diff --git a/.gitignore b/.gitignore index 474763e..78cc14e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ node_modules -*storybook.log \ No newline at end of file +*storybook.log + +.vscode \ No newline at end of file diff --git a/.storybook/preview.ts b/.storybook/preview.ts index e334e6b..3bf6ee8 100644 --- a/.storybook/preview.ts +++ b/.storybook/preview.ts @@ -9,7 +9,7 @@ const preview: Preview = { }, }, options: { storySort: { - order: ['nbody', 'Installation', 'Quick Start', 'Integration', 'Contribute', 'Define', ['Intro', 'Force', 'Simulate Function', 'Transformation'], 'Visualize', ['Intro', 'Dimension', 'Multiverse', 'Record', 'Controller', 'Trails', 'Debug Info'], 'Showcase', ['Intro', 'Analemma', ['Intro', 'Sun-Earth'],'HorseshoeOrbit', ['Intro', '54509 YORP'], 'SolarSystem']], + order: ['nbody', 'Installation', 'Quick Start', 'Integration', 'Contribute', 'Define', ['Intro', 'Force', 'Simulate Function', 'Transformation'], 'Visualize', ['Intro', 'Dimension', 'Multiverse', 'Record', 'Controller', 'Trails', 'Debug Info'], 'Showcase', ['Intro', 'Analemma', ['Intro', 'Sun-Earth', 'Sun-Mars'],'HorseshoeOrbit', ['Intro', '54509 YORP'], 'SolarSystem']], }, } }, diff --git a/.storybook/stories/Showcase/Analemma/Analemma.stories.tsx b/.storybook/stories/Showcase/Analemma/Analemma.stories.tsx index 3a15c06..8f2e2cd 100644 --- a/.storybook/stories/Showcase/Analemma/Analemma.stories.tsx +++ b/.storybook/stories/Showcase/Analemma/Analemma.stories.tsx @@ -1,35 +1,44 @@ import type { Meta, StoryObj } from "@storybook/react"; -import { Simulation } from "../../Simulation"; -import { fig8 } from "../../Universe"; -import { sunEarth } from "./Analemma"; +// import { fig8 } from "../../Universe"; +import { Analemma, sunMars, sunEarth } from "./Analemma"; const meta = { title: "Showcase/Analemma", - component: Simulation, + component: Analemma, parameters: { layout: "centered", - controls: { - disable: true, - }, }, tags: [], - argTypes: {}, + argTypes: { + name: { + table: { + disable: true, + }, + }, + obj: { + table: { + disable: true, + }, + }, + }, args: {}, -} satisfies Meta; +} satisfies Meta; export default meta; type Story = StoryObj; export const SunEarthAnalemma: Story = { args: { - storyName: "SunEarthAnalemma", - universe: [sunEarth], - controller: 'ui', - showTrails: true, - speed: 5000000, - visType: '3D', - width: 800, - maxTrailLength: 300, - showDebugInfo: true, + name: "SunEarthAnalemma", + obj: sunEarth, + axialTilt: sunEarth.actualAxialTilt, + }, +}; + +export const SunMarsAnalemma: Story = { + args: { + name: "SunMarsAnalemma", + obj: sunMars, + axialTilt: sunMars.actualAxialTilt, }, }; diff --git a/.storybook/stories/Showcase/Analemma/Analemma.ts b/.storybook/stories/Showcase/Analemma/Analemma.ts deleted file mode 100644 index 056dfc7..0000000 --- a/.storybook/stories/Showcase/Analemma/Analemma.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { BodyCenterTransformation, CelestialBody, CoMTransformation, RotateTransformation, RungeKutta4Sim, State, TimedRotateTransformation, Universe, Vector3 } from "../../../../src"; - -const SUN = new CelestialBody( - "Sun", - 1.989e30, - new Vector3(0, 0, 0), - new Vector3(0, 0, 0), - new Vector3(0, 0, 0) - ); - -const EARTH = new CelestialBody( - "Earth", - 5.972e24, - new Vector3(152.1e9, 0, 0), - new Vector3(0, 0, -29290), - new Vector3(0, 0, 0) - ); - - -const axialTilt = new RotateTransformation( - new Vector3(0, 0, 1), - -(23.4 / 180) * Math.PI - ); -const alignTilt = new RotateTransformation(new Vector3(0, 1, 0), -(Math.PI / 2)); -const bodyTranslate = new BodyCenterTransformation(1); - -export const sunEarth: Universe = new Universe({ - label: "Sun-Earth System", - currState: alignTilt.transform( - axialTilt.transform(bodyTranslate.transform(new State([SUN.clone(), EARTH.clone()]))) - ), - color: ["#FDB813", "#287AB8"], - simFunc: new RungeKutta4Sim(), - transformations: [ - bodyTranslate, - new TimedRotateTransformation(new Vector3(0, 1, 0), 365.25 * 24 * 60 * 60), - ], - }); \ No newline at end of file diff --git a/.storybook/stories/Showcase/Analemma/Analemma.tsx b/.storybook/stories/Showcase/Analemma/Analemma.tsx new file mode 100644 index 0000000..b1414fa --- /dev/null +++ b/.storybook/stories/Showcase/Analemma/Analemma.tsx @@ -0,0 +1,170 @@ +import React from "react"; +import { + BodyCenterTransformation, + CelestialBody, + Simulation as NbodySimulation, + RotateTransformation, + RungeKutta4Sim, + State, + TimedRotateTransformation, + Universe, + Vector3, +} from "../../../../src"; + +const SUN = new CelestialBody( + "Sun", + 1.989e30, + 696340e3, + new Vector3(0, 0, 0), + new Vector3(0, 0, 0), + new Vector3(0, 0, 0) +); + +const EARTH = new CelestialBody( + "Earth", + 5.97219e24, + 6371e3, + // new Vector3(-2.48109932596539e10, 1.449948612736719e11, -8.215203670851886e6), + // new Vector3(-2.984146365518679e4, -5.126262286859617e3, 1.184224839788195), + // new Vector3(0, 0, 0) + // ); + new Vector3(152.1e9, 0, 0), + new Vector3(0, 0, -29290), + new Vector3(0, 0, 0) +); + +const MARS = new CelestialBody( + "Mars", + 6.41e23, + 3389.5e3, + // new Vector3( + // -4.388577457378983e10, + // -2.170849264747524e11, + // -3.473007284583151e9 + // ), + // new Vector3(2.466191455128526e4, -2.72216016197737e3, -6.619819103693254e2), + // new Vector3(0, 0, 0) + // ); + new Vector3(249.2e9, 0, 0), + new Vector3(0, 0, -22000), + new Vector3(0, 0, 0) +); + +const alignTilt = new RotateTransformation( + new Vector3(0, 1, 0), + -(Math.PI / 2) +); +const bodyTranslate = new BodyCenterTransformation(1); + +interface AnalemmaSetup { + actualAxialTilt: number; + sim?: NbodySimulation; + helper: ( + divId: string, + axialTilt: number, + node: HTMLDivElement | null + ) => void; +} + +export const sunEarth: AnalemmaSetup = { + actualAxialTilt: 23.4, + helper(divId, axialTilt, node) { + if (node === null) { + this.sim?.stop(); + this.sim = null; + return; + } + const newUniverse = new Universe({ + label: "Sun-Earth System", + currState: alignTilt.transform( + bodyTranslate.transform(new State([SUN.clone(), EARTH.clone()])) + ), + color: ["#FDB813", "#287AB8"], + simFunc: new RungeKutta4Sim(), + transformations: [ + bodyTranslate, + new TimedRotateTransformation( + new Vector3(0, 1, 0), + 366.24 * 86164.0905 + ), + ], + }); + newUniverse.currState = new RotateTransformation( + new Vector3(1, 0, 0), + (axialTilt / 180) * Math.PI + ).transform(newUniverse.currState); + this.sim = new NbodySimulation([newUniverse], { + visType: "3D", + controller: "ui", + showTrails: true, + showDebugInfo: true, + maxTrailLength: 750, + }); + this.sim.start(divId, 800, 800, 5000000); + }, +}; + +export const sunMars: AnalemmaSetup = { + actualAxialTilt: 24.9, + helper(divId, axialTilt, node) { + if (node === null) { + this.sim?.stop(); + this.sim = null; + return; + } + const newUniverse = new Universe({ + label: "Sun-Mars System", + currState: alignTilt.transform( + bodyTranslate.transform(new State([SUN.clone(), MARS.clone()])) + ), + color: ["#FDB813", "#c1440e"], + simFunc: new RungeKutta4Sim(), + transformations: [ + bodyTranslate, + new TimedRotateTransformation( + new Vector3(0, 1, 0), + 668.5991 * 88775.244 + ), + ], + }); + newUniverse.currState = new RotateTransformation( + new Vector3(1, 0, 0), + (axialTilt / 180) * Math.PI + ).transform(newUniverse.currState); + this.sim = new NbodySimulation([newUniverse], { + visType: "3D", + controller: "ui", + showTrails: true, + showDebugInfo: true, + maxTrailLength: 1350, + }); + this.sim.start(divId, 800, 800, 5000000); + }, +}; + +export const Analemma = ({ + obj, + name, + axialTilt, + ...props +}: { + obj: AnalemmaSetup; + name: string; + axialTilt: number; +}) => { + const divId = "demo-" + name + "-" + axialTilt; + + return ( +
+
obj.helper(divId, axialTilt, node)} + >
+
+ ); +}; diff --git a/.storybook/stories/Showcase/Analemma/Analemma.mdx b/.storybook/stories/Showcase/Analemma/Intro.mdx similarity index 100% rename from .storybook/stories/Showcase/Analemma/Analemma.mdx rename to .storybook/stories/Showcase/Analemma/Intro.mdx diff --git a/.storybook/stories/Showcase/Analemma/Sun-Earth.mdx b/.storybook/stories/Showcase/Analemma/Sun-Earth.mdx index 3b429a9..a34b5bb 100644 --- a/.storybook/stories/Showcase/Analemma/Sun-Earth.mdx +++ b/.storybook/stories/Showcase/Analemma/Sun-Earth.mdx @@ -1,9 +1,10 @@ -import { Meta, Story } from '@storybook/blocks'; +import { Meta, Story, Controls } from '@storybook/blocks'; import * as Stories from "./Analemma.stories"; - + # Sun-Earth Analemma - \ No newline at end of file + + \ No newline at end of file diff --git a/.storybook/stories/Showcase/Analemma/Sun-Mars.mdx b/.storybook/stories/Showcase/Analemma/Sun-Mars.mdx new file mode 100644 index 0000000..b46c158 --- /dev/null +++ b/.storybook/stories/Showcase/Analemma/Sun-Mars.mdx @@ -0,0 +1,10 @@ +import { Meta, Story, Controls } from '@storybook/blocks'; + +import * as Stories from "./Analemma.stories"; + + + +# Sun-Mars Analemma + + + \ No newline at end of file diff --git a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx b/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx index d1ded76..23cb8d7 100644 --- a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx +++ b/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx @@ -24,10 +24,15 @@ export const YORP: Story = { storyName: "Horseshoe Orbit YORP", universe: [horseshoe.yorp], showDebugInfo: true, - controller: 'ui', - visType: '3D', + controller: "ui", + visType: "3D", width: 800, - speed: 10000000, + playSpeed: 2, showTrails: true, + record: true, + looped: true, + recordFor: 332, + recordSpeed: 20000000, + maxTrailLength: 2000, }, }; diff --git a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.ts b/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.ts index 1903168..1c24c62 100644 --- a/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.ts +++ b/.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.ts @@ -1,9 +1,10 @@ -import { BodyCenterTransformation, CelestialBody, CoMTransformation, PinTransformation, RotateTransformation, RungeKutta4Sim, State, TimedRotateTransformation, Universe, Vector3 } from "../../../../src"; +import { CelestialBody, CoMTransformation, PinTransformation, RotateTransformation, RungeKutta4Sim, State, Universe, Vector3 } from "../../../../src"; const yorpState = new State([ new CelestialBody( "Sun", 1988500e24, + 696340e3, new Vector3(0, 0, 0), new Vector3(0, 0, 0), new Vector3(0, 0, 0) @@ -11,6 +12,7 @@ const yorpState = new State([ new CelestialBody( "Earth", 5.97219e24, + 6371e3, new Vector3( -2.48109932596539e10, 1.449948612736719e11, @@ -26,6 +28,7 @@ const yorpState = new State([ new CelestialBody( "YORP", 1, + 1, new Vector3( 1.789598196203594e11, 4.67757011067789e10, diff --git a/.storybook/stories/Simulation.tsx b/.storybook/stories/Simulation.tsx index c5ee722..93bd2a6 100644 --- a/.storybook/stories/Simulation.tsx +++ b/.storybook/stories/Simulation.tsx @@ -1,5 +1,10 @@ -import React, { useEffect } from 'react'; -import { ControllerType, Simulation as NbodySimulation, Universe, VisType } from "../../src/index"; +import React, { useEffect } from "react"; +import { + ControllerType, + Simulation as NbodySimulation, + Universe, + VisType, +} from "../../src/index"; interface SimulationProps { storyName: string; @@ -14,49 +19,66 @@ interface SimulationProps { maxTrailLength?: number; width?: number; callback?: (simulation: NbodySimulation) => () => void; - speed?: number, - paused?: boolean , - recordFor?: number, + playSpeed?: number; + startPaused?: boolean; + recordFor?: number; + recordSpeed?: number; } /** * Primary UI component for user interaction */ export const Simulation = ({ - storyName = 'default', + storyName = "default", universe = [], - visType = '2D', + visType = "2D", record = false, looped = true, - controller = 'none', + controller = "none", showTrails = false, showDebugInfo = false, maxFrameRate = -1, maxTrailLength = 100, width = 400, - callback = (sim) => () => { }, - speed = 1, - paused = false, - recordFor = 5, + callback = (sim) => () => {}, + playSpeed = 1, + startPaused = false, + recordFor = 1, + recordSpeed = 1, ...props }: SimulationProps) => { const divId = "demo-" + storyName; - const [simulation, setSimulation] = React.useState(null); + const [simulation, setSimulation] = React.useState( + null + ); if (simulation === null) { - setSimulation(new NbodySimulation(universe.map(u => u.clone()), { - visType, - record, - looped, - controller, - showTrails, - showDebugInfo, - maxFrameRate, - maxTrailLength, - })); + setSimulation( + new NbodySimulation( + universe.map((u) => u.clone()), + { + visType, + record, + looped, + controller, + showTrails, + showDebugInfo, + maxFrameRate, + maxTrailLength, + } + ) + ); } useEffect(() => { - simulation?.start(divId, width, width, speed, paused, recordFor); + simulation?.start( + divId, + width, + width, + playSpeed, + startPaused, + recordFor, + recordSpeed + ); let callbackClear = () => {}; if (simulation) { callbackClear = callback(simulation); @@ -69,7 +91,7 @@ export const Simulation = ({ return (
-
+ style={{ width: width, height: width, position: "relative" }} + > ); -}; \ No newline at end of file +}; diff --git a/.storybook/stories/Universe.ts b/.storybook/stories/Universe.ts index 03fc6aa..0a9e2a7 100644 --- a/.storybook/stories/Universe.ts +++ b/.storybook/stories/Universe.ts @@ -17,6 +17,7 @@ export const fig8 = new Universe({ new CelestialBody( "Body 1", 1, + 1, new Vector3(-0.97000436, 0.24308753, 0), new Vector3(0.466203685, 0.43236573, 0), new Vector3(0, 0, 0) @@ -24,6 +25,7 @@ export const fig8 = new Universe({ new CelestialBody( "Body 2", 1, + 1, new Vector3(0.97000436, -0.24308753, 0), new Vector3(0.466203685, 0.43236573, 0), new Vector3(0, 0, 0) @@ -31,6 +33,7 @@ export const fig8 = new Universe({ new CelestialBody( "Body 3", 1, + 1, new Vector3(0, 0, 0), new Vector3(-2 * 0.466203685, -2 * 0.43236573, 0), new Vector3(0, 0, 0) @@ -47,6 +50,7 @@ export const multiFig8 = [ new CelestialBody( "Body 1", 1, + 1, new Vector3(-0.97000436, 0.24308753, 0), new Vector3(0.466203685, 0.43236573, 0), new Vector3(0, 0, 0) @@ -54,6 +58,7 @@ export const multiFig8 = [ new CelestialBody( "Body 2", 1, + 1, new Vector3(0.97000436, -0.24308753, 0), new Vector3(0.466203685, 0.43236573, 0), new Vector3(0, 0, 0) @@ -61,6 +66,7 @@ export const multiFig8 = [ new CelestialBody( "Body 3", 1, + 1, new Vector3(0, 0, 0), new Vector3(-2 * 0.466203685, -2 * 0.43236573, 0), new Vector3(0, 0, 0) diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 6fde596..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "eslint.workingDirectories": ["src", ".storybook"], - "[typescript]": { - "editor.defaultFormatter": "dbaeumer.vscode-eslint" - }, - "[typescriptreact]": { - "editor.defaultFormatter": "dbaeumer.vscode-eslint" - }, - "eslint.format.enable": true, - "editor.codeActionsOnSave": { - "source.organizeImports": "always", - "source.fixAll": "always" - }, - "files.eol": "\r\n" -} diff --git a/dist/src/CelestialBody.js b/dist/src/CelestialBody.js index bda3bb5..1352e7b 100644 --- a/dist/src/CelestialBody.js +++ b/dist/src/CelestialBody.js @@ -7,13 +7,15 @@ export class CelestialBody { * Create a new CelestialBody with the provided information. * @param label label of the body. * @param mass mass of the body. + * @param radius radius of the body. * @param position position of the body. * @param velocity velocity of the body. * @param acceleration acceleration of the body. */ - constructor(label, mass, position, velocity, acceleration) { + constructor(label, mass, radius, position, velocity, acceleration) { this.label = label; this.mass = mass; + this.radius = radius; this.position = position; this.velocity = velocity; this.acceleration = acceleration; @@ -26,6 +28,6 @@ export class CelestialBody { * @returns a new CelestialBody instance with the updated properties. */ clone(position, velocity, acceleration) { - return new CelestialBody(this.label, this.mass, position === undefined ? this.position.clone() : position, velocity === undefined ? this.velocity.clone() : velocity, acceleration === undefined ? this.acceleration.clone() : acceleration); + return new CelestialBody(this.label, this.mass, this.radius, position === undefined ? this.position.clone() : position, velocity === undefined ? this.velocity.clone() : velocity, acceleration === undefined ? this.acceleration.clone() : acceleration); } } diff --git a/dist/src/Simulation.js b/dist/src/Simulation.js index c569915..e55637e 100644 --- a/dist/src/Simulation.js +++ b/dist/src/Simulation.js @@ -23,7 +23,7 @@ export class Simulation { */ this.controls = { speed: 1, - paused: true, + paused: false, showTrails: false, showUniverse: {}, }; @@ -166,17 +166,20 @@ export class Simulation { /** * Insert the simulation visualization in the div with the given id. * @param divId div id. - * @param speed initial time scale. - * @param paused whether to start the simulation paused. + * @param width width of the visualization. + * @param height height of the visualization. + * @param playSpeed initial time scale. + * @param startPaused whether to start the simulation paused. * @param recordFor number of seconds to record for, only used if in record mode. + * @param recordSpeed speed of the recording, only used if in record mode. */ - start(divId, width, height, speed = 1, paused = false, recordFor = 0) { + start(divId, width, height, playSpeed = 1, startPaused = false, recordFor = 1, recordSpeed = 1) { if (recordFor === undefined) { throw new Error('recordFor must be defined if record is true'); } - this.controls.paused = paused; - this.controls.speed = speed; - this.visualizer.start(divId, width, height, recordFor); + this.controls.paused = startPaused; + this.controls.speed = playSpeed; + this.visualizer.start(divId, width, height, recordFor, recordSpeed); } /** * Stop and clear the simulation. diff --git a/dist/src/library/Visualizer.js b/dist/src/library/Visualizer.js index a8aea83..5527bec 100644 --- a/dist/src/library/Visualizer.js +++ b/dist/src/library/Visualizer.js @@ -1,22 +1,22 @@ /* eslint-disable import/extensions */ import GUI from 'lil-gui'; import Plotly from 'plotly.js-dist'; +import Stats from 'stats.js'; import * as THREE from 'three'; import { OrbitControls, ViewHelper } from 'three/examples/jsm/Addons.js'; -import Stats from 'three/examples/jsm/libs/stats.module.js'; /** - * Clips a number to a minimum and maximum value. - * @param x number to clip. - * @param min minimum value. - * @param max maximum value. - * @returns clipped value. + * Extrapolates a value from a range to another range. + * @param val value to extrapolate. + * @param minR minimum value of the input range. + * @param maxR maximum value of the input range. + * @param low minimum value of the output range. + * @param high maximum value of the output range. + * @returns extrapolated value. */ -function clipMinMax(x, min, max) { - if (x < min) - return min; - if (x > max) - return max; - return x; +function extrapolateRadius(val, minR, maxR, low, high) { + if (minR === maxR) + return (low + high) / 2; + return low + ((val - minR) / (maxR - minR)) * (high - low); } /** * Container object for body trails in a 2D universe based in Plotly. @@ -117,6 +117,14 @@ export class RealTimeVisualizer { config.showUniverse[u.label] = value; }); }); + this.gui = gui; + } + /** + * Remove the controls from the visualization. + */ + removeControls() { + var _a; + (_a = this.gui) === null || _a === void 0 ? void 0 : _a.destroy(); } /** * Simulate and play the visualization. @@ -138,11 +146,17 @@ export class RealTimeVisualizer { // const height = element.clientHeight; let maxWidth = 0; let maxHeight = 0; + let maxRadius = 0; + let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { maxWidth = Math.max(maxWidth, Math.abs(b.position.x)); maxHeight = Math.max(maxHeight, Math.abs(b.position.y)); + minRadius = Math.min(minRadius, b.radius); + maxRadius = Math.max(maxRadius, b.radius); })); const scale = 0.5 * Math.min(height / maxHeight, width / maxWidth); + const minShowRadius = 0.01 * Math.min(height, width); + const maxShowRadius = 0.05 * Math.min(height, width); const layout = { paper_bgcolor: '#000000', plot_bgcolor: '#000000', @@ -165,13 +179,12 @@ export class RealTimeVisualizer { if (this.simulation.controller === 'ui') { this.addControls(element); } - let stats; if (this.simulation.showDebugInfo) { - stats = new Stats(); - stats.dom.style.position = 'absolute'; - stats.dom.style.bottom = '0px'; - stats.dom.style.removeProperty('top'); - element.appendChild(stats.dom); + this.stats = new Stats(); + this.stats.dom.style.position = 'absolute'; + this.stats.dom.style.bottom = '0px'; + this.stats.dom.style.removeProperty('top'); + element.appendChild(this.stats.dom); } const init_data = this.simulation.universes.flatMap((uni) => { const currTrail = new PlotlyUniverseTrail(this.simulation.getMaxTrailLength(), typeof uni.color === 'string' ? uni.color : uni.color[0]); @@ -183,8 +196,8 @@ export class RealTimeVisualizer { mode: 'markers', marker: { color: uni.color, - sizemin: 6, - size: uni.currState.bodies.map((body) => Math.min(10, body.mass)), + sizemin: minShowRadius, + size: uni.currState.bodies.map((body) => extrapolateRadius(body.radius, minRadius, maxRadius, minShowRadius, maxShowRadius)), }, }; if (this.simulation.getShowTrails()) { @@ -255,9 +268,9 @@ export class RealTimeVisualizer { y: uni.currState.bodies.map((body) => body.position.y), hovertext: uni.currState.bodies.map((body) => body.label), marker: { - size: uni.currState.bodies.map((body) => Math.min(10, body.mass)), color: uni.color, - sizemin: 6, + sizemin: minShowRadius, + size: uni.currState.bodies.map((body) => extrapolateRadius(body.radius, minRadius, maxRadius, minShowRadius, maxShowRadius)), }, mode: 'markers', }; @@ -272,8 +285,8 @@ export class RealTimeVisualizer { return [currData, trailData]; }); Plotly.react(divId, new_data, layout); - if (this.simulation.showDebugInfo && stats) { - stats.update(); + if (this.simulation.showDebugInfo && this.stats) { + this.stats.update(); } this.animationId = requestAnimationFrame(paint); }; @@ -283,6 +296,7 @@ export class RealTimeVisualizer { * Stop the simulation and visualization. */ stop() { + var _a; if (this.animationId === null) { return; } @@ -292,6 +306,8 @@ export class RealTimeVisualizer { ut.popAllTrails(); }); this.universeTrails = []; + this.removeControls(); + (_a = this.stats) === null || _a === void 0 ? void 0 : _a.dom.remove(); try { Plotly.purge(this.divId); } @@ -405,6 +421,14 @@ export class RealTimeVisualizer3D { config.showUniverse[u.label] = value; }); }); + this.gui = gui; + } + /** + * Remove the controls from the visualization. + */ + removeControls() { + var _a; + (_a = this.gui) === null || _a === void 0 ? void 0 : _a.destroy(); } /** * Simulate and play the visualization @@ -422,15 +446,19 @@ export class RealTimeVisualizer3D { return; } element.style.position = 'relative'; - // const width = element.clientWidth; - // const height = element.clientHeight; - let maxWidth = 0; - let maxHeight = 0; + let maxLength = 0; + let maxRadius = 0; + let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { - maxWidth = Math.max(maxWidth, Math.abs(b.position.x)); - maxHeight = Math.max(maxHeight, Math.abs(b.position.y)); + for (let i = 0; i < 3; i++) { + maxLength = Math.max(maxLength, Math.abs(b.position.getComponent(i))); + } + minRadius = Math.min(minRadius, b.radius); + maxRadius = Math.max(maxRadius, b.radius); })); - const scale = 0.5 * Math.min(height / maxHeight, width / maxWidth); + const scale = 0.5 * Math.min(height, width) / maxLength; + const minShowRadius = 0.015 * Math.min(height, width); + const maxShowRadius = 0.04 * Math.min(height, width); this.scene = new THREE.Scene(); const camera = new THREE.OrthographicCamera(width / -2, width / 2, height / 2, height / -2, 0, 10000000000); camera.position.set(0, 0, Math.max(width, height)); @@ -438,13 +466,12 @@ export class RealTimeVisualizer3D { renderer.setSize(width, height); renderer.autoClear = false; element.appendChild(renderer.domElement); - let stats; if (this.simulation.showDebugInfo) { - stats = new Stats(); - stats.dom.style.position = 'absolute'; - stats.dom.style.right = '0px'; - stats.dom.style.removeProperty('left'); - element.appendChild(stats.dom); + this.stats = new Stats(); + this.stats.dom.style.position = 'absolute'; + this.stats.dom.style.right = '0px'; + this.stats.dom.style.removeProperty('left'); + element.appendChild(this.stats.dom); } if (this.simulation.controller === 'ui') { this.addControls(element); @@ -477,16 +504,24 @@ export class RealTimeVisualizer3D { this.simulation.universes.forEach((u) => { this.universeTrails.push(new ThreeUniverseTrail(this.simulation.maxTrailLength, typeof u.color === 'string' ? u.color : u.color[0], this.scene, scale)); u.currState.bodies.forEach((b, i) => { - const sph = new THREE.SphereGeometry(clipMinMax(Math.log2(b.mass) - 70, 10, 40), 8, 8); - const curr = new THREE.WireframeGeometry(sph); - const line = new THREE.LineSegments(curr, new THREE.LineBasicMaterial({ + const sph = new THREE.SphereGeometry(extrapolateRadius(b.radius, minRadius, maxRadius, minShowRadius, maxShowRadius), 12, 12); + const group = new THREE.Group(); + group.add(new THREE.LineSegments(new THREE.WireframeGeometry(sph), new THREE.LineBasicMaterial({ + color: new THREE.Color(typeof u.color === 'string' ? u.color : u.color[i]), + transparent: true, + opacity: 0.4, + }))); + group.add(new THREE.Mesh(sph, new THREE.MeshBasicMaterial({ color: new THREE.Color(typeof u.color === 'string' ? u.color : u.color[i]), - })); - this.scene.add(line); - line.position.copy(b.position.clone() + transparent: true, + opacity: 0.5, + side: THREE.FrontSide, + }))); + this.scene.add(group); + group.position.copy(b.position.clone() .multiplyScalar(scale)); // m.set(u.label + " " + b.label, line); - arr.push(line); + arr.push(group); }); }); // arr[0].add(earthLabel) @@ -529,8 +564,8 @@ export class RealTimeVisualizer3D { return; } lastPaint = timestampMs; - if (this.simulation.showDebugInfo && stats) { - stats.update(); + if (this.simulation.showDebugInfo && this.stats) { + this.stats.update(); } let ind = 0; this.simulation.universes.forEach((u, i) => { @@ -540,7 +575,7 @@ export class RealTimeVisualizer3D { arr[ind].position.copy(b.position.clone() .multiplyScalar(scale)); if (this.simulation.controls.showTrails) { - this.universeTrails[i].addTrail(arr[ind].position); + this.universeTrails[i].addTrail(arr[ind].position.clone()); } ind++; }); @@ -565,17 +600,15 @@ export class RealTimeVisualizer3D { this.clear = () => { renderer.clear(); renderer.dispose(); - arr.forEach((a) => { - if (Array.isArray(a.material)) { - a.material.forEach((m) => { - m.dispose(); - }); - } - else { - a.material.dispose(); - } - a.geometry.dispose(); + arr.forEach((g) => { + g.children.forEach((c) => { + // @ts-ignore + c.geometry.dispose(); + // @ts-ignore + c.material.dispose(); + }); }); + renderer.domElement.remove(); }; this.animationId = requestAnimationFrame(paint); } @@ -583,7 +616,7 @@ export class RealTimeVisualizer3D { * Stop the simulation and visualization. */ stop() { - var _a; + var _a, _b; if (this.animationId === null) { return; } @@ -599,6 +632,8 @@ export class RealTimeVisualizer3D { ut.popAllTrails(); }); this.universeTrails = []; + this.removeControls(); + (_b = this.stats) === null || _b === void 0 ? void 0 : _b.dom.remove(); } } /** @@ -649,15 +684,24 @@ export class RecordingVisualizer { config.showUniverse[u.label] = value; }); }); + this.gui = gui; + } + /** + * Remove the controls from the visualization. + */ + removeControls() { + var _a; + (_a = this.gui) === null || _a === void 0 ? void 0 : _a.destroy(); } /** * Simulate and play the visualization. * @param divId div id to render the visualization in. * @param width width of the visualization. * @param height height of the visualization. - * @param recordFor number of seconds to record for.. + * @param recordFor number of seconds to record for. + * @param recordSpeed speed to record the visualization at. */ - start(divId, width, height, recordFor) { + start(divId, width, height, recordFor, recordSpeed) { if (this.divId !== '') { console.error('Simulation already playing. Stop the current playtime before initiating a new one.'); return; @@ -667,15 +711,19 @@ export class RecordingVisualizer { if (element === null) { return; } - // const width = element.clientWidth; - // const height = element.clientHeight; let maxWidth = 0; let maxHeight = 0; + let maxRadius = 0; + let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { maxWidth = Math.max(maxWidth, Math.abs(b.position.x)); maxHeight = Math.max(maxHeight, Math.abs(b.position.y)); + minRadius = Math.min(minRadius, b.radius); + maxRadius = Math.max(maxRadius, b.radius); })); const scale = 0.5 * Math.min(height / maxHeight, width / maxWidth); + const minShowRadius = 0.01 * Math.min(height, width); + const maxShowRadius = 0.05 * Math.min(height, width); const recordedFrames = []; const totalFrames = this.simulation.maxFrameRate * recordFor; let playInd = 1; @@ -683,7 +731,7 @@ export class RecordingVisualizer { recordedFrames.push([u.currState.clone()]); }); for (let i = 0; i < totalFrames; i++) { - this.simulation.simulateStep(1 / this.simulation.maxFrameRate); + this.simulation.simulateStep(recordSpeed / this.simulation.maxFrameRate); this.simulation.universes.forEach((u, j) => { recordedFrames[j].push(u.currState.clone()); }); @@ -710,13 +758,12 @@ export class RecordingVisualizer { if (this.simulation.controller === 'ui') { this.addControls(element); } - let stats; if (this.simulation.showDebugInfo) { - stats = new Stats(); - stats.dom.style.position = 'absolute'; - stats.dom.style.bottom = '0px'; - stats.dom.style.removeProperty('top'); - element.appendChild(stats.dom); + this.stats = new Stats(); + this.stats.dom.style.position = 'absolute'; + this.stats.dom.style.bottom = '0px'; + this.stats.dom.style.removeProperty('top'); + element.appendChild(this.stats.dom); } const init_data = this.simulation.universes.flatMap((uni) => { const currTrail = new PlotlyUniverseTrail(this.simulation.getMaxTrailLength(), typeof uni.color === 'string' ? uni.color : uni.color[0]); @@ -728,8 +775,8 @@ export class RecordingVisualizer { mode: 'markers', marker: { color: uni.color, - sizemin: 6, - size: uni.currState.bodies.map((body) => Math.min(10, body.mass)), + sizemin: minShowRadius, + size: uni.currState.bodies.map((body) => extrapolateRadius(body.radius, minRadius, maxRadius, minShowRadius, maxShowRadius)), }, }; if (this.simulation.getShowTrails()) { @@ -783,9 +830,9 @@ export class RecordingVisualizer { y: currState.bodies.map((body) => body.position.y), hovertext: currState.bodies.map((body) => body.label), marker: { - size: currState.bodies.map((body) => Math.min(10, body.mass)), color: uni.color, - sizemin: 6, + sizemin: minShowRadius, + size: uni.currState.bodies.map((body) => extrapolateRadius(body.radius, minRadius, maxRadius, minShowRadius, maxShowRadius)), }, mode: 'markers', }; @@ -800,8 +847,8 @@ export class RecordingVisualizer { return [currData, trailData]; }); Plotly.react(divId, new_data, layout); - if (this.simulation.showDebugInfo && stats) { - stats.update(); + if (this.simulation.showDebugInfo && this.stats) { + this.stats.update(); } playInd = Math.round(playInd + this.simulation.controls.speed); if (playInd < 0) { @@ -828,6 +875,7 @@ export class RecordingVisualizer { * Stop the simulation and visualization. */ stop() { + var _a; if (this.animationId === null) { return; } @@ -839,6 +887,8 @@ export class RecordingVisualizer { } catch (_) { } + this.removeControls(); + (_a = this.stats) === null || _a === void 0 ? void 0 : _a.dom.remove(); } } /** @@ -894,6 +944,14 @@ export class RecordingVisualizer3D { config.showUniverse[u.label] = value; }); }); + this.gui = gui; + } + /** + * Remove the controls from the visualization. + */ + removeControls() { + var _a; + (_a = this.gui) === null || _a === void 0 ? void 0 : _a.destroy(); } /** * Simulate and play the visualization @@ -901,8 +959,9 @@ export class RecordingVisualizer3D { * @param width width of the visualization. * @param height height of the visualization. * @param recordFor number of seconds to record for. + * @param recordSpeed speed to record the simulation at. */ - start(divId, width, height, recordFor) { + start(divId, width, height, recordFor, recordSpeed) { if (this.scene !== undefined) { console.error('Simulation already playing. Stop the current playtime before initiating a new one.'); return; @@ -911,15 +970,19 @@ export class RecordingVisualizer3D { if (element === null) { return; } - // const width = element.clientWidth; - // const height = element.clientHeight; - let maxWidth = 0; - let maxHeight = 0; + let maxLength = 0; + let maxRadius = 0; + let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { - maxWidth = Math.max(maxWidth, Math.abs(b.position.x)); - maxHeight = Math.max(maxHeight, Math.abs(b.position.y)); + for (let i = 0; i < 3; i++) { + maxLength = Math.max(maxLength, Math.abs(b.position.getComponent(i))); + } + minRadius = Math.min(minRadius, b.radius); + maxRadius = Math.max(maxRadius, b.radius); })); - const scale = 0.5 * Math.min(height / maxHeight, width / maxWidth); + const scale = 0.5 * Math.min(height, width) / maxLength; + const minShowRadius = 0.015 * Math.min(height, width); + const maxShowRadius = 0.04 * Math.min(height, width); this.scene = new THREE.Scene(); const camera = new THREE.OrthographicCamera(width / -2, width / 2, height / 2, height / -2, 0, 10000000000); camera.position.set(0, 0, Math.max(width, height)); @@ -927,17 +990,6 @@ export class RecordingVisualizer3D { renderer.setSize(width, height); renderer.autoClear = false; element.appendChild(renderer.domElement); - let stats; - if (this.simulation.showDebugInfo) { - stats = new Stats(); - stats.dom.style.position = 'absolute'; - stats.dom.style.right = '0px'; - stats.dom.style.removeProperty('left'); - element.appendChild(stats.dom); - } - if (this.simulation.controller === 'ui') { - this.addControls(element); - } // const earthDiv = document.createElement('div'); // earthDiv.className = 'label'; // earthDiv.textContent = 'Earthhgkjfdghkjfgh'; @@ -966,19 +1018,34 @@ export class RecordingVisualizer3D { this.simulation.universes.forEach((u) => { this.universeTrails.push(new ThreeUniverseTrail(this.simulation.maxTrailLength, typeof u.color === 'string' ? u.color : u.color[0], this.scene, scale)); u.currState.bodies.forEach((b, i) => { - const sph = new THREE.SphereGeometry(clipMinMax(Math.log2(b.mass) - 70, 10, 40), 8, 8); - const curr = new THREE.WireframeGeometry(sph); - const line = new THREE.LineSegments(curr, new THREE.LineBasicMaterial({ + const sph = new THREE.SphereGeometry(extrapolateRadius(b.radius, minRadius, maxRadius, minShowRadius, maxShowRadius), 12, 12); + const group = new THREE.Group(); + group.add(new THREE.LineSegments(new THREE.WireframeGeometry(sph), new THREE.LineBasicMaterial({ + color: new THREE.Color(typeof u.color === 'string' ? u.color : u.color[i]), + transparent: true, + opacity: 0.4, + }))); + group.add(new THREE.Mesh(sph, new THREE.MeshBasicMaterial({ color: new THREE.Color(typeof u.color === 'string' ? u.color : u.color[i]), - })); - this.scene.add(line); - line.position.copy(b.position.clone() + transparent: true, + opacity: 0.5, + side: THREE.FrontSide, + }))); + this.scene.add(group); + group.position.copy(b.position.clone() .multiplyScalar(scale)); // m.set(u.label + " " + b.label, line); - arr.push(line); + arr.push(group); }); }); // arr[0].add(earthLabel) + if (this.simulation.showDebugInfo) { + this.stats = new Stats(); + this.stats.dom.style.position = 'absolute'; + this.stats.dom.style.right = '0px'; + this.stats.dom.style.removeProperty('left'); + element.appendChild(this.stats.dom); + } const recordedFrames = []; const totalFrames = this.simulation.maxFrameRate * recordFor; let playInd = 1; @@ -986,11 +1053,14 @@ export class RecordingVisualizer3D { recordedFrames.push([u.currState.clone()]); }); for (let i = 0; i < totalFrames; i++) { - this.simulation.simulateStep(1 / this.simulation.maxFrameRate); + this.simulation.simulateStep(recordSpeed / this.simulation.maxFrameRate); this.simulation.universes.forEach((u, j) => { recordedFrames[j].push(u.currState.clone()); }); } + if (this.simulation.controller === 'ui') { + this.addControls(element); + } /** * Paint the visualization * @param timestampMs current timestamp in milliseconds, provided by requestAnimationFrame @@ -1015,7 +1085,7 @@ export class RecordingVisualizer3D { arr[ind].position.copy(b.position.clone() .multiplyScalar(scale)); if (this.simulation.controls.showTrails) { - this.universeTrails[i].addTrail(arr[ind].position); + this.universeTrails[i].addTrail(arr[ind].position.clone()); } ind++; }); @@ -1027,8 +1097,8 @@ export class RecordingVisualizer3D { }); } }); - if (this.simulation.showDebugInfo && stats) { - stats.update(); + if (this.simulation.showDebugInfo && this.stats) { + this.stats.update(); } playInd = Math.round(playInd + this.simulation.controls.speed); if (playInd < 0) { @@ -1060,16 +1130,13 @@ export class RecordingVisualizer3D { this.clear = () => { renderer.clear(); renderer.dispose(); - arr.forEach((a) => { - if (Array.isArray(a.material)) { - a.material.forEach((m) => { - m.dispose(); - }); - } - else { - a.material.dispose(); - } - a.geometry.dispose(); + arr.forEach((g) => { + g.children.forEach((c) => { + // @ts-ignore + c.geometry.dispose(); + // @ts-ignore + c.material.dispose(); + }); }); }; this.animationId = requestAnimationFrame(paint); @@ -1078,7 +1145,7 @@ export class RecordingVisualizer3D { * Stop the simulation and visualization. */ stop() { - var _a; + var _a, _b; if (this.animationId === null) { return; } @@ -1094,5 +1161,7 @@ export class RecordingVisualizer3D { ut.popAllTrails(); }); this.universeTrails = []; + this.removeControls(); + (_b = this.stats) === null || _b === void 0 ? void 0 : _b.dom.remove(); } } diff --git a/dist/types/src/CelestialBody.d.ts b/dist/types/src/CelestialBody.d.ts index 4fd3cb6..35f69fb 100644 --- a/dist/types/src/CelestialBody.d.ts +++ b/dist/types/src/CelestialBody.d.ts @@ -12,6 +12,10 @@ export declare class CelestialBody { * Mean mass of the body. */ readonly mass: number; + /** + * Mean mass of the body. + */ + readonly radius: number; /** * Position vector of the body. */ @@ -28,11 +32,12 @@ export declare class CelestialBody { * Create a new CelestialBody with the provided information. * @param label label of the body. * @param mass mass of the body. + * @param radius radius of the body. * @param position position of the body. * @param velocity velocity of the body. * @param acceleration acceleration of the body. */ - constructor(label: string, mass: number, position: Vector3, velocity: Vector3, acceleration: Vector3); + constructor(label: string, mass: number, radius: number, position: Vector3, velocity: Vector3, acceleration: Vector3); /** * Deep copy the current CelestialBody with the updated kinematic properties. * @param position new position. diff --git a/dist/types/src/Simulation.d.ts b/dist/types/src/Simulation.d.ts index 50558f4..7a02a5e 100644 --- a/dist/types/src/Simulation.d.ts +++ b/dist/types/src/Simulation.d.ts @@ -163,11 +163,14 @@ export declare class Simulation { /** * Insert the simulation visualization in the div with the given id. * @param divId div id. - * @param speed initial time scale. - * @param paused whether to start the simulation paused. + * @param width width of the visualization. + * @param height height of the visualization. + * @param playSpeed initial time scale. + * @param startPaused whether to start the simulation paused. * @param recordFor number of seconds to record for, only used if in record mode. + * @param recordSpeed speed of the recording, only used if in record mode. */ - start(divId: string, width: number, height: number, speed?: number, paused?: boolean, recordFor?: number): void; + start(divId: string, width: number, height: number, playSpeed?: number, startPaused?: boolean, recordFor?: number, recordSpeed?: number): void; /** * Stop and clear the simulation. */ diff --git a/dist/types/src/Visualizer.d.ts b/dist/types/src/Visualizer.d.ts index b71ec57..6c5d94d 100644 --- a/dist/types/src/Visualizer.d.ts +++ b/dist/types/src/Visualizer.d.ts @@ -10,8 +10,9 @@ export interface Visualizer { * @param width width of the visualizer. * @param height height of the visualizer. * @param recordFor time to record the visualization for. + * @param recordSpeed speed to record the visualization at. */ - start(divId: string, width: number, height: number, recordFor: number): void; + start(divId: string, width: number, height: number, recordFor: number, recordSpeed: number): void; /** * Stop and clear the visualization. */ diff --git a/dist/types/src/library/Visualizer.d.ts b/dist/types/src/library/Visualizer.d.ts index 68b6647..1c1cee7 100644 --- a/dist/types/src/library/Visualizer.d.ts +++ b/dist/types/src/library/Visualizer.d.ts @@ -1,3 +1,5 @@ +import GUI from 'lil-gui'; +import Stats from 'stats.js'; import * as THREE from 'three'; import { type Simulation } from '../Simulation'; import { type Visualizer } from '../Visualizer'; @@ -43,6 +45,8 @@ export declare class RealTimeVisualizer implements Visualizer { simulation: Simulation; divId: string; universeTrails: PlotlyUniverseTrail[]; + gui?: GUI; + stats?: Stats; /** * Constructor for RealTimeVisualizer * @param simulation simulation object @@ -53,6 +57,10 @@ export declare class RealTimeVisualizer implements Visualizer { * @param parentElement parent element to place the controller div in. */ private addControls; + /** + * Remove the controls from the visualization. + */ + private removeControls; /** * Simulate and play the visualization. * @param divId div id to render the visualization in. @@ -107,6 +115,8 @@ export declare class RealTimeVisualizer3D implements Visualizer { simulation: Simulation; scene?: THREE.Scene; universeTrails: ThreeUniverseTrail[]; + gui?: GUI; + stats?: Stats; /** * Constructor for RealTimeVisualizer3D. * @param simulation simulation object. @@ -117,6 +127,10 @@ export declare class RealTimeVisualizer3D implements Visualizer { * @param parentElement parent element to place the controller div in. */ private addControls; + /** + * Remove the controls from the visualization. + */ + private removeControls; /** * Simulate and play the visualization * @param divId div id to render the visualization in @@ -138,6 +152,8 @@ export declare class RecordingVisualizer implements Visualizer { simulation: Simulation; divId: string; universeTrails: PlotlyUniverseTrail[]; + gui?: GUI; + stats?: Stats; /** * Constructor for RealTimeVisualizer * @param simulation simulation object @@ -148,14 +164,19 @@ export declare class RecordingVisualizer implements Visualizer { * @param parentElement parent element to place the controller div in. */ private addControls; + /** + * Remove the controls from the visualization. + */ + removeControls(): void; /** * Simulate and play the visualization. * @param divId div id to render the visualization in. * @param width width of the visualization. * @param height height of the visualization. - * @param recordFor number of seconds to record for.. + * @param recordFor number of seconds to record for. + * @param recordSpeed speed to record the visualization at. */ - start(divId: string, width: number, height: number, recordFor: number): void; + start(divId: string, width: number, height: number, recordFor: number, recordSpeed: number): void; /** * Stop the simulation and visualization. */ @@ -174,6 +195,8 @@ export declare class RecordingVisualizer3D implements Visualizer { simulation: Simulation; scene?: THREE.Scene; universeTrails: ThreeUniverseTrail[]; + gui?: GUI; + stats?: Stats; /** * Constructor for RealTimeVisualizer3D. * @param simulation simulation object. @@ -184,14 +207,19 @@ export declare class RecordingVisualizer3D implements Visualizer { * @param parentElement parent element to place the controller div in. */ private addControls; + /** + * Remove the controls from the visualization. + */ + private removeControls; /** * Simulate and play the visualization * @param divId div id to render the visualization in. * @param width width of the visualization. * @param height height of the visualization. * @param recordFor number of seconds to record for. + * @param recordSpeed speed to record the simulation at. */ - start(divId: string, width: number, height: number, recordFor: number): void; + start(divId: string, width: number, height: number, recordFor: number, recordSpeed: number): void; /** * Stop the simulation and visualization. */ diff --git a/docs/api/assets/search.js b/docs/api/assets/search.js index c4c4a45..2c24ea4 100644 --- a/docs/api/assets/search.js +++ b/docs/api/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACtV9a48jOXLgf6nFwvchnZN8k/3xdu3F4mzA8O7Nl8Ggoa7K7pZHJZUlVfWMB/PfDxF8iK9Ipapq7nyfOluZZASD8Y4g69e74+Hb6e7DD7/e/bTdP9x9YNwOd/vN43z34e5/Hh5++dO8P8/Hvx83+9Pnw/Fxc94e9nfD3fNxd/fh7n63OZ3m03fUh+PX8+Pubojf3X24u/ttiJAU4wnS/WF/Oh+f78+H422T/6EcmQEa7p42x3l/XlrHBRk2cZmw2e4f5p9vxCOOeTUGfJIXyp/jVzdikY97PS0yFvjTvJtP5+1mB+MaZIq377LZ7YyrdrhEk9jW3ebTvFsDMX74BliPm9NpDajw3RsgPR1O265QdqBl374B4su8O9xvz2vY4Q/Zt2+AuLm/n3fzsa98OlCr72+DXAji/e6wn1dxafjwxlUWorY/H7dP83mz++fD8b4HtfzgnQSuM+lKmavwJTbvHrXNWsDx45thFtv2ZT7j+54M9sDm39++2nwTD4+ftvv5gdjB/O37bF8z47q9K9AkNu4zQcEW5OcrtCOgrd2yFuCK/aJWWGzWv15xbJov3mnTerOu3Lga5Zs9CAL6dddhCXZO1n/6+Wm3vd+e/+l5Nx//tm0xqD94F6J2J11F0wbfJXlYCTd+ezPEYhNP28fn3ea8Fmj2+e0rzTbwL8fNS8++h9/fZbvyuVbtUkSK2Jy/LEP4yw3zrlRLxfzXFVIH/4zk/7J5/PSw6VuN7N27kL6ebxX5cwQp+Wj1ZwPqM+2P9SFopYROID5+PP/ydJ1Cf/i8H9OnV6GNn0ktSu9+A/I6BxAkbLigpzLTm3fkgJuU5AW1W3f/ohOv7X05+w07n4FYt+8wgN51Uu1W0K7q2y7Rmv2+4oP0PnpHLnitJ9LF/Vbe6AG/yiYkzBs4pg94HfNUY2k+on0wGonrbtg1wmf89W/b/RXmar54F87qz7qKrVqUqZzAz9tWKxOAw7dvhNhPCxIgl/OBSzBXshAB9zr/LK43Y55/nze7v28f5++3p+fNbvtfnRi+/eRd2IeYdhX/dLCmGGi/9ev/68NqDMoxb8Ug2I+eXFIIFEPeCv9h+3LD2uPXb4X6vN++zMfT/PfjZrtrRZgC3wx7BR6FaG0eHv502J+PhxuQKMdcMDifHv5xe/rHp+P2xfsDr8DndN4cz+sZIXz9ViqczoenG4Dix6/hgEXFIv68AgXx599JuYSJX6lexJ/fR8FELF6nYmgs7nfz5iYqhO9fBXmVB3YF9jUnrDvcY/0eejbi8ipNS2/D6X7uFBIWwIfv3w75Zn0bUXi1xi1weYPOTSLxDlqXxmmt3k07c6PmXYK8SvdeAN+kfUuOKPTv/eH4sN1/WfTsmm/eSfv2512pfFvEX6V7CRzWqd7VOCyqHQKFVVpnNQaUg0cAv+bhrYZ7VeUQCKzWOEuY3KBwKD54hb5ZjRGlbiiGuKJtboDbVTYk2EVds8gJy6qm6+t1vvq91M1t3l4P/fdRObf5ezfgQTl8NCWueHzLsFe6fMvQr/t8vfGvd/pIbF6nf293+2gErvh9N8C+XQvf7PktY/MWTfwW3+8GrFZr47Xe302w12nklf7fFc7ItfLhvDnPVzLDvY/eRydTE69TyT3cb0kR0+AXs8Q3wd1/2XWEngYcvn8V5JXpYhr69YzxtbXnrPW8/zL/r+fzeSN7Zczy9fuwUzvlOkYqMb2p56MHc7njYx20b/P2y9dzh2c78C7f3ghxXamzB/JqvZNeZcYif5sft399vNIi1PvoXdiFnHgV03Rxv4l1aPjLDHQF8rpNpYFf3dprK883mPa8Lq/eZzPL6dZt4QU7uunjb0/z3HrxNbjsw9fCOq2FdXo7rO3p33abX7b7L1eB5V++FtrT5vnU4cAKUvzqtVCO8+n58TqY9NlbeOLr4RvhSvcYI//6LdyxHmr99RvX+r9DELB2tdn3b1zvasjt929Y879ufkbS/cu8/3L+umbVzYg3rPtG6L0Rr4bejYEaiIuBzxoonWinBbIQ4nRhFIbn3DV68Ov7mJs00zpLg+gQ3sGnw8O201aYgUhfrJt9xbGVHP/F4yoN5hmRocjwsCqCJL98l81Ynn3VBtFLuSWgvILIYlR5MwbH+eWwe4YvYOituDSjX4/VyrDzCkLXY89VFMrYk7Qd8cW7MF8x2SpeS3hRx/iO80tff5Ww8u9eB+n++XhcAyn/7pWQDrsVtNu9gWr9I50lhOXTnNcgnLaP//y8v78C4/LV66CcC9ZudUwJrf16NdQVVqLan0VD0VtXJozfh9Of38/H3XzuxfnNF+8inv1ZV8lpi/JSeP+nze4efJL1OLTDbsdjXbBPIHA10l+G7AxTl00IqfndfPx7XvaBWg4cNMtfLm4sV5cSUnkIZgvnQT9v7ufTd9dPwFw5u9Gda8XBjebcYoZtcEpnEP/CC8qA1d+sX0OzuddmXZHIqRHur4vw7TL4N/h0V5yF5UnXOAm0l1Lya9RXfzrsP2+/VPxavlxc0GLRk5ztD1eqnBV2qz2FawDH9U5DGBwQXe1BXMVgvTOxDoPCs7gOfZWTsQpy6XFchbzO+VgFufZErsJe65Ssgk55KFexuNVZobCpRfn77aljc8KvPeH9cQgnOD78egeQQFN8uOOjGN3dcPd5O+8e4CIcP/9wd394fATMfgzvvp/Bb4Av/CffTXfDD9Mg9aiF/PHH4Yc4Al+wgY+TNgMf2Ki4HUT4vxz4qAc1sJErN+hhGrXggxn4qCY2WPiKscENYhTWDmwa2Ki5GhjM56xGOAidARA+MDMqaQrw+AbgWWkGJgc2SscHpgY+CsMGpgc9MsMuU3EYYAYJmOpiKnhz+U7Ad3bgYnTSFt/hm4GNdhK4YmHlIML/Ya2Ts7hWo/xameWDHdholPJrlMz4NepJDQxeWXgFdNCMD3wa+Mi1HThAEcpdkJJ3ww+cD8KOTLMCKXwDhJ4UEhYIjuRgXA4cCCQ4G7gcxGgnNXAg0OT4wDVQX6mBm0GOWg3cDnJkkg3c+YcLdEXuAryBJSspBtwNIcJucNhPoIqTZuAcp9QePDDKhFTgg2CDGiedbbm+G34QfOBu5Lakvw5LVS7wlPa85JwdBIcFmmweA/OIQahRV/to4jzAJDAPNziPlWIQYpCjNGIQclCjVfwyoYUJVY+B7NKEalAjZ2wQepCjsdmmOpjQ9DB0SxOGeQZhPKqZtIBMCttDEV9dn9J6ZLMpQc6E63EevvL7YGHPp9FK7fdcSOX3nBvm91xIBxwmRsaM5zAt7SCBDayWA7CdfwAcnWGDFIiKG6T0rzKcQGBldyfwFWBgGK5SOjYY+K+VXgRZEo8JZByE0sgBOHPUgBbIrVN8kCCdQvMB8B7BRKgJ5VUOCqRTazEolDugmQjDlYwPgAOzclBxZoUaQQzKxvmcny9bl6C1ncjE3C/Moo6xzMsdk+oi9rgHxpqLtKO8ga4FsqGUI/JOZdBBk5iB25GZiqhRx2ikJihGXDwfjTDZBKgMpkGIUUtezqBwW6bRGo++4drvi7CoIoULZoBxF7YFmBKIpzQPJOcBawt0BTmdJu5Jjt8gyVUgOf4CBJqMBpoDU4lBA5sxUB88TKhF/EV6NLL1gL7RfTbzqmgarUXNrwAvmFvKwF5cCL8O7ZRnJqW1ZybBDTATcAP3C5LADiowHCKipRs0aOiJi0EDzYVTg7bxwYUHgyaDi8EghabcdBqam8xKtV1raw3ElpoNQJZRFYoClCC856NWqgRnCwPLHM0nLtBVGxPcBon8wbXzKkYL5ukqJgk2LHADUNFI7ak4SQM7zUbnNGxweJAoeALoKkcNNINlGW488ZwZDE4DTB4HGYkbpgcDpAAjbXR8MP4h8zBAxxrbc5Z49JZATpGHmRmi3KLScA45SUxh4dJ5f8lp4CwxMjBNYuQ2E1lOu0f4KvuSk16NfwXr5RpRMwAv/B9lCgQHZHYyiJIQzDO7scJ7Mc4y77xIcDhgLqk44MtHJzODx0GLGdf1wUTYeaeNhyq8phAu7LybuN95q4N6NqAQFHp+erCoPYwZQCOORqvBgoZiRg5WoGSKwaIpUXywyNhKDhZkzAg2WIMurBus9b9kWEuayjIIEmIpAk4JXRQkCXSAB20cSBIbHdOeY5WWnvcAXYMyzXm2EhfQdVN8QIdbyAEcOP8Lmh7HBif9qwxvVLp8YG5UqmJHFcykZDKZE9S/lqO68oyp0FdlLhoLT22rlRcmcDXBvo98cLhAmakfDioSqOpGxlwJXSfHISj9iXntM+mgfSYTvGCtrPcJlAXCgMZVfh8BQauChsXtY8pTAVjIgbVxTgwgPzDYedYdYKEIEHZslOgXTMEkIx6j4zkRUYtOvMuz+E5Gfwd2woD4W7Q/ZmAQF+Ams0mCvlRiYJPyv2UgLM1fNipq5ryi5lFRMxP4y2rhFTWEG6ipwQYBxqMA6ZzA9Xfgok3a/5aBdrg601VZ/t0FcRjtMJSxaVkuPrEpPTH/XRZRTaTCF1MQe1DDgSW85yWCvjfRTZsY6PvgOzG/qciXICrImEabYOGlCoZdBlYFjwfVvbXa8+xkFah5/w2qeenchTsY49Gr8nR3GW8L1LtM9pgC3+XRoLbMqyuttZcoEGCvt6T15h4iRERPgCJAjTA50GQcw2qvySDAE+EbhoEuhpFMo8sKTyHozBDlJGvhK/QoHR8UqoAYGMAWTKNxsOloitDHhLg2bAp4HkyFIILDgxEKeG8aLYQfIFnMqw1YP652ArfAm2UOyxbxQQZYBtWPDOsXQnhNLrzMBjQYD8OYD/mVxGUDvcADQ8mDfACIyyiEHhifkDPcwDjGGIA6R+0J47yLJviA0fI44ZNKv+n0ZDy0jLTeWbe9yAjf4QYHdxfEN4omsgCYHGRMobTfZ+4U6Cr/CrZXeKWMm+qyIE94c+QGgYFSCViWqQzaI8dXQMxJRI8cjSkfxRR8pbApwlsnxJoz8JE4uu2enprlcqExKTN15UIHmuQZIZQLxzwFjOOe0yXjntPBE0HNrp3xJkaCyUDed1Yj74cUEgvJpQwZ2v8VJjob0bVBbY08GlgdxBI4UwZGFzo4NkwEjpeR4xUDCzWNTgjY3PCAo7T0/A2ZFwOvIA71DooxYKzATxB+aQJtlR/t1RBzYKQgaNKR83H5BtNEDvmdBdFHfocn9DCA7xjw0chgbpHGCpHeyjQC+V3BW+2fMiLaBS4v3XrhFvjSFZ/KifQNZMxTTGFrLLh9qO7BA0D7rFzBFaDLnbfvzLoLK+C6xch0ZoqkTxt2DZ5/l/nooPlrHx2dJR28FRF09ATKiiPU4G1a+ACFmAUuhbxLQC03JZLW0JIHLgWv2ttGvk4jR5XHY6aio6ORYyG9kpR10tHxlYk6+qKIgYeB2LB8qA0ho0pwr2Aah5bpoqKXFbOJClzYqGYFvJ1AAcsp/iZZeuIBVSaT2pYyPak4s0xqWxr/lNF7QW3ju+zTBUUrS0UrFRle+VcEV8VID+nDJ+OjKOAzv3XMXBgMGZyD18dSYAgptJG7LAkjUQVL12VwXaXsQcbalL1xISaAiKlO1SPfTwyyV/A9U2AgNOhitGuFBpa0BvavFtL3itf5e4mqCKC0GSpZqiLpyFy/LDWRmsiN869CvBkj0xh/osrUnk7Kep/VMo50mqJQYghoQ8CHOytkjI8n6UkIv3giQujnichzP0OhVlKix7D4DvkCMnLANfgASbDgqiuVnsB9n4DSytQOuqKVUHzFR6k0qAYxajBHCkIbURQJULKU7eWzVSlZCqQHwlw5GlbujyoFS6H0qG7KAN9lnyJ3g7fTga/LT5H7NOt+ajq+G9JYgXZDCkAmhGmRnmR6UjHq0jo9GcyQZFGXQk6GZF7rl6kY8WF+HmNWH5aAh2hwNv8T065O/yvP9tPAzchMmYPDd2le72qb7rzo8uUbq1EQDOtxIL7rcWCH7wyPvxlRc6CmM1nxVc2BhtUcqDnNgbos8mlkViN7W4DvkFRIZkzzIUCQKjNlG6kXLIQuGVkrkuV1ycca+dh088665GNtaJbHd9mnlmZ5fOczKdyzPNgWjfUbsM9apCeZntAa2Zz6juZq7V7P1WaiuRrfvY6rDbKV0T1DaYJeFeOEfpUMJTzPzBwVtYm/GVPXzAytTs1qdWoW1Kkp1amh1akpudAsqFNTsqFZUKemZEOzoE7N769OzYI6NW9Qp2ZBnZrXq1Pr+blbJrBTyXiJ3QxP7CZoxrO0FrWrtahd0KK21KJ2QYva1VrULmhRW/KvpbWoLdnXLmhRW7KvXdCittSidkGL2nfRonZBi9o3aFG3oEXd67Wo81q0G274d5jM9eEG4+g/ixBtGKYw8WiFD2+5E75SayE3ghUoo3yoKZ0IGX3tQkZfch98TvCNC8lUhl42TOxDSeNdakhqyIFZzPPDzD7fBHGnTeksjNs5RJtYXvC/qfSk05PxTxkRaH3vXy3EOdbWcY4TdJzjSsXvUHJsl3NdKTmOjlBdjFB7YWEMBDFChYSoj1AvKRnsZ4CMAiYvBSZLMWkIuekYEyLtq1SMQwm1XVvkqvo65GV9vVqHThPOOuX1VEPHyj/U4pGbJ8N8CkNPGvI0wFjW52mgdI6bPKmQahSwPW4KpXfmWHri6Un46nu2FjrSdbHWLiClKAKmaRG+XQZq2Sr20GH2RopLawA2KzgoOadFpGU5TAUoXyLEBwxZFfMlQvxFBGKgKMEroHpciwxVK0gU4m/ZqixZQHT2dy8gOtSETvbCDnyHRkyCTXHgoAG/AYRRwlyu6f9jE5119O98Nkb4dUyxk2OKHRETpNaQ7Z0ONUm/FdD4JEMtkoVa5OS0L0ZCx4tXXaBTdRjlkzkyZHoBltdhzJcjoQjpQjkS1CNzvn+HIUPGJ+6f8iWiynXdzId/iUIFDi3mcYJUiZDsNoAWSpWMUhX6aiA5gUIljA3cFxLZKooUZ16kwL1EDerr7NBHEUULWA/NioOcs48WhRr4BOLGQYFMzD/la6K1q3/3TvX3t5XdB4Zum+A8R12QAhTe/a4SxCa5wPHy7RyPa//dWd8mhnctw9MOoX+HC1KOe4pC9Rz3WYWEveUhhw1lGPC3fdWNp/I5n0RdNGeTXuDI2NsAlgp9GJCOWC1gvtTCPEM6IX1VEDK/vhRmQ/sHlAURL0ytYsxjIA05gemxaIZlnfplE5a1JtVzxsLLIAbeL5cXScGqHphzLIljiwyaIW5CZh9+xw4AC59OJrTN8Klpl2ETtsNOXZ8wvMzqO0YEcwZ1R+fTnxbdN3QzJh3yy5wFD2LgsU184BjQwL8iOCGcSf+U44NNZYwgS/KpoeGKY/4qIOQg7w36SEC/tweFmXmNZR3OzKDHCbQis77AkwH1/bas6934l743IOgdCS0r6CxBAQMXD7oGO7+wSRvB40/AAeA2wlLjU9OxzbA5l/NuKZZdOnffBz6AqeFj8YqzLtFZVNsy6h7o/kfqwyZ6fofq3mWDddpyG0oREBerkUPvLYeY2MLecOl/yzHBzjLe334WtXBscgsdSYpJTw9ogPH0gCqcx0yB6mCT724L7Ai9cB5b3wOH9gEqPsiQ/knH7zh6LmD5sAtfirwN13fb8m6J0r+MzXioREB+RISrIqLebYW6HCoaqwrkEiJITMhlAeEk9EvliGCLAO8mKhhTnTYXb2a58gjBSQZECB5caLFEfLhxgaj+tAMGbdC5kw5HeGz9W3Rfoe0SSemfdPwOCchL0cPggff1D9OZvHvWs9q344JwJw3AkCDC5MpXQI+TANOGpxaEy3u3saeWQ09DD6pJAscuR0FUPO+ROn58Fwq29SAJgSjM930ynZHMIyWB5BfiiSl8B+jFJxHPloCtCU/KP+XIL6TQ/MusS4Jh2dm3lodCIPQ3eD0yuYCcxUZdsBigW7g/rIBP1j/l4Bcybf7lQnYi5CRCZokXDhj3WrhrqX1LLkbkEI6j5fEtphydWS5CEmXgcqrPgrCF1lv/bk3XHgveHo8teqmPT/kWbAXkFeNUeHXYsAsfWCiuV6BjV5fSqVchlZIRDPQh+G45njUtOB99stglBchaET6HpAj6GgOXvPE6sHOXOCGC7zp95Whp4JTFFM4FIQR8kOEBwONTDgpVoxRdGfNtukS9VoZSa+ws9jKoMw8I8xiY0IhlWUxopE5R8IBYKuKmQu3ApQzFWw4dQd4rkrrxijh9iCq8o7NEHBraq2gWm2iJNJF/mX+Mykn2VTk31ceWTBWFdyFCjLFkjBibmBIdWAiVMPEWYgkw0Si82lPYBgJDysOnjrBLSbEQOvq0HRw3wZNAGDBKFwNGNTUBIzauAkPrUbFaPlzAXzF/ho+HpCT8HwNJHs/RwD5iB5VkPvYx0UuHwyoYBDkV2s0lHFPAb7QOgZgy3oG3IPrehuFZHXQqIE6SHInig43gWvpoD58w21RwEPbKUseDokd564kOFzs+OJ6oKY90YC8rMHnPiRTlCQPmG0pV/7yM4NXH6JRBvNVmLsNLPGDpD0WAE4aLM/40CGS+vATzIMFKoDqFZLI/FaLCGSw4YIkxqAHqI0fC9Rq+LVRA4IrKSBiDxhcH+t44C54fNhVZTM+h0wTHQBRWoLCryqbfXPxNT+mJpSd0ZsBd8adRdO5mYc9m/8Cjf1cfeYxHHX3vG8sPhDDf1qmJHYs+mw7MrsBDw94TOAGBzpCRoe2Y+QoDWFXkEWvymMp3ekreq9n4l6iBw6EWEw+tsex4CJ6FArWBgCGacjZ43qB0/Tu/Owq2FOUFf7s44T5QgZlwK/BJq8alxn5PwkQJkxvrxkbLKZhmyeIDD026Mlpt3AeRd5kx7I2EjsvuPthIn8mfdZliJ5Fyl4OUmIgz0sA5T6idhYycZrF5HFqIsJDKY/Iq5uS0T8rxMbYjQo83prlZTNJg9IEHy7CdDE+WFSRzC8rG/bfJunE8JFdm3XwLqe77//jyd067YSMpkXaTKfQW4UTqFC3ONIXTs9MUxAQOkQgTjqKhDZKGhfwbD2k3BQlZE5SiT7sJFtJuXPm0G4zyabcpVs14qJphYg3TbtbGAzBwAs53D8Nv3Jf/IOfkjyjwYq2o9U0/zseXmKZXlmVnFsqYTvgWVcNj0GJS0GJS0ALdA6MAKTc6/WbSk01Prglu5EIWVi7E/56h4zlOOA3nT50Z5yM3DLjRnJtQrNHMekaBVlc82GGN9Ac7QIWZ6O/7fm9d0FHShyKrZlOGLaXcdm9l8C+RseMJmimsALxS6S8d4P40M+p/RNyGKpOM+V1jY7d1YLPJeqYClsDzGCg3yDh4XIaFapr3dSaAjtbWJGurMMCJ33E0MxLY0jf945NITzI9qfSk05NJTzY9Of+UE4o+g+bf4ckjG/pw400UyQ5EDxCi6+QBoqxh+lqGIObi7+nwjcP81RT7+EOGG37I/D8M8AUoXxOyDznmYJVk1yfwrbOhaod7BmY4nj3DBHZQKPmptHzuBf/ev8OI1ZfslT+myn3oBAKIvGViK7ANh80hPeFDcundfbxsAl0rWQgjJmMdwbsuD8lRcaCTf4nEVex+4Y41Mbnv2O03kviX+cdLvq1/Wd2WkFIE/swBeAmCNSkHteQGK740r4wLjgDyaZccZkU5zFqo/z8d5tZNVgtusrrVTVZLbrJ6PzdZLbnJ6r+bm4ytz+Aq9mQz9EzjnRMSrbUembY//ogXDr3Mx/P88Fd/8dAPP9zdDb/efQz3EIFtQAh3H3797XLj0Idf77jzP4HR+vDrb7/9BhChOJEPnhYH+zH8oRijJDFGMf+TYZexAnqYL4Mhi9MfDBmmy6gSouHEID35n+x0GSuLoY4a6nSgzpSN1cB7czHB5FZQKN7Jlo3jl3F3QvrRIuyIDP/X4V8b/gU1CnPmcDyATTE3tQGB/mE2FSYNvzIe/hXh30gAE/4NyPHwnodpePiOh++4DYsJtBdhXhHey4hF+F2G8TK8V2GcC+/jRriIxzTFh4j5FFGfIqGmuLgpbWMczuNwnhYeVxyXBCnB8BBlJK4G0iPhIU4obHxIAhVnlvFjGSeMq2VxuWD0w0McrsSFczb39/NuPoYLEi97LOyFfVjLFfG3MMcZ/8zCZbShxDptuqs2kVWbqYoVXuCUWEKytw/IUy+Me3i4T39+KxusL5rrTgVy6UAtE/5vLSURDw/b8/Zl3v2Sz6nN4sLT0AoRSklcwcrP9vkMf/s0VxmkRi51Ts7QIvFN5C2VY7zbFVpUEwBkf3cvTF2wXrmVnOKZyBMuYOaS8CRxsjWcJA8lwEKtO3uFTKSGCf9XAawKy9XhXxPGmbhr4Xcb/nVTuaDOdrT6JdI0UxnNlrVaoNjE/cN3h4JTOC2nlzmLGfBvfGWbZi8T3DnZqol2z3LOjX81clsZ+Ez3qLCjOtDchP9bTsnlE/x9n82nClFJrdRvZjZ2LpDhiuKSTFMnaose2Z+eSh0BxVpiSpZrrWOxAoiqqVH5Eo6H55LN6QVEq6bWyVcEcPxhW6g8StvEeRtdX6B73PxSqgFqusY08ORQrNyIQukakpwVujIZ/3xzzqUYUGrfZa7o5mU+br6UbOko+xW9EZd5ef6vMOSCkhmwaOZdcjZ0K45RL6jpli3/VOAsKYc08ZPO9zkjoOhppU/z50PF6Zr00fszhL8xkrG8ypwX3mqKhvVrtyT5oKpiXcJNqS1D8imjYbq4kml7knfYsnHy2KJdkD37+enwUIgOJecR94Bi0KdBnQZtGtCNSFbU6Qrw0HBT38wDmvcz3I59rq7jvqCeWREqAulMU7k9lFOSieCngmCOGpEcAFFubyMureFufZKuJb0Pl+cXjK9ITVqxK8mWNb6J/ZJfVHJUiUy1KZB9pbwD1Y4uXQtLhq2BQJdwK/G/KybdlY4+pa5TmJTbzvtNtRJSoxQrmXfz6bzdlL4uZazTRpeCXE3VKie4n2jJwrUTlN4Dz3R+q9mKoDtOta8iBJOpx84cpcJo4vaULAjMGD4vl78/H7dP87mkpSRFtGDwZo7wVyWziQoF39HvOXd/3ey/lFvASW4quWh7BM4uSKduWoL/o+R5JunCTXc6urKiXUD5Lrn/cVr8cyZZsJ7leliTdQihcKtS7w8PpeGlEztT1CTJNiQ4iS+Suchd6nBrfe5Q6wzZ2mIQHnZuT3DGcjsV6ZIQMzx+2pYU1KSq0824wrvWJD8ULkU5QcPPOufnjt9WcOXhkTakJgudOGVK78MfjsgoONE7XxAABj632SKo3FA7kCxOQYj96bzZl070RJrjwHy8niH+GZxcuWaEDN5Jpb5iGjG8TmnGmFYkgv2UPgz/1zHZHP5vo28QXcDGvqVQ/mIxEm7Jg3Idlb4IMZHjvNmWCRVJ7UkpnziwtA9QfqPspWvGlrI4UdbtktOo9hESc2VWgrbWvBm5q1BnJCe+QYdFSHWWHVojMlNK5ST62UeyjLEi6Xd/eCq8AkluGGUO/DTHufJBafItS9ONUvQuUuKX8HzEP76RE4NkwSjzuo9dz593Bdlafx5sCy/ROZ0rovIiIBW8HNfyy8PmvCnHkyvKZelhnp8KOpDZvUWmeJg/b553pW7WFFusYdaH+XNtNhkZraVYJpZtWD7Rl+NcuXILPqXMRz7N+4eKTxgpNbn0P8zn+fhYL4AvpEHypW9fSseTrA+wclSdEs08PBXkwSiKfZ6PVT0GLj24nqCaN/dfy0QMyUBdv2rebZ5OdfqUnCIn07ybH6vNMeS+Zhw/7+83T6cmkIaeoxXx3vyfz2V8wsjCRh6azc+VzSGJm9JIqe6S0kAZb84v87HMS1DClmLn6GssxtDzz/4v3SO+J/i7hRl1M37iHdc7l5355/N83FdRMZnxLCj8eXs8lSJHSU3GRp+rulDm0qYER9A2skU9zFG6hWSBLdr7VNK55t0VadnkJxS1l2wLGkc/U+Qpi9PJ0vSCoStheJPCjBa5zhVVlvcCnddoXOrNTR6y2GRY5I//4+v5/HT68N138378tv1p+zQ/bDfj4fjlO/jfd1k0/7EN50lm4jeC2c/fzof9H7k5fdxtvn08fP747P8k12b38ctx87I9N7EL3LxNiJupoPdTXdCMnDmBVNT1Ofx9xowrs2QAa+vM7dbWnRLXstNRWqos9cq04Ocj/hGxjFKrEsxlPijrx4iidmMNInfCqqaGgGf6q5WZSiZL4OIKrWrXcKpWwcvVuEa1XzzG5LemVHCqSmfiUxrqKcvN8TYYDEPm0lSS2i0m7lO+OhmMiGRSK3mi48t87nBrlqQnKwNJCbZpxTT14+bn83Gz3e3m/Zdz6XDwIpHVJkLSHKevh284SekM8jwc6yQGi/HP6a9s5zPkudFOcvQyw9NcuTpT7uRPVNLty/ZlLliVTl5RZZak+tM2sCQpiQszA54pvsrfIdM+dbNVHmb46cqq7ZTbtXbpd7mz9+W5qB8zMoUWYwuT6eFiKEW5qUe4ML7cM0Hm/XJ/fPu5TDHQKY6kWZN8tbmGJHGiv58B5qP33krvieSVrmcZ5/iILuDHx/n89VDxLJk3mLLAoEosUS49UTeoila8Kg83tdNEwxSMi2JtfRqmPplUD0oykXqcWnPXNtKVLQRx/febSk/QHqUoBsLXRQEgk5OwbkrLb/fdFK+gtixnnv0Wakfb/2q9HbIU5ooNf3ouOY9TLlpZ5Y/DT/PxXAoaGc4VgoZp4co5pLtl4gb3shjw95i/tJlqcvl1rFb157bBW2HYyw6sCwb4F6HLjCG5nJKCL4efSvtCdhKvq6iWrSNkgjdOJjk16SodR6i2Bqen3eaXKlcBd/lkdpSUjtJ1IBNUa7qQtufSjaB4XRZD5l1hFhjJ4jlb/lTl6Mhm9l498aftfgaFcF+G4lcK1Jlc//R8LjOLjGSEbn96+EvQmTLK7H4cIFJk2qkta5oxqmEB4OOnhxJjRmqid3Hpc7hNoMqyCmmAR+eJ/BxV4gX+gstlhk6pL2cWPwNd7WNZOjEmSltJqWapumZIDyhXR62rzsi+CFFGFLlJ7mYNd9vSJyW7v3ru4O7wpZYGWr9m+/u4+alUy3QBJe9rgGFlFYcMNHNz+rjZV5lGTqc3ZQHvVIDL+hbuOl52dNo7HRmPm3Od3KVLtr1tetz8vH18fiyNOl1gKPc+TDGXbTlkH2wxpvZZ4VjqcttWp4zTNdB+7mspJcp3tmS5WtwK4vi8/zL/ceZ/tNMfnUAlHQCWzEYmhp2+FeRpfixCKU5StYgE1k3+Mh938/lj5oL94WXeHe63518++nclJ9It1plv+Hio1Z9aThtmnc1NkqaduKA02flW7O3z7rx9KvvMNRmgZTu0n+/n02lTJv35Qvdf7yDdfv5WVojW1W0TAcK/df02HrZ6dR03iV57Zqqt7KZQsS3xJpvRHnqyBRXOh/22OkoykQUUkw/9uQxxBNmXVzkOF4OWt3TuD6WCJzkhV/D7qpOLG7rnshh2fKwMykQOzPvW94eqcZ1SYrn52j8/fqq8BvIY5aXZu2dE9s+P83F7X9eSSEuUM/zh03/M92Wd/+rJhsjNVTt3zG7VteYVbdvtwZxLvpdu2y7WUSaTVuVSbmnarutDdV2oSs+nhHh92Klubb+SCL+W1m918CUZnTI1cd8WSgCXLvnm6NplA+hDkPGMMFPJRiRGTQFIJtVVex2po9dW364cIFhRlWOtZuxVbw778tQRE5RCSqF+2phbGqVyB6/qxSP9O7EYEByOD7W2Ic8bZjrxcP5aDSN7mZKV6VrWp81zlexjRVmidxo2Pw77VKVLyRaIXn76abtfiPeyppMwuhPv5VNUFCH7iGS2i5CTKSMyinPiAch08DH837pytibDQzpuUzHycK54mPT4ekf/nw6nbZM8zXJLnYpr5lk8HefTfHyp2pbISnXOiU/H+WV7eC59dzJtm4SBt55OSkazcvZOh1leSxasHNfhkePhaT6eq6MJnFQRUdhzNA4v24eSPGQ8eGvXYHWOZSEZmXR/rzfwOFf1LkXmFgLF9FSOPm8f55ft6Rly6bUsZbF4h86plcTwpSnrmyayAqbuKJrYl5L3/h7n+8Pxoe74MhSnmjjF1JmCWGuWrYgi1vJUZ5J6dVkrj6X6JI7z5/k4V0UASpP/P249OM6oJqq2QvKkruCdodXJlCsSuPbgYvRw40rbNoUkMMlrai+TMDm+//m8PZbyTnf9d5LXx/n0NN+3VyZw+gBx1z04zqeqO5UuqRQ5/8vwx6rmn3c2sI4oM1aI2/n5WJplsiC8fINAPl9lZzh5r0Ux8uWwewYTBzqlTGfm13d0CvJhgkNjR+hqW/dosJ9hwWPJGw0dqTnKWSrlQyZjXE4LSKGVyTLKGHUrGzgeM2+yztjbfAmdjL3LpORUt0yR9MxZ4HS/KdNIfKI9pBza/VymD1h2dOJOh3VaylE8zVXXLJ2yyOS4zhwy8h6NflMCjI+NCb3WVPhTO1n9ryeOU067eV9664xs/s1zGqcqB0k2NWTR0GLsc1psbMrrZHFYb0PIxqa8JsqortfTUmNTrhEY1Tp+6jY25eHPRF2Ic/p6eN5VTf4UZ1BpxSsXuMDiykXRXQXlZl3Gl+fWyCpW1mKS8+72EboNS/NVeN5Vh1+HTNvHpl/d5l0h8dxDSqQuFDM62qjuYxDVfMsx28q+h7azsQ1ZVEE2XHOvU5PnV8hERUOSrY4kyfJbqbLC4KoVJAMccz86nq2IN6OldF+LGHlTWbwPKN0DVN/78843jq3qyEharL1HKO1mk0jrJN9LBq+yZRdCj3UWgZNXdZVqdFvfMcTpMk/XPzztN0+nr2Wem9NHoXjmBHRUH6lgKuqHCc6bY3VwKr/L6IrosU4TeJq38tPyRtfOQd8UEcUsL9UDUWVxU2S0cMNFe79dStumes5C2ra9tSr9siZJm3MbUOUfyjQLWRMo9MG5bMJxZBusJMhXpUzXlL86slSs5fBUenK5drqiUOLtAGX+YeUgD/6X03ku3bB13f6pxNLpOfCTlrcukUogQ+ZcNWcw+tTQQlx1/lpe0kS6hc2RgOLkYbdy0VxBVRWBIgZlbXgVQcPUq0o91M2aEb36vAhR+qmLFU0ReO35khvPTtTpmNjg09yrF++Aq/Vn5OzYGFTftxcv0ahdnCslqrYIs2Cfm97kV9rna13hyz3OF6veKuVWF7d3jbaeXfIFFq4hXWijbu8jvakC13Muzl+r68/IurEjLFOc5zjP43+Uc5HXwfWu+K3TLWRbPmU3ynTz8k2QqTyw7mYpwO3hWlqGZ3dDpLMirdvRm6u6bmHh6F5mcM9FbwRlA5bPD/QtTeeutittoJTW6Z9gz7TE9eaANkOwcEXpgtvdaSBI0pNkpSsikDkovW76Yohei14v9UDfplDqrDSDZ5RSVLOm13L7SM/zwuadQt1rJylRbOQiD+Vlp8Eysl5t2CJrlKevqgx6CbZyW/P8UH3LYb/Bpr0HtuKEIK9VQEN5UhVBX0nY5ypKoVOD7QHELM9SFkUY2duUH0tr72ahLwFIqiXbnvJUGqfvB82dzF6qzRWXk3U88+YkFOE3Jc2z5kRU4y10fNM1dj+VuW4x7uttekm2f6iKX/RRyIR68ifSbea6nbdzw5Ur0kzUqZI4QXWnEX2nUJmVKSdplSnLD9GqsBQd3deYr6fSw89PpemlL4XJOfTpYXMulQB5MVRe5qp7YMhOwSLT9lzd/7Fw/cddYdV7pwUSm7VJ4RJk1fZD1s7qazKrQK+U7IoJSGfz9vAxjxGfT1VK01EOVZ0YTqo5dvhGPyZGRbElJvoz6xPKiNnLXF+uRh5w6oWncRLf9l1Mk2W7O9qxbadk7Xy+i7yqHHFdXC3Yu1Eh7w7pdaLTqcYuNtvymiay56LgrJftqbFVLrf/ilIAsbGiLbOSiP/fjqmzC+tvOaNb+TCVaaY6cMiD41V4Vba8XLL5OPm3efvla6UhGXk1cH4ftx9ZHdHIXEjX4+7Ovd7fvs517yKnbzPueE6LB8m/fd2WJ3/Iwvi6g6TftqVloJm+GFQVRMn+8cCmcSERgfDvjdfNLTSMrblEodtU9u1w/Kl0D8hU6Q2dtL/9Bn9q6Wn7NO/gatIPP/z422//Bys86dTY+AAA"; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAACtV9a48jR3Lgf+nF4u5Dmap8Z87H27UXi7MBw7unL4Iw4HTXzNBik22S3SNZ0H8/ROSj8hXFYnfr7PsgqIZZmREZGe+IrP717nT8dr778MOvdz/tDg93Hxi3w91h+zjdfbj7X8eHX/40HS7T6e+n7eH8+Xh63F52x8PdcPd82t99uLvfb8/n6fwd9eLm6+VxfzfE9+4+3N39NkRIivEE6f54OF9Oz/eX4+m2xf9QzswADXdP29N0uCztY0aGjVwmbHaHh+nnG/GIc16NAR/lTPlLfOtGLPJ5r6dFxgJ/mvbT+bLb7mFeg0wx+i6H3a646oRLNIlj3W8/Tfs1EOOLb4D1uD2f14AK770B0mn7sHteBSu9+QZoT8fzrqsCOvCyd98A8WXaH+93lzXM94fs3TdA3N7fT/vp1Fd1HajV+7dBLsT+fn88TKtkIrx44y4LwT5cTrun6bLd/9PxdN+DWr7wTuLdWXSlhFf4Eod3j7ptLeD48s0wi2P7Ml1wvCeFPbD5+7fvNj/E4+On3WF6IE4wH32f42tWXHd2BZrEwX0mKNiC/HyFdgS0tUfWAlxxXtQOi8P6lytuVPPGOx1ab9WVB1ejfLO/QkC/7qgswc7J+o8/P+1397vLPz7vp9Pfdi0G9QvvQtTuoqto2uC7JA8r4cZ3b4ZYHOJ59/i8317WAs1ev32n2QH+5bR96dn38Pu7HFe+1qpTikgRh/OXZQh/uWHdlWqpWP+6Qurgn5H8n7ePnx62fauRjb0L6ev1VpE/R5CSj1Z/NqA+0/5YH4JWSugE4uPHyy9P1yn0h8+HTXr1KrTNZ1KL0qffgLzOAQQJGy7oqcw08o4ccJOSnFG79fRnnXjt7MvVbzj5DMS6c4cJ9KmTareCdlXfdonWnPcVH6T30jtywWs9kS7ut/JGD/hVNiFh3sAxfcDrmKeaS/MR7YPRSFx3w64RPuOvf90drjBX88a7cFZ/1VVs1aJM5QR+3rVamQAc3n0jxH4SkgC5nH1cgrmShQi41/lncb8Z8/zbtN3/ffc4fb87P2/3u//sxPDtK+/CPsSyq/ingzXFQIed3/9fH1ZjUM55KwbBfvTkkkKgmPJW+A+7lxv2Ht9+K9Tnw+5lOp2nv5+2u30rwhT4Ztpb8fjyvFsN3L/75vO+bC/rNxzffgXUQoVsHx7+dDxcTscbiF3OmTG4nB/+YXf+h6fT7sX7Pa/A5zQ9Hl+mm1Fqpr0vVufL9nS55Wzw7beezflyfLoBKL78Gi5cVOvizytQEH/+nVR7WPiVyl38+X3Ue8TidQqexuJ+P21vokJ4/1WQV/m/V2Bfc4G70z3W72HlIi6vsnP0MZzvp04ZZwF8eP/tkG+2dhGFV9s7Gpd1Fi8icJvNW6D9SquXaH+j3Ssgv8HyJRXwDraPxulm6xfReif7R2O21gJm53STDVyCvMoKzoBvsoMlZxaW8P54etgdvixGOM0772QH++uuNIMt4q+yggQO64zgahwWDQCBwir9vxoDKtAhgF+LdFbDvar8CQRW6/7VmPRVPwF+WfOvP3dC8VNHfkXvL8G9Qe1TPP8Krb8ao6tKn0BqQee/EhNKydNnsqjjb4DbVfEk2EUNv8iBywq+G+t03vq9lPxt0U4P/fdR9LfFOzfgQQU8NCWuRDzLsFeGPMvQr8c8vfmvD3pIbF5n9W4Pe2gErsQ9N8C+3fbdHPncgM1K+7cu9rnlBNbawLXRzzLst9jBt8Q/N2B1uy18YwR0A26rrePaGOgm2Oss5Moo6AqP5lbyeNlepit1wt5L72MjqYXXmcge7rcUDGnwizXDm+Aevuw7SpgGHN5/FeSVxUMa+vX64bW956z1fPgy/e/ny2Ure00t5fD7sFO75DpGKjG9qQOwB3O5/28dtG/T7svXnvXowJvfvRHiusaXHsir3S/0LjMW+dv0uPvr45WG0d5L78Iu5MKrmKaL+02sQ8NfZqArkNcdKg386tFe23l+wLQnPA+9z2GWy607whk7ugXwb0/T1EZVNbjsxdfCOq+FdX47rN35X/fbX3aHL1eB5W++FtrT9vnc4cAKUnzrtVBO0/n58TqY9NpbeOLr8RsR2vQYI3/7LdyxHmr99hv3+n9CULZ2t9n7b9zvasjt+2/Y879sf0bS/fN0+HL5umbXzYw37PtG6L0Zr4bejYEaiIuBzxoonWinBbIQ4nRhFIbn0jV68Ov7mJu00jpLg+gQ3sGn48Ou02SegUhvrFt9xSXGHP/Fy4sN5hmRodT2sCqCJN98l8NYXn3VAdFbuSWgvILIYlR5Mwan6eW4f4Y3YOqtuDSzX4/VyrDzCkLXY89VFMrYk7QdceBdmK9YbBWvJbyIg306TS99/VXCyt97HaT759NpDaT8vVdCOu5X0G7/Bqr1PydQQlj+ksA1COfd4z89H+6vwJjfeh2US8HarY4pobVvr4a6wkpU57NoKHr7yoTx+/AtgO+n03669OL85o13Ec/+qqvktEV5Kbz/03Z/Dz7JehzaabfjsS7YJxC4GukvQ3aGqfkQQmp+P53+npfhoLYG147zwcWD5Wou6ZVXInfwdYDP2/vp/N31+5BXbvJ111pxja+5xZ5hG5zSCcS/8IIyYPU76/fQHO61VVckcmqE+/sifLsM/g0+3RVnYXnRNU4C7aWU/Br11Z+Oh8+7LxW/loOLG1osQpOr/eFK1bnCbrWncA3gZr3TECYHRFd7EFcxWO9MrMOg8CyuQ1/lZKyCXHocVyGvcz5WQa49kauw1zolq6BTHspVLG51VihsalH+fnfu2Jzwa094fxzCfb4Pv94BJNAUH+74Rmzc3XD3eTftH+AjbH794e7++PgImP0Yxr6fwG+AN/wr3413ww/jIM1G8h9/HH6IE/B3NvDNaNTAB7ZR2g4i/FsOfKOcGNTANtwNehg3WonBDHwjnRnswDbODG4QG6HswMaBbbTUA4P1nLYIB4EzAMIHZjdCiAI8jgA8x9jAJCBg5MAUgJB8YHrQG+bYvBSHCWaQfCNYuRMYmd8T8J4duNyYCiSODGxjR4E7lkwNIvwbdso4w60ay3GrTDvcqoEdwB6l8FtUxg0MRqwSAwMyKMUHPg58w5UYOAARRsw4ybvhB84HYTdOmgInHAEqCzZYmM+5pwYzfOBAHyEHLgexMVYPHMjDmB64BtpLM3AzyI1mA7eD3DAgqPMPM3BFngGMwIaVHvAohHYeOLcMjoJtnDUD57CisB66YGIQsFPN7SDYoDajcDMwfTf8IPggxs1oZAFMh50CIyFDWYc7dlYMMGPjuJ7XMbCOGITcSF5SzIR1lA7rKE85CwQWg9xwxQYhB7XhXM0LWlhQdeTAvm49B+vpHju6pQW1X2cQcG42Y28G8ijsIPRGipJyOESu6BcaBDCAdNlRMBAx4Xoo4tDVFV29ZwaSJsceH+MQruSQgceNNcrzkFDa8xCXLvAQqBw7iM2onWdYzfQgGSKgBsnjA0in03yQQH5mxCCVH8pwAqmW3YPAIcDAaC/YagQdBv+WXqCZFkHaFANpYxup9QBitVHGDhJJYt0gHe7DDgpmOacGhYpE8EEhT0s7gCrYcCCaDNOVig8aQFgzqLiygpVHZwblwoJ69AtmO5O08szVBu6Mee1sgeICdZed9Qgeg2V21h8owXKUA1AO9Qai74zJ4IN6MAO3cAQleBXAGzQKcjMymA/gMxFmIPGa9WQYhxQwibVe5apwMsyiygWe8SckRDgY0HBIPsYC0UcVsAbwoCKdUoHo8A4SXelAdPgFiS5FILqUg+ZIKj4AH+CCWsZfkHVzA8RA8+g+p3mlNG6sQ0uinPKWQvKoUJXfBogHcpPSBriJbwRYH4bnIv1+AEONJsRjAdylYRPOyAGsNPDDoF14MGN8gFX4yAfjyZOfhaV5ya6zAo3y12irHRuAJhvpcnCgA2FcbKRkJThXWGs+kkzCx0BUbYOOksgbnFuvYYAuSFTuJFhEsMfMk9Ao42kIEZ0Gcjhl4XDDA6A+cgVklRtlA+3MqD3tgNBGBM1h4izQWhsOQxo4SrrBmPhg/UO2MVCxxnUMDo7ggYNiBKyNQs8L/g3sp51ELhLSC7c23h8JXCU2o5VgmvAhg8jJM+ali8RpH4lHJ8lxh8gBBUT4N7qDXl6FRJQEuCtIOu09IrDm6AhJ+BkWkgZwhTcyBEB/2bHrzMlw6s56p0x5/1OO4dQdOETotmnpRcnwcNhqdAPw7IYPFnE3g/XKUA1WojjqwXoTwgbwpzZcisGaQSCRLexASTZY53/JMKa9KB7dKERRBIQSrihBUqLyZRttUfmyjWNBeymjPNMBtiDKHB78LtwYcHUsPoDGGsXgRPwBOUbrwSFPZ34fRyULx7GpHAo/AmgplcwHqlsLLOiC/QCfdqNn0+CJbMFYeUlwgLj3WZ3GzeUUA50IFHUbN6oSvonOgg2eNRtlMFdjoNhouecfDUKEhNIS6AJK1vhTZKOBU4R3lD88sONICGcZ4jQ4E6Y6EFEh2OBchDOiUw/EH5HlHRvYiBLpcrlC3TmKLrfimMRgQnh/3XJPQY1RAzguCo2ZAk0DdmbU/rcMgqOZy0XtLIJ65jqQivNAKuuCX8WZ185g7BDhDXceNNhG2LDxv2XREoaBo+3oqTA04w2TnTIDG13cFRvTE0tP3L+XAWGkkhcsiLsRfIgsgR4AD36kdsbLuwDe1+GcFA/HiszJjPbMaawKRn00wZaPxrMrk8ZreasD345OgHL37xgfeZqMPbwjNZoBLDOEdhl3C1S2TPWYAseKgBKI6JBPvVCNPOArtTfxRmmPnJDBBEHQCSKwUWD2MDB30msxgaG2joEoQ9eAAZrWR60ZmoLkLBwCSAL8DlBfLkT6Ug0WsNYonONGCwOsN26MlP5M5IhO5bjRXALrjRvDUa+N6Lejlzw6DocD5gs9YDDg3hRzprwpxgcVI270qJn02xdceh0OD85FLFC9wjTm1SowOtodbWDUIfOrgfER3QI3MNQhBvwwjmEFrI5yaoCKHBMPoG1ROzsnB4Y85n8z6cl6aBllvXfuesEQjqEf6HkaZDcJJjKAkYErhfWnLDhoKj+ADjo4VOFEnczhoiES4yA4eDklXFVmQmgHXMRofAwoGungkPhGBO1uOYqL2BhjvbggjyLlgKZITT3mImEQM9YVCRMokmWTUCIcD2xuIQEi0HHwXG5G5nW6YdqbF/A1Pd87iG6YifknpJJ0ucah/V1hk4PhY1+DOhIZXwc+VyryuQ18LkJaRwLvIMsKExge4mWY5ZiGww0PuEsd2BsUDSo5I6JnIsFOQQBk/OaEFMABfrbXQRwt1LixmkXOFyLsFmJp4HdPQc/vAiRBIJaCDwz+Q9cHYqgwV8g0qtIMHWIfBhIGTxkd3QKXl568HGnGxLHsVUa6BjJmJkbndacV2lNeWU86MP4ZW4BiF964M5DeyAu4a7FhuexIVNqiZ+z8UOaUA6lqpxydPBNSBmOQ3FEGL1ONwcu0ow4yDI6651NpXcBNuYy+ktbPUgQ+lTxaRrFOH49B43n3ybKOhvYMO/JMVUcNHUdM1NCzGsYI13Mu2yhmPZ9KYDF0pdDHyFT0smK2UYELF9WsRGxGoDBLv/H0JAKuTCa1LVV60nFlmdS2tP4pI/iC2sax7NUFTStLTSs1GVD5IYKxYnTnRRpU2xhYzZ+d5DOPIYtzO3PRwKTDrFqWb5eog1Uv3++HsoQ/SFgv4W9V4HSlmkw/Mr6EZJV/H/xtgYE4Q7tWKGFJK2E/tJD+hyRxmf+XqIoASpuQkqUqUiNZK1ClJlKMPDg/FOLMEJDGsBNdNuZjJz36tITxZBqZzmI/GyI9PFcBIbU3Ip6C8IOnIMR8noJc5ql71EqQ22q5FcecDbEOCGB4Uir66aC6whNm6cACKFt754rWQXGIb5SwoBqEd5sUhDXC5ZiiXCnXy1+rUq4UyA4iulFjdTqlWCmUHd3NE+BY9ipyNzg7HfimfBV5T/OeXONY9iryHOy7s2rJcxp5TsveqzhW+YN4cgrsA2CyEeB1agjUNKgwrdMTWI8RFKu2MaCDBB14BRl0ZFbIBHagsxBCol3C9RQEVBrjfBBdw2Bl8KkM90/Zyr7u1i3F6JT0V+ir8Y1UaBTAjTQBAsarRtbVCY2sBarIbJwuc4Q4ltbF0JzJ/rpAMakyRtTIiEb3RAbHuiLTERSTwl3TiIyms0FxqBYZiFBLkdGaFhldcrdG7jauewgxmWLimQJgeFlujM6RtrQ90yXfa0eKqC7Z3iDb91N5ptS1htEiimPZq5wWUVPmMo2gRRTHslclLaImhmwmWD8NulurKBiY4/ZPjQBlEBQthka9RQyNpsUQx14phsbQYmjM68XQILNZ1nFEcAiMKXruYK58SdTLHlRbwUiF3yyvi5CGTpbFoevmyo607NmSbS0jZcGWXGs5ba5sybVW0LJgS661kpYFW1pWq2hZsKVptZqWBat/b3NlDS0n1rxFTqyl5cTa18uJdbScWPd6OXFef4qOnOBQJidJOiAT76XDLMiJo3tv4tB1G+U4LSeuZGknaBvlxEob5SRto1zJ7I52I13J607TNsqVhtYtuJGudCPdghvpSnPqFtxIV9pTNi74kX7wzVaKjQveoh98tfyxccFf9IOvlEA2LniMfvCVMshG5DorO0IYxrAlwYT43WAcCP/GPCUmz630B8KhbIn6TlqozUGfAfcJE2kcJKzGjTM6lKV4SPWNEP75ahTk5ThWVEM6RIMK9Q0PGFFimQ8SlFi/hMoXdJbEJ58HMwOzLv6GRUT/xNIT9085EWifNowthOuuCdfZqOl43Q/mL6PcWdXnSFO9bMmgPYwRWY6Y1fB1EhFa9iCPETOMymHqW/pkvIBEKcckOPonPKYWAdEytchGlHEnu+0hoyv7Q2LWXenYLBVbGcr+kNAFgo0rkAtiuCGfkdOjhrwjNEiFvCO0fiBTjEL7HKkA7vL1UDguTJf6J5OeQj9JthXsNyM4AccAdQH1GhEQTXvwDV/AF+g/CF/rNtAVFTpbdOzYMWkTYVfIp0qHYjc+YC1Whmo3/uKr+F6gYIThL34ncHYG+hR9YGdkvidGFcPD0O9cDWfYIAc49prnfPcc2GEF+XsH9VXIHcNO1EZhUpc1Eob9bf00uh/zNYiwmVEFyR116AgbA99rJn2FHZLUvsKuhC+sK6g5Wjyf0GFgrQ5aTHGvxWCWT07KUFxHUF6dQWEdi+tAqFBch/wuroX5L2RK/+Q7SooWRuwGGXm/iTG2iljtM5djqLdCR45nSc6DWEkWxIqHzjCAiHIlpA0sqIyXLAWlBs+mxksW1EhQ8UqrPGFc7DhAszBi4R/eGGV6Ah3BoVll1P4p39eCsmXv2E/y6jaSAYiOeckca7KjJAz97kJE95T4sbdxPG4dNNLvyfqeWTAXjMxSMbwlvVo/hhvSJtCU+54Yb46xCmWF85g48LCVCZVkHls/Bj7augmEMTqm9mOp8oXn5mwqgSFZAR1fP1e+zg2lDF/edUG4hA1ogdnAgBCKG4CL2Bhgy7GpZTDfAMh6xYwwhrLhyyiGuVlGsEythPHtHdjshW0A0KXmK1XQbMHAj7XQVMp46ADj0OBYdn4x7NfjrOsd8rpcacAY44YhaEZW1ujIRT8j1kugQoY+xMBTSZszk96zwRHhLLgkOUYc7xP0CZNcbOgaRJdNBJTASjqM3kWEhaUmHnsKQer0ZoRRLnzRMoeKBUne93B4ivBYILYajSeA18ZoknE/6eqCb1zB3zDKtX634QkAlRcZmO8N5N2mGz/4vhioFgPsfOa6S/mkt8HFjHdijAgH6bleFafMWTx5pDeU2DjH6B74gkN0D/VWzp3/LccEOzhEnweiMg6F49Bkp4QnB+oiGZs0PV5IDXQUeWBIkGnE1HdyWuz61YEf8YmHxk9AWfj2LMH8U44o9kYL3kV0zl1Lr0GMVHAbxEPVEUfk2tG39HFMz2eozWhgwR9MPt4pcKUUY9uH6CVa/FjdsOXNK2yIh3s9Ol7wQb/UQU+hrzlHCfeXfxS2yLhARmjR8sj6UR/0RrnGJx7vFHnyFQ1cDBsAwY3o4e0yWccjNsz3koNcJ+FnyMjCylzzCki7Cogc8U6KsLmhx9Y/Do0tLVARIwAgUrwWhUBhg6l3jXEVG9R8+y94eFD6xmtVM708SsIUlBMqvAfIxScb71mJdOMK7qLAU446W8g/iJjbMGCLkGDhUsQYjteOwaBK6CxA3MzoBpBHiZ0YXPL0JPxTDp0v5CgEX85RxMxESIxxlcu7b9djXRPtu/xkcEiQncAxwDY3B1ZNhmzKwCUcu82bT5lYuGci5Mr2U18oZ/6qGvSBxIZU5b1lB+TFzHAOGTQmvOA20toKcrxjAn200f1IXREIBjbruz6lnltwUCZBA/t+P0hiWRve5njdhYP5labxN7ApjrjehGOdWxEobHAJj4VLcjLelpMqPAB4fMpBoVKUvU4kP0Y0HgSHMXXGe/kzWWu8csH1SR0GGFaNTmWuj88w+faD0HQwQEeZb0TgaozukG/vKBTpQmtdGKPzRBzyHlUUKxb6OljVY8awkQzURoduVZMZk3RvRxgLgWEMIWOg2ISS2McEpz1i7i1cbIBGV/TBRUgXWRbdSxOyeGKD/XiKh4iRpSAS78L5QBGvLmGgqFQTKGJfGrC0gdRitQkeNqFG31rEsbXI/xtzNPF2GygkeBFao6RPM4X+S+G0D4BcCH7hPoS/QRMDsJCjhKAI+6Al8DQaRYZ9kphdUxhhcO/aYiOpfzLNjeCFljc/9pq7SIiqxTuqtrmMhH1dXPVvQlZNXww7u3i/iMeqti+GzV28Xy4Ig9jkZsL9Yt9wqvy14lHIaD9DFlBJ7HWEvIXzre4q3mPCtrt4Odk3fkrLQ3sz6GbUdkLFTmaY6Hs8sY0bm+PgCZDl3t3y16LgSLVIv8n0m0pPOj3hrWi4g6l9Y1PBqYa8+uvH6su/8dKvd+q4KpgEvTVNHFl013S4GaasHVBTiWhYDQ/dmUoaX2gAzwu5xPECEGofKXpVHD+I0R0kV1AowmUkLtLlJjUGf9gnWyBb6byzDX62H/Kng9cyUFzwt+R3Sxn8bjwHePBX+go3GhvXCOOkxtxKN8ZZsmCTJY8PIrSay3g1BM9A5teHGDbAcdPt5w6D2K7s72mN1uscSD+l+7+Ye0OXHsMHGXLbmgWuhkszKjbsIv1Y7PvXKrTVjnCUmN42Ib0d+sIl0M3weI3YYMSa30Vnir4R58f+67NshjVZNmy6g2uGHRunxP+LNBs27BFpNiWTExvU18h1bAyNabZRxYoKtC6G65M+4abiJS4RU8wqNHRDtI5ptqDpnAhJNiVjf3fIISFENLQCFJFPsql4eQtuLPrmd/iN+41CFB3vb+Y7RW1vuvE8jmFSHm6nsyyay2M4sdGgUo2JcYpJcYpJcYodB70Rwg1gxuJvPD2J9CSbeEbROVdFhvmejXW4OAVXN/1FSbiCzkLcrHhkFnQIwp1jFa8+W+ARFrQWcjrcdvdXFYpYEbsriWveVeclw/ZKuAvdI3fszpAiZPI0hMj+6kK4PwVMjjfvlQw3v8CRwZKSiJlcuM7hLwr4chgYSuM5Cm6b410iF7nGQPEKOyHwnjyysXPxaoVOFhbgebcGv8uBakiCwcTSq3+y6cnFJ1QJ/omlJ56eRHryflXBmW5BBmM50bhweyd+oYRhW3ju8sGZJ5cP5QyCIBQ0pXIfz4R3HPbMu2DGWIobsN17dvswqOc2SJUuAinsd5VdT0DHz86AdcazEUO8NRk7DarrlPnCCy69jteq0Z7iBxdwZfinCp4uspeLX1iJNhKvUWApaAwd+JAFwBBJjnmogv2u3HXZ1/fJxhgc1Qbc385C79TUBgmjOgj37bD9xhc/mL+85NDq+G2I/NseKSfgb8xgMM+bHINe8n21WlpXxg1HAPmyS16yprxkHa4f/H/oJrfOsV5wjvWtzrFeco71OzrHesk51v+NnGPsNOaum6/0HcrY/2MApjGD3nBgUPzS1st0ukwPf/Vf3Prhh7u74de7j+EDXGz+juevv82f2vrw650Y/U9gtT78+ttvvwFIaCTIJ7PFyX4OfyjmKEXMUdz/ZDJ4ApTpPBnSNv3JkFKaZ5UQjSEmael/chm2spjqqKnQ7+LJw8Q8WW+0kVNJIgrjnETxa4TZPDHPuxPKz5bhSGT4t7YB/7AP0KKwZg7HA9gWa0tqU2F5/78AhIVj8fsc7lgEZsL/AxI8IMfDOA/zeXiPx/cC4USAJsK6IozLAE+G32WYL8O4CvOgYys8pKOILJtwTciy+HJCO+IN1d+w0Tg9ogS54fCg40OcHtFlEV8mE4HiyyqJUMQ58jjEGOEhvRwXVBEfHafrOF3H6VrPzLO9v5/20yl8HXQ+ZuFmDmKsYYz4W1jjgn9jZJ5tKNGOBIzUSufIq/PUxQ5nOCWWbP56Zy0gmR7YPjzcp789l03WMyvfRXKZQFobERhHSioeHnaX3cu0/yVfVNvFnaepFSaUWruGll/u8wX+AHa23kjpZZ4YODF5/EVGzkncpV0GY78vdClFd9k/35mtC+YrD5OTBiEiO0bUxsjvSaRkAynJRAmyUO/OXSEUqWjCv6NQ6fBvE6CbMN+G922k7hilcGw21Z5Jq2ZEUhjpoTm3jjJwBQW+OxbsAiEKwbTzmsUK+HfuspOzKtMWo+moi/bkZK5B4h+z3VXmPtNCERUdKGwDizlOCegT/Jmr7acKV0lxmcxsMc6dHkqWFxSVEsuls9C6R/mnp1JZcEGxH8sN/PZU7IBzUsd4sxlnHZ9LZlc0tIjtWjmLIE4/7ArtR+mduHKj90Wx2vaXUiGQ7mVtJqKTs/ooCv1rKJ+mRjdZaZ4fz6X0+kgaeKqGSS/TafulPNeR9E9n34RnS+BfJMmlZYZ8l7Y/JhK5ViyjezS7ResO/lOB+IJfHeaa/LQzMsqegvo0fT5WHG9ICP0Vwp/cyVDUmYLyzHJFBCpHJTmmumJgwnGp7UTmZ0Zaz+5lOqLkMTbsPDuBcUHVs6ifjg+FCFGaIvJ1QDJo1mC6gn4N6jXiH5Et6dQX6KHlrK4DAOjeT/DZ+Ev1nfp5C1koQ7linWUqh4hyV3KeLghHxm7JMZDlQXdEp7XnrbfSNbD34e9KlFJG6pWKdUkWrTGeOTFxWclcJTbVuUB6lvIabDu7dDkcJdA8hVqJ4eIviher7stAgFLhabe5Rb3fVlsh9UuxlWk/nS+7bekJU4CTLJdCXS3VqirI7y1ZvXaB0qfIjUCr54q4PC51qOIHkynLjq4slUcT2kcQkR0Dl3FRgjztnqZLSUtJJkwKFm/WCH9yNVuoUPcdbZ9Z4vuv28OX8gigl26FX3a/OwFrF6RTN21hP5WzobFtDkmDsnCdDZRjKS6Iy+Lf+snIkenQOSNTJho6avX++FCaYUY6kPGQGU8eUmSHqI4YT2FJLgj+TzrkbjbLkK2tBuF35zYFVyyPU5M5K2KFx0+7koKa3Llp5hU+tyb5oXAwygUaftY5P/fCK1ssQhvTnL94m9aJK/i/qpK7puT+WW63cOJzm02C2g51AkkueLHQ+bI9lI71SJrkmBQcqxXi34jKlWtGyOChVOorZhqDnKRMZARCJAJShjEmBsI8E+a5JvPYWrg5yk82I0XLyTK34e4VmIkgl+2uTLhI0naJZmJpIaBER0V6vJlbSiN5jnO6Q1ZrnI6lzbW0vVbNzH2FOqPD59drsQipTsVD70RmTFtrWixQZQXJ0kPgnJjajdlBE84/ZgltdDfHyGpjwRFPhecgSQeTMhl+mdNUeaqMdAyXJe5GSXsnSfKbeD7h36/JyUHuImoG08evl1vlBeFavx/0nyrROV8qskLhObOMqpzX8tTD9rItlTApeLm8PUzTU0EHMpe/yBYP0+ft877U4JpSGqvS3A/T59q6wrcjCV85Bj2xAFTs8Mtpqjw+Re4yrw0+TE/T4aFiFEYKTq5GH6bLdHqsNwDNzdSZZKL6sHspYw46FixnVfnUnINi/sBS+dOH51NV1oGPJqzIbU3b+68l45L55a7/Ne23T+eaTvQSLJ85PVanQ9Zvc8drOtxvn85NyA3dSyviwuk/nss4Bj6MfD2Em54ry2SpPabkU6oLpNRRxpzTy3QqcxhkWjMVP9M6i9H29DNk0ncXxPgMf/4zQzpjKd4JOPOU9PTzZTodqviZzpfmNP68O52rPCtF4mxSVV/KnN+UDAnqV7aohzVKB5IuAujSClz1A6ucbvIoispVdghNUKBERvkoR52cTi9yuhKzN9nPaJrr1JJoNpPgqwaRtM8mhVmcNOzzx//59XJ5On/47rvpsPm2+2n3ND3stpvj6ct38K/vsuD/Yxv909H7jWAO07fL8fBHbs4f99tvH4+fPz77P2+33X/8ctq+7C5NqAN/voCQunqT/dQYz6oRkVZ9vrwvbZjOi3CdZH99uE3vxbXUdhSZKsW9No/4+YR/kS8j1arkdJk/ylo8osDdXMPIHbKqTSJieix0HPS0Eo5L9MCj55087ny59DdlM7VJVujlFerXXieryCJK8mSFB1lvPnnSc3UhaZ6MWUsfYLSZFqVSR1+m0ghTWjOVD1J4Fc8jxt8sGSueZRq+TJeOAOSZI6o+kVi0TaOkpR+3P19O291+Px2+XEpXRuTCyVspS2ucvx6/4SKln8nzcJBTrnuY/xz/LHeBQZ7C4Au7OD9NlRPFijwgeXa7l6ngVX2tvteIYHJUUrScGkHmgCxzXTJdWnlSI+kT1R1hY71cWUsec2tpW+1YcNfzrnSbM5JHCTGBP21sA+ysGZWLzbRgsTLlw4w9uob55ZHSUWoeCew+l3xAurVzBiSJX5sKSQKp+8cdYD56p7HM/ZDhTteljWt8RM/z4+N0+Xos909aW5bn+Ku8F8XPRGGjqquluJ/IT2T2MP2ii831iZhSFqmTMMlMsl+tgW1bAcvGh0iA+22lR+jMtCwmwtuFLczkKLAnpUl2h24SWlCGX+Vwd1Dd2v1n62DRxbqxOPKn5zJgINtmyraEOP08nUrepRMhhahh5rpySMngdTGFAn9P/UubTLekg1mHiVWbcRs4Fqa/bB+bUcA/6V56qGQaQBVH+HL8qbRAZMl4Zdm3bHghI8e4mmzDkyR2axQdod8apJ7221+qVAl8fSiztVSOZVe6F3ShakX/1O5SuhqUfMtiyrQvbAN8vfN6R+1PVY6Qzs50qp4/7Q4TKIX7MtVypYyeEfyn50uZ2WR0NaLbaR/+mnumkTIDnxrI4qHrTsGN5ox6WgD4+OmhRJmsQryP45/DbQJk+ONgsw/fKSgJUa9RZX1YpsMDZjS3+BXooiTLyu0xUduKSrVK1eBDdlLmSr315+GW07JR6NjlbtJyvysdV7IRvOcU7o9fanGgVWxG2cftT6VmlqQg5N0nMK0sNZE2pbCpj9tDlemE+7orTMHj9lzAE5kz3mGesgOt10DyuL3UOWa6wtw7rsftz7vH54Kn4RYtZaZLHghLTGUXEdmClG8nTq0dWbhuu9xw1ikrdU22X/taZotyqMmMN5e3gjg9H75Mf5z4H+34RydQaQeAJe858uRGdyvM8/RYBFicjB+L+GDd4i/TaT9dPmZu2R9epv3xfnf55aMfK+0v3R+X+YuPx1od0r0STZt2k9ppVy5oTWqV4nSf95fdU9k1TzfgZlbuMN1P5/O2LEJwRaqWuSpq80W+FdxBnp//pb5nRtWUY0L7DbXlJH7tbbC22pxaetuycyoBN9e58hykTz3vqisyZPzMCxL+XEY+guworHyJ2cbl7aiHY6nySSc1V/mHqgcNvuKwatrpsTIxdDtBXsI7HKvyEGmYcot2eH78VHkSpAltr+jlBuXw/Diddve1eSRlOef546d/n+7L5oOrVzUiQ1d96dEPrevfq/rP2+tGs4jS/efFTspE06o8y2u6z+u6VV2vqmoGKale3+aqu/WvJNNX1BpanTyntJOURbQXChOyiUPmi17pLBYueyadkkp7iWtThJLJeNUmSNZk1xYGr1yLWFUwFK2m7NWVjofyVhWTlLGaL2Oks7ml4yt3/qq2QtJ1nPV/T2kcTw+19iGj9sz7PV6+VtPIW9miYaxcXJ+2z1VWkBf1jV7rdO6GP1WJVbKLppfJftodFmLC7FJRmN2JCfMlKoooymrIfP/76sYZeRMs3vOM9zttkndeLtfkgeiuumLm8VJxMekG9j518HQ875o0a1Zq6pSDM+F/Ok3n6fRS9VaRZfScFZ9O08vu+Fx69IK8t9fce+/0wcly9bYPLr8VyqQs53WY5HR8mk6X6poFJxMGUexzNI4vu4eSPIJSMrd2N1a3chZylrNV7rUwnrYPu/IcMqV011anwqypKriR7npku/x8YPZl9zi97M7PkKyvZTBTJkt9y8YtLVl/kCNj686Zp4abvPn5NN0fTw9NNxvFpiZ6H2NnCWKvWSIkSmaP2s0i1e4yLzmC7y3zeTpNVZGB0nf/5d0Up+nx+FLmH8nvQ6zqp/ALdlumszj16lo9uqImrNo7yRteeZY0Ta0uEl1RMmtvnUavPp1K42WmfOXsHbYfQij4+T+ed6dSp9HNqJ00/mk6P0337RcwONnl2/eBTtO56hMmP0dQVj/m6Y+VD5M3QvV6EhkvdNjl+VT6HmTEufw1iHy9ypaS38soeejluH8GMw4KsDR5Ijd5pF44NrZyIZDsXez2Kyy4ZTb3D0fK5FbLVKqSvjg6ZpkATB+W88hcULfKgwtg2lHW1QtX7KLXK8cyUTnXfWtkPTfng/P9dl9dn6NdwRza/VRmTljeYmviVy/ars4wfSqBkk3ARSDQ5k3JM+o2asD82KzR6xLmY961xHoyyVS+3OFc0YD+lpbM55UpWDp7OAd+i2HeebkZLL8oS/bCnclmMFHUiOkTXWgGy/VCp61pXqFtBisiPcoknr8en/fVnQuy85pqiFn+JA9srtwUfeOkPKx5fnnbkPTts7abnHl3j9CiWRqxIsaouiI7ZNo9NrcHstxfyj8nl2mpmNPRR3Vrh6jWuxKeruwF6fSDtuGZLQiHu+41uPLim0DqCuHqqJmuR6oWft0fk3nisaVeB/Rt2JhLMVWvFZD4CF36xlPMUabsZPuRj3f6mNyaNpW5Taz9NlSKt9vcYRuBl1xeJQhnWm/qrAknE26lLt3V343i9PeCuq7i+bB9On89Vm1ZdO9Jbo1b/UdrmZL6YYHLtuwHY1l9b4X8CVLDNj5b3sYsOim4GMrF/1ONIVXyeg7pFj5Qknofm0/RpJLWUq66/RZZ0htrMtM5vwFZ/kcZ3ZHObN7zAhOre7TZQUV8TNiojdkCqpX7fClbnUgntNYW7ReA2stWdEmxI54FcY5PJS9myva6muq1/Kye5RH45XyZSp963W2OFOF2mjr8ouWXuchex0yxXKouGMbJz6YuxG2Xr+WHvMh6ZXNDo7hi2g3Ok4afP+xUFtYiCuVXH1ZRNFq4cHzh9AJXR4wiHlGxRXQiNlEAw//rm0FEOa2u/jRV9rU3iW6801Inqer78PVHGWPFq74n33yssbo3X3+8MX1tpbpPv/xZx05psC1+LbgJTe/469yEq237V3rQE8+0HylrDULj+cvGx5xtxcKHbhfa3NuPXN5U++z5OJev1Rf16PL9SNjHuNBpmjb/XuUmyY7AeIUk12lVBoiRHwek7E2Zr1/+zuj88eJ1HygD7B6u5Yp4VkBK131aA9tbq/pix8Knz7Jo4FK0qVBmevmOR988dT7/d6VJl9JQxAcOCnWxolGjk7Sgv4O7FAQ0zRyzEKVfupICyYwyaCcjtm7zZO9qHH0rqVRdaQXPLKXEZm3J5RHSbnAimW599NevUiLZSEeefdFt6uiuMr3JFKYiRnmPrsrul3ArL7rIJVffzyQ6npqPDVfMEMS2uptFeWEVSV9L2ucq7U/3ibV3SbP0TxUtkJ+6Kti3+cwP/aWI1KOUzS8vGHLSNBS9cb0MoMvvk3Z659tba4SvlZmHNdfX2guejWe7xgmYbf9Nln61gS8JV4aTnPz81RwGz/yeSpyuXbfzwTSXZ780dachLlB9IIvkhipTVC7SqlSW34hW0QkOx2vDHh1lmJ+fSmrRXzbMefTpYXsp9QBN5iygrPuQ6PbNPAH4XH0mZuErPlEII9+2tzoSm7XZ6hJk1XpFlvbq767WcWIh2xUTkE22r4g+8xDz+VylWsnu+zplndRz9Ctj0BWDqhgshfdcm+WgUt2I2ctUf6yPvIrWDWvjKr4hv1gn90M7ppa1AYhsV/Qd/nVdy+TJOtXxH4oend4tAfrzN11sduU3vcgeloK7XnbnxmK5vHhlqOJVbFRpK8HkJzH/W0bjc8x8y8Xryt2pjDjV9USxbR2RlW1GczECF/827b58vdQeFanfcl3qp1aXbIq/59LxE/rfmP/2dap7TTn5Zzp6ftbiJwK+fd2Vt7hIrb/yfvC3XWlGSL8qTx9+qy7hklcCw7GtvXJy5arJUoPfmu9ndJsAvx1PP5XOBP3p8/W9z7/9Bn8L7Gn3NO3hu7gffvjxt9/+L7BP2f3uBAEA"; \ No newline at end of file diff --git a/docs/api/classes/BodyCenterTransformation.html b/docs/api/classes/BodyCenterTransformation.html index f1829ed..244ab98 100644 --- a/docs/api/classes/BodyCenterTransformation.html +++ b/docs/api/classes/BodyCenterTransformation.html @@ -1,10 +1,10 @@ BodyCenterTransformation | nbody

Class BodyCenterTransformation

Frame of reference transformation to the center of body i in the system.

-

Implements

Constructors

Implements

Constructors

Properties

Methods

Constructors

Properties

index: number

Methods

  • Transform the frame of reference to the center of the first body in the system.

    +

Returns BodyCenterTransformation

Properties

index: number

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/CelestialBody.html b/docs/api/classes/CelestialBody.html index 1a1d305..b31d363 100644 --- a/docs/api/classes/CelestialBody.html +++ b/docs/api/classes/CelestialBody.html @@ -1,25 +1,28 @@ CelestialBody | nbody

Class CelestialBody

Represents a celestial body with all of its kinematic properties.

-

Constructors

Constructors

  • Create a new CelestialBody with the provided information.

    +

Constructors

  • Create a new CelestialBody with the provided information.

    Parameters

    • label: string

      label of the body.

    • mass: number

      mass of the body.

      +
    • radius: number

      radius of the body.

    • position: Vector3

      position of the body.

    • velocity: Vector3

      velocity of the body.

    • acceleration: Vector3

      acceleration of the body.

      -

    Returns CelestialBody

Properties

acceleration: Vector3

Acceleration vector of the body.

-
label: string

Label of the body.

-
mass: number

Mean mass of the body.

-
position: Vector3

Position vector of the body.

-
velocity: Vector3

Velocity vector of the body.

-

Methods

  • Deep copy the current CelestialBody with the updated kinematic properties.

    +

Returns CelestialBody

Properties

acceleration: Vector3

Acceleration vector of the body.

+
label: string

Label of the body.

+
mass: number

Mean mass of the body.

+
position: Vector3

Position vector of the body.

+
radius: number

Mean mass of the body.

+
velocity: Vector3

Velocity vector of the body.

+

Methods

  • Deep copy the current CelestialBody with the updated kinematic properties.

    Parameters

    • Optional position: Vector3

      new position.

    • Optional velocity: Vector3

      new velocity.

    • Optional acceleration: Vector3

      new acceleration.

    Returns CelestialBody

    a new CelestialBody instance with the updated properties.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/CentripetalForce.html b/docs/api/classes/CentripetalForce.html index bc61615..38a25a1 100644 --- a/docs/api/classes/CentripetalForce.html +++ b/docs/api/classes/CentripetalForce.html @@ -1,11 +1,11 @@ CentripetalForce | nbody

Class CentripetalForce

Represents a Centripetal force object. To be used to calculate the force required to keep the bodies in circular motion around a given center.

-

Implements

Constructors

Implements

Constructors

Properties

Methods

Constructors

Properties

center: Vector3

Center of force.

-

Methods

  • Calculate the force required to keep the bodies in circular motion around the center. arr[i] represents the centripetal force required for the ith body.

    +

Returns CentripetalForce

Properties

center: Vector3

Center of force.

+

Methods

  • Calculate the force required to keep the bodies in circular motion around the center. arr[i] represents the centripetal force required for the ith body.

    Parameters

    Returns Vector3[]

    forces.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/CoMTransformation.html b/docs/api/classes/CoMTransformation.html index 07520b0..4a22d0c 100644 --- a/docs/api/classes/CoMTransformation.html +++ b/docs/api/classes/CoMTransformation.html @@ -1,7 +1,7 @@ CoMTransformation | nbody

Class CoMTransformation

Frame of reference transformation to the center of mass of the system.

-

Implements

Constructors

Implements

Constructors

Methods

Constructors

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/CombinedForce.html b/docs/api/classes/CombinedForce.html index 49b95bc..891ee3c 100644 --- a/docs/api/classes/CombinedForce.html +++ b/docs/api/classes/CombinedForce.html @@ -1,10 +1,10 @@ CombinedForce | nbody

Class CombinedForce

Represents a combined force object. To be used to additively combine multiple forces acting on a system of bodies.

-

Implements

Constructors

Implements

Constructors

Properties

Methods

Constructors

Properties

forces: Force[]

Methods

  • Get the combined forces acting on the bodies. arr[i] represents the combined force acting on the ith body as a result of all force systems.

    +

Returns CombinedForce

Properties

forces: Force[]

Methods

  • Get the combined forces acting on the bodies. arr[i] represents the combined force acting on the ith body as a result of all force systems.

    Parameters

    Returns Vector3[]

    element-wise combined forces.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/ExplicitEulerSim.html b/docs/api/classes/ExplicitEulerSim.html index 08a919c..3c4f494 100644 --- a/docs/api/classes/ExplicitEulerSim.html +++ b/docs/api/classes/ExplicitEulerSim.html @@ -1,12 +1,12 @@ ExplicitEulerSim | nbody

Class ExplicitEulerSim

Represents a simulation function object that uses the Euler integration method to simulate motions of bodies.

-

Implements

Constructors

Implements

Constructors

Properties

Methods

Constructors

Properties

force: Force

Force object to calculate forces on bodies in the Universe.

-

Methods

  • Simulate a step in the Universe by using the current state and a time step, using the Euler integration method.

    +

Returns ExplicitEulerSim

Properties

force: Force

Force object to calculate forces on bodies in the Universe.

+

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/Gravity.html b/docs/api/classes/Gravity.html index 808f0e1..93bfb9a 100644 --- a/docs/api/classes/Gravity.html +++ b/docs/api/classes/Gravity.html @@ -1,13 +1,13 @@ Gravity | nbody

Class Gravity

Represents a Newtonian Gravitational force object.

-

Implements

Constructors

Implements

Constructors

Properties

G

Methods

Constructors

  • Create a new Gravity with the provided gravitational constant.

    Parameters

    • G: number = 6.674e-11

      gravitational constant.

      -

    Returns Gravity

Properties

G: number

Gravitational constant.

+

Returns Gravity

Properties

G: number

Gravitational constant.

Default Value

6.674e-11
 
-

Methods

  • Calculate and return the forces acting on the bodies. arr[i] represents the force acting on the ith body as a result of all other bodies.

    +

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/LambdaForce.html b/docs/api/classes/LambdaForce.html index 340ecfc..b72ceab 100644 --- a/docs/api/classes/LambdaForce.html +++ b/docs/api/classes/LambdaForce.html @@ -1,5 +1,5 @@ LambdaForce | nbody

Class LambdaForce

Function object that uses the user-defined lambda function to calculate the forces acting on the bodies.

-

Implements

Constructors

Implements

Constructors

Properties

Methods

Constructors

  • Create a new LambdaForce with the provided lambda function.

    @@ -9,8 +9,8 @@
  • Length of the returned array should be equal to the length of the input array of CelestialBodies.

Parameters

Returns LambdaForce

Properties

fn: ((bodies) => Vector3[])

Lambda function to calculate forces, provided by the user.

-

Type declaration

Methods

Returns LambdaForce

Properties

fn: ((bodies) => Vector3[])

Lambda function to calculate forces, provided by the user.

+

Type declaration

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/LambdaSim.html b/docs/api/classes/LambdaSim.html index 3943622..9993b0c 100644 --- a/docs/api/classes/LambdaSim.html +++ b/docs/api/classes/LambdaSim.html @@ -1,5 +1,5 @@ LambdaSim | nbody

Class LambdaSim

Function object that uses the user-defined lambda function to simulate the Universe.

-

Implements

Constructors

Implements

Constructors

Properties

Methods

Constructors

  • Create a new LambdaSim with the provided lambda function.

    @@ -8,9 +8,9 @@
  • The lambda function should call or calculate the forces action on the bodies by itself.

Parameters

  • fn: ((deltaT, currState, prevState) => State)

    lambda function.

    -
      • (deltaT, currState, prevState): State
      • Parameters

        Returns State

Returns LambdaSim

Properties

fn: ((deltaT, currState, prevState) => State)

Type declaration

    • (deltaT, currState, prevState): State
    • Parameters

      Returns State

Methods

  • Simulate the Universe using the lambda function.

    +
      • (deltaT, currState, prevState): State
      • Parameters

        Returns State

Returns LambdaSim

Properties

fn: ((deltaT, currState, prevState) => State)

Type declaration

    • (deltaT, currState, prevState): State
    • Parameters

      Returns State

Methods

  • Simulate the Universe using the lambda function.

    Parameters

    • deltaT: number

      time step.

    • currState: State

      current state of the Universe.

    • prevState: State

      previous state of the Universe.

    Returns State

    the next state of the Universe.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/LambdaTransformation.html b/docs/api/classes/LambdaTransformation.html index 0c39256..3df8b33 100644 --- a/docs/api/classes/LambdaTransformation.html +++ b/docs/api/classes/LambdaTransformation.html @@ -1,5 +1,5 @@ LambdaTransformation | nbody

Class LambdaTransformation

A Frame of Reference transformation that uses the user-defined lambda function.

-

Implements

Constructors

Implements

Constructors

Properties

Methods

Constructors

  • Create a new LambdaTransformer with the provided lambda function.

    @@ -9,8 +9,8 @@
  • Transformed state should contain the same number of bodies as the input state, and the order should be preserved.

Parameters

  • fn: ((state, deltaT) => State)

    lambda function.

    -

Returns LambdaTransformation

Properties

fn: ((state, deltaT) => State)

Type declaration

Methods

  • Transform the state's frame of reference using the lambda function.

    +

Returns LambdaTransformation

Properties

fn: ((state, deltaT) => State)

Type declaration

Methods

  • Transform the state's frame of reference using the lambda function.

    Parameters

    • state: State

      state to transform.

    • deltaT: number

      time step taken to get to this state. Only applicable for time-dependent transformations.

    Returns State

    transformed state.

    -

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/PinTransformation.html b/docs/api/classes/PinTransformation.html index b2e80ff..9564bb1 100644 --- a/docs/api/classes/PinTransformation.html +++ b/docs/api/classes/PinTransformation.html @@ -1,12 +1,12 @@ PinTransformation | nbody

Class PinTransformation

Frame of reference transformation to a pin body i to the given axis.

-

Implements

Constructors

Implements

Constructors

Properties

Methods

Constructors

Properties

axis: Vector3
index: number

Methods

  • Transform the frame of reference to a pin body i to the given axis.

    +

Returns PinTransformation

Properties

axis: Vector3
index: number

Methods

Generated using TypeDoc

\ No newline at end of file +

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/RealTimeVisualizer.html b/docs/api/classes/RealTimeVisualizer.html index 8c3b89c..9388cf2 100644 --- a/docs/api/classes/RealTimeVisualizer.html +++ b/docs/api/classes/RealTimeVisualizer.html @@ -1,19 +1,23 @@ RealTimeVisualizer | nbody

Class RealTimeVisualizer

2D real-time visualizer using Plotly.

-

Implements

  • Visualizer

Constructors

Implements

  • Visualizer

Constructors

Properties

animationId: null | number = null
divId: string = ''
simulation: Simulation
universeTrails: PlotlyUniverseTrail[] = []

Methods

  • Adds default controls using lil-gui to the visualization.

    +

Returns RealTimeVisualizer

Properties

animationId: null | number = null
divId: string = ''
gui?: GUI
simulation: Simulation
stats?: Stats
universeTrails: PlotlyUniverseTrail[] = []

Methods

  • Adds default controls using lil-gui to the visualization.

    Parameters

    • parentElement: HTMLElement

      parent element to place the controller div in.

      -

    Returns void

  • Simulate and play the visualization.

    +

Returns void

  • Simulate and play the visualization.

    Parameters

    • divId: string

      div id to render the visualization in.

    • width: number

      width of the visualization.

    • height: number

      height of the visualization.

      -

    Returns void

Generated using TypeDoc

\ No newline at end of file +

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/RealTimeVisualizer3D.html b/docs/api/classes/RealTimeVisualizer3D.html index 8951654..d4dde65 100644 --- a/docs/api/classes/RealTimeVisualizer3D.html +++ b/docs/api/classes/RealTimeVisualizer3D.html @@ -1,21 +1,25 @@ RealTimeVisualizer3D | nbody

Class RealTimeVisualizer3D

3D real-time visualizer using Three.js.

-

Implements

  • Visualizer

Constructors

Implements

  • Visualizer

Constructors

Properties

animationId: null | number = null
clear: (() => void) = ...

Clear the visualization.

-

Type declaration

    • (): void
    • Returns void

scene?: Scene
simulation: Simulation
universeTrails: ThreeUniverseTrail[] = []

Methods

  • Adds default controls to the visualization.

    +

Returns RealTimeVisualizer3D

Properties

animationId: null | number = null
clear: (() => void) = ...

Clear the visualization.

+

Type declaration

    • (): void
    • Returns void

gui?: GUI
scene?: Scene
simulation: Simulation
stats?: Stats
universeTrails: ThreeUniverseTrail[] = []

Methods

  • Adds default controls to the visualization.

    Parameters

    • parentElement: HTMLElement

      parent element to place the controller div in.

      -

    Returns void

  • Simulate and play the visualization

    +

Returns void

  • Simulate and play the visualization

    Parameters

    • divId: string

      div id to render the visualization in

    • width: number

      width of the visualization.

    • height: number

      height of the visualization.

      -

    Returns void

Generated using TypeDoc

\ No newline at end of file +

Returns void

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/api/classes/RecordingVisualizer.html b/docs/api/classes/RecordingVisualizer.html index 96de0ab..7250d53 100644 --- a/docs/api/classes/RecordingVisualizer.html +++ b/docs/api/classes/RecordingVisualizer.html @@ -1,20 +1,25 @@ RecordingVisualizer | nbody

Class RecordingVisualizer

2D recording visualizer using Plotly.

-

Implements

  • Visualizer

Constructors

Implements

  • Visualizer

Constructors

Properties

animationId: null | number = null
divId: string = ''
simulation: Simulation
universeTrails: PlotlyUniverseTrail[] = []

Methods

  • Adds default controls using lil-gui to the visualization.

    +

Returns RecordingVisualizer

Properties

animationId: null | number = null
divId: string = ''
gui?: GUI
simulation: Simulation
stats?: Stats
universeTrails: PlotlyUniverseTrail[] = []

Methods

  • Adds default controls using lil-gui to the visualization.

    Parameters

    • parentElement: HTMLElement

      parent element to place the controller div in.

      -

    Returns void

  • Simulate and play the visualization.

    +

Returns void

  • Simulate and play the visualization.

    Parameters

    • divId: string

      div id to render the visualization in.

    • width: number

      width of the visualization.

    • height: number

      height of the visualization.

      -
    • recordFor: number

      number of seconds to record for..

      -

    Returns void

Generated using TypeDoc

\ No newline at end of file +
  • recordFor: number

    number of seconds to record for.

    +
  • recordSpeed: number

    speed to record the visualization at.

    +
  • Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/RecordingVisualizer3D.html b/docs/api/classes/RecordingVisualizer3D.html index 37ea4eb..03a935d 100644 --- a/docs/api/classes/RecordingVisualizer3D.html +++ b/docs/api/classes/RecordingVisualizer3D.html @@ -1,22 +1,27 @@ RecordingVisualizer3D | nbody

    Class RecordingVisualizer3D

    3D recording visualizer using Three.js.

    -

    Implements

    • Visualizer

    Constructors

    Implements

    • Visualizer

    Constructors

    Properties

    animationId: null | number = null
    clear: (() => void) = ...

    Clear the visualization.

    -

    Type declaration

      • (): void
      • Returns void

    scene?: Scene
    simulation: Simulation
    universeTrails: ThreeUniverseTrail[] = []

    Methods

    • Adds default controls to the visualization.

      +

    Returns RecordingVisualizer3D

    Properties

    animationId: null | number = null
    clear: (() => void) = ...

    Clear the visualization.

    +

    Type declaration

      • (): void
      • Returns void

    gui?: GUI
    scene?: Scene
    simulation: Simulation
    stats?: Stats
    universeTrails: ThreeUniverseTrail[] = []

    Methods

    • Adds default controls to the visualization.

      Parameters

      • parentElement: HTMLElement

        parent element to place the controller div in.

        -

      Returns void

    • Simulate and play the visualization

      +

    Returns void

    • Simulate and play the visualization

      Parameters

      • divId: string

        div id to render the visualization in.

      • width: number

        width of the visualization.

      • height: number

        height of the visualization.

      • recordFor: number

        number of seconds to record for.

        -

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +
  • recordSpeed: number

    speed to record the simulation at.

    +
  • Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/RotateTransformation.html b/docs/api/classes/RotateTransformation.html index b4f84ed..b071ae7 100644 --- a/docs/api/classes/RotateTransformation.html +++ b/docs/api/classes/RotateTransformation.html @@ -1,12 +1,12 @@ RotateTransformation | nbody

    Class RotateTransformation

    Frame of reference transformation around an axis by an angle. Makes sense to this transformation only during initialization of the universe and not at every time step.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    angle: number
    axis: Vector3

    Methods

    • Transform the frame of reference around an axis by an angle.

      +

    Returns RotateTransformation

    Properties

    angle: number
    axis: Vector3

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/RungeKutta4Sim.html b/docs/api/classes/RungeKutta4Sim.html index 35c101f..0867f48 100644 --- a/docs/api/classes/RungeKutta4Sim.html +++ b/docs/api/classes/RungeKutta4Sim.html @@ -1,15 +1,15 @@ RungeKutta4Sim | nbody

    Class RungeKutta4Sim

    Represents a simulation function object that uses the Runge-Kutta 4 integration method to simulate the motion of bodies.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    • Create a new RungeKutta4Sim with the provided weights for average force calculator, which is invoked on every simulation step.

      Parameters

      • force: Force = ...

        force calculator.

      • weights: number[] = ...

        weights for weighted average.

        -

      Returns RungeKutta4Sim

    Properties

    force: Force

    Force object to calculate forces on bodies in the Universe.

    -
    weights: number[]

    Weights for weighted average.

    -

    Methods

    • Simulate a step in the Universe by using the current state and a time step, using the Runge-Kutta 4 integration method.

      +

    Returns RungeKutta4Sim

    Properties

    force: Force

    Force object to calculate forces on bodies in the Universe.

    +
    weights: number[]

    Weights for weighted average.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/SemiImplicitEulerSim.html b/docs/api/classes/SemiImplicitEulerSim.html index 676f831..c9f4437 100644 --- a/docs/api/classes/SemiImplicitEulerSim.html +++ b/docs/api/classes/SemiImplicitEulerSim.html @@ -1,12 +1,12 @@ SemiImplicitEulerSim | nbody

    Class SemiImplicitEulerSim

    Represents a simulation function object that uses the Semi-Implicit Euler integration method to simulate the motion of bodies.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    force: Force

    Force object to calculate forces on bodies in the Universe.

    -

    Methods

    • Simulate a step in the Universe by using the current state and a time step, using the Semi-Implicit Euler integration method.

      +

    Returns SemiImplicitEulerSim

    Properties

    force: Force

    Force object to calculate forces on bodies in the Universe.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/Simulation.html b/docs/api/classes/Simulation.html index 9170315..0572576 100644 --- a/docs/api/classes/Simulation.html +++ b/docs/api/classes/Simulation.html @@ -1,5 +1,5 @@ Simulation | nbody

    Class Simulation

    A Simulation object that contains Universes and a Visualizer.

    -

    Constructors

    Constructors

    Methods

    Constructors

    • Create a new Simulation object with the provided Universes and visualization config.

      Parameters

      • universes: Universe | Universe[]

        array of Universes.

        -
      • __namedParameters: {
            controller?: ControllerType;
            looped?: boolean;
            maxFrameRate?: number;
            maxTrailLength?: number;
            record?: boolean;
            showDebugInfo?: boolean;
            showTrails?: boolean;
            visType?: VisType;
        }
        • Optional controller?: ControllerType
        • Optional looped?: boolean
        • Optional maxFrameRate?: number
        • Optional maxTrailLength?: number
        • Optional record?: boolean
        • Optional showDebugInfo?: boolean
        • Optional showTrails?: boolean
        • Optional visType?: VisType

      Returns Simulation

    Methods

    • Get the maximum trail length used in the visualization.

      +
    • __namedParameters: {
          controller?: ControllerType;
          looped?: boolean;
          maxFrameRate?: number;
          maxTrailLength?: number;
          record?: boolean;
          showDebugInfo?: boolean;
          showTrails?: boolean;
          visType?: VisType;
      }
      • Optional controller?: ControllerType
      • Optional looped?: boolean
      • Optional maxFrameRate?: number
      • Optional maxTrailLength?: number
      • Optional record?: boolean
      • Optional showDebugInfo?: boolean
      • Optional showTrails?: boolean
      • Optional visType?: VisType

    Returns Simulation

    Methods

    • Get the maximum trail length used in the visualization.

      Returns number

      maximum trail length.

      -
    • Get whether trails are shown in the visualization.

      +
    • Get whether trails are shown in the visualization.

      Returns boolean

      true if trails are shown.

      -
    • True if the universe with the given label is shown.

      +
    • True if the universe with the given label is shown.

      Parameters

      • label: string

        universe label.

      Returns boolean

      whether the universe is shown.

      -
    • Get the speed of the simulation.

      Returns number

      speed of the simulation as a scale of normal time.

      -
    • Get whether the simulation is playing.

      Returns boolean

      true if the simulation is playing.

      -
    • Pause the simulation. Only works if the controller is 'code'.

      -

      Returns void

    • Resume the simulation. Only works if the controller is 'code'.

      -

      Returns void

    • Set the maximum trail length used in the visualization. Changes only apply on the next Simulation.play() call.

      +
    • Pause the simulation. Only works if the controller is 'code'.

      +

      Returns void

    • Resume the simulation. Only works if the controller is 'code'.

      +

      Returns void

    • Set the maximum trail length used in the visualization. Changes only apply on the next Simulation.play() call.

      Parameters

      • maxTrailLength: number

        maximum trail length.

        -

      Returns void

    • Set whether to show trails in the visualization. Only works if the controller is 'code'.

      +

    Returns void

    • Set whether to show trails in the visualization. Only works if the controller is 'code'.

      Parameters

      • showTrails: boolean

        true to show trails.

        -

      Returns void

    • Set whether to show the universe with the given label. Only works if the controller is 'code'.

      +

    Returns void

    • Set whether to show the universe with the given label. Only works if the controller is 'code'.

      Parameters

      • label: string

        universe label.

      • show: boolean

        true to show the universe.

        -

      Returns void

    • Set the speed of the simulation. Only works if the controller is 'code'.

      +

    Returns void

    • Set the speed of the simulation. Only works if the controller is 'code'.

      Parameters

      • speed: number

        speed of the simulation as a scale of normal time.

        -

      Returns void

    • Insert the simulation visualization in the div with the given id.

      +

    Returns void

    • Insert the simulation visualization in the div with the given id.

      Parameters

      • divId: string

        div id.

        -
      • width: number
      • height: number
      • speed: number = 1

        initial time scale.

        -
      • paused: boolean = false

        whether to start the simulation paused.

        -
      • recordFor: number = 0

        number of seconds to record for, only used if in record mode.

        -

      Returns void

    Generated using TypeDoc

    \ No newline at end of file +
  • width: number

    width of the visualization.

    +
  • height: number

    height of the visualization.

    +
  • playSpeed: number = 1

    initial time scale.

    +
  • startPaused: boolean = false

    whether to start the simulation paused.

    +
  • recordFor: number = 1

    number of seconds to record for, only used if in record mode.

    +
  • recordSpeed: number = 1

    speed of the recording, only used if in record mode.

    +
  • Returns void

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/State.html b/docs/api/classes/State.html index 3a9cf51..0cd4b9e 100644 --- a/docs/api/classes/State.html +++ b/docs/api/classes/State.html @@ -1,10 +1,10 @@ State | nbody

    Class State

    Represents a Universe's state snapshot.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    bodies: CelestialBody[]

    Array of celestial bodies that make up this state of the Universe.

    -

    Methods

    • Deep copy this state

      +

    Returns State

    Properties

    bodies: CelestialBody[]

    Array of celestial bodies that make up this state of the Universe.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/TimedRotateTransformation.html b/docs/api/classes/TimedRotateTransformation.html index e915006..e3c79fd 100644 --- a/docs/api/classes/TimedRotateTransformation.html +++ b/docs/api/classes/TimedRotateTransformation.html @@ -1,13 +1,13 @@ TimedRotateTransformation | nbody

    Class TimedRotateTransformation

    Frame of reference transformation to rotate around an axis by 360 degrees in a given time.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    axis: Vector3
    revolutionTime: number

    Methods

    • Transform the frame of reference to rotate around an axis by an angle determined by the time elapsed.

      +

    Returns TimedRotateTransformation

    Properties

    axis: Vector3
    revolutionTime: number

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/Universe.html b/docs/api/classes/Universe.html index 73aeadc..7ca1774 100644 --- a/docs/api/classes/Universe.html +++ b/docs/api/classes/Universe.html @@ -1,5 +1,5 @@ Universe | nbody

    Class Universe

    A Universe object that contains previous and current state of the universe, a simulation function, frame of reference transformations and other necessary data.

    -

    Constructors

    Constructors

    Properties

    color currState label @@ -9,10 +9,10 @@

    Methods

    Constructors

    Properties

    color: string | string[]

    Color of the bodies in the Universe. A single color applied to all bodies or an array of colors applied to each body respectively. Incase of array, length should match the number of bodies in the state.

    -
    currState: State
    label: string

    Label of the Universe.

    -
    prevState: State

    Simulation function used to simulate the Universe.

    -
    transformations: Transformation[]

    Array of transformations to be applied to the Universe's state after simulation and before visualization.

    -

    Methods

    • Deep copy the current Universe.

      +

    Returns Universe

    Properties

    color: string | string[]

    Color of the bodies in the Universe. A single color applied to all bodies or an array of colors applied to each body respectively. Incase of array, length should match the number of bodies in the state.

    +
    currState: State
    label: string

    Label of the Universe.

    +
    prevState: State

    Simulation function used to simulate the Universe.

    +
    transformations: Transformation[]

    Array of transformations to be applied to the Universe's state after simulation and before visualization.

    +

    Methods

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/classes/VelocityVerletSim.html b/docs/api/classes/VelocityVerletSim.html index af5ea4f..b0a568c 100644 --- a/docs/api/classes/VelocityVerletSim.html +++ b/docs/api/classes/VelocityVerletSim.html @@ -1,12 +1,12 @@ VelocityVerletSim | nbody

    Class VelocityVerletSim

    Represents a simulation function object that uses the Velocity Verlet integration method to simulate the motion of bodies.

    -

    Implements

    Constructors

    Implements

    Constructors

    Properties

    Methods

    Constructors

    Properties

    forceCalculator: Force

    Force object to calculate forces on bodies in the Universe.

    -

    Methods

    • Simulate a step in the Universe by using the previous and/or current state and a time step, using the Velocity Verlet integration method.

      +

    Returns VelocityVerletSim

    Properties

    forceCalculator: Force

    Force object to calculate forces on bodies in the Universe.

    +

    Methods

    • Simulate a step in the Universe by using the previous and/or current state and a time step, using the Velocity Verlet integration method.

      Parameters

      • deltaT: number

        time step.

      • currState: State

        current state.

      Returns State

      new state after the simulation step.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/interfaces/Force.html b/docs/api/interfaces/Force.html index 9c0af5e..760d6e5 100644 --- a/docs/api/interfaces/Force.html +++ b/docs/api/interfaces/Force.html @@ -1,3 +1,3 @@ Force | nbody

    Interface Force

    Represents a force object used to calculate forces acting on the bodies in the Universe.

    -
    interface Force {
        getForces(bodies): Vector3[];
    }

    Implemented by

    Methods

    Methods

    Generated using TypeDoc

    \ No newline at end of file +
    interface Force {
        getForces(bodies): Vector3[];
    }

    Implemented by

    Methods

    Methods

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/interfaces/SimulateFunction.html b/docs/api/interfaces/SimulateFunction.html index fd76e2e..cd6be4b 100644 --- a/docs/api/interfaces/SimulateFunction.html +++ b/docs/api/interfaces/SimulateFunction.html @@ -1,8 +1,8 @@ SimulateFunction | nbody

    Interface SimulateFunction

    Represents a function object used for simulating the Universe. Should encapsulate the numerical integration method and other necessary simulation logic. Can use an external force calculation function object - see Force.

    -
    interface SimulateFunction {
        simulate(deltaT, currState, prevState): State;
    }

    Implemented by

    Methods

    interface SimulateFunction {
        simulate(deltaT, currState, prevState): State;
    }

    Implemented by

    Methods

    Methods

    • Simulate a step in the Universe by using the previous and/or current state and a time step.

      Parameters

      • deltaT: number

        time step.

      • currState: State

        current state of the Universe.

      • prevState: State

        previous state of the Universe.

      Returns State

      the next state of the Universe.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/interfaces/Transformation.html b/docs/api/interfaces/Transformation.html index 69962e3..f83163d 100644 --- a/docs/api/interfaces/Transformation.html +++ b/docs/api/interfaces/Transformation.html @@ -1,7 +1,7 @@ Transformation | nbody

    Interface Transformation

    Represents a Frame of Reference transformation.

    -
    interface Transformation {
        transform(state, deltaT): State;
    }

    Implemented by

    Methods

    interface Transformation {
        transform(state, deltaT): State;
    }

    Implemented by

    Methods

    Methods

    • Transform the state to a new frame of reference.

      Parameters

      • state: State

        state to transform.

      • deltaT: number

        time step taken to get to this state. Only applicable for time-dependent transformations.

      Returns State

      transformed state.

      -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/types/ControllerType.html b/docs/api/types/ControllerType.html index c48b7f7..37e2234 100644 --- a/docs/api/types/ControllerType.html +++ b/docs/api/types/ControllerType.html @@ -4,4 +4,4 @@
  • 'code' for manual control via code.
  • 'none' for no control.
  • -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/types/UniverseConfig.html b/docs/api/types/UniverseConfig.html index 2a42f35..fb7c6d3 100644 --- a/docs/api/types/UniverseConfig.html +++ b/docs/api/types/UniverseConfig.html @@ -5,4 +5,4 @@
  • prevState: State

    Previous state of the Universe.

  • simFunc: SimulateFunction

    Simulation function used to simulate the Universe.

  • transformations: Transformation[]

    Array of transformations to be applied to the Universe's state after simulation and before visualization.

    -
  • Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/api/types/VisType.html b/docs/api/types/VisType.html index a480533..f0b6f26 100644 --- a/docs/api/types/VisType.html +++ b/docs/api/types/VisType.html @@ -1,2 +1,2 @@ VisType | nbody

    Type alias VisType

    VisType: "2D" | "3D"

    Visualization type.

    -

    Generated using TypeDoc

    \ No newline at end of file +

    Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/assets/54509 YORP-DLZ0e9ho.js b/docs/assets/54509 YORP-DLZ0e9ho.js new file mode 100644 index 0000000..502ef51 --- /dev/null +++ b/docs/assets/54509 YORP-DLZ0e9ho.js @@ -0,0 +1,4 @@ +import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as e}from"./index-z5U8iC57.js";import{M as i,d as s}from"./index-BLJ7OnYF.js";import{YORP as m}from"./HorseshoeOrbit.stories-CmfTDrnU.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-ChslY3aX.js";import"./Universe-PJ2jYdc8.js";import"./Transformation-D8slzxJF.js";function n(t){const r={h1:"h1",p:"p",...e(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(i,{title:"Showcase/HorseshoeOrbit/54509 YORP"}),` +`,o.jsx(r.h1,{id:"54509-yorp",children:"54509 YORP"}),` +`,o.jsx(r.p,{children:"54509 YORP is an Earth co-orbital asteroid that follows a horse shoe orbit"}),` +`,o.jsx(s,{of:m})]})}function P(t={}){const{wrapper:r}={...e(),...t.components};return r?o.jsx(r,{...t,children:o.jsx(n,{...t})}):n(t)}export{P as default}; diff --git a/docs/assets/54509 YORP-OMNIj1fz.js b/docs/assets/54509 YORP-OMNIj1fz.js deleted file mode 100644 index 51d91da..0000000 --- a/docs/assets/54509 YORP-OMNIj1fz.js +++ /dev/null @@ -1,4 +0,0 @@ -import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as e}from"./index-z5U8iC57.js";import{M as i,d as s}from"./index-iQvBBB1Z.js";import{YORP as m}from"./HorseshoeOrbit.stories-BMFTqkxu.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Transformation-KUb0IKcR.js";function n(t){const r={h1:"h1",p:"p",...e(),...t.components};return o.jsxs(o.Fragment,{children:[o.jsx(i,{title:"Showcase/HorseshoeOrbit/54509 YORP"}),` -`,o.jsx(r.h1,{id:"54509-yorp",children:"54509 YORP"}),` -`,o.jsx(r.p,{children:"54509 YORP is an Earth co-orbital asteroid that follows a horse shoe orbit"}),` -`,o.jsx(s,{of:m})]})}function R(t={}){const{wrapper:r}={...e(),...t.components};return r?o.jsx(r,{...t,children:o.jsx(n,{...t})}):n(t)}export{R as default}; diff --git a/docs/assets/Analemma.stories-AQ7QpHgD.js b/docs/assets/Analemma.stories-AQ7QpHgD.js new file mode 100644 index 0000000..f1da0ae --- /dev/null +++ b/docs/assets/Analemma.stories-AQ7QpHgD.js @@ -0,0 +1,13 @@ +import{j as c}from"./jsx-runtime-DRTy3Uxn.js";import{C as m,V as e,U as x,a as g,R as b,S as y}from"./Universe-PJ2jYdc8.js";import{R as u,T as M,B as I}from"./Transformation-D8slzxJF.js";import"./index-BBkUAzwr.js";const E=new m("Sun",1989e27,69634e4,new e(0,0,0),new e(0,0,0),new e(0,0,0)),B=new m("Earth",597219e19,6371e3,new e(1521e8,0,0),new e(0,0,-29290),new e(0,0,0)),D=new m("Mars",641e21,3389500,new e(2492e8,0,0),new e(0,0,-22e3),new e(0,0,0)),j=new u(new e(0,1,0),-(Math.PI/2)),l=new I(1),p={actualAxialTilt:23.4,helper(r,s,t){var n;if(t===null){(n=this.sim)==null||n.stop(),this.sim=null;return}const a=new x({label:"Sun-Earth System",currState:j.transform(l.transform(new g([E.clone(),B.clone()]))),color:["#FDB813","#287AB8"],simFunc:new b,transformations:[l,new M(new e(0,1,0),366.24*86164.0905)]});a.currState=new u(new e(1,0,0),s/180*Math.PI).transform(a.currState),this.sim=new y([a],{visType:"3D",controller:"ui",showTrails:!0,showDebugInfo:!0,maxTrailLength:750}),this.sim.start(r,800,800,5e6)}},w={actualAxialTilt:24.9,helper(r,s,t){var n;if(t===null){(n=this.sim)==null||n.stop(),this.sim=null;return}const a=new x({label:"Sun-Mars System",currState:j.transform(l.transform(new g([E.clone(),D.clone()]))),color:["#FDB813","#c1440e"],simFunc:new b,transformations:[l,new M(new e(0,1,0),668.5991*88775.244)]});a.currState=new u(new e(1,0,0),s/180*Math.PI).transform(a.currState),this.sim=new y([a],{visType:"3D",controller:"ui",showTrails:!0,showDebugInfo:!0,maxTrailLength:1350}),this.sim.start(r,800,800,5e6)}},v=({obj:r,name:s,axialTilt:t,...a})=>{const n="demo-"+s+"-"+t;return c.jsx("div",{children:c.jsx("div",{id:n,style:{width:"800px",height:"800px",position:"relative"},ref:R=>r.helper(n,t,R)})})};v.__docgenInfo={description:"",methods:[],displayName:"Analemma",props:{obj:{required:!0,tsType:{name:"AnalemmaSetup"},description:""},name:{required:!0,tsType:{name:"string"},description:""},axialTilt:{required:!0,tsType:{name:"number"},description:""}}};const C={title:"Showcase/Analemma",component:v,parameters:{layout:"centered"},tags:[],argTypes:{name:{table:{disable:!0}},obj:{table:{disable:!0}}},args:{}},o={args:{name:"SunEarthAnalemma",obj:p,axialTilt:p.actualAxialTilt}},i={args:{name:"SunMarsAnalemma",obj:w,axialTilt:w.actualAxialTilt}};var h,d,S;o.parameters={...o.parameters,docs:{...(h=o.parameters)==null?void 0:h.docs,source:{originalSource:`{ + args: { + name: "SunEarthAnalemma", + obj: sunEarth, + axialTilt: sunEarth.actualAxialTilt + } +}`,...(S=(d=o.parameters)==null?void 0:d.docs)==null?void 0:S.source}}};var T,f,A;i.parameters={...i.parameters,docs:{...(T=i.parameters)==null?void 0:T.docs,source:{originalSource:`{ + args: { + name: "SunMarsAnalemma", + obj: sunMars, + axialTilt: sunMars.actualAxialTilt + } +}`,...(A=(f=i.parameters)==null?void 0:f.docs)==null?void 0:A.source}}};const P=["SunEarthAnalemma","SunMarsAnalemma"];export{o as SunEarthAnalemma,i as SunMarsAnalemma,P as __namedExportsOrder,C as default}; diff --git a/docs/assets/Analemma.stories-CHKHhkqr.js b/docs/assets/Analemma.stories-CHKHhkqr.js deleted file mode 100644 index d69b39a..0000000 --- a/docs/assets/Analemma.stories-CHKHhkqr.js +++ /dev/null @@ -1,13 +0,0 @@ -import{C as o,V as e,U as i,a as l,R as u,S as c}from"./Simulation-7H4WISkI.js";import{R as m,T as w,B as h}from"./Transformation-KUb0IKcR.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const p=new o("Sun",1989e27,new e(0,0,0),new e(0,0,0),new e(0,0,0)),d=new o("Earth",5972e21,new e(1521e8,0,0),new e(0,0,-29290),new e(0,0,0)),T=new m(new e(0,0,1),-(23.4/180)*Math.PI),S=new m(new e(0,1,0),-(Math.PI/2)),a=new h(1),f=new i({label:"Sun-Earth System",currState:S.transform(T.transform(a.transform(new l([p.clone(),d.clone()])))),color:["#FDB813","#287AB8"],simFunc:new u,transformations:[a,new w(new e(0,1,0),365.25*24*60*60)]}),R={title:"Showcase/Analemma",component:c,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},n={args:{storyName:"SunEarthAnalemma",universe:[f],controller:"ui",showTrails:!0,speed:5e6,visType:"3D",width:800,maxTrailLength:300,showDebugInfo:!0}};var t,r,s;n.parameters={...n.parameters,docs:{...(t=n.parameters)==null?void 0:t.docs,source:{originalSource:`{ - args: { - storyName: "SunEarthAnalemma", - universe: [sunEarth], - controller: 'ui', - showTrails: true, - speed: 5000000, - visType: '3D', - width: 800, - maxTrailLength: 300, - showDebugInfo: true - } -}`,...(s=(r=n.parameters)==null?void 0:r.docs)==null?void 0:s.source}}};const b=["SunEarthAnalemma"];export{n as SunEarthAnalemma,b as __namedExportsOrder,R as default}; diff --git a/docs/assets/Color-RQJUDNI5-roFcWcLK.js b/docs/assets/Color-RQJUDNI5-DeQMaR6o.js similarity index 99% rename from docs/assets/Color-RQJUDNI5-roFcWcLK.js rename to docs/assets/Color-RQJUDNI5-DeQMaR6o.js index a49fccb..87c0fe5 100644 --- a/docs/assets/Color-RQJUDNI5-roFcWcLK.js +++ b/docs/assets/Color-RQJUDNI5-DeQMaR6o.js @@ -1 +1 @@ -import{n as M,e as ue,T as Me,F as Ce,f as $e,g as Ne}from"./index-iQvBBB1Z.js";import{R as h,r as b,g as fe}from"./index-BBkUAzwr.js";import{_ as Oe,i as J,a as Ie}from"./index-DrlA5mbP.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrFu-skq.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{onClick:k}):null)},un=tn;export{tn as ColorControl,un as default}; +import{n as M,f as ue,T as Me,F as Ce,g as $e,h as Ne}from"./index-BLJ7OnYF.js";import{R as h,r as b,g as fe}from"./index-BBkUAzwr.js";import{_ as Oe,i as J,a as Ie}from"./index-DrlA5mbP.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrFu-skq.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{onClick:k}):null)},un=tn;export{tn as ColorControl,un as default}; diff --git a/docs/assets/Contribute-DyWf3n8a.js b/docs/assets/Contribute-ByZEtrPP.js similarity index 98% rename from docs/assets/Contribute-DyWf3n8a.js rename to docs/assets/Contribute-ByZEtrPP.js index a236786..fb74cfd 100644 --- a/docs/assets/Contribute-DyWf3n8a.js +++ b/docs/assets/Contribute-ByZEtrPP.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as o}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function s(r){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...i(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Contribute"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as o}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function s(r){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...i(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Contribute"}),` `,e.jsx(n.h1,{id:"contribute",children:"Contribute"}),` `,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"nbody"})," is maintained by the open-source ",e.jsx(n.a,{href:"https://github.com/source-academy/",rel:"nofollow",children:"Source Academy"})," development community based in National University of Singapore. Anyone from anywhere is free and welcome to contribute to our project and our community."]}),` `,e.jsxs(n.ul,{children:[` diff --git a/docs/assets/Controller-DZoLtyi4.js b/docs/assets/Controller-Bx20WcyY.js similarity index 61% rename from docs/assets/Controller-DZoLtyi4.js rename to docs/assets/Controller-Bx20WcyY.js index 72d6cdc..d12c6dc 100644 --- a/docs/assets/Controller-DZoLtyi4.js +++ b/docs/assets/Controller-Bx20WcyY.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as o}from"./index-iQvBBB1Z.js";import{None as c,Ui as l,Code as d}from"./Controller.stories-DG1QIQlB.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Universe-DrO6ncQG.js";function i(r){const n={code:"code",h2:"h2",pre:"pre",...t(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Visualize/Controller"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as o}from"./index-BLJ7OnYF.js";import{None as c,Ui as l,Code as d}from"./Controller.stories-Cd5yycrz.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-ChslY3aX.js";import"./Universe-PJ2jYdc8.js";import"./Universe-BHXwzv85.js";function i(r){const n={code:"code",h2:"h2",pre:"pre",...t(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Visualize/Controller"}),` `,e.jsx(n.h2,{id:"none-default",children:"None (default)"}),` `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js",children:`new Simulation(universe, {\r controller: 'none'\r @@ -16,4 +16,4 @@ import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from" controller: 'code'\r }) `})}),` -`,e.jsx("center",{children:e.jsx(o,{of:d,name:"Code"})})]})}function w(r={}){const{wrapper:n}={...t(),...r.components};return n?e.jsx(n,{...r,children:e.jsx(i,{...r})}):i(r)}export{w as default}; +`,e.jsx("center",{children:e.jsx(o,{of:d,name:"Code"})})]})}function S(r={}){const{wrapper:n}={...t(),...r.components};return n?e.jsx(n,{...r,children:e.jsx(i,{...r})}):i(r)}export{S as default}; diff --git a/docs/assets/Controller.stories-DG1QIQlB.js b/docs/assets/Controller.stories-Cd5yycrz.js similarity index 51% rename from docs/assets/Controller.stories-DG1QIQlB.js rename to docs/assets/Controller.stories-Cd5yycrz.js index d280f8c..71ed80a 100644 --- a/docs/assets/Controller.stories-DG1QIQlB.js +++ b/docs/assets/Controller.stories-Cd5yycrz.js @@ -1,4 +1,4 @@ -import{S as v}from"./Simulation-7H4WISkI.js";import{f as e}from"./Universe-DrO6ncQG.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const U={title:"Visualize/Controller",component:v,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"None",universe:[e],controller:"none"}},o={args:{storyName:"Ui",universe:[e],controller:"ui"}},n={args:{storyName:"Code",universe:[e],controller:"code",callback:s=>{const g=setInterval(()=>{s.setShowUniverse(e.label,!s.getShowUniverse(e.label))},500);return()=>{clearInterval(g)}}}};var a,t,i;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:`{ +import{S as v}from"./Simulation-ChslY3aX.js";import{f as e}from"./Universe-BHXwzv85.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PJ2jYdc8.js";const b={title:"Visualize/Controller",component:v,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"None",universe:[e],controller:"none"}},o={args:{storyName:"Ui",universe:[e],controller:"ui"}},n={args:{storyName:"Code",universe:[e],controller:"code",callback:s=>{const g=setInterval(()=>{s.setShowUniverse(e.label,!s.getShowUniverse(e.label))},500);return()=>{clearInterval(g)}}}};var a,t,i;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:`{ args: { storyName: 'None', universe: [fig8], @@ -24,4 +24,4 @@ import{S as v}from"./Simulation-7H4WISkI.js";import{f as e}from"./Universe-DrO6n }; } } -}`,...(p=(d=n.parameters)==null?void 0:d.docs)==null?void 0:p.source}}};const b=["None","Ui","Code"];export{n as Code,r as None,o as Ui,b as __namedExportsOrder,U as default}; +}`,...(p=(d=n.parameters)==null?void 0:d.docs)==null?void 0:p.source}}};const C=["None","Ui","Code"];export{n as Code,r as None,o as Ui,C as __namedExportsOrder,b as default}; diff --git a/docs/assets/Debug-cu0XayVm.js b/docs/assets/Debug-CuZDaDhW.js similarity index 64% rename from docs/assets/Debug-cu0XayVm.js rename to docs/assets/Debug-CuZDaDhW.js index cd2ee65..c2b8c88 100644 --- a/docs/assets/Debug-cu0XayVm.js +++ b/docs/assets/Debug-CuZDaDhW.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as s,d as t}from"./index-iQvBBB1Z.js";import{DebugInfoOff as a,DebugInfoOn as m}from"./Debug.stories-C9fkCxNd.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Universe-DrO6ncQG.js";function r(o){const n={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...i(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Visualize/Debug Info"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as s,d as t}from"./index-BLJ7OnYF.js";import{DebugInfoOff as a,DebugInfoOn as m}from"./Debug.stories-Dvamq5az.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-ChslY3aX.js";import"./Universe-PJ2jYdc8.js";import"./Universe-BHXwzv85.js";function r(o){const n={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...i(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Visualize/Debug Info"}),` `,e.jsx(n.h1,{id:"debug-info",children:"Debug Info"}),` `,e.jsxs(n.p,{children:["Passed as the ",e.jsx(n.code,{children:"showDebugInfo"})," property in the Simulation config. This will display debug information in the corner of the simulation canvas. Click on the pop-up to toggle between frames showing the frame rate, time taken for each frame and the total memory usage."]}),` `,e.jsx(n.h2,{id:"off-default",children:"Off (default)"}),` @@ -12,4 +12,4 @@ import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from" showDebugInfo: true\r }) `})}),` -`,e.jsx("center",{children:e.jsx(t,{of:m,name:"On"})})]})}function w(o={}){const{wrapper:n}={...i(),...o.components};return n?e.jsx(n,{...o,children:e.jsx(r,{...o})}):r(o)}export{w as default}; +`,e.jsx("center",{children:e.jsx(t,{of:m,name:"On"})})]})}function I(o={}){const{wrapper:n}={...i(),...o.components};return n?e.jsx(n,{...o,children:e.jsx(r,{...o})}):r(o)}export{I as default}; diff --git a/docs/assets/Debug.stories-C9fkCxNd.js b/docs/assets/Debug.stories-C9fkCxNd.js deleted file mode 100644 index d2779d8..0000000 --- a/docs/assets/Debug.stories-C9fkCxNd.js +++ /dev/null @@ -1,19 +0,0 @@ -import{S as p}from"./Simulation-7H4WISkI.js";import{f as s}from"./Universe-DrO6ncQG.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const I={title:"Visualize/Debug Info",component:p,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"DebugInfoOn",universe:[s],showDebugInfo:!0}},r={args:{storyName:"DebugInfoOff",universe:[s],showDebugInfo:!1}},o={args:{storyName:"Ui",universe:[s],controller:"ui"}};var n,a,t;e.parameters={...e.parameters,docs:{...(n=e.parameters)==null?void 0:n.docs,source:{originalSource:`{ - args: { - storyName: 'DebugInfoOn', - universe: [fig8], - showDebugInfo: true - } -}`,...(t=(a=e.parameters)==null?void 0:a.docs)==null?void 0:t.source}}};var u,i,f;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`{ - args: { - storyName: 'DebugInfoOff', - universe: [fig8], - showDebugInfo: false - } -}`,...(f=(i=r.parameters)==null?void 0:i.docs)==null?void 0:f.source}}};var g,m,c;o.parameters={...o.parameters,docs:{...(g=o.parameters)==null?void 0:g.docs,source:{originalSource:`{ - args: { - storyName: 'Ui', - universe: [fig8], - controller: 'ui' - } -}`,...(c=(m=o.parameters)==null?void 0:m.docs)==null?void 0:c.source}}};const O=["DebugInfoOn","DebugInfoOff","Ui"];export{r as DebugInfoOff,e as DebugInfoOn,o as Ui,O as __namedExportsOrder,I as default}; diff --git a/docs/assets/Debug.stories-Dvamq5az.js b/docs/assets/Debug.stories-Dvamq5az.js new file mode 100644 index 0000000..4eb2076 --- /dev/null +++ b/docs/assets/Debug.stories-Dvamq5az.js @@ -0,0 +1,19 @@ +import{S as p}from"./Simulation-ChslY3aX.js";import{f as s}from"./Universe-BHXwzv85.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PJ2jYdc8.js";const O={title:"Visualize/Debug Info",component:p,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"DebugInfoOn",universe:[s],showDebugInfo:!0}},r={args:{storyName:"DebugInfoOff",universe:[s],showDebugInfo:!1}},o={args:{storyName:"Ui",universe:[s],controller:"ui"}};var n,a,t;e.parameters={...e.parameters,docs:{...(n=e.parameters)==null?void 0:n.docs,source:{originalSource:`{ + args: { + storyName: 'DebugInfoOn', + universe: [fig8], + showDebugInfo: true + } +}`,...(t=(a=e.parameters)==null?void 0:a.docs)==null?void 0:t.source}}};var u,i,f;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`{ + args: { + storyName: 'DebugInfoOff', + universe: [fig8], + showDebugInfo: false + } +}`,...(f=(i=r.parameters)==null?void 0:i.docs)==null?void 0:f.source}}};var m,g,c;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`{ + args: { + storyName: 'Ui', + universe: [fig8], + controller: 'ui' + } +}`,...(c=(g=o.parameters)==null?void 0:g.docs)==null?void 0:c.source}}};const y=["DebugInfoOn","DebugInfoOff","Ui"];export{r as DebugInfoOff,e as DebugInfoOn,o as Ui,y as __namedExportsOrder,O as default}; diff --git a/docs/assets/Dimension-q3qUdgUC.js b/docs/assets/Dimension-B9GudtkL.js similarity index 56% rename from docs/assets/Dimension-q3qUdgUC.js rename to docs/assets/Dimension-B9GudtkL.js index 34651fd..ac18a34 100644 --- a/docs/assets/Dimension-q3qUdgUC.js +++ b/docs/assets/Dimension-B9GudtkL.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as i}from"./index-iQvBBB1Z.js";import{TwoD as m,ThreeD as c}from"./Dimension.stories-BWmrmXNV.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Universe-DrO6ncQG.js";function o(r){const e={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...t(),...r.components};return n.jsxs(n.Fragment,{children:[n.jsx(s,{title:"Visualize/Dimension"}),` +import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as i}from"./index-BLJ7OnYF.js";import{TwoD as m,ThreeD as c}from"./Dimension.stories-DZuxSGLH.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-ChslY3aX.js";import"./Universe-PJ2jYdc8.js";import"./Universe-BHXwzv85.js";function o(r){const e={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...t(),...r.components};return n.jsxs(n.Fragment,{children:[n.jsx(s,{title:"Visualize/Dimension"}),` `,n.jsx(e.h1,{id:"dimension",children:"Dimension"}),` `,n.jsx(e.p,{children:"TODO"}),` `,n.jsx(e.h2,{id:"2d-default",children:"2D (default)"}),` @@ -12,4 +12,4 @@ import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from" visType: '3D',\r }) `})}),` -`,n.jsx("center",{children:n.jsx(i,{of:c,name:"3D"})})]})}function T(r={}){const{wrapper:e}={...t(),...r.components};return e?n.jsx(e,{...r,children:n.jsx(o,{...r})}):o(r)}export{T as default}; +`,n.jsx("center",{children:n.jsx(i,{of:c,name:"3D"})})]})}function v(r={}){const{wrapper:e}={...t(),...r.components};return e?n.jsx(e,{...r,children:n.jsx(o,{...r})}):o(r)}export{v as default}; diff --git a/docs/assets/Dimension.stories-BWmrmXNV.js b/docs/assets/Dimension.stories-BWmrmXNV.js deleted file mode 100644 index c4ab16d..0000000 --- a/docs/assets/Dimension.stories-BWmrmXNV.js +++ /dev/null @@ -1,12 +0,0 @@ -import{S as c}from"./Simulation-7H4WISkI.js";import{f as m}from"./Universe-DrO6ncQG.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const D={title:"Visualize/Dimension",component:c,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"TwoD",universe:[m]}},r={args:{storyName:"ThreeD",universe:[m],visType:"3D"}};var s,a,o;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`{ - args: { - storyName: 'TwoD', - universe: [fig8] - } -}`,...(o=(a=e.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};var t,n,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`{ - args: { - storyName: 'ThreeD', - universe: [fig8], - visType: '3D' - } -}`,...(i=(n=r.parameters)==null?void 0:n.docs)==null?void 0:i.source}}};const T=["TwoD","ThreeD"];export{r as ThreeD,e as TwoD,T as __namedExportsOrder,D as default}; diff --git a/docs/assets/Dimension.stories-DZuxSGLH.js b/docs/assets/Dimension.stories-DZuxSGLH.js new file mode 100644 index 0000000..02e2e84 --- /dev/null +++ b/docs/assets/Dimension.stories-DZuxSGLH.js @@ -0,0 +1,12 @@ +import{S as p}from"./Simulation-ChslY3aX.js";import{f as m}from"./Universe-BHXwzv85.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PJ2jYdc8.js";const T={title:"Visualize/Dimension",component:p,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"TwoD",universe:[m]}},r={args:{storyName:"ThreeD",universe:[m],visType:"3D"}};var s,o,a;e.parameters={...e.parameters,docs:{...(s=e.parameters)==null?void 0:s.docs,source:{originalSource:`{ + args: { + storyName: 'TwoD', + universe: [fig8] + } +}`,...(a=(o=e.parameters)==null?void 0:o.docs)==null?void 0:a.source}}};var t,n,i;r.parameters={...r.parameters,docs:{...(t=r.parameters)==null?void 0:t.docs,source:{originalSource:`{ + args: { + storyName: 'ThreeD', + universe: [fig8], + visType: '3D' + } +}`,...(i=(n=r.parameters)==null?void 0:n.docs)==null?void 0:i.source}}};const l=["TwoD","ThreeD"];export{r as ThreeD,e as TwoD,l as __namedExportsOrder,T as default}; diff --git a/docs/assets/DocsRenderer-K4EAMTCU-CsI0HbRn.js b/docs/assets/DocsRenderer-K4EAMTCU-13PP_yj2.js similarity index 90% rename from docs/assets/DocsRenderer-K4EAMTCU-CsI0HbRn.js rename to docs/assets/DocsRenderer-K4EAMTCU-13PP_yj2.js index 9eb3141..95bd730 100644 --- a/docs/assets/DocsRenderer-K4EAMTCU-CsI0HbRn.js +++ b/docs/assets/DocsRenderer-K4EAMTCU-13PP_yj2.js @@ -4,4 +4,4 @@ function __vite__mapDeps(indexes) { } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -import{_ as p}from"./iframe-C3OM9s_A.js";import{R as e,r as c}from"./index-BBkUAzwr.js";import{r as l,u}from"./react-18-B-OKcmzb.js";import{C as h,A as E,H as d,D as x}from"./index-iQvBBB1Z.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";var _={code:h,a:E,...d},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},A=class{constructor(){this.render=async(t,r,o)=>{let n={..._,...r==null?void 0:r.components},s=x;return new Promise((m,a)=>{p(()=>import("./index-z5U8iC57.js"),__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:i})=>l(e.createElement(D,{showException:a,key:Math.random()},e.createElement(i,{components:n},e.createElement(s,{context:t,docsParameter:r}))),o)).then(()=>m())})},this.unmount=t=>{u(t)}}};export{A as DocsRenderer,_ as defaultComponents}; +import{_ as p}from"./iframe-5rd2FdmP.js";import{R as e,r as c}from"./index-BBkUAzwr.js";import{r as l,u}from"./react-18-B-OKcmzb.js";import{e as h,A as E,H as d,D as x}from"./index-BLJ7OnYF.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";var _={code:h,a:E,...d},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},A=class{constructor(){this.render=async(t,r,o)=>{let n={..._,...r==null?void 0:r.components},s=x;return new Promise((m,a)=>{p(()=>import("./index-z5U8iC57.js"),__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:i})=>l(e.createElement(D,{showException:a,key:Math.random()},e.createElement(i,{components:n},e.createElement(s,{context:t,docsParameter:r}))),o)).then(()=>m())})},this.unmount=t=>{u(t)}}};export{A as DocsRenderer,_ as defaultComponents}; diff --git a/docs/assets/Force-DULVW8v9.js b/docs/assets/Force-CgPjTVej.js similarity index 97% rename from docs/assets/Force-DULVW8v9.js rename to docs/assets/Force-CgPjTVej.js index ccb04e0..548893b 100644 --- a/docs/assets/Force-DULVW8v9.js +++ b/docs/assets/Force-CgPjTVej.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import{M as t}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function i(r){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...o(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Define/Force"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import{M as t}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function i(r){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...o(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Define/Force"}),` `,e.jsx(n.h1,{id:"force",children:"Force"}),` `,e.jsx(n.p,{children:"A force object encapsulates logic for calculating forces acting on celestial bodies due to other objects or environment. It has a getForces method that takes in an array of celestial bodies and returns an array of forces acting on each body. It is defined as the following Typescript interface."}),` `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-typescript",children:`interface Force {\r diff --git a/docs/assets/HorseshoeOrbit-C7UQkWZK.js b/docs/assets/HorseshoeOrbit-C7UQkWZK.js deleted file mode 100644 index e02c772..0000000 --- a/docs/assets/HorseshoeOrbit-C7UQkWZK.js +++ /dev/null @@ -1,3 +0,0 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as n}from"./index-z5U8iC57.js";import{M as s}from"./index-iQvBBB1Z.js";import"./HorseshoeOrbit.stories-BMFTqkxu.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Transformation-KUb0IKcR.js";function e(o){const r={h1:"h1",p:"p",...n(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Showcase/HorseshoeOrbit/Intro"}),` -`,t.jsx(r.h1,{id:"horseshoe-orbits",children:"Horseshoe Orbits"}),` -`,t.jsx(r.p,{children:"TODO"})]})}function M(o={}){const{wrapper:r}={...n(),...o.components};return r?t.jsx(r,{...o,children:t.jsx(e,{...o})}):e(o)}export{M as default}; diff --git a/docs/assets/HorseshoeOrbit-DyIihBPW.js b/docs/assets/HorseshoeOrbit-DyIihBPW.js new file mode 100644 index 0000000..bd9d1a0 --- /dev/null +++ b/docs/assets/HorseshoeOrbit-DyIihBPW.js @@ -0,0 +1,3 @@ +import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as n}from"./index-z5U8iC57.js";import{M as i}from"./index-BLJ7OnYF.js";import"./HorseshoeOrbit.stories-CmfTDrnU.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-ChslY3aX.js";import"./Universe-PJ2jYdc8.js";import"./Transformation-D8slzxJF.js";function e(o){const r={h1:"h1",p:"p",...n(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(i,{title:"Showcase/HorseshoeOrbit/Intro"}),` +`,t.jsx(r.h1,{id:"horseshoe-orbits",children:"Horseshoe Orbits"}),` +`,t.jsx(r.p,{children:"TODO"})]})}function D(o={}){const{wrapper:r}={...n(),...o.components};return r?t.jsx(r,{...o,children:t.jsx(e,{...o})}):e(o)}export{D as default}; diff --git a/docs/assets/HorseshoeOrbit.stories-BMFTqkxu.js b/docs/assets/HorseshoeOrbit.stories-BMFTqkxu.js deleted file mode 100644 index 5223a6d..0000000 --- a/docs/assets/HorseshoeOrbit.stories-BMFTqkxu.js +++ /dev/null @@ -1,12 +0,0 @@ -import{a,C as o,V as e,U as i,R as w,S as m}from"./Simulation-7H4WISkI.js";import{R as c,C as u,P as p}from"./Transformation-KUb0IKcR.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const l=new a([new o("Sun",19885e26,new e(0,0,0),new e(0,0,0),new e(0,0,0)),new o("Earth",597219e19,new e(-248109932596539e-4,1449948612736719e-4,-8215203670851886e-9),new e(-29841.46365518679,-5126.262286859617,1.184224839788195),new e(0,0,0)),new o("YORP",1,new e(1789598196203594e-4,467757011067789e-4,5131735873924753e-6),new e(-5641.374152889482,22817.8307950743,-65.07224186314708),new e(0,0,0))]),h=new i({label:"54509 YORP",currState:new c(new e(1,0,0),Math.PI/2).transform(l.clone()),simFunc:new w,color:["#FDB813","#287AB8","#767676"],transformations:[new u,new p(new e(1,0,0),1)]}),d={yorp:h},g={title:"Showcase/Horseshoe Orbit",component:m,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"Horseshoe Orbit YORP",universe:[d.yorp],showDebugInfo:!0,controller:"ui",visType:"3D",width:800,speed:1e7,showTrails:!0}};var s,n,t;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`{ - args: { - storyName: "Horseshoe Orbit YORP", - universe: [horseshoe.yorp], - showDebugInfo: true, - controller: 'ui', - visType: '3D', - width: 800, - speed: 10000000, - showTrails: true - } -}`,...(t=(n=r.parameters)==null?void 0:n.docs)==null?void 0:t.source}}};const P=["YORP"];export{r as YORP,P as __namedExportsOrder,g as default}; diff --git a/docs/assets/HorseshoeOrbit.stories-CmfTDrnU.js b/docs/assets/HorseshoeOrbit.stories-CmfTDrnU.js new file mode 100644 index 0000000..bbffc42 --- /dev/null +++ b/docs/assets/HorseshoeOrbit.stories-CmfTDrnU.js @@ -0,0 +1,17 @@ +import{S as a}from"./Simulation-ChslY3aX.js";import{a as i,C as o,V as e,U as c,R as m}from"./Universe-PJ2jYdc8.js";import{R as p,C as w,P as u}from"./Transformation-D8slzxJF.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const l=new i([new o("Sun",19885e26,69634e4,new e(0,0,0),new e(0,0,0),new e(0,0,0)),new o("Earth",597219e19,6371e3,new e(-248109932596539e-4,1449948612736719e-4,-8215203670851886e-9),new e(-29841.46365518679,-5126.262286859617,1.184224839788195),new e(0,0,0)),new o("YORP",1,1,new e(1789598196203594e-4,467757011067789e-4,5131735873924753e-6),new e(-5641.374152889482,22817.8307950743,-65.07224186314708),new e(0,0,0))]),d=new c({label:"54509 YORP",currState:new p(new e(1,0,0),Math.PI/2).transform(l.clone()),simFunc:new m,color:["#FDB813","#287AB8","#767676"],transformations:[new w,new u(new e(1,0,0),1)]}),h={yorp:d},R={title:"Showcase/Horseshoe Orbit",component:a,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"Horseshoe Orbit YORP",universe:[h.yorp],showDebugInfo:!0,controller:"ui",visType:"3D",width:800,playSpeed:2,showTrails:!0,record:!0,looped:!0,recordFor:332,recordSpeed:2e7,maxTrailLength:2e3}};var n,t,s;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ + args: { + storyName: "Horseshoe Orbit YORP", + universe: [horseshoe.yorp], + showDebugInfo: true, + controller: "ui", + visType: "3D", + width: 800, + playSpeed: 2, + showTrails: true, + record: true, + looped: true, + recordFor: 332, + recordSpeed: 20000000, + maxTrailLength: 2000 + } +}`,...(s=(t=r.parameters)==null?void 0:t.docs)==null?void 0:s.source}}};const T=["YORP"];export{r as YORP,T as __namedExportsOrder,R as default}; diff --git a/docs/assets/Install-BXrzk_ma.js b/docs/assets/Install-BFyTOPa9.js similarity index 94% rename from docs/assets/Install-BXrzk_ma.js rename to docs/assets/Install-BFyTOPa9.js index 9883a56..22e5af9 100644 --- a/docs/assets/Install-BXrzk_ma.js +++ b/docs/assets/Install-BFyTOPa9.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as s}from"./index-z5U8iC57.js";import{M as r}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function o(t){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...s(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Installation"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as s}from"./index-z5U8iC57.js";import{M as r}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function o(t){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...s(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Installation"}),` `,e.jsx(n.h1,{id:"installation",children:"Installation"}),` `,e.jsx(n.h2,{id:"via-npm-registry",children:"Via npm registry"}),` `,e.jsxs(n.p,{children:["nbody is available on the npm registry as ",e.jsx(n.a,{href:"https://www.npmjs.com/package/nbody",rel:"nofollow",children:"nbody"}),". Simply follow the following install commands based on your package manager. Since nbody relies on ",e.jsx(n.a,{href:"https://threejs.org/",rel:"nofollow",children:"three"})," and ",e.jsx(n.a,{href:"https://plotly.com/javascript/",rel:"nofollow",children:"Plotly.js"})," for visualization of the simulations, they have to be installed alongside nbody."]}),` diff --git a/docs/assets/Integration-AjHreSnD.js b/docs/assets/Integration-HQa34VN9.js similarity index 96% rename from docs/assets/Integration-AjHreSnD.js rename to docs/assets/Integration-HQa34VN9.js index 8b18bd3..38d4050 100644 --- a/docs/assets/Integration-AjHreSnD.js +++ b/docs/assets/Integration-HQa34VN9.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as o}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function i(r){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...r.components};return n.jsxs(n.Fragment,{children:[n.jsx(o,{title:"Integration"}),` +import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as o}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function i(r){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...r.components};return n.jsxs(n.Fragment,{children:[n.jsx(o,{title:"Integration"}),` `,n.jsx(e.h1,{id:"integration",children:"Integration"}),` `,n.jsxs(e.p,{children:["Once installed into your ",n.jsx(e.code,{children:"node_modules"}),", you can use ",n.jsx(e.strong,{children:"nbody"})," in your choice of your frontend framework just like you would any other client side library."]}),` `,n.jsx(e.h2,{id:"table-of-contents",children:"Table of Contents"}),` diff --git a/docs/assets/Intro-NACn9ZVr.js b/docs/assets/Intro-EjW6Vlu5.js similarity index 83% rename from docs/assets/Intro-NACn9ZVr.js rename to docs/assets/Intro-EjW6Vlu5.js index cf0dda1..aa42858 100644 --- a/docs/assets/Intro-NACn9ZVr.js +++ b/docs/assets/Intro-EjW6Vlu5.js @@ -1,3 +1,3 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as s}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function e(n){const o={h1:"h1",p:"p",...i(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Visualize/Intro"}),` +import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as s}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function e(n){const o={h1:"h1",p:"p",...i(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Visualize/Intro"}),` `,t.jsx(o.h1,{id:"visualize",children:"Visualize"}),` `,t.jsx(o.p,{children:"This section shall explore the various setups and configurations of the visualization system."})]})}function d(n={}){const{wrapper:o}={...i(),...n.components};return o?t.jsx(o,{...n,children:t.jsx(e,{...n})}):e(n)}export{d as default}; diff --git a/docs/assets/Analemma-Iy1rkUoS.js b/docs/assets/Intro-M1nOElhC.js similarity index 80% rename from docs/assets/Analemma-Iy1rkUoS.js rename to docs/assets/Intro-M1nOElhC.js index c168655..5bacda1 100644 --- a/docs/assets/Analemma-Iy1rkUoS.js +++ b/docs/assets/Intro-M1nOElhC.js @@ -1,2 +1,2 @@ -import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as m}from"./index-z5U8iC57.js";import{M as r}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function e(t){const o={h1:"h1",...m(),...t.components};return n.jsxs(n.Fragment,{children:[n.jsx(r,{title:"Showcase/Analemma/Intro"}),` +import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as m}from"./index-z5U8iC57.js";import{M as r}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function e(t){const o={h1:"h1",...m(),...t.components};return n.jsxs(n.Fragment,{children:[n.jsx(r,{title:"Showcase/Analemma/Intro"}),` `,n.jsx(o.h1,{id:"analemma",children:"Analemma"})]})}function j(t={}){const{wrapper:o}={...m(),...t.components};return o?n.jsx(o,{...t,children:n.jsx(e,{...t})}):e(t)}export{j as default}; diff --git a/docs/assets/Intro-CLahxizt.js b/docs/assets/Intro-Z6LnQ2ID.js similarity index 90% rename from docs/assets/Intro-CLahxizt.js rename to docs/assets/Intro-Z6LnQ2ID.js index b01bf6d..e4e3d4c 100644 --- a/docs/assets/Intro-CLahxizt.js +++ b/docs/assets/Intro-Z6LnQ2ID.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import{M as r}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function t(i){const n={a:"a",h1:"h1",li:"li",p:"p",ul:"ul",...o(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Define/Intro"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import{M as r}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function t(i){const n={a:"a",h1:"h1",li:"li",p:"p",ul:"ul",...o(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(r,{title:"Define/Intro"}),` `,e.jsx(n.h1,{id:"define",children:"Define"}),` `,e.jsx(n.p,{children:"The library provides a set of predefined building blocks (force, simulate function, transformation) that can be used to define a simulation. However, the library is designed to be extensible and allows users to define their own building blocks in either JavaScript or TypeScript. Check out each building block's page for more details."}),` `,e.jsxs(n.ul,{children:[` diff --git a/docs/assets/Intro-CImMAE62.js b/docs/assets/Intro-d9UFjdxt.js similarity index 83% rename from docs/assets/Intro-CImMAE62.js rename to docs/assets/Intro-d9UFjdxt.js index ae65db8..82a5788 100644 --- a/docs/assets/Intro-CImMAE62.js +++ b/docs/assets/Intro-d9UFjdxt.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as r}from"./index-z5U8iC57.js";import{M as s}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function e(o){const n={h2:"h2",...r(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Showcase/Intro"}),` +import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as r}from"./index-z5U8iC57.js";import{M as s}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function e(o){const n={h2:"h2",...r(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Showcase/Intro"}),` `,t.jsx(n.h2,{id:"horseshoe-orbits",children:"Horseshoe Orbits"}),` `,t.jsx(n.h2,{id:"solar-system",children:"Solar system"}),` `,t.jsx(n.h2,{id:"analemma",children:"Analemma"})]})}function j(o={}){const{wrapper:n}={...r(),...o.components};return n?t.jsx(n,{...o,children:t.jsx(e,{...o})}):e(o)}export{j as default}; diff --git a/docs/assets/Multiverse-CRf5xCsB.js b/docs/assets/Multiverse-AyMvfeqa.js similarity index 59% rename from docs/assets/Multiverse-CRf5xCsB.js rename to docs/assets/Multiverse-AyMvfeqa.js index ab270c2..a5ad709 100644 --- a/docs/assets/Multiverse-CRf5xCsB.js +++ b/docs/assets/Multiverse-AyMvfeqa.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as o,d as s}from"./index-iQvBBB1Z.js";import{SingleUniverse as l,Multiverse as c,Multiverse3D as m}from"./Multiverse.stories-u1FjssdI.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Universe-DrO6ncQG.js";function i(r){const n={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...t(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Visualize/Multiverse"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as o,d as s}from"./index-BLJ7OnYF.js";import{SingleUniverse as l,Multiverse as c,Multiverse3D as m}from"./Multiverse.stories-Vo2-9zik.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-ChslY3aX.js";import"./Universe-PJ2jYdc8.js";import"./Universe-BHXwzv85.js";function i(r){const n={code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...t(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(o,{title:"Visualize/Multiverse"}),` `,e.jsx(n.h1,{id:"multiverse",children:"Multiverse"}),` `,e.jsx(n.p,{children:"TODO"}),` `,e.jsx(n.h2,{id:"single-universe---2d",children:"Single Universe - 2D"}),` @@ -9,4 +9,4 @@ import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from" `,e.jsx("center",{children:e.jsx(s,{of:c,name:"Multiverse"})}),` `,e.jsx(n.h2,{id:"multiverse---3d",children:"Multiverse - 3D"}),` `,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-js"})}),` -`,e.jsx("center",{children:e.jsx(s,{of:m,name:"Multiverse3D"})})]})}function S(r={}){const{wrapper:n}={...t(),...r.components};return n?e.jsx(n,{...r,children:e.jsx(i,{...r})}):i(r)}export{S as default}; +`,e.jsx("center",{children:e.jsx(s,{of:m,name:"Multiverse3D"})})]})}function C(r={}){const{wrapper:n}={...t(),...r.components};return n?e.jsx(n,{...r,children:e.jsx(i,{...r})}):i(r)}export{C as default}; diff --git a/docs/assets/Multiverse.stories-Vo2-9zik.js b/docs/assets/Multiverse.stories-Vo2-9zik.js new file mode 100644 index 0000000..f228332 --- /dev/null +++ b/docs/assets/Multiverse.stories-Vo2-9zik.js @@ -0,0 +1,20 @@ +import{S as g}from"./Simulation-ChslY3aX.js";import{f as v,m as p}from"./Universe-BHXwzv85.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PJ2jYdc8.js";const D={title:"Visualize/Multiverse",component:g,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"SingleUniverse",universe:[v]}},r={args:{storyName:"Multiverse",universe:p}},s={args:{storyName:"Multiverse3D",universe:p,visType:"3D",showTrails:!0,showDebugInfo:!0}};var t,a,o;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`{ + args: { + storyName: 'SingleUniverse', + universe: [fig8] + } +}`,...(o=(a=e.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};var i,n,u;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{ + args: { + storyName: 'Multiverse', + universe: multiFig8 + // showTrails: true, + } +}`,...(u=(n=r.parameters)==null?void 0:n.docs)==null?void 0:u.source}}};var m,l,c;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`{ + args: { + storyName: 'Multiverse3D', + universe: multiFig8, + visType: '3D', + showTrails: true, + showDebugInfo: true + } +}`,...(c=(l=s.parameters)==null?void 0:l.docs)==null?void 0:c.source}}};const N=["SingleUniverse","Multiverse","Multiverse3D"];export{r as Multiverse,s as Multiverse3D,e as SingleUniverse,N as __namedExportsOrder,D as default}; diff --git a/docs/assets/Multiverse.stories-u1FjssdI.js b/docs/assets/Multiverse.stories-u1FjssdI.js deleted file mode 100644 index 3635873..0000000 --- a/docs/assets/Multiverse.stories-u1FjssdI.js +++ /dev/null @@ -1,20 +0,0 @@ -import{S as p}from"./Simulation-7H4WISkI.js";import{f as v,m as g}from"./Universe-DrO6ncQG.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const f={title:"Visualize/Multiverse",component:p,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"SingleUniverse",universe:[v]}},r={args:{storyName:"Multiverse",universe:g}},s={args:{storyName:"Multiverse3D",universe:g,visType:"3D",showTrails:!0,showDebugInfo:!0}};var a,t,o;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`{ - args: { - storyName: 'SingleUniverse', - universe: [fig8] - } -}`,...(o=(t=e.parameters)==null?void 0:t.docs)==null?void 0:o.source}}};var i,n,u;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{ - args: { - storyName: 'Multiverse', - universe: multiFig8 - // showTrails: true, - } -}`,...(u=(n=r.parameters)==null?void 0:n.docs)==null?void 0:u.source}}};var m,l,c;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`{ - args: { - storyName: 'Multiverse3D', - universe: multiFig8, - visType: '3D', - showTrails: true, - showDebugInfo: true - } -}`,...(c=(l=s.parameters)==null?void 0:l.docs)==null?void 0:c.source}}};const D=["SingleUniverse","Multiverse","Multiverse3D"];export{r as Multiverse,s as Multiverse3D,e as SingleUniverse,D as __namedExportsOrder,f as default}; diff --git a/docs/assets/Nbody-CxxSf_jl.js b/docs/assets/Nbody-L_Z_SugA.js similarity index 97% rename from docs/assets/Nbody-CxxSf_jl.js rename to docs/assets/Nbody-L_Z_SugA.js index 7d8439c..ecb6c13 100644 --- a/docs/assets/Nbody-CxxSf_jl.js +++ b/docs/assets/Nbody-L_Z_SugA.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as t}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function r(o){const n={a:"a",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...i(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"nbody"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as t}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function r(o){const n={a:"a",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...i(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"nbody"}),` `,e.jsx(n.h1,{id:"nbody",children:"nbody"}),` `,e.jsxs(n.p,{children:["Frontend library to ",e.jsx(n.strong,{children:"configure"}),", ",e.jsx(n.strong,{children:"simulate"})," and ",e.jsx(n.strong,{children:"visualize"})," nbody simulations, entirely on the client-side browser."]}),` `,e.jsx(n.h1,{id:"background",children:"Background"}),` diff --git a/docs/assets/QuickStart-D3GHxeRp.js b/docs/assets/QuickStart-VUvd4iNx.js similarity index 93% rename from docs/assets/QuickStart-D3GHxeRp.js rename to docs/assets/QuickStart-VUvd4iNx.js index 69e3fe3..f691110 100644 --- a/docs/assets/QuickStart-D3GHxeRp.js +++ b/docs/assets/QuickStart-VUvd4iNx.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as o}from"./index-iQvBBB1Z.js";import{TwoD as a}from"./Dimension.stories-BWmrmXNV.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Universe-DrO6ncQG.js";function r(i){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Quick Start"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as s,d as o}from"./index-BLJ7OnYF.js";import{TwoD as a}from"./Dimension.stories-DZuxSGLH.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-ChslY3aX.js";import"./Universe-PJ2jYdc8.js";import"./Universe-BHXwzv85.js";function r(i){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...t(),...i.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Quick Start"}),` `,e.jsx(n.h1,{id:"quick-start",children:"Quick Start"}),` `,e.jsx(n.p,{children:"A quick start guide to configuring, simulating and visualizing a simple nbody simulation."}),` `,e.jsxs(n.ul,{children:[` @@ -79,4 +79,4 @@ simulation.start(, 800, 800); `,e.jsx("center",{children:e.jsx(o,{of:a})}),` `,e.jsxs(n.p,{children:["You've done it! You just simulated a special configuration of the ",e.jsx(n.a,{href:"https://en.wikipedia.org/wiki/Three-body_problem",rel:"nofollow",children:"three-body"})," system using the ",e.jsx(n.em,{children:"nbody"})," library. Feel free to experiment with different configurations to see how systems evolve over time with various forces, integrators and transformations (read on to find out what those are)."]}),` `,e.jsx(n.h2,{id:"next-steps",children:"Next Steps"}),` -`,e.jsxs(n.p,{children:["Checkout the ",e.jsx(n.a,{href:"?path=/docs/configuration-configuration--docs",children:"Configuration"})," section to learn how to configure a simulation with greater detail and customization."]})]})}function v(i={}){const{wrapper:n}={...t(),...i.components};return n?e.jsx(n,{...i,children:e.jsx(r,{...i})}):r(i)}export{v as default}; +`,e.jsxs(n.p,{children:["Checkout the ",e.jsx(n.a,{href:"?path=/docs/configuration-configuration--docs",children:"Configuration"})," section to learn how to configure a simulation with greater detail and customization."]})]})}function w(i={}){const{wrapper:n}={...t(),...i.components};return n?e.jsx(n,{...i,children:e.jsx(r,{...i})}):r(i)}export{w as default}; diff --git a/docs/assets/Record-A_-7v384.js b/docs/assets/Record-A_-7v384.js deleted file mode 100644 index 5e25ffb..0000000 --- a/docs/assets/Record-A_-7v384.js +++ /dev/null @@ -1,4 +0,0 @@ -import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as m}from"./index-z5U8iC57.js";import{M as i,d as t}from"./index-iQvBBB1Z.js";import{RealTime as s,Recorded as p,RecordedLooped as a}from"./Record.stories-CIwO-28m.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Universe-DrO6ncQG.js";function n(r){return o.jsxs(o.Fragment,{children:[o.jsx(i,{title:"Visualize/Record"}),` -`,o.jsx(t,{of:s,name:"Record"}),` -`,o.jsx(t,{of:p,name:"Record"}),` -`,o.jsx(t,{of:a,name:"Record"})]})}function h(r={}){const{wrapper:e}={...m(),...r.components};return e?o.jsx(e,{...r,children:o.jsx(n,{...r})}):n()}export{h as default}; diff --git a/docs/assets/Record-B6rA6KjA.js b/docs/assets/Record-B6rA6KjA.js new file mode 100644 index 0000000..dae43a3 --- /dev/null +++ b/docs/assets/Record-B6rA6KjA.js @@ -0,0 +1,4 @@ +import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as n}from"./index-z5U8iC57.js";import{M as i,d as t}from"./index-BLJ7OnYF.js";import{RealTime as p,Recorded as s,RecordedLooped as a}from"./Record.stories-Cn0MdLuR.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-ChslY3aX.js";import"./Universe-PJ2jYdc8.js";import"./Universe-BHXwzv85.js";function m(r){return o.jsxs(o.Fragment,{children:[o.jsx(i,{title:"Visualize/Record"}),` +`,o.jsx(t,{of:p,name:"Record"}),` +`,o.jsx(t,{of:s,name:"Record"}),` +`,o.jsx(t,{of:a,name:"Record"})]})}function y(r={}){const{wrapper:e}={...n(),...r.components};return e?o.jsx(e,{...r,children:o.jsx(m,{...r})}):m()}export{y as default}; diff --git a/docs/assets/Record.stories-CIwO-28m.js b/docs/assets/Record.stories-CIwO-28m.js deleted file mode 100644 index 39ecf91..0000000 --- a/docs/assets/Record.stories-CIwO-28m.js +++ /dev/null @@ -1,23 +0,0 @@ -import{S as l}from"./Simulation-7H4WISkI.js";import{f as s}from"./Universe-DrO6ncQG.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const T={title:"Visualize/Record",component:l,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"RealTime",universe:[s],visType:"3D"}},r={args:{storyName:"Recorded",universe:[s],visType:"3D",record:!0,looped:!1}},o={args:{storyName:"RecordedLooped",universe:[s],visType:"3D",record:!0,looped:!0}};var a,t,d;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`{ - args: { - storyName: 'RealTime', - universe: [fig8], - visType: '3D' - } -}`,...(d=(t=e.parameters)==null?void 0:t.docs)==null?void 0:d.source}}};var n,c,i;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ - args: { - storyName: 'Recorded', - universe: [fig8], - visType: '3D', - record: true, - looped: false - } -}`,...(i=(c=r.parameters)==null?void 0:c.docs)==null?void 0:i.source}}};var p,m,u;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{ - args: { - storyName: 'RecordedLooped', - universe: [fig8], - visType: '3D', - record: true, - looped: true - } -}`,...(u=(m=o.parameters)==null?void 0:m.docs)==null?void 0:u.source}}};const f=["RealTime","Recorded","RecordedLooped"];export{e as RealTime,r as Recorded,o as RecordedLooped,f as __namedExportsOrder,T as default}; diff --git a/docs/assets/Record.stories-Cn0MdLuR.js b/docs/assets/Record.stories-Cn0MdLuR.js new file mode 100644 index 0000000..ee51c71 --- /dev/null +++ b/docs/assets/Record.stories-Cn0MdLuR.js @@ -0,0 +1,23 @@ +import{S as l}from"./Simulation-ChslY3aX.js";import{f as s}from"./Universe-BHXwzv85.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PJ2jYdc8.js";const f={title:"Visualize/Record",component:l,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},e={args:{storyName:"RealTime",universe:[s],visType:"3D"}},r={args:{storyName:"Recorded",universe:[s],visType:"3D",record:!0,looped:!1}},o={args:{storyName:"RecordedLooped",universe:[s],visType:"3D",record:!0,looped:!0}};var a,t,d;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`{ + args: { + storyName: 'RealTime', + universe: [fig8], + visType: '3D' + } +}`,...(d=(t=e.parameters)==null?void 0:t.docs)==null?void 0:d.source}}};var n,c,i;r.parameters={...r.parameters,docs:{...(n=r.parameters)==null?void 0:n.docs,source:{originalSource:`{ + args: { + storyName: 'Recorded', + universe: [fig8], + visType: '3D', + record: true, + looped: false + } +}`,...(i=(c=r.parameters)==null?void 0:c.docs)==null?void 0:i.source}}};var p,m,u;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`{ + args: { + storyName: 'RecordedLooped', + universe: [fig8], + visType: '3D', + record: true, + looped: true + } +}`,...(u=(m=o.parameters)==null?void 0:m.docs)==null?void 0:u.source}}};const D=["RealTime","Recorded","RecordedLooped"];export{e as RealTime,r as Recorded,o as RecordedLooped,D as __namedExportsOrder,f as default}; diff --git a/docs/assets/SimulateFunction-DCH_HW37.js b/docs/assets/SimulateFunction-aqc1n8R8.js similarity index 97% rename from docs/assets/SimulateFunction-DCH_HW37.js rename to docs/assets/SimulateFunction-aqc1n8R8.js index b4b9195..bfccd94 100644 --- a/docs/assets/SimulateFunction-DCH_HW37.js +++ b/docs/assets/SimulateFunction-aqc1n8R8.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as a}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function n(r){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...i(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(a,{title:"Define/Simulate Function"}),` +import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as i}from"./index-z5U8iC57.js";import{M as a}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function n(r){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...i(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(a,{title:"Define/Simulate Function"}),` `,e.jsx(t.h1,{id:"simulate-function",children:"Simulate Function"}),` `,e.jsxs(t.p,{children:["A ",e.jsx(t.strong,{children:"Simulate Function"})," object encapsulates logic for advancing the state of the universe over time, usually using ",e.jsx(t.a,{href:"https://en.wikipedia.org/wiki/Numerical_integration",rel:"nofollow",children:"numerical integration"}),". It has a simulate method that takes in a time step, current state of the universe, (optionally the previous state of the universe) and returns the next state of the universe."]}),` `,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-typescript",children:`interface SimulateFunction {\r diff --git a/docs/assets/Simulation-ChslY3aX.js b/docs/assets/Simulation-ChslY3aX.js new file mode 100644 index 0000000..0a872e9 --- /dev/null +++ b/docs/assets/Simulation-ChslY3aX.js @@ -0,0 +1 @@ +import{j as V}from"./jsx-runtime-DRTy3Uxn.js";import{R as g,r as S}from"./index-BBkUAzwr.js";import{S as x}from"./Universe-PJ2jYdc8.js";const D=({storyName:u="default",universe:r=[],visType:s="2D",record:n=!1,looped:i=!0,controller:o="none",showTrails:d=!1,showDebugInfo:m=!1,maxFrameRate:p=-1,maxTrailLength:f=100,width:a=400,callback:c=t=>()=>{},playSpeed:v=1,startPaused:y=!1,recordFor:T=1,recordSpeed:b=1,...w})=>{const t="demo-"+u,[e,q]=g.useState(null);return e===null&&q(new x(r.map(l=>l.clone()),{visType:s,record:n,looped:i,controller:o,showTrails:d,showDebugInfo:m,maxFrameRate:p,maxTrailLength:f})),S.useEffect(()=>{e==null||e.start(t,a,a,v,y,T,b);let l=()=>{};return e&&(l=c(e)),()=>{l(),e==null||e.stop()}},[]),V.jsx("div",{id:t,style:{width:a,height:a,position:"relative"}})};D.__docgenInfo={description:"Primary UI component for user interaction",methods:[],displayName:"Simulation",props:{storyName:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:'"default"',computed:!1}},universe:{required:!1,tsType:{name:"Array",elements:[{name:"Universe"}],raw:"Universe[]"},description:"",defaultValue:{value:"[]",computed:!1}},visType:{required:!1,tsType:{name:"union",raw:"'2D' | '3D'",elements:[{name:"literal",value:"'2D'"},{name:"literal",value:"'3D'"}]},description:"",defaultValue:{value:'"2D"',computed:!1}},record:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},looped:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},controller:{required:!1,tsType:{name:"union",raw:"'ui' | 'code' | 'none'",elements:[{name:"literal",value:"'ui'"},{name:"literal",value:"'code'"},{name:"literal",value:"'none'"}]},description:"",defaultValue:{value:'"none"',computed:!1}},showTrails:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},showDebugInfo:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},maxFrameRate:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"-1",computed:!1}},maxTrailLength:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"100",computed:!1}},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}},callback:{required:!1,tsType:{name:"signature",type:"function",raw:"(simulation: NbodySimulation) => () => void",signature:{arguments:[{type:{name:"NbodySimulation"},name:"simulation"}],return:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}}}},description:"",defaultValue:{value:"(sim) => () => {}",computed:!1}},playSpeed:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},startPaused:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},recordFor:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},recordSpeed:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}}}};export{D as S}; diff --git a/docs/assets/SolarSystem-BfaEfycU.js b/docs/assets/SolarSystem-BfaEfycU.js new file mode 100644 index 0000000..46cc4cb --- /dev/null +++ b/docs/assets/SolarSystem-BfaEfycU.js @@ -0,0 +1,4 @@ +import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as n}from"./index-z5U8iC57.js";import{M as m,d as s}from"./index-BLJ7OnYF.js";import{SolarSystem as i}from"./SolarSystem.stories-CKTAJpEs.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-ChslY3aX.js";import"./Universe-PJ2jYdc8.js";import"./Universe-BHXwzv85.js";function r(o){const e={code:"code",h2:"h2",pre:"pre",...n(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(m,{title:"Showcase/SolarSystem"}),` +`,t.jsx(e.h2,{id:""}),` +`,t.jsx(e.pre,{children:t.jsx(e.code,{className:"language-js"})}),` +`,t.jsx("center",{children:t.jsx(s,{of:i,name:""})})]})}function g(o={}){const{wrapper:e}={...n(),...o.components};return e?t.jsx(e,{...o,children:t.jsx(r,{...o})}):r(o)}export{g as default}; diff --git a/docs/assets/SolarSystem-Dp_t01xV.js b/docs/assets/SolarSystem-Dp_t01xV.js deleted file mode 100644 index a531117..0000000 --- a/docs/assets/SolarSystem-Dp_t01xV.js +++ /dev/null @@ -1,4 +0,0 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as n}from"./index-z5U8iC57.js";import{M as m,d as s}from"./index-iQvBBB1Z.js";import{SolarSystem as i}from"./SolarSystem.stories-CVC3sKTl.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Universe-DrO6ncQG.js";function r(o){const e={code:"code",h2:"h2",pre:"pre",...n(),...o.components};return t.jsxs(t.Fragment,{children:[t.jsx(m,{title:"Showcase/SolarSystem"}),` -`,t.jsx(e.h2,{id:""}),` -`,t.jsx(e.pre,{children:t.jsx(e.code,{className:"language-js"})}),` -`,t.jsx("center",{children:t.jsx(s,{of:i,name:""})})]})}function y(o={}){const{wrapper:e}={...n(),...o.components};return e?t.jsx(e,{...o,children:t.jsx(r,{...o})}):r(o)}export{y as default}; diff --git a/docs/assets/SolarSystem.stories-CKTAJpEs.js b/docs/assets/SolarSystem.stories-CKTAJpEs.js new file mode 100644 index 0000000..6c4a30c --- /dev/null +++ b/docs/assets/SolarSystem.stories-CKTAJpEs.js @@ -0,0 +1,6 @@ +import{S as o}from"./Simulation-ChslY3aX.js";import{f as t}from"./Universe-BHXwzv85.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PJ2jYdc8.js";const l={title:"Showcase/Solar System",component:o,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"3D",universe:[t]}};var e,s,a;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`{ + args: { + storyName: "3D", + universe: [fig8] + } +}`,...(a=(s=r.parameters)==null?void 0:s.docs)==null?void 0:a.source}}};const S=["SolarSystem"];export{r as SolarSystem,S as __namedExportsOrder,l as default}; diff --git a/docs/assets/SolarSystem.stories-CVC3sKTl.js b/docs/assets/SolarSystem.stories-CVC3sKTl.js deleted file mode 100644 index 34bfb93..0000000 --- a/docs/assets/SolarSystem.stories-CVC3sKTl.js +++ /dev/null @@ -1,6 +0,0 @@ -import{S as o}from"./Simulation-7H4WISkI.js";import{f as t}from"./Universe-DrO6ncQG.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const p={title:"Showcase/Solar System",component:o,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"3D",universe:[t]}};var e,s,a;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`{ - args: { - storyName: "3D", - universe: [fig8] - } -}`,...(a=(s=r.parameters)==null?void 0:s.docs)==null?void 0:a.source}}};const l=["SolarSystem"];export{r as SolarSystem,l as __namedExportsOrder,p as default}; diff --git a/docs/assets/Sun-Earth-BKKYWkEY.js b/docs/assets/Sun-Earth-BKKYWkEY.js deleted file mode 100644 index 9973581..0000000 --- a/docs/assets/Sun-Earth-BKKYWkEY.js +++ /dev/null @@ -1,3 +0,0 @@ -import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as m}from"./index-z5U8iC57.js";import{M as e,d as a}from"./index-iQvBBB1Z.js";import{SunEarthAnalemma as i}from"./Analemma.stories-CHKHhkqr.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Transformation-KUb0IKcR.js";function r(n){const o={h1:"h1",...m(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(e,{title:"Showcase/Analemma/Sun-Earth"}),` -`,t.jsx(o.h1,{id:"sun-earth-analemma",children:"Sun-Earth Analemma"}),` -`,t.jsx(a,{of:i})]})}function E(n={}){const{wrapper:o}={...m(),...n.components};return o?t.jsx(o,{...n,children:t.jsx(r,{...n})}):r(n)}export{E as default}; diff --git a/docs/assets/Sun-Earth-BL7Vma6k.js b/docs/assets/Sun-Earth-BL7Vma6k.js new file mode 100644 index 0000000..4e6852d --- /dev/null +++ b/docs/assets/Sun-Earth-BL7Vma6k.js @@ -0,0 +1,4 @@ +import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as e}from"./index-z5U8iC57.js";import{M as a,d as s,C as i}from"./index-BLJ7OnYF.js";import{SunEarthAnalemma as r}from"./Analemma.stories-AQ7QpHgD.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-PJ2jYdc8.js";import"./Transformation-D8slzxJF.js";function m(n){const o={h1:"h1",...e(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(a,{title:"Showcase/Analemma/Sun-Earth"}),` +`,t.jsx(o.h1,{id:"sun-earth-analemma",children:"Sun-Earth Analemma"}),` +`,t.jsx(s,{of:r}),` +`,t.jsx(i,{of:r})]})}function E(n={}){const{wrapper:o}={...e(),...n.components};return o?t.jsx(o,{...n,children:t.jsx(m,{...n})}):m(n)}export{E as default}; diff --git a/docs/assets/Sun-Mars-CDIkeXEq.js b/docs/assets/Sun-Mars-CDIkeXEq.js new file mode 100644 index 0000000..e33736d --- /dev/null +++ b/docs/assets/Sun-Mars-CDIkeXEq.js @@ -0,0 +1,4 @@ +import{j as t}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as e}from"./index-z5U8iC57.js";import{M as s,d as a,C as i}from"./index-BLJ7OnYF.js";import{SunMarsAnalemma as r}from"./Analemma.stories-AQ7QpHgD.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Universe-PJ2jYdc8.js";import"./Transformation-D8slzxJF.js";function m(n){const o={h1:"h1",...e(),...n.components};return t.jsxs(t.Fragment,{children:[t.jsx(s,{title:"Showcase/Analemma/Sun-Mars"}),` +`,t.jsx(o.h1,{id:"sun-mars-analemma",children:"Sun-Mars Analemma"}),` +`,t.jsx(a,{of:r}),` +`,t.jsx(i,{of:r})]})}function A(n={}){const{wrapper:o}={...e(),...n.components};return o?t.jsx(o,{...n,children:t.jsx(m,{...n})}):m(n)}export{A as default}; diff --git a/docs/assets/Trails-B4BB4YNG.js b/docs/assets/Trails-B4BB4YNG.js new file mode 100644 index 0000000..6dab1b8 --- /dev/null +++ b/docs/assets/Trails-B4BB4YNG.js @@ -0,0 +1,3 @@ +import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as m}from"./index-z5U8iC57.js";import{M as s,d as i}from"./index-BLJ7OnYF.js";import{ShowTrailsOff as e,ShowTrailsOn as a}from"./Trails.stories-BRC0C8d9.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-ChslY3aX.js";import"./Universe-PJ2jYdc8.js";import"./Universe-BHXwzv85.js";function n(t){return o.jsxs(o.Fragment,{children:[o.jsx(s,{title:"Visualize/Trails"}),` +`,o.jsx(i,{of:e,name:"ShowTrailsOff"}),` +`,o.jsx(i,{of:a,name:"ShowTrailsOn"})]})}function O(t={}){const{wrapper:r}={...m(),...t.components};return r?o.jsx(r,{...t,children:o.jsx(n,{...t})}):n()}export{O as default}; diff --git a/docs/assets/Trails-CEoBnGe5.js b/docs/assets/Trails-CEoBnGe5.js deleted file mode 100644 index 070ff55..0000000 --- a/docs/assets/Trails-CEoBnGe5.js +++ /dev/null @@ -1,3 +0,0 @@ -import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as m}from"./index-z5U8iC57.js";import{M as s,d as i}from"./index-iQvBBB1Z.js";import{ShowTrailsOff as e,ShowTrailsOn as a}from"./Trails.stories-CqQYYREo.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";import"./Simulation-7H4WISkI.js";import"./Universe-DrO6ncQG.js";function n(t){return o.jsxs(o.Fragment,{children:[o.jsx(s,{title:"Visualize/Trails"}),` -`,o.jsx(i,{of:e,name:"ShowTrailsOff"}),` -`,o.jsx(i,{of:a,name:"ShowTrailsOn"})]})}function T(t={}){const{wrapper:r}={...m(),...t.components};return r?o.jsx(r,{...t,children:o.jsx(n,{...t})}):n()}export{T as default}; diff --git a/docs/assets/Trails.stories-BRC0C8d9.js b/docs/assets/Trails.stories-BRC0C8d9.js new file mode 100644 index 0000000..5b9f271 --- /dev/null +++ b/docs/assets/Trails.stories-BRC0C8d9.js @@ -0,0 +1,14 @@ +import{S as p}from"./Simulation-ChslY3aX.js";import{f as m}from"./Universe-BHXwzv85.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";import"./Universe-PJ2jYdc8.js";const g={title:"Visualize/Trails",component:p,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"ShowTrailsOff",universe:[m],visType:"3D"}},s={args:{storyName:"ShowTrailsOn",universe:[m],visType:"3D",showTrails:!0}};var e,a,o;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`{ + args: { + storyName: 'ShowTrailsOff', + universe: [fig8], + visType: '3D' + } +}`,...(o=(a=r.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};var i,t,n;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`{ + args: { + storyName: 'ShowTrailsOn', + universe: [fig8], + visType: '3D', + showTrails: true + } +}`,...(n=(t=s.parameters)==null?void 0:t.docs)==null?void 0:n.source}}};const S=["ShowTrailsOff","ShowTrailsOn"];export{r as ShowTrailsOff,s as ShowTrailsOn,S as __namedExportsOrder,g as default}; diff --git a/docs/assets/Trails.stories-CqQYYREo.js b/docs/assets/Trails.stories-CqQYYREo.js deleted file mode 100644 index b964411..0000000 --- a/docs/assets/Trails.stories-CqQYYREo.js +++ /dev/null @@ -1,14 +0,0 @@ -import{S as p}from"./Simulation-7H4WISkI.js";import{f as m}from"./Universe-DrO6ncQG.js";import"./jsx-runtime-DRTy3Uxn.js";import"./index-BBkUAzwr.js";const f={title:"Visualize/Trails",component:p,parameters:{layout:"centered",controls:{disable:!0}},tags:[],argTypes:{},args:{}},r={args:{storyName:"ShowTrailsOff",universe:[m],visType:"3D"}},s={args:{storyName:"ShowTrailsOn",universe:[m],visType:"3D",showTrails:!0}};var e,a,o;r.parameters={...r.parameters,docs:{...(e=r.parameters)==null?void 0:e.docs,source:{originalSource:`{ - args: { - storyName: 'ShowTrailsOff', - universe: [fig8], - visType: '3D' - } -}`,...(o=(a=r.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};var i,t,n;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`{ - args: { - storyName: 'ShowTrailsOn', - universe: [fig8], - visType: '3D', - showTrails: true - } -}`,...(n=(t=s.parameters)==null?void 0:t.docs)==null?void 0:n.source}}};const g=["ShowTrailsOff","ShowTrailsOn"];export{r as ShowTrailsOff,s as ShowTrailsOn,g as __namedExportsOrder,f as default}; diff --git a/docs/assets/Transformation-D8slzxJF.js b/docs/assets/Transformation-D8slzxJF.js new file mode 100644 index 0000000..5fc47d5 --- /dev/null +++ b/docs/assets/Transformation-D8slzxJF.js @@ -0,0 +1 @@ +import{V as t}from"./Universe-PJ2jYdc8.js";class r{constructor(i){this.index=i}transform(i){const s=i.bodies[this.index].position.clone();return i.bodies.forEach(o=>{o.position.sub(s)}),i}}class l{transform(i){let s=0,o=new t;return i.bodies.forEach(n=>{s+=n.mass,o.add(n.position.clone().multiplyScalar(n.mass))}),o.divideScalar(s),i.bodies.forEach(n=>{n.position.sub(o)}),i}}class c{constructor(i,s){this.axis=i,this.angle=s}transform(i){return i.bodies.forEach(s=>{s.position.applyAxisAngle(this.axis,this.angle),s.velocity.applyAxisAngle(this.axis,this.angle),s.acceleration.applyAxisAngle(this.axis,this.angle)}),i}}class p{constructor(i,s){this.axis=i,this.index=s}transform(i){const s=i.bodies[this.index].position.clone().angleTo(this.axis.clone()),o=i.bodies[this.index].position.clone().cross(this.axis.clone()).normalize();return i.bodies.forEach(n=>{n.position.applyAxisAngle(o.clone(),s),n.velocity.applyAxisAngle(o.clone(),s),n.acceleration.applyAxisAngle(o.clone(),s)}),i}}class h{constructor(i,s){this.axis=i,this.revolutionTime=s}transform(i,s){const o=-(s/this.revolutionTime)*Math.PI*2;return i.bodies.forEach(n=>{n.position.applyAxisAngle(this.axis,o),n.velocity.applyAxisAngle(this.axis,o),n.acceleration.applyAxisAngle(this.axis,o)}),i}}export{r as B,l as C,p as P,c as R,h as T}; diff --git a/docs/assets/Transformation-KUb0IKcR.js b/docs/assets/Transformation-KUb0IKcR.js deleted file mode 100644 index d820b2d..0000000 --- a/docs/assets/Transformation-KUb0IKcR.js +++ /dev/null @@ -1 +0,0 @@ -import{V as t}from"./Simulation-7H4WISkI.js";class r{constructor(i){this.index=i}transform(i){const s=i.bodies[this.index].position.clone();return i.bodies.forEach(o=>{o.position.sub(s)}),i}}class l{transform(i){let s=0,o=new t;return i.bodies.forEach(n=>{s+=n.mass,o.add(n.position.clone().multiplyScalar(n.mass))}),o.divideScalar(s),i.bodies.forEach(n=>{n.position.sub(o)}),i}}class c{constructor(i,s){this.axis=i,this.angle=s}transform(i){return i.bodies.forEach(s=>{s.position.applyAxisAngle(this.axis,this.angle),s.velocity.applyAxisAngle(this.axis,this.angle),s.acceleration.applyAxisAngle(this.axis,this.angle)}),i}}class p{constructor(i,s){this.axis=i,this.index=s}transform(i){const s=i.bodies[this.index].position.clone().angleTo(this.axis.clone()),o=i.bodies[this.index].position.clone().cross(this.axis.clone()).normalize();return i.bodies.forEach(n=>{n.position.applyAxisAngle(o.clone(),s),n.velocity.applyAxisAngle(o.clone(),s),n.acceleration.applyAxisAngle(o.clone(),s)}),i}}class h{constructor(i,s){this.axis=i,this.revolutionTime=s}transform(i,s){const o=-(s/this.revolutionTime)*Math.PI*2;return i.bodies.forEach(n=>{n.position.applyAxisAngle(this.axis,o),n.velocity.applyAxisAngle(this.axis,o),n.acceleration.applyAxisAngle(this.axis,o)}),i}}export{r as B,l as C,p as P,c as R,h as T}; diff --git a/docs/assets/Transformation-BDRML62g.js b/docs/assets/Transformation-Wi_BFfS_.js similarity index 95% rename from docs/assets/Transformation-BDRML62g.js rename to docs/assets/Transformation-Wi_BFfS_.js index 279cefc..17b0d7a 100644 --- a/docs/assets/Transformation-BDRML62g.js +++ b/docs/assets/Transformation-Wi_BFfS_.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as i}from"./index-iQvBBB1Z.js";import"./index-BBkUAzwr.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function a(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...t(),...e.components};return n.jsxs(n.Fragment,{children:[n.jsx(i,{title:"Define/Transformation"}),` +import{j as n}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as t}from"./index-z5U8iC57.js";import{M as i}from"./index-BLJ7OnYF.js";import"./index-BBkUAzwr.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";function a(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...t(),...e.components};return n.jsxs(n.Fragment,{children:[n.jsx(i,{title:"Define/Transformation"}),` `,n.jsx(r.h1,{id:"transformation",children:"Transformation"}),` `,n.jsx(r.p,{children:"TODO"}),` `,n.jsx(r.pre,{children:n.jsx(r.code,{className:"language-typescript",children:`export interface Transformation {\r diff --git a/docs/assets/Universe-BHXwzv85.js b/docs/assets/Universe-BHXwzv85.js new file mode 100644 index 0000000..925c0d0 --- /dev/null +++ b/docs/assets/Universe-BHXwzv85.js @@ -0,0 +1 @@ +import{U as w,a,C as n,V as e,R as s,G as i,b as t}from"./Universe-PJ2jYdc8.js";const o=new w({label:"Fig 8 Universe",currState:new a([new n("Body 1",1,1,new e(-.97000436,.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 2",1,1,new e(.97000436,-.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 3",1,1,new e(0,0,0),new e(-2*.466203685,-2*.43236573,0),new e(0,0,0))]),simFunc:new s(new i(1),[1,2,2,1])}),l=[o,new w({label:"Fig 8 Universe 2",currState:new a([new n("Body 1",1,1,new e(-.97000436,.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 2",1,1,new e(.97000436,-.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 3",1,1,new e(0,0,0),new e(-2*.466203685,-2*.43236573,0),new e(0,0,0))]),simFunc:new t(new i(1)),color:"red"})];export{o as f,l as m}; diff --git a/docs/assets/Universe-DrO6ncQG.js b/docs/assets/Universe-DrO6ncQG.js deleted file mode 100644 index 567b269..0000000 --- a/docs/assets/Universe-DrO6ncQG.js +++ /dev/null @@ -1 +0,0 @@ -import{U as w,a,C as n,V as e,R as s,G as i,b as t}from"./Simulation-7H4WISkI.js";const o=new w({label:"Fig 8 Universe",currState:new a([new n("Body 1",1,new e(-.97000436,.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 2",1,new e(.97000436,-.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 3",1,new e(0,0,0),new e(-2*.466203685,-2*.43236573,0),new e(0,0,0))]),simFunc:new s(new i(1),[1,2,2,1])}),l=[o,new w({label:"Fig 8 Universe 2",currState:new a([new n("Body 1",1,new e(-.97000436,.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 2",1,new e(.97000436,-.24308753,0),new e(.466203685,.43236573,0),new e(0,0,0)),new n("Body 3",1,new e(0,0,0),new e(-2*.466203685,-2*.43236573,0),new e(0,0,0))]),simFunc:new t(new i(1)),color:"red"})];export{o as f,l as m}; diff --git a/docs/assets/Simulation-7H4WISkI.js b/docs/assets/Universe-PJ2jYdc8.js similarity index 58% rename from docs/assets/Simulation-7H4WISkI.js rename to docs/assets/Universe-PJ2jYdc8.js index 89309a1..d1a5c38 100644 --- a/docs/assets/Simulation-7H4WISkI.js +++ b/docs/assets/Universe-PJ2jYdc8.js @@ -1,12 +1,12 @@ -import{j as L3}from"./jsx-runtime-DRTy3Uxn.js";import{g as P3,R as R3,r as D3}from"./index-BBkUAzwr.js";class By{constructor(F,q,le,De,Xe){this.label=F,this.mass=q,this.position=le,this.velocity=De,this.acceleration=Xe}clone(F,q,le){return new By(this.label,this.mass,F===void 0?this.position.clone():F,q===void 0?this.velocity.clone():q,le===void 0?this.acceleration.clone():le)}}/** +import{g as Uy,c as R3}from"./index-BBkUAzwr.js";class Hy{constructor(F,q,lt,Dt,Zt,G){this.label=F,this.mass=q,this.radius=lt,this.position=Dt,this.velocity=Zt,this.acceleration=G}clone(F,q,lt){return new Hy(this.label,this.mass,this.radius,F===void 0?this.position.clone():F,q===void 0?this.velocity.clone():q,lt===void 0?this.acceleration.clone():lt)}}/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const H0="163",Dh={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Ih={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},I3=0,nm=1,F3=2,Uy=1,z3=2,gf=3,gc=0,Hs=1,mf=2,hc=0,nv=1,im=2,am=3,om=4,k3=5,qc=100,O3=101,N3=102,B3=103,U3=104,V3=200,H3=201,G3=202,W3=203,R0=204,D0=205,Y3=206,X3=207,Z3=208,j3=209,K3=210,J3=211,Q3=212,$3=213,q3=214,ew=0,tw=1,rw=2,ip=3,nw=4,iw=5,aw=6,ow=7,Vy=0,sw=1,lw=2,vc=0,uw=1,fw=2,cw=3,hw=4,vw=5,dw=6,pw=7,Hy=300,sv=301,lv=302,I0=303,F0=304,hp=306,z0=1e3,th=1001,k0=1002,Dl=1003,gw=1004,_d=1005,fu=1006,Jp=1007,rh=1008,dc=1009,mw=1010,yw=1011,Gy=1012,Wy=1013,uv=1014,cc=1015,ap=1016,Yy=1017,Xy=1018,Kv=1020,xw=35902,bw=1021,ww=1022,zu=1023,Tw=1024,Aw=1025,iv=1026,Xv=1027,Mw=1028,Zy=1029,Sw=1030,jy=1031,Ky=1033,Qp=33776,$p=33777,qp=33778,e0=33779,sm=35840,lm=35841,um=35842,fm=35843,Jy=36196,cm=37492,hm=37496,vm=37808,dm=37809,pm=37810,gm=37811,mm=37812,ym=37813,xm=37814,bm=37815,wm=37816,Tm=37817,Am=37818,Mm=37819,Sm=37820,Em=37821,t0=36492,_m=36494,Cm=36495,Ew=36283,Lm=36284,Pm=36285,Rm=36286,_w=3200,Cw=3201,Lw=0,Pw=1,fc="",Iu="srgb",yc="srgb-linear",G0="display-p3",vp="display-p3-linear",op="linear",Ya="srgb",sp="rec709",lp="p3",Fh=7680,Dm=519,Rw=512,Dw=513,Iw=514,Qy=515,Fw=516,zw=517,kw=518,Ow=519,O0=35044,Im="300 es",yf=2e3,up=2001;class ih{addEventListener(F,q){this._listeners===void 0&&(this._listeners={});const le=this._listeners;le[F]===void 0&&(le[F]=[]),le[F].indexOf(q)===-1&&le[F].push(q)}hasEventListener(F,q){if(this._listeners===void 0)return!1;const le=this._listeners;return le[F]!==void 0&&le[F].indexOf(q)!==-1}removeEventListener(F,q){if(this._listeners===void 0)return;const De=this._listeners[F];if(De!==void 0){const Xe=De.indexOf(q);Xe!==-1&&De.splice(Xe,1)}}dispatchEvent(F){if(this._listeners===void 0)return;const le=this._listeners[F.type];if(le!==void 0){F.target=this;const De=le.slice(0);for(let Xe=0,H=De.length;Xe>8&255]+fs[_e>>16&255]+fs[_e>>24&255]+"-"+fs[F&255]+fs[F>>8&255]+"-"+fs[F>>16&15|64]+fs[F>>24&255]+"-"+fs[q&63|128]+fs[q>>8&255]+"-"+fs[q>>16&255]+fs[q>>24&255]+fs[le&255]+fs[le>>8&255]+fs[le>>16&255]+fs[le>>24&255]).toLowerCase()}function hs(_e,F,q){return Math.max(F,Math.min(q,_e))}function W0(_e,F){return(_e%F+F)%F}function Nw(_e,F,q,le,De){return le+(_e-F)*(De-le)/(q-F)}function Bw(_e,F,q){return _e!==F?(q-_e)/(F-_e):0}function Yv(_e,F,q){return(1-q)*_e+q*F}function Uw(_e,F,q,le){return Yv(_e,F,1-Math.exp(-q*le))}function Vw(_e,F=1){return F-Math.abs(W0(_e,F*2)-F)}function Hw(_e,F,q){return _e<=F?0:_e>=q?1:(_e=(_e-F)/(q-F),_e*_e*(3-2*_e))}function Gw(_e,F,q){return _e<=F?0:_e>=q?1:(_e=(_e-F)/(q-F),_e*_e*_e*(_e*(_e*6-15)+10))}function Ww(_e,F){return _e+Math.floor(Math.random()*(F-_e+1))}function Yw(_e,F){return _e+Math.random()*(F-_e)}function Xw(_e){return _e*(.5-Math.random())}function Zw(_e){_e!==void 0&&(Fm=_e);let F=Fm+=1831565813;return F=Math.imul(F^F>>>15,F|1),F^=F+Math.imul(F^F>>>7,F|61),((F^F>>>14)>>>0)/4294967296}function jw(_e){return _e*Wv}function Kw(_e){return _e*Zv}function Jw(_e){return(_e&_e-1)===0&&_e!==0}function Qw(_e){return Math.pow(2,Math.ceil(Math.log(_e)/Math.LN2))}function $w(_e){return Math.pow(2,Math.floor(Math.log(_e)/Math.LN2))}function qw(_e,F,q,le,De){const Xe=Math.cos,H=Math.sin,U=Xe(q/2),e=H(q/2),g=Xe((F+le)/2),C=H((F+le)/2),i=Xe((F-le)/2),S=H((F-le)/2),x=Xe((le-F)/2),v=H((le-F)/2);switch(De){case"XYX":_e.set(U*C,e*i,e*S,U*g);break;case"YZY":_e.set(e*S,U*C,e*i,U*g);break;case"ZXZ":_e.set(e*i,e*S,U*C,U*g);break;case"XZX":_e.set(U*C,e*v,e*x,U*g);break;case"YXY":_e.set(e*x,U*C,e*v,U*g);break;case"ZYZ":_e.set(e*v,e*x,U*C,U*g);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+De)}}function cu(_e,F){switch(F.constructor){case Float32Array:return _e;case Uint32Array:return _e/4294967295;case Uint16Array:return _e/65535;case Uint8Array:return _e/255;case Int32Array:return Math.max(_e/2147483647,-1);case Int16Array:return Math.max(_e/32767,-1);case Int8Array:return Math.max(_e/127,-1);default:throw new Error("Invalid component type.")}}function Pa(_e,F){switch(F.constructor){case Float32Array:return _e;case Uint32Array:return Math.round(_e*4294967295);case Uint16Array:return Math.round(_e*65535);case Uint8Array:return Math.round(_e*255);case Int32Array:return Math.round(_e*2147483647);case Int16Array:return Math.round(_e*32767);case Int8Array:return Math.round(_e*127);default:throw new Error("Invalid component type.")}}const e2={DEG2RAD:Wv,RAD2DEG:Zv,generateUUID:xf,clamp:hs,euclideanModulo:W0,mapLinear:Nw,inverseLerp:Bw,lerp:Yv,damp:Uw,pingpong:Vw,smoothstep:Hw,smootherstep:Gw,randInt:Ww,randFloat:Yw,randFloatSpread:Xw,seededRandom:Zw,degToRad:jw,radToDeg:Kw,isPowerOfTwo:Jw,ceilPowerOfTwo:Qw,floorPowerOfTwo:$w,setQuaternionFromProperEuler:qw,normalize:Pa,denormalize:cu};class Wi{constructor(F=0,q=0){Wi.prototype.isVector2=!0,this.x=F,this.y=q}get width(){return this.x}set width(F){this.x=F}get height(){return this.y}set height(F){this.y=F}set(F,q){return this.x=F,this.y=q,this}setScalar(F){return this.x=F,this.y=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y)}copy(F){return this.x=F.x,this.y=F.y,this}add(F){return this.x+=F.x,this.y+=F.y,this}addScalar(F){return this.x+=F,this.y+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this}subScalar(F){return this.x-=F,this.y-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this}multiply(F){return this.x*=F.x,this.y*=F.y,this}multiplyScalar(F){return this.x*=F,this.y*=F,this}divide(F){return this.x/=F.x,this.y/=F.y,this}divideScalar(F){return this.multiplyScalar(1/F)}applyMatrix3(F){const q=this.x,le=this.y,De=F.elements;return this.x=De[0]*q+De[3]*le+De[6],this.y=De[1]*q+De[4]*le+De[7],this}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this}clampLength(F,q){const le=this.length();return this.divideScalar(le||1).multiplyScalar(Math.max(F,Math.min(q,le)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(F){return this.x*F.x+this.y*F.y}cross(F){return this.x*F.y-this.y*F.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(F){const q=Math.sqrt(this.lengthSq()*F.lengthSq());if(q===0)return Math.PI/2;const le=this.dot(F)/q;return Math.acos(hs(le,-1,1))}distanceTo(F){return Math.sqrt(this.distanceToSquared(F))}distanceToSquared(F){const q=this.x-F.x,le=this.y-F.y;return q*q+le*le}manhattanDistanceTo(F){return Math.abs(this.x-F.x)+Math.abs(this.y-F.y)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this}lerpVectors(F,q,le){return this.x=F.x+(q.x-F.x)*le,this.y=F.y+(q.y-F.y)*le,this}equals(F){return F.x===this.x&&F.y===this.y}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this}rotateAround(F,q){const le=Math.cos(q),De=Math.sin(q),Xe=this.x-F.x,H=this.y-F.y;return this.x=Xe*le-H*De+F.x,this.y=Xe*De+H*le+F.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class fa{constructor(F,q,le,De,Xe,H,U,e,g){fa.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],F!==void 0&&this.set(F,q,le,De,Xe,H,U,e,g)}set(F,q,le,De,Xe,H,U,e,g){const C=this.elements;return C[0]=F,C[1]=De,C[2]=U,C[3]=q,C[4]=Xe,C[5]=e,C[6]=le,C[7]=H,C[8]=g,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(F){const q=this.elements,le=F.elements;return q[0]=le[0],q[1]=le[1],q[2]=le[2],q[3]=le[3],q[4]=le[4],q[5]=le[5],q[6]=le[6],q[7]=le[7],q[8]=le[8],this}extractBasis(F,q,le){return F.setFromMatrix3Column(this,0),q.setFromMatrix3Column(this,1),le.setFromMatrix3Column(this,2),this}setFromMatrix4(F){const q=F.elements;return this.set(q[0],q[4],q[8],q[1],q[5],q[9],q[2],q[6],q[10]),this}multiply(F){return this.multiplyMatrices(this,F)}premultiply(F){return this.multiplyMatrices(F,this)}multiplyMatrices(F,q){const le=F.elements,De=q.elements,Xe=this.elements,H=le[0],U=le[3],e=le[6],g=le[1],C=le[4],i=le[7],S=le[2],x=le[5],v=le[8],p=De[0],r=De[3],t=De[6],a=De[1],n=De[4],f=De[7],c=De[2],l=De[5],m=De[8];return Xe[0]=H*p+U*a+e*c,Xe[3]=H*r+U*n+e*l,Xe[6]=H*t+U*f+e*m,Xe[1]=g*p+C*a+i*c,Xe[4]=g*r+C*n+i*l,Xe[7]=g*t+C*f+i*m,Xe[2]=S*p+x*a+v*c,Xe[5]=S*r+x*n+v*l,Xe[8]=S*t+x*f+v*m,this}multiplyScalar(F){const q=this.elements;return q[0]*=F,q[3]*=F,q[6]*=F,q[1]*=F,q[4]*=F,q[7]*=F,q[2]*=F,q[5]*=F,q[8]*=F,this}determinant(){const F=this.elements,q=F[0],le=F[1],De=F[2],Xe=F[3],H=F[4],U=F[5],e=F[6],g=F[7],C=F[8];return q*H*C-q*U*g-le*Xe*C+le*U*e+De*Xe*g-De*H*e}invert(){const F=this.elements,q=F[0],le=F[1],De=F[2],Xe=F[3],H=F[4],U=F[5],e=F[6],g=F[7],C=F[8],i=C*H-U*g,S=U*e-C*Xe,x=g*Xe-H*e,v=q*i+le*S+De*x;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/v;return F[0]=i*p,F[1]=(De*g-C*le)*p,F[2]=(U*le-De*H)*p,F[3]=S*p,F[4]=(C*q-De*e)*p,F[5]=(De*Xe-U*q)*p,F[6]=x*p,F[7]=(le*e-g*q)*p,F[8]=(H*q-le*Xe)*p,this}transpose(){let F;const q=this.elements;return F=q[1],q[1]=q[3],q[3]=F,F=q[2],q[2]=q[6],q[6]=F,F=q[5],q[5]=q[7],q[7]=F,this}getNormalMatrix(F){return this.setFromMatrix4(F).invert().transpose()}transposeIntoArray(F){const q=this.elements;return F[0]=q[0],F[1]=q[3],F[2]=q[6],F[3]=q[1],F[4]=q[4],F[5]=q[7],F[6]=q[2],F[7]=q[5],F[8]=q[8],this}setUvTransform(F,q,le,De,Xe,H,U){const e=Math.cos(Xe),g=Math.sin(Xe);return this.set(le*e,le*g,-le*(e*H+g*U)+H+F,-De*g,De*e,-De*(-g*H+e*U)+U+q,0,0,1),this}scale(F,q){return this.premultiply(r0.makeScale(F,q)),this}rotate(F){return this.premultiply(r0.makeRotation(-F)),this}translate(F,q){return this.premultiply(r0.makeTranslation(F,q)),this}makeTranslation(F,q){return F.isVector2?this.set(1,0,F.x,0,1,F.y,0,0,1):this.set(1,0,F,0,1,q,0,0,1),this}makeRotation(F){const q=Math.cos(F),le=Math.sin(F);return this.set(q,-le,0,le,q,0,0,0,1),this}makeScale(F,q){return this.set(F,0,0,0,q,0,0,0,1),this}equals(F){const q=this.elements,le=F.elements;for(let De=0;De<9;De++)if(q[De]!==le[De])return!1;return!0}fromArray(F,q=0){for(let le=0;le<9;le++)this.elements[le]=F[le+q];return this}toArray(F=[],q=0){const le=this.elements;return F[q]=le[0],F[q+1]=le[1],F[q+2]=le[2],F[q+3]=le[3],F[q+4]=le[4],F[q+5]=le[5],F[q+6]=le[6],F[q+7]=le[7],F[q+8]=le[8],F}clone(){return new this.constructor().fromArray(this.elements)}}const r0=new fa;function $y(_e){for(let F=_e.length-1;F>=0;--F)if(_e[F]>=65535)return!0;return!1}function fp(_e){return document.createElementNS("http://www.w3.org/1999/xhtml",_e)}function t2(){const _e=fp("canvas");return _e.style.display="block",_e}const zm={};function qy(_e){_e in zm||(zm[_e]=!0,console.warn(_e))}const km=new fa().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Om=new fa().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Cd={[yc]:{transfer:op,primaries:sp,toReference:_e=>_e,fromReference:_e=>_e},[Iu]:{transfer:Ya,primaries:sp,toReference:_e=>_e.convertSRGBToLinear(),fromReference:_e=>_e.convertLinearToSRGB()},[vp]:{transfer:op,primaries:lp,toReference:_e=>_e.applyMatrix3(Om),fromReference:_e=>_e.applyMatrix3(km)},[G0]:{transfer:Ya,primaries:lp,toReference:_e=>_e.convertSRGBToLinear().applyMatrix3(Om),fromReference:_e=>_e.applyMatrix3(km).convertLinearToSRGB()}},r2=new Set([yc,vp]),Fa={enabled:!0,_workingColorSpace:yc,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(_e){if(!r2.has(_e))throw new Error(`Unsupported working color space, "${_e}".`);this._workingColorSpace=_e},convert:function(_e,F,q){if(this.enabled===!1||F===q||!F||!q)return _e;const le=Cd[F].toReference,De=Cd[q].fromReference;return De(le(_e))},fromWorkingColorSpace:function(_e,F){return this.convert(_e,this._workingColorSpace,F)},toWorkingColorSpace:function(_e,F){return this.convert(_e,F,this._workingColorSpace)},getPrimaries:function(_e){return Cd[_e].primaries},getTransfer:function(_e){return _e===fc?op:Cd[_e].transfer}};function av(_e){return _e<.04045?_e*.0773993808:Math.pow(_e*.9478672986+.0521327014,2.4)}function n0(_e){return _e<.0031308?_e*12.92:1.055*Math.pow(_e,.41666)-.055}let zh;class n2{static getDataURL(F){if(/^data:/i.test(F.src)||typeof HTMLCanvasElement>"u")return F.src;let q;if(F instanceof HTMLCanvasElement)q=F;else{zh===void 0&&(zh=fp("canvas")),zh.width=F.width,zh.height=F.height;const le=zh.getContext("2d");F instanceof ImageData?le.putImageData(F,0,0):le.drawImage(F,0,0,F.width,F.height),q=zh}return q.width>2048||q.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",F),q.toDataURL("image/jpeg",.6)):q.toDataURL("image/png")}static sRGBToLinear(F){if(typeof HTMLImageElement<"u"&&F instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&F instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&F instanceof ImageBitmap){const q=fp("canvas");q.width=F.width,q.height=F.height;const le=q.getContext("2d");le.drawImage(F,0,0,F.width,F.height);const De=le.getImageData(0,0,F.width,F.height),Xe=De.data;for(let H=0;H0&&(le.userData=this.userData),q||(F.textures[this.uuid]=le),le}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(F){if(this.mapping!==Hy)return F;if(F.applyMatrix3(this.matrix),F.x<0||F.x>1)switch(this.wrapS){case z0:F.x=F.x-Math.floor(F.x);break;case th:F.x=F.x<0?0:1;break;case k0:Math.abs(Math.floor(F.x)%2)===1?F.x=Math.ceil(F.x)-F.x:F.x=F.x-Math.floor(F.x);break}if(F.y<0||F.y>1)switch(this.wrapT){case z0:F.y=F.y-Math.floor(F.y);break;case th:F.y=F.y<0?0:1;break;case k0:Math.abs(Math.floor(F.y)%2)===1?F.y=Math.ceil(F.y)-F.y:F.y=F.y-Math.floor(F.y);break}return this.flipY&&(F.y=1-F.y),F}set needsUpdate(F){F===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(F){F===!0&&this.pmremVersion++}}Es.DEFAULT_IMAGE=null;Es.DEFAULT_MAPPING=Hy;Es.DEFAULT_ANISOTROPY=1;class No{constructor(F=0,q=0,le=0,De=1){No.prototype.isVector4=!0,this.x=F,this.y=q,this.z=le,this.w=De}get width(){return this.z}set width(F){this.z=F}get height(){return this.w}set height(F){this.w=F}set(F,q,le,De){return this.x=F,this.y=q,this.z=le,this.w=De,this}setScalar(F){return this.x=F,this.y=F,this.z=F,this.w=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setZ(F){return this.z=F,this}setW(F){return this.w=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;case 2:this.z=q;break;case 3:this.w=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(F){return this.x=F.x,this.y=F.y,this.z=F.z,this.w=F.w!==void 0?F.w:1,this}add(F){return this.x+=F.x,this.y+=F.y,this.z+=F.z,this.w+=F.w,this}addScalar(F){return this.x+=F,this.y+=F,this.z+=F,this.w+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this.z=F.z+q.z,this.w=F.w+q.w,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this.z+=F.z*q,this.w+=F.w*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this.z-=F.z,this.w-=F.w,this}subScalar(F){return this.x-=F,this.y-=F,this.z-=F,this.w-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this.z=F.z-q.z,this.w=F.w-q.w,this}multiply(F){return this.x*=F.x,this.y*=F.y,this.z*=F.z,this.w*=F.w,this}multiplyScalar(F){return this.x*=F,this.y*=F,this.z*=F,this.w*=F,this}applyMatrix4(F){const q=this.x,le=this.y,De=this.z,Xe=this.w,H=F.elements;return this.x=H[0]*q+H[4]*le+H[8]*De+H[12]*Xe,this.y=H[1]*q+H[5]*le+H[9]*De+H[13]*Xe,this.z=H[2]*q+H[6]*le+H[10]*De+H[14]*Xe,this.w=H[3]*q+H[7]*le+H[11]*De+H[15]*Xe,this}divideScalar(F){return this.multiplyScalar(1/F)}setAxisAngleFromQuaternion(F){this.w=2*Math.acos(F.w);const q=Math.sqrt(1-F.w*F.w);return q<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=F.x/q,this.y=F.y/q,this.z=F.z/q),this}setAxisAngleFromRotationMatrix(F){let q,le,De,Xe;const e=F.elements,g=e[0],C=e[4],i=e[8],S=e[1],x=e[5],v=e[9],p=e[2],r=e[6],t=e[10];if(Math.abs(C-S)<.01&&Math.abs(i-p)<.01&&Math.abs(v-r)<.01){if(Math.abs(C+S)<.1&&Math.abs(i+p)<.1&&Math.abs(v+r)<.1&&Math.abs(g+x+t-3)<.1)return this.set(1,0,0,0),this;q=Math.PI;const n=(g+1)/2,f=(x+1)/2,c=(t+1)/2,l=(C+S)/4,m=(i+p)/4,h=(v+r)/4;return n>f&&n>c?n<.01?(le=0,De=.707106781,Xe=.707106781):(le=Math.sqrt(n),De=l/le,Xe=m/le):f>c?f<.01?(le=.707106781,De=0,Xe=.707106781):(De=Math.sqrt(f),le=l/De,Xe=h/De):c<.01?(le=.707106781,De=.707106781,Xe=0):(Xe=Math.sqrt(c),le=m/Xe,De=h/Xe),this.set(le,De,Xe,q),this}let a=Math.sqrt((r-v)*(r-v)+(i-p)*(i-p)+(S-C)*(S-C));return Math.abs(a)<.001&&(a=1),this.x=(r-v)/a,this.y=(i-p)/a,this.z=(S-C)/a,this.w=Math.acos((g+x+t-1)/2),this}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this.z=Math.min(this.z,F.z),this.w=Math.min(this.w,F.w),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this.z=Math.max(this.z,F.z),this.w=Math.max(this.w,F.w),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this.z=Math.max(F.z,Math.min(q.z,this.z)),this.w=Math.max(F.w,Math.min(q.w,this.w)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this.z=Math.max(F,Math.min(q,this.z)),this.w=Math.max(F,Math.min(q,this.w)),this}clampLength(F,q){const le=this.length();return this.divideScalar(le||1).multiplyScalar(Math.max(F,Math.min(q,le)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(F){return this.x*F.x+this.y*F.y+this.z*F.z+this.w*F.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this.z+=(F.z-this.z)*q,this.w+=(F.w-this.w)*q,this}lerpVectors(F,q,le){return this.x=F.x+(q.x-F.x)*le,this.y=F.y+(q.y-F.y)*le,this.z=F.z+(q.z-F.z)*le,this.w=F.w+(q.w-F.w)*le,this}equals(F){return F.x===this.x&&F.y===this.y&&F.z===this.z&&F.w===this.w}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this.z=F[q+2],this.w=F[q+3],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F[q+2]=this.z,F[q+3]=this.w,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this.z=F.getZ(q),this.w=F.getW(q),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class o2 extends ih{constructor(F=1,q=1,le={}){super(),this.isRenderTarget=!0,this.width=F,this.height=q,this.depth=1,this.scissor=new No(0,0,F,q),this.scissorTest=!1,this.viewport=new No(0,0,F,q);const De={width:F,height:q,depth:1};le=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:fu,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0,count:1},le);const Xe=new Es(De,le.mapping,le.wrapS,le.wrapT,le.magFilter,le.minFilter,le.format,le.type,le.anisotropy,le.colorSpace);Xe.flipY=!1,Xe.generateMipmaps=le.generateMipmaps,Xe.internalFormat=le.internalFormat,this.textures=[];const H=le.count;for(let U=0;U=0?1:-1,n=1-t*t;if(n>Number.EPSILON){const c=Math.sqrt(n),l=Math.atan2(c,t*a);r=Math.sin(r*l)/c,U=Math.sin(U*l)/c}const f=U*a;if(e=e*r+S*f,g=g*r+x*f,C=C*r+v*f,i=i*r+p*f,r===1-U){const c=1/Math.sqrt(e*e+g*g+C*C+i*i);e*=c,g*=c,C*=c,i*=c}}F[q]=e,F[q+1]=g,F[q+2]=C,F[q+3]=i}static multiplyQuaternionsFlat(F,q,le,De,Xe,H){const U=le[De],e=le[De+1],g=le[De+2],C=le[De+3],i=Xe[H],S=Xe[H+1],x=Xe[H+2],v=Xe[H+3];return F[q]=U*v+C*i+e*x-g*S,F[q+1]=e*v+C*S+g*i-U*x,F[q+2]=g*v+C*x+U*S-e*i,F[q+3]=C*v-U*i-e*S-g*x,F}get x(){return this._x}set x(F){this._x=F,this._onChangeCallback()}get y(){return this._y}set y(F){this._y=F,this._onChangeCallback()}get z(){return this._z}set z(F){this._z=F,this._onChangeCallback()}get w(){return this._w}set w(F){this._w=F,this._onChangeCallback()}set(F,q,le,De){return this._x=F,this._y=q,this._z=le,this._w=De,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(F){return this._x=F.x,this._y=F.y,this._z=F.z,this._w=F.w,this._onChangeCallback(),this}setFromEuler(F,q=!0){const le=F._x,De=F._y,Xe=F._z,H=F._order,U=Math.cos,e=Math.sin,g=U(le/2),C=U(De/2),i=U(Xe/2),S=e(le/2),x=e(De/2),v=e(Xe/2);switch(H){case"XYZ":this._x=S*C*i+g*x*v,this._y=g*x*i-S*C*v,this._z=g*C*v+S*x*i,this._w=g*C*i-S*x*v;break;case"YXZ":this._x=S*C*i+g*x*v,this._y=g*x*i-S*C*v,this._z=g*C*v-S*x*i,this._w=g*C*i+S*x*v;break;case"ZXY":this._x=S*C*i-g*x*v,this._y=g*x*i+S*C*v,this._z=g*C*v+S*x*i,this._w=g*C*i-S*x*v;break;case"ZYX":this._x=S*C*i-g*x*v,this._y=g*x*i+S*C*v,this._z=g*C*v-S*x*i,this._w=g*C*i+S*x*v;break;case"YZX":this._x=S*C*i+g*x*v,this._y=g*x*i+S*C*v,this._z=g*C*v-S*x*i,this._w=g*C*i-S*x*v;break;case"XZY":this._x=S*C*i-g*x*v,this._y=g*x*i-S*C*v,this._z=g*C*v+S*x*i,this._w=g*C*i+S*x*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+H)}return q===!0&&this._onChangeCallback(),this}setFromAxisAngle(F,q){const le=q/2,De=Math.sin(le);return this._x=F.x*De,this._y=F.y*De,this._z=F.z*De,this._w=Math.cos(le),this._onChangeCallback(),this}setFromRotationMatrix(F){const q=F.elements,le=q[0],De=q[4],Xe=q[8],H=q[1],U=q[5],e=q[9],g=q[2],C=q[6],i=q[10],S=le+U+i;if(S>0){const x=.5/Math.sqrt(S+1);this._w=.25/x,this._x=(C-e)*x,this._y=(Xe-g)*x,this._z=(H-De)*x}else if(le>U&&le>i){const x=2*Math.sqrt(1+le-U-i);this._w=(C-e)/x,this._x=.25*x,this._y=(De+H)/x,this._z=(Xe+g)/x}else if(U>i){const x=2*Math.sqrt(1+U-le-i);this._w=(Xe-g)/x,this._x=(De+H)/x,this._y=.25*x,this._z=(e+C)/x}else{const x=2*Math.sqrt(1+i-le-U);this._w=(H-De)/x,this._x=(Xe+g)/x,this._y=(e+C)/x,this._z=.25*x}return this._onChangeCallback(),this}setFromUnitVectors(F,q){let le=F.dot(q)+1;return leMath.abs(F.z)?(this._x=-F.y,this._y=F.x,this._z=0,this._w=le):(this._x=0,this._y=-F.z,this._z=F.y,this._w=le)):(this._x=F.y*q.z-F.z*q.y,this._y=F.z*q.x-F.x*q.z,this._z=F.x*q.y-F.y*q.x,this._w=le),this.normalize()}angleTo(F){return 2*Math.acos(Math.abs(hs(this.dot(F),-1,1)))}rotateTowards(F,q){const le=this.angleTo(F);if(le===0)return this;const De=Math.min(1,q/le);return this.slerp(F,De),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(F){return this._x*F._x+this._y*F._y+this._z*F._z+this._w*F._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let F=this.length();return F===0?(this._x=0,this._y=0,this._z=0,this._w=1):(F=1/F,this._x=this._x*F,this._y=this._y*F,this._z=this._z*F,this._w=this._w*F),this._onChangeCallback(),this}multiply(F){return this.multiplyQuaternions(this,F)}premultiply(F){return this.multiplyQuaternions(F,this)}multiplyQuaternions(F,q){const le=F._x,De=F._y,Xe=F._z,H=F._w,U=q._x,e=q._y,g=q._z,C=q._w;return this._x=le*C+H*U+De*g-Xe*e,this._y=De*C+H*e+Xe*U-le*g,this._z=Xe*C+H*g+le*e-De*U,this._w=H*C-le*U-De*e-Xe*g,this._onChangeCallback(),this}slerp(F,q){if(q===0)return this;if(q===1)return this.copy(F);const le=this._x,De=this._y,Xe=this._z,H=this._w;let U=H*F._w+le*F._x+De*F._y+Xe*F._z;if(U<0?(this._w=-F._w,this._x=-F._x,this._y=-F._y,this._z=-F._z,U=-U):this.copy(F),U>=1)return this._w=H,this._x=le,this._y=De,this._z=Xe,this;const e=1-U*U;if(e<=Number.EPSILON){const x=1-q;return this._w=x*H+q*this._w,this._x=x*le+q*this._x,this._y=x*De+q*this._y,this._z=x*Xe+q*this._z,this.normalize(),this}const g=Math.sqrt(e),C=Math.atan2(g,U),i=Math.sin((1-q)*C)/g,S=Math.sin(q*C)/g;return this._w=H*i+this._w*S,this._x=le*i+this._x*S,this._y=De*i+this._y*S,this._z=Xe*i+this._z*S,this._onChangeCallback(),this}slerpQuaternions(F,q,le){return this.copy(F).slerp(q,le)}random(){const F=2*Math.PI*Math.random(),q=2*Math.PI*Math.random(),le=Math.random(),De=Math.sqrt(1-le),Xe=Math.sqrt(le);return this.set(De*Math.sin(F),De*Math.cos(F),Xe*Math.sin(q),Xe*Math.cos(q))}equals(F){return F._x===this._x&&F._y===this._y&&F._z===this._z&&F._w===this._w}fromArray(F,q=0){return this._x=F[q],this._y=F[q+1],this._z=F[q+2],this._w=F[q+3],this._onChangeCallback(),this}toArray(F=[],q=0){return F[q]=this._x,F[q+1]=this._y,F[q+2]=this._z,F[q+3]=this._w,F}fromBufferAttribute(F,q){return this._x=F.getX(q),this._y=F.getY(q),this._z=F.getZ(q),this._w=F.getW(q),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(F){return this._onChangeCallback=F,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class bn{constructor(F=0,q=0,le=0){bn.prototype.isVector3=!0,this.x=F,this.y=q,this.z=le}set(F,q,le){return le===void 0&&(le=this.z),this.x=F,this.y=q,this.z=le,this}setScalar(F){return this.x=F,this.y=F,this.z=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setZ(F){return this.z=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;case 2:this.z=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(F){return this.x=F.x,this.y=F.y,this.z=F.z,this}add(F){return this.x+=F.x,this.y+=F.y,this.z+=F.z,this}addScalar(F){return this.x+=F,this.y+=F,this.z+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this.z=F.z+q.z,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this.z+=F.z*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this.z-=F.z,this}subScalar(F){return this.x-=F,this.y-=F,this.z-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this.z=F.z-q.z,this}multiply(F){return this.x*=F.x,this.y*=F.y,this.z*=F.z,this}multiplyScalar(F){return this.x*=F,this.y*=F,this.z*=F,this}multiplyVectors(F,q){return this.x=F.x*q.x,this.y=F.y*q.y,this.z=F.z*q.z,this}applyEuler(F){return this.applyQuaternion(Nm.setFromEuler(F))}applyAxisAngle(F,q){return this.applyQuaternion(Nm.setFromAxisAngle(F,q))}applyMatrix3(F){const q=this.x,le=this.y,De=this.z,Xe=F.elements;return this.x=Xe[0]*q+Xe[3]*le+Xe[6]*De,this.y=Xe[1]*q+Xe[4]*le+Xe[7]*De,this.z=Xe[2]*q+Xe[5]*le+Xe[8]*De,this}applyNormalMatrix(F){return this.applyMatrix3(F).normalize()}applyMatrix4(F){const q=this.x,le=this.y,De=this.z,Xe=F.elements,H=1/(Xe[3]*q+Xe[7]*le+Xe[11]*De+Xe[15]);return this.x=(Xe[0]*q+Xe[4]*le+Xe[8]*De+Xe[12])*H,this.y=(Xe[1]*q+Xe[5]*le+Xe[9]*De+Xe[13])*H,this.z=(Xe[2]*q+Xe[6]*le+Xe[10]*De+Xe[14])*H,this}applyQuaternion(F){const q=this.x,le=this.y,De=this.z,Xe=F.x,H=F.y,U=F.z,e=F.w,g=2*(H*De-U*le),C=2*(U*q-Xe*De),i=2*(Xe*le-H*q);return this.x=q+e*g+H*i-U*C,this.y=le+e*C+U*g-Xe*i,this.z=De+e*i+Xe*C-H*g,this}project(F){return this.applyMatrix4(F.matrixWorldInverse).applyMatrix4(F.projectionMatrix)}unproject(F){return this.applyMatrix4(F.projectionMatrixInverse).applyMatrix4(F.matrixWorld)}transformDirection(F){const q=this.x,le=this.y,De=this.z,Xe=F.elements;return this.x=Xe[0]*q+Xe[4]*le+Xe[8]*De,this.y=Xe[1]*q+Xe[5]*le+Xe[9]*De,this.z=Xe[2]*q+Xe[6]*le+Xe[10]*De,this.normalize()}divide(F){return this.x/=F.x,this.y/=F.y,this.z/=F.z,this}divideScalar(F){return this.multiplyScalar(1/F)}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this.z=Math.min(this.z,F.z),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this.z=Math.max(this.z,F.z),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this.z=Math.max(F.z,Math.min(q.z,this.z)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this.z=Math.max(F,Math.min(q,this.z)),this}clampLength(F,q){const le=this.length();return this.divideScalar(le||1).multiplyScalar(Math.max(F,Math.min(q,le)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(F){return this.x*F.x+this.y*F.y+this.z*F.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this.z+=(F.z-this.z)*q,this}lerpVectors(F,q,le){return this.x=F.x+(q.x-F.x)*le,this.y=F.y+(q.y-F.y)*le,this.z=F.z+(q.z-F.z)*le,this}cross(F){return this.crossVectors(this,F)}crossVectors(F,q){const le=F.x,De=F.y,Xe=F.z,H=q.x,U=q.y,e=q.z;return this.x=De*e-Xe*U,this.y=Xe*H-le*e,this.z=le*U-De*H,this}projectOnVector(F){const q=F.lengthSq();if(q===0)return this.set(0,0,0);const le=F.dot(this)/q;return this.copy(F).multiplyScalar(le)}projectOnPlane(F){return a0.copy(this).projectOnVector(F),this.sub(a0)}reflect(F){return this.sub(a0.copy(F).multiplyScalar(2*this.dot(F)))}angleTo(F){const q=Math.sqrt(this.lengthSq()*F.lengthSq());if(q===0)return Math.PI/2;const le=this.dot(F)/q;return Math.acos(hs(le,-1,1))}distanceTo(F){return Math.sqrt(this.distanceToSquared(F))}distanceToSquared(F){const q=this.x-F.x,le=this.y-F.y,De=this.z-F.z;return q*q+le*le+De*De}manhattanDistanceTo(F){return Math.abs(this.x-F.x)+Math.abs(this.y-F.y)+Math.abs(this.z-F.z)}setFromSpherical(F){return this.setFromSphericalCoords(F.radius,F.phi,F.theta)}setFromSphericalCoords(F,q,le){const De=Math.sin(q)*F;return this.x=De*Math.sin(le),this.y=Math.cos(q)*F,this.z=De*Math.cos(le),this}setFromCylindrical(F){return this.setFromCylindricalCoords(F.radius,F.theta,F.y)}setFromCylindricalCoords(F,q,le){return this.x=F*Math.sin(q),this.y=le,this.z=F*Math.cos(q),this}setFromMatrixPosition(F){const q=F.elements;return this.x=q[12],this.y=q[13],this.z=q[14],this}setFromMatrixScale(F){const q=this.setFromMatrixColumn(F,0).length(),le=this.setFromMatrixColumn(F,1).length(),De=this.setFromMatrixColumn(F,2).length();return this.x=q,this.y=le,this.z=De,this}setFromMatrixColumn(F,q){return this.fromArray(F.elements,q*4)}setFromMatrix3Column(F,q){return this.fromArray(F.elements,q*3)}setFromEuler(F){return this.x=F._x,this.y=F._y,this.z=F._z,this}setFromColor(F){return this.x=F.r,this.y=F.g,this.z=F.b,this}equals(F){return F.x===this.x&&F.y===this.y&&F.z===this.z}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this.z=F[q+2],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F[q+2]=this.z,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this.z=F.getZ(q),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const F=Math.random()*Math.PI*2,q=Math.random()*2-1,le=Math.sqrt(1-q*q);return this.x=le*Math.cos(F),this.y=q,this.z=le*Math.sin(F),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const a0=new bn,Nm=new ku;class Jv{constructor(F=new bn(1/0,1/0,1/0),q=new bn(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=F,this.max=q}set(F,q){return this.min.copy(F),this.max.copy(q),this}setFromArray(F){this.makeEmpty();for(let q=0,le=F.length;qthis.max.x||F.ythis.max.y||F.zthis.max.z)}containsBox(F){return this.min.x<=F.min.x&&F.max.x<=this.max.x&&this.min.y<=F.min.y&&F.max.y<=this.max.y&&this.min.z<=F.min.z&&F.max.z<=this.max.z}getParameter(F,q){return q.set((F.x-this.min.x)/(this.max.x-this.min.x),(F.y-this.min.y)/(this.max.y-this.min.y),(F.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(F){return!(F.max.xthis.max.x||F.max.ythis.max.y||F.max.zthis.max.z)}intersectsSphere(F){return this.clampPoint(F.center,ou),ou.distanceToSquared(F.center)<=F.radius*F.radius}intersectsPlane(F){let q,le;return F.normal.x>0?(q=F.normal.x*this.min.x,le=F.normal.x*this.max.x):(q=F.normal.x*this.max.x,le=F.normal.x*this.min.x),F.normal.y>0?(q+=F.normal.y*this.min.y,le+=F.normal.y*this.max.y):(q+=F.normal.y*this.max.y,le+=F.normal.y*this.min.y),F.normal.z>0?(q+=F.normal.z*this.min.z,le+=F.normal.z*this.max.z):(q+=F.normal.z*this.max.z,le+=F.normal.z*this.min.z),q<=-F.constant&&le>=-F.constant}intersectsTriangle(F){if(this.isEmpty())return!1;this.getCenter(kv),Pd.subVectors(this.max,kv),kh.subVectors(F.a,kv),Oh.subVectors(F.b,kv),Nh.subVectors(F.c,kv),nc.subVectors(Oh,kh),ic.subVectors(Nh,Oh),Xc.subVectors(kh,Nh);let q=[0,-nc.z,nc.y,0,-ic.z,ic.y,0,-Xc.z,Xc.y,nc.z,0,-nc.x,ic.z,0,-ic.x,Xc.z,0,-Xc.x,-nc.y,nc.x,0,-ic.y,ic.x,0,-Xc.y,Xc.x,0];return!o0(q,kh,Oh,Nh,Pd)||(q=[1,0,0,0,1,0,0,0,1],!o0(q,kh,Oh,Nh,Pd))?!1:(Rd.crossVectors(nc,ic),q=[Rd.x,Rd.y,Rd.z],o0(q,kh,Oh,Nh,Pd))}clampPoint(F,q){return q.copy(F).clamp(this.min,this.max)}distanceToPoint(F){return this.clampPoint(F,ou).distanceTo(F)}getBoundingSphere(F){return this.isEmpty()?F.makeEmpty():(this.getCenter(F.center),F.radius=this.getSize(ou).length()*.5),F}intersect(F){return this.min.max(F.min),this.max.min(F.max),this.isEmpty()&&this.makeEmpty(),this}union(F){return this.min.min(F.min),this.max.max(F.max),this}applyMatrix4(F){return this.isEmpty()?this:(cf[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(F),cf[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(F),cf[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(F),cf[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(F),cf[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(F),cf[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(F),cf[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(F),cf[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(F),this.setFromPoints(cf),this)}translate(F){return this.min.add(F),this.max.add(F),this}equals(F){return F.min.equals(this.min)&&F.max.equals(this.max)}}const cf=[new bn,new bn,new bn,new bn,new bn,new bn,new bn,new bn],ou=new bn,Ld=new Jv,kh=new bn,Oh=new bn,Nh=new bn,nc=new bn,ic=new bn,Xc=new bn,kv=new bn,Pd=new bn,Rd=new bn,Zc=new bn;function o0(_e,F,q,le,De){for(let Xe=0,H=_e.length-3;Xe<=H;Xe+=3){Zc.fromArray(_e,Xe);const U=De.x*Math.abs(Zc.x)+De.y*Math.abs(Zc.y)+De.z*Math.abs(Zc.z),e=F.dot(Zc),g=q.dot(Zc),C=le.dot(Zc);if(Math.max(-Math.max(e,g,C),Math.min(e,g,C))>U)return!1}return!0}const l2=new Jv,Ov=new bn,s0=new bn;class Qv{constructor(F=new bn,q=-1){this.isSphere=!0,this.center=F,this.radius=q}set(F,q){return this.center.copy(F),this.radius=q,this}setFromPoints(F,q){const le=this.center;q!==void 0?le.copy(q):l2.setFromPoints(F).getCenter(le);let De=0;for(let Xe=0,H=F.length;Xethis.radius*this.radius&&(q.sub(this.center).normalize(),q.multiplyScalar(this.radius).add(this.center)),q}getBoundingBox(F){return this.isEmpty()?(F.makeEmpty(),F):(F.set(this.center,this.center),F.expandByScalar(this.radius),F)}applyMatrix4(F){return this.center.applyMatrix4(F),this.radius=this.radius*F.getMaxScaleOnAxis(),this}translate(F){return this.center.add(F),this}expandByPoint(F){if(this.isEmpty())return this.center.copy(F),this.radius=0,this;Ov.subVectors(F,this.center);const q=Ov.lengthSq();if(q>this.radius*this.radius){const le=Math.sqrt(q),De=(le-this.radius)*.5;this.center.addScaledVector(Ov,De/le),this.radius+=De}return this}union(F){return F.isEmpty()?this:this.isEmpty()?(this.copy(F),this):(this.center.equals(F.center)===!0?this.radius=Math.max(this.radius,F.radius):(s0.subVectors(F.center,this.center).setLength(F.radius),this.expandByPoint(Ov.copy(F.center).add(s0)),this.expandByPoint(Ov.copy(F.center).sub(s0))),this)}equals(F){return F.center.equals(this.center)&&F.radius===this.radius}clone(){return new this.constructor().copy(this)}}const hf=new bn,l0=new bn,Dd=new bn,ac=new bn,u0=new bn,Id=new bn,f0=new bn;class $v{constructor(F=new bn,q=new bn(0,0,-1)){this.origin=F,this.direction=q}set(F,q){return this.origin.copy(F),this.direction.copy(q),this}copy(F){return this.origin.copy(F.origin),this.direction.copy(F.direction),this}at(F,q){return q.copy(this.origin).addScaledVector(this.direction,F)}lookAt(F){return this.direction.copy(F).sub(this.origin).normalize(),this}recast(F){return this.origin.copy(this.at(F,hf)),this}closestPointToPoint(F,q){q.subVectors(F,this.origin);const le=q.dot(this.direction);return le<0?q.copy(this.origin):q.copy(this.origin).addScaledVector(this.direction,le)}distanceToPoint(F){return Math.sqrt(this.distanceSqToPoint(F))}distanceSqToPoint(F){const q=hf.subVectors(F,this.origin).dot(this.direction);return q<0?this.origin.distanceToSquared(F):(hf.copy(this.origin).addScaledVector(this.direction,q),hf.distanceToSquared(F))}distanceSqToSegment(F,q,le,De){l0.copy(F).add(q).multiplyScalar(.5),Dd.copy(q).sub(F).normalize(),ac.copy(this.origin).sub(l0);const Xe=F.distanceTo(q)*.5,H=-this.direction.dot(Dd),U=ac.dot(this.direction),e=-ac.dot(Dd),g=ac.lengthSq(),C=Math.abs(1-H*H);let i,S,x,v;if(C>0)if(i=H*e-U,S=H*U-e,v=Xe*C,i>=0)if(S>=-v)if(S<=v){const p=1/C;i*=p,S*=p,x=i*(i+H*S+2*U)+S*(H*i+S+2*e)+g}else S=Xe,i=Math.max(0,-(H*S+U)),x=-i*i+S*(S+2*e)+g;else S=-Xe,i=Math.max(0,-(H*S+U)),x=-i*i+S*(S+2*e)+g;else S<=-v?(i=Math.max(0,-(-H*Xe+U)),S=i>0?-Xe:Math.min(Math.max(-Xe,-e),Xe),x=-i*i+S*(S+2*e)+g):S<=v?(i=0,S=Math.min(Math.max(-Xe,-e),Xe),x=S*(S+2*e)+g):(i=Math.max(0,-(H*Xe+U)),S=i>0?Xe:Math.min(Math.max(-Xe,-e),Xe),x=-i*i+S*(S+2*e)+g);else S=H>0?-Xe:Xe,i=Math.max(0,-(H*S+U)),x=-i*i+S*(S+2*e)+g;return le&&le.copy(this.origin).addScaledVector(this.direction,i),De&&De.copy(l0).addScaledVector(Dd,S),x}intersectSphere(F,q){hf.subVectors(F.center,this.origin);const le=hf.dot(this.direction),De=hf.dot(hf)-le*le,Xe=F.radius*F.radius;if(De>Xe)return null;const H=Math.sqrt(Xe-De),U=le-H,e=le+H;return e<0?null:U<0?this.at(e,q):this.at(U,q)}intersectsSphere(F){return this.distanceSqToPoint(F.center)<=F.radius*F.radius}distanceToPlane(F){const q=F.normal.dot(this.direction);if(q===0)return F.distanceToPoint(this.origin)===0?0:null;const le=-(this.origin.dot(F.normal)+F.constant)/q;return le>=0?le:null}intersectPlane(F,q){const le=this.distanceToPlane(F);return le===null?null:this.at(le,q)}intersectsPlane(F){const q=F.distanceToPoint(this.origin);return q===0||F.normal.dot(this.direction)*q<0}intersectBox(F,q){let le,De,Xe,H,U,e;const g=1/this.direction.x,C=1/this.direction.y,i=1/this.direction.z,S=this.origin;return g>=0?(le=(F.min.x-S.x)*g,De=(F.max.x-S.x)*g):(le=(F.max.x-S.x)*g,De=(F.min.x-S.x)*g),C>=0?(Xe=(F.min.y-S.y)*C,H=(F.max.y-S.y)*C):(Xe=(F.max.y-S.y)*C,H=(F.min.y-S.y)*C),le>H||Xe>De||((Xe>le||isNaN(le))&&(le=Xe),(H=0?(U=(F.min.z-S.z)*i,e=(F.max.z-S.z)*i):(U=(F.max.z-S.z)*i,e=(F.min.z-S.z)*i),le>e||U>De)||((U>le||le!==le)&&(le=U),(e=0?le:De,q)}intersectsBox(F){return this.intersectBox(F,hf)!==null}intersectTriangle(F,q,le,De,Xe){u0.subVectors(q,F),Id.subVectors(le,F),f0.crossVectors(u0,Id);let H=this.direction.dot(f0),U;if(H>0){if(De)return null;U=1}else if(H<0)U=-1,H=-H;else return null;ac.subVectors(this.origin,F);const e=U*this.direction.dot(Id.crossVectors(ac,Id));if(e<0)return null;const g=U*this.direction.dot(u0.cross(ac));if(g<0||e+g>H)return null;const C=-U*ac.dot(f0);return C<0?null:this.at(C/H,Xe)}applyMatrix4(F){return this.origin.applyMatrix4(F),this.direction.transformDirection(F),this}equals(F){return F.origin.equals(this.origin)&&F.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class so{constructor(F,q,le,De,Xe,H,U,e,g,C,i,S,x,v,p,r){so.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],F!==void 0&&this.set(F,q,le,De,Xe,H,U,e,g,C,i,S,x,v,p,r)}set(F,q,le,De,Xe,H,U,e,g,C,i,S,x,v,p,r){const t=this.elements;return t[0]=F,t[4]=q,t[8]=le,t[12]=De,t[1]=Xe,t[5]=H,t[9]=U,t[13]=e,t[2]=g,t[6]=C,t[10]=i,t[14]=S,t[3]=x,t[7]=v,t[11]=p,t[15]=r,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new so().fromArray(this.elements)}copy(F){const q=this.elements,le=F.elements;return q[0]=le[0],q[1]=le[1],q[2]=le[2],q[3]=le[3],q[4]=le[4],q[5]=le[5],q[6]=le[6],q[7]=le[7],q[8]=le[8],q[9]=le[9],q[10]=le[10],q[11]=le[11],q[12]=le[12],q[13]=le[13],q[14]=le[14],q[15]=le[15],this}copyPosition(F){const q=this.elements,le=F.elements;return q[12]=le[12],q[13]=le[13],q[14]=le[14],this}setFromMatrix3(F){const q=F.elements;return this.set(q[0],q[3],q[6],0,q[1],q[4],q[7],0,q[2],q[5],q[8],0,0,0,0,1),this}extractBasis(F,q,le){return F.setFromMatrixColumn(this,0),q.setFromMatrixColumn(this,1),le.setFromMatrixColumn(this,2),this}makeBasis(F,q,le){return this.set(F.x,q.x,le.x,0,F.y,q.y,le.y,0,F.z,q.z,le.z,0,0,0,0,1),this}extractRotation(F){const q=this.elements,le=F.elements,De=1/Bh.setFromMatrixColumn(F,0).length(),Xe=1/Bh.setFromMatrixColumn(F,1).length(),H=1/Bh.setFromMatrixColumn(F,2).length();return q[0]=le[0]*De,q[1]=le[1]*De,q[2]=le[2]*De,q[3]=0,q[4]=le[4]*Xe,q[5]=le[5]*Xe,q[6]=le[6]*Xe,q[7]=0,q[8]=le[8]*H,q[9]=le[9]*H,q[10]=le[10]*H,q[11]=0,q[12]=0,q[13]=0,q[14]=0,q[15]=1,this}makeRotationFromEuler(F){const q=this.elements,le=F.x,De=F.y,Xe=F.z,H=Math.cos(le),U=Math.sin(le),e=Math.cos(De),g=Math.sin(De),C=Math.cos(Xe),i=Math.sin(Xe);if(F.order==="XYZ"){const S=H*C,x=H*i,v=U*C,p=U*i;q[0]=e*C,q[4]=-e*i,q[8]=g,q[1]=x+v*g,q[5]=S-p*g,q[9]=-U*e,q[2]=p-S*g,q[6]=v+x*g,q[10]=H*e}else if(F.order==="YXZ"){const S=e*C,x=e*i,v=g*C,p=g*i;q[0]=S+p*U,q[4]=v*U-x,q[8]=H*g,q[1]=H*i,q[5]=H*C,q[9]=-U,q[2]=x*U-v,q[6]=p+S*U,q[10]=H*e}else if(F.order==="ZXY"){const S=e*C,x=e*i,v=g*C,p=g*i;q[0]=S-p*U,q[4]=-H*i,q[8]=v+x*U,q[1]=x+v*U,q[5]=H*C,q[9]=p-S*U,q[2]=-H*g,q[6]=U,q[10]=H*e}else if(F.order==="ZYX"){const S=H*C,x=H*i,v=U*C,p=U*i;q[0]=e*C,q[4]=v*g-x,q[8]=S*g+p,q[1]=e*i,q[5]=p*g+S,q[9]=x*g-v,q[2]=-g,q[6]=U*e,q[10]=H*e}else if(F.order==="YZX"){const S=H*e,x=H*g,v=U*e,p=U*g;q[0]=e*C,q[4]=p-S*i,q[8]=v*i+x,q[1]=i,q[5]=H*C,q[9]=-U*C,q[2]=-g*C,q[6]=x*i+v,q[10]=S-p*i}else if(F.order==="XZY"){const S=H*e,x=H*g,v=U*e,p=U*g;q[0]=e*C,q[4]=-i,q[8]=g*C,q[1]=S*i+p,q[5]=H*C,q[9]=x*i-v,q[2]=v*i-x,q[6]=U*C,q[10]=p*i+S}return q[3]=0,q[7]=0,q[11]=0,q[12]=0,q[13]=0,q[14]=0,q[15]=1,this}makeRotationFromQuaternion(F){return this.compose(u2,F,f2)}lookAt(F,q,le){const De=this.elements;return il.subVectors(F,q),il.lengthSq()===0&&(il.z=1),il.normalize(),oc.crossVectors(le,il),oc.lengthSq()===0&&(Math.abs(le.z)===1?il.x+=1e-4:il.z+=1e-4,il.normalize(),oc.crossVectors(le,il)),oc.normalize(),Fd.crossVectors(il,oc),De[0]=oc.x,De[4]=Fd.x,De[8]=il.x,De[1]=oc.y,De[5]=Fd.y,De[9]=il.y,De[2]=oc.z,De[6]=Fd.z,De[10]=il.z,this}multiply(F){return this.multiplyMatrices(this,F)}premultiply(F){return this.multiplyMatrices(F,this)}multiplyMatrices(F,q){const le=F.elements,De=q.elements,Xe=this.elements,H=le[0],U=le[4],e=le[8],g=le[12],C=le[1],i=le[5],S=le[9],x=le[13],v=le[2],p=le[6],r=le[10],t=le[14],a=le[3],n=le[7],f=le[11],c=le[15],l=De[0],m=De[4],h=De[8],b=De[12],u=De[1],o=De[5],d=De[9],w=De[13],A=De[2],_=De[6],y=De[10],E=De[14],T=De[3],s=De[7],L=De[11],M=De[15];return Xe[0]=H*l+U*u+e*A+g*T,Xe[4]=H*m+U*o+e*_+g*s,Xe[8]=H*h+U*d+e*y+g*L,Xe[12]=H*b+U*w+e*E+g*M,Xe[1]=C*l+i*u+S*A+x*T,Xe[5]=C*m+i*o+S*_+x*s,Xe[9]=C*h+i*d+S*y+x*L,Xe[13]=C*b+i*w+S*E+x*M,Xe[2]=v*l+p*u+r*A+t*T,Xe[6]=v*m+p*o+r*_+t*s,Xe[10]=v*h+p*d+r*y+t*L,Xe[14]=v*b+p*w+r*E+t*M,Xe[3]=a*l+n*u+f*A+c*T,Xe[7]=a*m+n*o+f*_+c*s,Xe[11]=a*h+n*d+f*y+c*L,Xe[15]=a*b+n*w+f*E+c*M,this}multiplyScalar(F){const q=this.elements;return q[0]*=F,q[4]*=F,q[8]*=F,q[12]*=F,q[1]*=F,q[5]*=F,q[9]*=F,q[13]*=F,q[2]*=F,q[6]*=F,q[10]*=F,q[14]*=F,q[3]*=F,q[7]*=F,q[11]*=F,q[15]*=F,this}determinant(){const F=this.elements,q=F[0],le=F[4],De=F[8],Xe=F[12],H=F[1],U=F[5],e=F[9],g=F[13],C=F[2],i=F[6],S=F[10],x=F[14],v=F[3],p=F[7],r=F[11],t=F[15];return v*(+Xe*e*i-De*g*i-Xe*U*S+le*g*S+De*U*x-le*e*x)+p*(+q*e*x-q*g*S+Xe*H*S-De*H*x+De*g*C-Xe*e*C)+r*(+q*g*i-q*U*x-Xe*H*i+le*H*x+Xe*U*C-le*g*C)+t*(-De*U*C-q*e*i+q*U*S+De*H*i-le*H*S+le*e*C)}transpose(){const F=this.elements;let q;return q=F[1],F[1]=F[4],F[4]=q,q=F[2],F[2]=F[8],F[8]=q,q=F[6],F[6]=F[9],F[9]=q,q=F[3],F[3]=F[12],F[12]=q,q=F[7],F[7]=F[13],F[13]=q,q=F[11],F[11]=F[14],F[14]=q,this}setPosition(F,q,le){const De=this.elements;return F.isVector3?(De[12]=F.x,De[13]=F.y,De[14]=F.z):(De[12]=F,De[13]=q,De[14]=le),this}invert(){const F=this.elements,q=F[0],le=F[1],De=F[2],Xe=F[3],H=F[4],U=F[5],e=F[6],g=F[7],C=F[8],i=F[9],S=F[10],x=F[11],v=F[12],p=F[13],r=F[14],t=F[15],a=i*r*g-p*S*g+p*e*x-U*r*x-i*e*t+U*S*t,n=v*S*g-C*r*g-v*e*x+H*r*x+C*e*t-H*S*t,f=C*p*g-v*i*g+v*U*x-H*p*x-C*U*t+H*i*t,c=v*i*e-C*p*e-v*U*S+H*p*S+C*U*r-H*i*r,l=q*a+le*n+De*f+Xe*c;if(l===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const m=1/l;return F[0]=a*m,F[1]=(p*S*Xe-i*r*Xe-p*De*x+le*r*x+i*De*t-le*S*t)*m,F[2]=(U*r*Xe-p*e*Xe+p*De*g-le*r*g-U*De*t+le*e*t)*m,F[3]=(i*e*Xe-U*S*Xe-i*De*g+le*S*g+U*De*x-le*e*x)*m,F[4]=n*m,F[5]=(C*r*Xe-v*S*Xe+v*De*x-q*r*x-C*De*t+q*S*t)*m,F[6]=(v*e*Xe-H*r*Xe-v*De*g+q*r*g+H*De*t-q*e*t)*m,F[7]=(H*S*Xe-C*e*Xe+C*De*g-q*S*g-H*De*x+q*e*x)*m,F[8]=f*m,F[9]=(v*i*Xe-C*p*Xe-v*le*x+q*p*x+C*le*t-q*i*t)*m,F[10]=(H*p*Xe-v*U*Xe+v*le*g-q*p*g-H*le*t+q*U*t)*m,F[11]=(C*U*Xe-H*i*Xe-C*le*g+q*i*g+H*le*x-q*U*x)*m,F[12]=c*m,F[13]=(C*p*De-v*i*De+v*le*S-q*p*S-C*le*r+q*i*r)*m,F[14]=(v*U*De-H*p*De-v*le*e+q*p*e+H*le*r-q*U*r)*m,F[15]=(H*i*De-C*U*De+C*le*e-q*i*e-H*le*S+q*U*S)*m,this}scale(F){const q=this.elements,le=F.x,De=F.y,Xe=F.z;return q[0]*=le,q[4]*=De,q[8]*=Xe,q[1]*=le,q[5]*=De,q[9]*=Xe,q[2]*=le,q[6]*=De,q[10]*=Xe,q[3]*=le,q[7]*=De,q[11]*=Xe,this}getMaxScaleOnAxis(){const F=this.elements,q=F[0]*F[0]+F[1]*F[1]+F[2]*F[2],le=F[4]*F[4]+F[5]*F[5]+F[6]*F[6],De=F[8]*F[8]+F[9]*F[9]+F[10]*F[10];return Math.sqrt(Math.max(q,le,De))}makeTranslation(F,q,le){return F.isVector3?this.set(1,0,0,F.x,0,1,0,F.y,0,0,1,F.z,0,0,0,1):this.set(1,0,0,F,0,1,0,q,0,0,1,le,0,0,0,1),this}makeRotationX(F){const q=Math.cos(F),le=Math.sin(F);return this.set(1,0,0,0,0,q,-le,0,0,le,q,0,0,0,0,1),this}makeRotationY(F){const q=Math.cos(F),le=Math.sin(F);return this.set(q,0,le,0,0,1,0,0,-le,0,q,0,0,0,0,1),this}makeRotationZ(F){const q=Math.cos(F),le=Math.sin(F);return this.set(q,-le,0,0,le,q,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(F,q){const le=Math.cos(q),De=Math.sin(q),Xe=1-le,H=F.x,U=F.y,e=F.z,g=Xe*H,C=Xe*U;return this.set(g*H+le,g*U-De*e,g*e+De*U,0,g*U+De*e,C*U+le,C*e-De*H,0,g*e-De*U,C*e+De*H,Xe*e*e+le,0,0,0,0,1),this}makeScale(F,q,le){return this.set(F,0,0,0,0,q,0,0,0,0,le,0,0,0,0,1),this}makeShear(F,q,le,De,Xe,H){return this.set(1,le,Xe,0,F,1,H,0,q,De,1,0,0,0,0,1),this}compose(F,q,le){const De=this.elements,Xe=q._x,H=q._y,U=q._z,e=q._w,g=Xe+Xe,C=H+H,i=U+U,S=Xe*g,x=Xe*C,v=Xe*i,p=H*C,r=H*i,t=U*i,a=e*g,n=e*C,f=e*i,c=le.x,l=le.y,m=le.z;return De[0]=(1-(p+t))*c,De[1]=(x+f)*c,De[2]=(v-n)*c,De[3]=0,De[4]=(x-f)*l,De[5]=(1-(S+t))*l,De[6]=(r+a)*l,De[7]=0,De[8]=(v+n)*m,De[9]=(r-a)*m,De[10]=(1-(S+p))*m,De[11]=0,De[12]=F.x,De[13]=F.y,De[14]=F.z,De[15]=1,this}decompose(F,q,le){const De=this.elements;let Xe=Bh.set(De[0],De[1],De[2]).length();const H=Bh.set(De[4],De[5],De[6]).length(),U=Bh.set(De[8],De[9],De[10]).length();this.determinant()<0&&(Xe=-Xe),F.x=De[12],F.y=De[13],F.z=De[14],su.copy(this);const g=1/Xe,C=1/H,i=1/U;return su.elements[0]*=g,su.elements[1]*=g,su.elements[2]*=g,su.elements[4]*=C,su.elements[5]*=C,su.elements[6]*=C,su.elements[8]*=i,su.elements[9]*=i,su.elements[10]*=i,q.setFromRotationMatrix(su),le.x=Xe,le.y=H,le.z=U,this}makePerspective(F,q,le,De,Xe,H,U=yf){const e=this.elements,g=2*Xe/(q-F),C=2*Xe/(le-De),i=(q+F)/(q-F),S=(le+De)/(le-De);let x,v;if(U===yf)x=-(H+Xe)/(H-Xe),v=-2*H*Xe/(H-Xe);else if(U===up)x=-H/(H-Xe),v=-H*Xe/(H-Xe);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+U);return e[0]=g,e[4]=0,e[8]=i,e[12]=0,e[1]=0,e[5]=C,e[9]=S,e[13]=0,e[2]=0,e[6]=0,e[10]=x,e[14]=v,e[3]=0,e[7]=0,e[11]=-1,e[15]=0,this}makeOrthographic(F,q,le,De,Xe,H,U=yf){const e=this.elements,g=1/(q-F),C=1/(le-De),i=1/(H-Xe),S=(q+F)*g,x=(le+De)*C;let v,p;if(U===yf)v=(H+Xe)*i,p=-2*i;else if(U===up)v=Xe*i,p=-1*i;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+U);return e[0]=2*g,e[4]=0,e[8]=0,e[12]=-S,e[1]=0,e[5]=2*C,e[9]=0,e[13]=-x,e[2]=0,e[6]=0,e[10]=p,e[14]=-v,e[3]=0,e[7]=0,e[11]=0,e[15]=1,this}equals(F){const q=this.elements,le=F.elements;for(let De=0;De<16;De++)if(q[De]!==le[De])return!1;return!0}fromArray(F,q=0){for(let le=0;le<16;le++)this.elements[le]=F[le+q];return this}toArray(F=[],q=0){const le=this.elements;return F[q]=le[0],F[q+1]=le[1],F[q+2]=le[2],F[q+3]=le[3],F[q+4]=le[4],F[q+5]=le[5],F[q+6]=le[6],F[q+7]=le[7],F[q+8]=le[8],F[q+9]=le[9],F[q+10]=le[10],F[q+11]=le[11],F[q+12]=le[12],F[q+13]=le[13],F[q+14]=le[14],F[q+15]=le[15],F}}const Bh=new bn,su=new so,u2=new bn(0,0,0),f2=new bn(1,1,1),oc=new bn,Fd=new bn,il=new bn,Bm=new so,Um=new ku;class Ss{constructor(F=0,q=0,le=0,De=Ss.DEFAULT_ORDER){this.isEuler=!0,this._x=F,this._y=q,this._z=le,this._order=De}get x(){return this._x}set x(F){this._x=F,this._onChangeCallback()}get y(){return this._y}set y(F){this._y=F,this._onChangeCallback()}get z(){return this._z}set z(F){this._z=F,this._onChangeCallback()}get order(){return this._order}set order(F){this._order=F,this._onChangeCallback()}set(F,q,le,De=this._order){return this._x=F,this._y=q,this._z=le,this._order=De,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(F){return this._x=F._x,this._y=F._y,this._z=F._z,this._order=F._order,this._onChangeCallback(),this}setFromRotationMatrix(F,q=this._order,le=!0){const De=F.elements,Xe=De[0],H=De[4],U=De[8],e=De[1],g=De[5],C=De[9],i=De[2],S=De[6],x=De[10];switch(q){case"XYZ":this._y=Math.asin(hs(U,-1,1)),Math.abs(U)<.9999999?(this._x=Math.atan2(-C,x),this._z=Math.atan2(-H,Xe)):(this._x=Math.atan2(S,g),this._z=0);break;case"YXZ":this._x=Math.asin(-hs(C,-1,1)),Math.abs(C)<.9999999?(this._y=Math.atan2(U,x),this._z=Math.atan2(e,g)):(this._y=Math.atan2(-i,Xe),this._z=0);break;case"ZXY":this._x=Math.asin(hs(S,-1,1)),Math.abs(S)<.9999999?(this._y=Math.atan2(-i,x),this._z=Math.atan2(-H,g)):(this._y=0,this._z=Math.atan2(e,Xe));break;case"ZYX":this._y=Math.asin(-hs(i,-1,1)),Math.abs(i)<.9999999?(this._x=Math.atan2(S,x),this._z=Math.atan2(e,Xe)):(this._x=0,this._z=Math.atan2(-H,g));break;case"YZX":this._z=Math.asin(hs(e,-1,1)),Math.abs(e)<.9999999?(this._x=Math.atan2(-C,g),this._y=Math.atan2(-i,Xe)):(this._x=0,this._y=Math.atan2(U,x));break;case"XZY":this._z=Math.asin(-hs(H,-1,1)),Math.abs(H)<.9999999?(this._x=Math.atan2(S,g),this._y=Math.atan2(U,Xe)):(this._x=Math.atan2(-C,x),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+q)}return this._order=q,le===!0&&this._onChangeCallback(),this}setFromQuaternion(F,q,le){return Bm.makeRotationFromQuaternion(F),this.setFromRotationMatrix(Bm,q,le)}setFromVector3(F,q=this._order){return this.set(F.x,F.y,F.z,q)}reorder(F){return Um.setFromEuler(this),this.setFromQuaternion(Um,F)}equals(F){return F._x===this._x&&F._y===this._y&&F._z===this._z&&F._order===this._order}fromArray(F){return this._x=F[0],this._y=F[1],this._z=F[2],F[3]!==void 0&&(this._order=F[3]),this._onChangeCallback(),this}toArray(F=[],q=0){return F[q]=this._x,F[q+1]=this._y,F[q+2]=this._z,F[q+3]=this._order,F}_onChange(F){return this._onChangeCallback=F,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Ss.DEFAULT_ORDER="XYZ";class Y0{constructor(){this.mask=1}set(F){this.mask=(1<>>0}enable(F){this.mask|=1<1){for(let q=0;q1){for(let le=0;le0&&(De.userData=this.userData),De.layers=this.layers.mask,De.matrix=this.matrix.toArray(),De.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(De.matrixAutoUpdate=!1),this.isInstancedMesh&&(De.type="InstancedMesh",De.count=this.count,De.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(De.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(De.type="BatchedMesh",De.perObjectFrustumCulled=this.perObjectFrustumCulled,De.sortObjects=this.sortObjects,De.drawRanges=this._drawRanges,De.reservedRanges=this._reservedRanges,De.visibility=this._visibility,De.active=this._active,De.bounds=this._bounds.map(U=>({boxInitialized:U.boxInitialized,boxMin:U.box.min.toArray(),boxMax:U.box.max.toArray(),sphereInitialized:U.sphereInitialized,sphereRadius:U.sphere.radius,sphereCenter:U.sphere.center.toArray()})),De.maxGeometryCount=this._maxGeometryCount,De.maxVertexCount=this._maxVertexCount,De.maxIndexCount=this._maxIndexCount,De.geometryInitialized=this._geometryInitialized,De.geometryCount=this._geometryCount,De.matricesTexture=this._matricesTexture.toJSON(F),this.boundingSphere!==null&&(De.boundingSphere={center:De.boundingSphere.center.toArray(),radius:De.boundingSphere.radius}),this.boundingBox!==null&&(De.boundingBox={min:De.boundingBox.min.toArray(),max:De.boundingBox.max.toArray()}));function Xe(U,e){return U[e.uuid]===void 0&&(U[e.uuid]=e.toJSON(F)),e.uuid}if(this.isScene)this.background&&(this.background.isColor?De.background=this.background.toJSON():this.background.isTexture&&(De.background=this.background.toJSON(F).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(De.environment=this.environment.toJSON(F).uuid);else if(this.isMesh||this.isLine||this.isPoints){De.geometry=Xe(F.geometries,this.geometry);const U=this.geometry.parameters;if(U!==void 0&&U.shapes!==void 0){const e=U.shapes;if(Array.isArray(e))for(let g=0,C=e.length;g0){De.children=[];for(let U=0;U0){De.animations=[];for(let U=0;U0&&(le.geometries=U),e.length>0&&(le.materials=e),g.length>0&&(le.textures=g),C.length>0&&(le.images=C),i.length>0&&(le.shapes=i),S.length>0&&(le.skeletons=S),x.length>0&&(le.animations=x),v.length>0&&(le.nodes=v)}return le.object=De,le;function H(U){const e=[];for(const g in U){const C=U[g];delete C.metadata,e.push(C)}return e}}clone(F){return new this.constructor().copy(this,F)}copy(F,q=!0){if(this.name=F.name,this.up.copy(F.up),this.position.copy(F.position),this.rotation.order=F.rotation.order,this.quaternion.copy(F.quaternion),this.scale.copy(F.scale),this.matrix.copy(F.matrix),this.matrixWorld.copy(F.matrixWorld),this.matrixAutoUpdate=F.matrixAutoUpdate,this.matrixWorldAutoUpdate=F.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=F.matrixWorldNeedsUpdate,this.layers.mask=F.layers.mask,this.visible=F.visible,this.castShadow=F.castShadow,this.receiveShadow=F.receiveShadow,this.frustumCulled=F.frustumCulled,this.renderOrder=F.renderOrder,this.animations=F.animations.slice(),this.userData=JSON.parse(JSON.stringify(F.userData)),q===!0)for(let le=0;le0?De.multiplyScalar(1/Math.sqrt(Xe)):De.set(0,0,0)}static getBarycoord(F,q,le,De,Xe){lu.subVectors(De,q),df.subVectors(le,q),h0.subVectors(F,q);const H=lu.dot(lu),U=lu.dot(df),e=lu.dot(h0),g=df.dot(df),C=df.dot(h0),i=H*g-U*U;if(i===0)return Xe.set(0,0,0),null;const S=1/i,x=(g*e-U*C)*S,v=(H*C-U*e)*S;return Xe.set(1-x-v,v,x)}static containsPoint(F,q,le,De){return this.getBarycoord(F,q,le,De,pf)===null?!1:pf.x>=0&&pf.y>=0&&pf.x+pf.y<=1}static getInterpolation(F,q,le,De,Xe,H,U,e){return this.getBarycoord(F,q,le,De,pf)===null?(e.x=0,e.y=0,"z"in e&&(e.z=0),"w"in e&&(e.w=0),null):(e.setScalar(0),e.addScaledVector(Xe,pf.x),e.addScaledVector(H,pf.y),e.addScaledVector(U,pf.z),e)}static isFrontFacing(F,q,le,De){return lu.subVectors(le,q),df.subVectors(F,q),lu.cross(df).dot(De)<0}set(F,q,le){return this.a.copy(F),this.b.copy(q),this.c.copy(le),this}setFromPointsAndIndices(F,q,le,De){return this.a.copy(F[q]),this.b.copy(F[le]),this.c.copy(F[De]),this}setFromAttributeAndIndices(F,q,le,De){return this.a.fromBufferAttribute(F,q),this.b.fromBufferAttribute(F,le),this.c.fromBufferAttribute(F,De),this}clone(){return new this.constructor().copy(this)}copy(F){return this.a.copy(F.a),this.b.copy(F.b),this.c.copy(F.c),this}getArea(){return lu.subVectors(this.c,this.b),df.subVectors(this.a,this.b),lu.cross(df).length()*.5}getMidpoint(F){return F.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(F){return hu.getNormal(this.a,this.b,this.c,F)}getPlane(F){return F.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(F,q){return hu.getBarycoord(F,this.a,this.b,this.c,q)}getInterpolation(F,q,le,De,Xe){return hu.getInterpolation(F,this.a,this.b,this.c,q,le,De,Xe)}containsPoint(F){return hu.containsPoint(F,this.a,this.b,this.c)}isFrontFacing(F){return hu.isFrontFacing(this.a,this.b,this.c,F)}intersectsBox(F){return F.intersectsTriangle(this)}closestPointToPoint(F,q){const le=this.a,De=this.b,Xe=this.c;let H,U;Hh.subVectors(De,le),Gh.subVectors(Xe,le),v0.subVectors(F,le);const e=Hh.dot(v0),g=Gh.dot(v0);if(e<=0&&g<=0)return q.copy(le);d0.subVectors(F,De);const C=Hh.dot(d0),i=Gh.dot(d0);if(C>=0&&i<=C)return q.copy(De);const S=e*i-C*g;if(S<=0&&e>=0&&C<=0)return H=e/(e-C),q.copy(le).addScaledVector(Hh,H);p0.subVectors(F,Xe);const x=Hh.dot(p0),v=Gh.dot(p0);if(v>=0&&x<=v)return q.copy(Xe);const p=x*g-e*v;if(p<=0&&g>=0&&v<=0)return U=g/(g-v),q.copy(le).addScaledVector(Gh,U);const r=C*v-x*i;if(r<=0&&i-C>=0&&x-v>=0)return Xm.subVectors(Xe,De),U=(i-C)/(i-C+(x-v)),q.copy(De).addScaledVector(Xm,U);const t=1/(r+p+S);return H=p*t,U=S*t,q.copy(le).addScaledVector(Hh,H).addScaledVector(Gh,U)}equals(F){return F.a.equals(this.a)&&F.b.equals(this.b)&&F.c.equals(this.c)}}const r1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},sc={h:0,s:0,l:0},kd={h:0,s:0,l:0};function g0(_e,F,q){return q<0&&(q+=1),q>1&&(q-=1),q<1/6?_e+(F-_e)*6*q:q<1/2?F:q<2/3?_e+(F-_e)*6*(2/3-q):_e}class da{constructor(F,q,le){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(F,q,le)}set(F,q,le){if(q===void 0&&le===void 0){const De=F;De&&De.isColor?this.copy(De):typeof De=="number"?this.setHex(De):typeof De=="string"&&this.setStyle(De)}else this.setRGB(F,q,le);return this}setScalar(F){return this.r=F,this.g=F,this.b=F,this}setHex(F,q=Iu){return F=Math.floor(F),this.r=(F>>16&255)/255,this.g=(F>>8&255)/255,this.b=(F&255)/255,Fa.toWorkingColorSpace(this,q),this}setRGB(F,q,le,De=Fa.workingColorSpace){return this.r=F,this.g=q,this.b=le,Fa.toWorkingColorSpace(this,De),this}setHSL(F,q,le,De=Fa.workingColorSpace){if(F=W0(F,1),q=hs(q,0,1),le=hs(le,0,1),q===0)this.r=this.g=this.b=le;else{const Xe=le<=.5?le*(1+q):le+q-le*q,H=2*le-Xe;this.r=g0(H,Xe,F+1/3),this.g=g0(H,Xe,F),this.b=g0(H,Xe,F-1/3)}return Fa.toWorkingColorSpace(this,De),this}setStyle(F,q=Iu){function le(Xe){Xe!==void 0&&parseFloat(Xe)<1&&console.warn("THREE.Color: Alpha component of "+F+" will be ignored.")}let De;if(De=/^(\w+)\(([^\)]*)\)/.exec(F)){let Xe;const H=De[1],U=De[2];switch(H){case"rgb":case"rgba":if(Xe=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return le(Xe[4]),this.setRGB(Math.min(255,parseInt(Xe[1],10))/255,Math.min(255,parseInt(Xe[2],10))/255,Math.min(255,parseInt(Xe[3],10))/255,q);if(Xe=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return le(Xe[4]),this.setRGB(Math.min(100,parseInt(Xe[1],10))/100,Math.min(100,parseInt(Xe[2],10))/100,Math.min(100,parseInt(Xe[3],10))/100,q);break;case"hsl":case"hsla":if(Xe=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return le(Xe[4]),this.setHSL(parseFloat(Xe[1])/360,parseFloat(Xe[2])/100,parseFloat(Xe[3])/100,q);break;default:console.warn("THREE.Color: Unknown color model "+F)}}else if(De=/^\#([A-Fa-f\d]+)$/.exec(F)){const Xe=De[1],H=Xe.length;if(H===3)return this.setRGB(parseInt(Xe.charAt(0),16)/15,parseInt(Xe.charAt(1),16)/15,parseInt(Xe.charAt(2),16)/15,q);if(H===6)return this.setHex(parseInt(Xe,16),q);console.warn("THREE.Color: Invalid hex color "+F)}else if(F&&F.length>0)return this.setColorName(F,q);return this}setColorName(F,q=Iu){const le=r1[F.toLowerCase()];return le!==void 0?this.setHex(le,q):console.warn("THREE.Color: Unknown color "+F),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(F){return this.r=F.r,this.g=F.g,this.b=F.b,this}copySRGBToLinear(F){return this.r=av(F.r),this.g=av(F.g),this.b=av(F.b),this}copyLinearToSRGB(F){return this.r=n0(F.r),this.g=n0(F.g),this.b=n0(F.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(F=Iu){return Fa.fromWorkingColorSpace(cs.copy(this),F),Math.round(hs(cs.r*255,0,255))*65536+Math.round(hs(cs.g*255,0,255))*256+Math.round(hs(cs.b*255,0,255))}getHexString(F=Iu){return("000000"+this.getHex(F).toString(16)).slice(-6)}getHSL(F,q=Fa.workingColorSpace){Fa.fromWorkingColorSpace(cs.copy(this),q);const le=cs.r,De=cs.g,Xe=cs.b,H=Math.max(le,De,Xe),U=Math.min(le,De,Xe);let e,g;const C=(U+H)/2;if(U===H)e=0,g=0;else{const i=H-U;switch(g=C<=.5?i/(H+U):i/(2-H-U),H){case le:e=(De-Xe)/i+(De0!=F>0&&this.version++,this._alphaTest=F}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(F){if(F!==void 0)for(const q in F){const le=F[q];if(le===void 0){console.warn(`THREE.Material: parameter '${q}' has value of undefined.`);continue}const De=this[q];if(De===void 0){console.warn(`THREE.Material: '${q}' is not a property of THREE.${this.type}.`);continue}De&&De.isColor?De.set(le):De&&De.isVector3&&le&&le.isVector3?De.copy(le):this[q]=le}}toJSON(F){const q=F===void 0||typeof F=="string";q&&(F={textures:{},images:{}});const le={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};le.uuid=this.uuid,le.type=this.type,this.name!==""&&(le.name=this.name),this.color&&this.color.isColor&&(le.color=this.color.getHex()),this.roughness!==void 0&&(le.roughness=this.roughness),this.metalness!==void 0&&(le.metalness=this.metalness),this.sheen!==void 0&&(le.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(le.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(le.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(le.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(le.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(le.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(le.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(le.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(le.shininess=this.shininess),this.clearcoat!==void 0&&(le.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(le.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(le.clearcoatMap=this.clearcoatMap.toJSON(F).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(le.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(F).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(le.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(F).uuid,le.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(le.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(le.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(le.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(le.iridescenceMap=this.iridescenceMap.toJSON(F).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(le.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(F).uuid),this.anisotropy!==void 0&&(le.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(le.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(le.anisotropyMap=this.anisotropyMap.toJSON(F).uuid),this.map&&this.map.isTexture&&(le.map=this.map.toJSON(F).uuid),this.matcap&&this.matcap.isTexture&&(le.matcap=this.matcap.toJSON(F).uuid),this.alphaMap&&this.alphaMap.isTexture&&(le.alphaMap=this.alphaMap.toJSON(F).uuid),this.lightMap&&this.lightMap.isTexture&&(le.lightMap=this.lightMap.toJSON(F).uuid,le.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(le.aoMap=this.aoMap.toJSON(F).uuid,le.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(le.bumpMap=this.bumpMap.toJSON(F).uuid,le.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(le.normalMap=this.normalMap.toJSON(F).uuid,le.normalMapType=this.normalMapType,le.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(le.displacementMap=this.displacementMap.toJSON(F).uuid,le.displacementScale=this.displacementScale,le.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(le.roughnessMap=this.roughnessMap.toJSON(F).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(le.metalnessMap=this.metalnessMap.toJSON(F).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(le.emissiveMap=this.emissiveMap.toJSON(F).uuid),this.specularMap&&this.specularMap.isTexture&&(le.specularMap=this.specularMap.toJSON(F).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(le.specularIntensityMap=this.specularIntensityMap.toJSON(F).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(le.specularColorMap=this.specularColorMap.toJSON(F).uuid),this.envMap&&this.envMap.isTexture&&(le.envMap=this.envMap.toJSON(F).uuid,this.combine!==void 0&&(le.combine=this.combine)),this.envMapRotation!==void 0&&(le.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(le.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(le.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(le.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(le.gradientMap=this.gradientMap.toJSON(F).uuid),this.transmission!==void 0&&(le.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(le.transmissionMap=this.transmissionMap.toJSON(F).uuid),this.thickness!==void 0&&(le.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(le.thicknessMap=this.thicknessMap.toJSON(F).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(le.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(le.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(le.size=this.size),this.shadowSide!==null&&(le.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(le.sizeAttenuation=this.sizeAttenuation),this.blending!==nv&&(le.blending=this.blending),this.side!==gc&&(le.side=this.side),this.vertexColors===!0&&(le.vertexColors=!0),this.opacity<1&&(le.opacity=this.opacity),this.transparent===!0&&(le.transparent=!0),this.blendSrc!==R0&&(le.blendSrc=this.blendSrc),this.blendDst!==D0&&(le.blendDst=this.blendDst),this.blendEquation!==qc&&(le.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(le.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(le.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(le.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(le.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(le.blendAlpha=this.blendAlpha),this.depthFunc!==ip&&(le.depthFunc=this.depthFunc),this.depthTest===!1&&(le.depthTest=this.depthTest),this.depthWrite===!1&&(le.depthWrite=this.depthWrite),this.colorWrite===!1&&(le.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(le.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Dm&&(le.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(le.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(le.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Fh&&(le.stencilFail=this.stencilFail),this.stencilZFail!==Fh&&(le.stencilZFail=this.stencilZFail),this.stencilZPass!==Fh&&(le.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(le.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(le.rotation=this.rotation),this.polygonOffset===!0&&(le.polygonOffset=!0),this.polygonOffsetFactor!==0&&(le.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(le.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(le.linewidth=this.linewidth),this.dashSize!==void 0&&(le.dashSize=this.dashSize),this.gapSize!==void 0&&(le.gapSize=this.gapSize),this.scale!==void 0&&(le.scale=this.scale),this.dithering===!0&&(le.dithering=!0),this.alphaTest>0&&(le.alphaTest=this.alphaTest),this.alphaHash===!0&&(le.alphaHash=!0),this.alphaToCoverage===!0&&(le.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(le.premultipliedAlpha=!0),this.forceSinglePass===!0&&(le.forceSinglePass=!0),this.wireframe===!0&&(le.wireframe=!0),this.wireframeLinewidth>1&&(le.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(le.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(le.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(le.flatShading=!0),this.visible===!1&&(le.visible=!1),this.toneMapped===!1&&(le.toneMapped=!1),this.fog===!1&&(le.fog=!1),Object.keys(this.userData).length>0&&(le.userData=this.userData);function De(Xe){const H=[];for(const U in Xe){const e=Xe[U];delete e.metadata,H.push(e)}return H}if(q){const Xe=De(F.textures),H=De(F.images);Xe.length>0&&(le.textures=Xe),H.length>0&&(le.images=H)}return le}clone(){return new this.constructor().copy(this)}copy(F){this.name=F.name,this.blending=F.blending,this.side=F.side,this.vertexColors=F.vertexColors,this.opacity=F.opacity,this.transparent=F.transparent,this.blendSrc=F.blendSrc,this.blendDst=F.blendDst,this.blendEquation=F.blendEquation,this.blendSrcAlpha=F.blendSrcAlpha,this.blendDstAlpha=F.blendDstAlpha,this.blendEquationAlpha=F.blendEquationAlpha,this.blendColor.copy(F.blendColor),this.blendAlpha=F.blendAlpha,this.depthFunc=F.depthFunc,this.depthTest=F.depthTest,this.depthWrite=F.depthWrite,this.stencilWriteMask=F.stencilWriteMask,this.stencilFunc=F.stencilFunc,this.stencilRef=F.stencilRef,this.stencilFuncMask=F.stencilFuncMask,this.stencilFail=F.stencilFail,this.stencilZFail=F.stencilZFail,this.stencilZPass=F.stencilZPass,this.stencilWrite=F.stencilWrite;const q=F.clippingPlanes;let le=null;if(q!==null){const De=q.length;le=new Array(De);for(let Xe=0;Xe!==De;++Xe)le[Xe]=q[Xe].clone()}return this.clippingPlanes=le,this.clipIntersection=F.clipIntersection,this.clipShadows=F.clipShadows,this.shadowSide=F.shadowSide,this.colorWrite=F.colorWrite,this.precision=F.precision,this.polygonOffset=F.polygonOffset,this.polygonOffsetFactor=F.polygonOffsetFactor,this.polygonOffsetUnits=F.polygonOffsetUnits,this.dithering=F.dithering,this.alphaTest=F.alphaTest,this.alphaHash=F.alphaHash,this.alphaToCoverage=F.alphaToCoverage,this.premultipliedAlpha=F.premultipliedAlpha,this.forceSinglePass=F.forceSinglePass,this.visible=F.visible,this.toneMapped=F.toneMapped,this.userData=JSON.parse(JSON.stringify(F.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(F){F===!0&&this.version++}}class X0 extends ah{constructor(F){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new da(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Ss,this.combine=Vy,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(F)}copy(F){return super.copy(F),this.color.copy(F.color),this.map=F.map,this.lightMap=F.lightMap,this.lightMapIntensity=F.lightMapIntensity,this.aoMap=F.aoMap,this.aoMapIntensity=F.aoMapIntensity,this.specularMap=F.specularMap,this.alphaMap=F.alphaMap,this.envMap=F.envMap,this.envMapRotation.copy(F.envMapRotation),this.combine=F.combine,this.reflectivity=F.reflectivity,this.refractionRatio=F.refractionRatio,this.wireframe=F.wireframe,this.wireframeLinewidth=F.wireframeLinewidth,this.wireframeLinecap=F.wireframeLinecap,this.wireframeLinejoin=F.wireframeLinejoin,this.fog=F.fog,this}}const So=new bn,Od=new Wi;class Gs{constructor(F,q,le=!1){if(Array.isArray(F))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=F,this.itemSize=q,this.count=F!==void 0?F.length/q:0,this.normalized=le,this.usage=O0,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=cc,this.version=0}onUploadCallback(){}set needsUpdate(F){F===!0&&this.version++}get updateRange(){return qy("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(F){return this.usage=F,this}addUpdateRange(F,q){this.updateRanges.push({start:F,count:q})}clearUpdateRanges(){this.updateRanges.length=0}copy(F){return this.name=F.name,this.array=new F.array.constructor(F.array),this.itemSize=F.itemSize,this.count=F.count,this.normalized=F.normalized,this.usage=F.usage,this.gpuType=F.gpuType,this}copyAt(F,q,le){F*=this.itemSize,le*=q.itemSize;for(let De=0,Xe=this.itemSize;De0&&(F.userData=this.userData),this.parameters!==void 0){const e=this.parameters;for(const g in e)e[g]!==void 0&&(F[g]=e[g]);return F}F.data={attributes:{}};const q=this.index;q!==null&&(F.data.index={type:q.array.constructor.name,array:Array.prototype.slice.call(q.array)});const le=this.attributes;for(const e in le){const g=le[e];F.data.attributes[e]=g.toJSON(F.data)}const De={};let Xe=!1;for(const e in this.morphAttributes){const g=this.morphAttributes[e],C=[];for(let i=0,S=g.length;i0&&(De[e]=C,Xe=!0)}Xe&&(F.data.morphAttributes=De,F.data.morphTargetsRelative=this.morphTargetsRelative);const H=this.groups;H.length>0&&(F.data.groups=JSON.parse(JSON.stringify(H)));const U=this.boundingSphere;return U!==null&&(F.data.boundingSphere={center:U.center.toArray(),radius:U.radius}),F}clone(){return new this.constructor().copy(this)}copy(F){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const q={};this.name=F.name;const le=F.index;le!==null&&this.setIndex(le.clone(q));const De=F.attributes;for(const g in De){const C=De[g];this.setAttribute(g,C.clone(q))}const Xe=F.morphAttributes;for(const g in Xe){const C=[],i=Xe[g];for(let S=0,x=i.length;S0){const De=q[le[0]];if(De!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Xe=0,H=De.length;Xe(F.far-F.near)**2))&&(Zm.copy(Xe).invert(),jc.copy(F.ray).applyMatrix4(Zm),!(le.boundingBox!==null&&jc.intersectsBox(le.boundingBox)===!1)&&this._computeIntersections(F,q,jc)))}_computeIntersections(F,q,le){let De;const Xe=this.geometry,H=this.material,U=Xe.index,e=Xe.attributes.position,g=Xe.attributes.uv,C=Xe.attributes.uv1,i=Xe.attributes.normal,S=Xe.groups,x=Xe.drawRange;if(U!==null)if(Array.isArray(H))for(let v=0,p=S.length;vq.far?null:{distance:g,point:Wd.clone(),object:_e}}function Yd(_e,F,q,le,De,Xe,H,U,e,g){_e.getVertexPosition(U,Yh),_e.getVertexPosition(e,Xh),_e.getVertexPosition(g,Zh);const C=m2(_e,F,q,le,Yh,Xh,Zh,Gd);if(C){De&&(Ud.fromBufferAttribute(De,U),Vd.fromBufferAttribute(De,e),Hd.fromBufferAttribute(De,g),C.uv=hu.getInterpolation(Gd,Yh,Xh,Zh,Ud,Vd,Hd,new Wi)),Xe&&(Ud.fromBufferAttribute(Xe,U),Vd.fromBufferAttribute(Xe,e),Hd.fromBufferAttribute(Xe,g),C.uv1=hu.getInterpolation(Gd,Yh,Xh,Zh,Ud,Vd,Hd,new Wi)),H&&(Km.fromBufferAttribute(H,U),Jm.fromBufferAttribute(H,e),Qm.fromBufferAttribute(H,g),C.normal=hu.getInterpolation(Gd,Yh,Xh,Zh,Km,Jm,Qm,new bn),C.normal.dot(le.direction)>0&&C.normal.multiplyScalar(-1));const i={a:U,b:e,c:g,normal:new bn,materialIndex:0};hu.getNormal(Yh,Xh,Zh,i.normal),C.face=i}return C}class cv extends Ws{constructor(F=1,q=1,le=1,De=1,Xe=1,H=1){super(),this.type="BoxGeometry",this.parameters={width:F,height:q,depth:le,widthSegments:De,heightSegments:Xe,depthSegments:H};const U=this;De=Math.floor(De),Xe=Math.floor(Xe),H=Math.floor(H);const e=[],g=[],C=[],i=[];let S=0,x=0;v("z","y","x",-1,-1,le,q,F,H,Xe,0),v("z","y","x",1,-1,le,q,-F,H,Xe,1),v("x","z","y",1,1,F,le,q,De,H,2),v("x","z","y",1,-1,F,le,-q,De,H,3),v("x","y","z",1,-1,F,q,le,De,Xe,4),v("x","y","z",-1,-1,F,q,-le,De,Xe,5),this.setIndex(e),this.setAttribute("position",new _s(g,3)),this.setAttribute("normal",new _s(C,3)),this.setAttribute("uv",new _s(i,2));function v(p,r,t,a,n,f,c,l,m,h,b){const u=f/m,o=c/h,d=f/2,w=c/2,A=l/2,_=m+1,y=h+1;let E=0,T=0;const s=new bn;for(let L=0;L0?1:-1,C.push(s.x,s.y,s.z),i.push(z/m),i.push(1-L/h),E+=1}}for(let L=0;L>8&255]+fs[_t>>16&255]+fs[_t>>24&255]+"-"+fs[F&255]+fs[F>>8&255]+"-"+fs[F>>16&15|64]+fs[F>>24&255]+"-"+fs[q&63|128]+fs[q>>8&255]+"-"+fs[q>>16&255]+fs[q>>24&255]+fs[lt&255]+fs[lt>>8&255]+fs[lt>>16&255]+fs[lt>>24&255]).toLowerCase()}function hs(_t,F,q){return Math.max(F,Math.min(q,_t))}function X0(_t,F){return(_t%F+F)%F}function Ow(_t,F,q,lt,Dt){return lt+(_t-F)*(Dt-lt)/(q-F)}function Nw(_t,F,q){return _t!==F?(q-_t)/(F-_t):0}function Xv(_t,F,q){return(1-q)*_t+q*F}function Bw(_t,F,q,lt){return Xv(_t,F,1-Math.exp(-q*lt))}function Uw(_t,F=1){return F-Math.abs(X0(_t,F*2)-F)}function Hw(_t,F,q){return _t<=F?0:_t>=q?1:(_t=(_t-F)/(q-F),_t*_t*(3-2*_t))}function Vw(_t,F,q){return _t<=F?0:_t>=q?1:(_t=(_t-F)/(q-F),_t*_t*_t*(_t*(_t*6-15)+10))}function Gw(_t,F){return _t+Math.floor(Math.random()*(F-_t+1))}function Ww(_t,F){return _t+Math.random()*(F-_t)}function Yw(_t){return _t*(.5-Math.random())}function Xw(_t){_t!==void 0&&(zm=_t);let F=zm+=1831565813;return F=Math.imul(F^F>>>15,F|1),F^=F+Math.imul(F^F>>>7,F|61),((F^F>>>14)>>>0)/4294967296}function Zw(_t){return _t*Yv}function jw(_t){return _t*jv}function Kw(_t){return(_t&_t-1)===0&&_t!==0}function Jw(_t){return Math.pow(2,Math.ceil(Math.log(_t)/Math.LN2))}function Qw(_t){return Math.pow(2,Math.floor(Math.log(_t)/Math.LN2))}function $w(_t,F,q,lt,Dt){const Zt=Math.cos,G=Math.sin,U=Zt(q/2),t=G(q/2),g=Zt((F+lt)/2),C=G((F+lt)/2),i=Zt((F-lt)/2),S=G((F-lt)/2),x=Zt((lt-F)/2),v=G((lt-F)/2);switch(Dt){case"XYX":_t.set(U*C,t*i,t*S,U*g);break;case"YZY":_t.set(t*S,U*C,t*i,U*g);break;case"ZXZ":_t.set(t*i,t*S,U*C,U*g);break;case"XZX":_t.set(U*C,t*v,t*x,U*g);break;case"YXY":_t.set(t*x,U*C,t*v,U*g);break;case"ZYZ":_t.set(t*v,t*x,U*C,U*g);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+Dt)}}function cu(_t,F){switch(F.constructor){case Float32Array:return _t;case Uint32Array:return _t/4294967295;case Uint16Array:return _t/65535;case Uint8Array:return _t/255;case Int32Array:return Math.max(_t/2147483647,-1);case Int16Array:return Math.max(_t/32767,-1);case Int8Array:return Math.max(_t/127,-1);default:throw new Error("Invalid component type.")}}function Pa(_t,F){switch(F.constructor){case Float32Array:return _t;case Uint32Array:return Math.round(_t*4294967295);case Uint16Array:return Math.round(_t*65535);case Uint8Array:return Math.round(_t*255);case Int32Array:return Math.round(_t*2147483647);case Int16Array:return Math.round(_t*32767);case Int8Array:return Math.round(_t*127);default:throw new Error("Invalid component type.")}}const qw={DEG2RAD:Yv,RAD2DEG:jv,generateUUID:bf,clamp:hs,euclideanModulo:X0,mapLinear:Ow,inverseLerp:Nw,lerp:Xv,damp:Bw,pingpong:Uw,smoothstep:Hw,smootherstep:Vw,randInt:Gw,randFloat:Ww,randFloatSpread:Yw,seededRandom:Xw,degToRad:Zw,radToDeg:jw,isPowerOfTwo:Kw,ceilPowerOfTwo:Jw,floorPowerOfTwo:Qw,setQuaternionFromProperEuler:$w,normalize:Pa,denormalize:cu};class Wi{constructor(F=0,q=0){Wi.prototype.isVector2=!0,this.x=F,this.y=q}get width(){return this.x}set width(F){this.x=F}get height(){return this.y}set height(F){this.y=F}set(F,q){return this.x=F,this.y=q,this}setScalar(F){return this.x=F,this.y=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y)}copy(F){return this.x=F.x,this.y=F.y,this}add(F){return this.x+=F.x,this.y+=F.y,this}addScalar(F){return this.x+=F,this.y+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this}subScalar(F){return this.x-=F,this.y-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this}multiply(F){return this.x*=F.x,this.y*=F.y,this}multiplyScalar(F){return this.x*=F,this.y*=F,this}divide(F){return this.x/=F.x,this.y/=F.y,this}divideScalar(F){return this.multiplyScalar(1/F)}applyMatrix3(F){const q=this.x,lt=this.y,Dt=F.elements;return this.x=Dt[0]*q+Dt[3]*lt+Dt[6],this.y=Dt[1]*q+Dt[4]*lt+Dt[7],this}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this}clampLength(F,q){const lt=this.length();return this.divideScalar(lt||1).multiplyScalar(Math.max(F,Math.min(q,lt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(F){return this.x*F.x+this.y*F.y}cross(F){return this.x*F.y-this.y*F.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(F){const q=Math.sqrt(this.lengthSq()*F.lengthSq());if(q===0)return Math.PI/2;const lt=this.dot(F)/q;return Math.acos(hs(lt,-1,1))}distanceTo(F){return Math.sqrt(this.distanceToSquared(F))}distanceToSquared(F){const q=this.x-F.x,lt=this.y-F.y;return q*q+lt*lt}manhattanDistanceTo(F){return Math.abs(this.x-F.x)+Math.abs(this.y-F.y)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this}lerpVectors(F,q,lt){return this.x=F.x+(q.x-F.x)*lt,this.y=F.y+(q.y-F.y)*lt,this}equals(F){return F.x===this.x&&F.y===this.y}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this}rotateAround(F,q){const lt=Math.cos(q),Dt=Math.sin(q),Zt=this.x-F.x,G=this.y-F.y;return this.x=Zt*lt-G*Dt+F.x,this.y=Zt*Dt+G*lt+F.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class fa{constructor(F,q,lt,Dt,Zt,G,U,t,g){fa.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],F!==void 0&&this.set(F,q,lt,Dt,Zt,G,U,t,g)}set(F,q,lt,Dt,Zt,G,U,t,g){const C=this.elements;return C[0]=F,C[1]=Dt,C[2]=U,C[3]=q,C[4]=Zt,C[5]=t,C[6]=lt,C[7]=G,C[8]=g,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(F){const q=this.elements,lt=F.elements;return q[0]=lt[0],q[1]=lt[1],q[2]=lt[2],q[3]=lt[3],q[4]=lt[4],q[5]=lt[5],q[6]=lt[6],q[7]=lt[7],q[8]=lt[8],this}extractBasis(F,q,lt){return F.setFromMatrix3Column(this,0),q.setFromMatrix3Column(this,1),lt.setFromMatrix3Column(this,2),this}setFromMatrix4(F){const q=F.elements;return this.set(q[0],q[4],q[8],q[1],q[5],q[9],q[2],q[6],q[10]),this}multiply(F){return this.multiplyMatrices(this,F)}premultiply(F){return this.multiplyMatrices(F,this)}multiplyMatrices(F,q){const lt=F.elements,Dt=q.elements,Zt=this.elements,G=lt[0],U=lt[3],t=lt[6],g=lt[1],C=lt[4],i=lt[7],S=lt[2],x=lt[5],v=lt[8],p=Dt[0],r=Dt[3],e=Dt[6],a=Dt[1],n=Dt[4],f=Dt[7],c=Dt[2],l=Dt[5],m=Dt[8];return Zt[0]=G*p+U*a+t*c,Zt[3]=G*r+U*n+t*l,Zt[6]=G*e+U*f+t*m,Zt[1]=g*p+C*a+i*c,Zt[4]=g*r+C*n+i*l,Zt[7]=g*e+C*f+i*m,Zt[2]=S*p+x*a+v*c,Zt[5]=S*r+x*n+v*l,Zt[8]=S*e+x*f+v*m,this}multiplyScalar(F){const q=this.elements;return q[0]*=F,q[3]*=F,q[6]*=F,q[1]*=F,q[4]*=F,q[7]*=F,q[2]*=F,q[5]*=F,q[8]*=F,this}determinant(){const F=this.elements,q=F[0],lt=F[1],Dt=F[2],Zt=F[3],G=F[4],U=F[5],t=F[6],g=F[7],C=F[8];return q*G*C-q*U*g-lt*Zt*C+lt*U*t+Dt*Zt*g-Dt*G*t}invert(){const F=this.elements,q=F[0],lt=F[1],Dt=F[2],Zt=F[3],G=F[4],U=F[5],t=F[6],g=F[7],C=F[8],i=C*G-U*g,S=U*t-C*Zt,x=g*Zt-G*t,v=q*i+lt*S+Dt*x;if(v===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/v;return F[0]=i*p,F[1]=(Dt*g-C*lt)*p,F[2]=(U*lt-Dt*G)*p,F[3]=S*p,F[4]=(C*q-Dt*t)*p,F[5]=(Dt*Zt-U*q)*p,F[6]=x*p,F[7]=(lt*t-g*q)*p,F[8]=(G*q-lt*Zt)*p,this}transpose(){let F;const q=this.elements;return F=q[1],q[1]=q[3],q[3]=F,F=q[2],q[2]=q[6],q[6]=F,F=q[5],q[5]=q[7],q[7]=F,this}getNormalMatrix(F){return this.setFromMatrix4(F).invert().transpose()}transposeIntoArray(F){const q=this.elements;return F[0]=q[0],F[1]=q[3],F[2]=q[6],F[3]=q[1],F[4]=q[4],F[5]=q[7],F[6]=q[2],F[7]=q[5],F[8]=q[8],this}setUvTransform(F,q,lt,Dt,Zt,G,U){const t=Math.cos(Zt),g=Math.sin(Zt);return this.set(lt*t,lt*g,-lt*(t*G+g*U)+G+F,-Dt*g,Dt*t,-Dt*(-g*G+t*U)+U+q,0,0,1),this}scale(F,q){return this.premultiply(i0.makeScale(F,q)),this}rotate(F){return this.premultiply(i0.makeRotation(-F)),this}translate(F,q){return this.premultiply(i0.makeTranslation(F,q)),this}makeTranslation(F,q){return F.isVector2?this.set(1,0,F.x,0,1,F.y,0,0,1):this.set(1,0,F,0,1,q,0,0,1),this}makeRotation(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(q,-lt,0,lt,q,0,0,0,1),this}makeScale(F,q){return this.set(F,0,0,0,q,0,0,0,1),this}equals(F){const q=this.elements,lt=F.elements;for(let Dt=0;Dt<9;Dt++)if(q[Dt]!==lt[Dt])return!1;return!0}fromArray(F,q=0){for(let lt=0;lt<9;lt++)this.elements[lt]=F[lt+q];return this}toArray(F=[],q=0){const lt=this.elements;return F[q]=lt[0],F[q+1]=lt[1],F[q+2]=lt[2],F[q+3]=lt[3],F[q+4]=lt[4],F[q+5]=lt[5],F[q+6]=lt[6],F[q+7]=lt[7],F[q+8]=lt[8],F}clone(){return new this.constructor().fromArray(this.elements)}}const i0=new fa;function t1(_t){for(let F=_t.length-1;F>=0;--F)if(_t[F]>=65535)return!0;return!1}function cp(_t){return document.createElementNS("http://www.w3.org/1999/xhtml",_t)}function t2(){const _t=cp("canvas");return _t.style.display="block",_t}const km={};function e1(_t){_t in km||(km[_t]=!0,console.warn(_t))}const Om=new fa().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Nm=new fa().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Pd={[mc]:{transfer:sp,primaries:lp,toReference:_t=>_t,fromReference:_t=>_t},[Iu]:{transfer:Ya,primaries:lp,toReference:_t=>_t.convertSRGBToLinear(),fromReference:_t=>_t.convertLinearToSRGB()},[dp]:{transfer:sp,primaries:up,toReference:_t=>_t.applyMatrix3(Nm),fromReference:_t=>_t.applyMatrix3(Om)},[Y0]:{transfer:Ya,primaries:up,toReference:_t=>_t.convertSRGBToLinear().applyMatrix3(Nm),fromReference:_t=>_t.applyMatrix3(Om).convertLinearToSRGB()}},e2=new Set([mc,dp]),Fa={enabled:!0,_workingColorSpace:mc,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(_t){if(!e2.has(_t))throw new Error(`Unsupported working color space, "${_t}".`);this._workingColorSpace=_t},convert:function(_t,F,q){if(this.enabled===!1||F===q||!F||!q)return _t;const lt=Pd[F].toReference,Dt=Pd[q].fromReference;return Dt(lt(_t))},fromWorkingColorSpace:function(_t,F){return this.convert(_t,this._workingColorSpace,F)},toWorkingColorSpace:function(_t,F){return this.convert(_t,F,this._workingColorSpace)},getPrimaries:function(_t){return Pd[_t].primaries},getTransfer:function(_t){return _t===cc?sp:Pd[_t].transfer}};function av(_t){return _t<.04045?_t*.0773993808:Math.pow(_t*.9478672986+.0521327014,2.4)}function a0(_t){return _t<.0031308?_t*12.92:1.055*Math.pow(_t,.41666)-.055}let Fh;class r2{static getDataURL(F){if(/^data:/i.test(F.src)||typeof HTMLCanvasElement>"u")return F.src;let q;if(F instanceof HTMLCanvasElement)q=F;else{Fh===void 0&&(Fh=cp("canvas")),Fh.width=F.width,Fh.height=F.height;const lt=Fh.getContext("2d");F instanceof ImageData?lt.putImageData(F,0,0):lt.drawImage(F,0,0,F.width,F.height),q=Fh}return q.width>2048||q.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",F),q.toDataURL("image/jpeg",.6)):q.toDataURL("image/png")}static sRGBToLinear(F){if(typeof HTMLImageElement<"u"&&F instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&F instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&F instanceof ImageBitmap){const q=cp("canvas");q.width=F.width,q.height=F.height;const lt=q.getContext("2d");lt.drawImage(F,0,0,F.width,F.height);const Dt=lt.getImageData(0,0,F.width,F.height),Zt=Dt.data;for(let G=0;G0&&(lt.userData=this.userData),q||(F.textures[this.uuid]=lt),lt}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(F){if(this.mapping!==Wy)return F;if(F.applyMatrix3(this.matrix),F.x<0||F.x>1)switch(this.wrapS){case O0:F.x=F.x-Math.floor(F.x);break;case th:F.x=F.x<0?0:1;break;case N0:Math.abs(Math.floor(F.x)%2)===1?F.x=Math.ceil(F.x)-F.x:F.x=F.x-Math.floor(F.x);break}if(F.y<0||F.y>1)switch(this.wrapT){case O0:F.y=F.y-Math.floor(F.y);break;case th:F.y=F.y<0?0:1;break;case N0:Math.abs(Math.floor(F.y)%2)===1?F.y=Math.ceil(F.y)-F.y:F.y=F.y-Math.floor(F.y);break}return this.flipY&&(F.y=1-F.y),F}set needsUpdate(F){F===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(F){F===!0&&this.pmremVersion++}}Es.DEFAULT_IMAGE=null;Es.DEFAULT_MAPPING=Wy;Es.DEFAULT_ANISOTROPY=1;class No{constructor(F=0,q=0,lt=0,Dt=1){No.prototype.isVector4=!0,this.x=F,this.y=q,this.z=lt,this.w=Dt}get width(){return this.z}set width(F){this.z=F}get height(){return this.w}set height(F){this.w=F}set(F,q,lt,Dt){return this.x=F,this.y=q,this.z=lt,this.w=Dt,this}setScalar(F){return this.x=F,this.y=F,this.z=F,this.w=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setZ(F){return this.z=F,this}setW(F){return this.w=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;case 2:this.z=q;break;case 3:this.w=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(F){return this.x=F.x,this.y=F.y,this.z=F.z,this.w=F.w!==void 0?F.w:1,this}add(F){return this.x+=F.x,this.y+=F.y,this.z+=F.z,this.w+=F.w,this}addScalar(F){return this.x+=F,this.y+=F,this.z+=F,this.w+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this.z=F.z+q.z,this.w=F.w+q.w,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this.z+=F.z*q,this.w+=F.w*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this.z-=F.z,this.w-=F.w,this}subScalar(F){return this.x-=F,this.y-=F,this.z-=F,this.w-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this.z=F.z-q.z,this.w=F.w-q.w,this}multiply(F){return this.x*=F.x,this.y*=F.y,this.z*=F.z,this.w*=F.w,this}multiplyScalar(F){return this.x*=F,this.y*=F,this.z*=F,this.w*=F,this}applyMatrix4(F){const q=this.x,lt=this.y,Dt=this.z,Zt=this.w,G=F.elements;return this.x=G[0]*q+G[4]*lt+G[8]*Dt+G[12]*Zt,this.y=G[1]*q+G[5]*lt+G[9]*Dt+G[13]*Zt,this.z=G[2]*q+G[6]*lt+G[10]*Dt+G[14]*Zt,this.w=G[3]*q+G[7]*lt+G[11]*Dt+G[15]*Zt,this}divideScalar(F){return this.multiplyScalar(1/F)}setAxisAngleFromQuaternion(F){this.w=2*Math.acos(F.w);const q=Math.sqrt(1-F.w*F.w);return q<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=F.x/q,this.y=F.y/q,this.z=F.z/q),this}setAxisAngleFromRotationMatrix(F){let q,lt,Dt,Zt;const t=F.elements,g=t[0],C=t[4],i=t[8],S=t[1],x=t[5],v=t[9],p=t[2],r=t[6],e=t[10];if(Math.abs(C-S)<.01&&Math.abs(i-p)<.01&&Math.abs(v-r)<.01){if(Math.abs(C+S)<.1&&Math.abs(i+p)<.1&&Math.abs(v+r)<.1&&Math.abs(g+x+e-3)<.1)return this.set(1,0,0,0),this;q=Math.PI;const n=(g+1)/2,f=(x+1)/2,c=(e+1)/2,l=(C+S)/4,m=(i+p)/4,h=(v+r)/4;return n>f&&n>c?n<.01?(lt=0,Dt=.707106781,Zt=.707106781):(lt=Math.sqrt(n),Dt=l/lt,Zt=m/lt):f>c?f<.01?(lt=.707106781,Dt=0,Zt=.707106781):(Dt=Math.sqrt(f),lt=l/Dt,Zt=h/Dt):c<.01?(lt=.707106781,Dt=.707106781,Zt=0):(Zt=Math.sqrt(c),lt=m/Zt,Dt=h/Zt),this.set(lt,Dt,Zt,q),this}let a=Math.sqrt((r-v)*(r-v)+(i-p)*(i-p)+(S-C)*(S-C));return Math.abs(a)<.001&&(a=1),this.x=(r-v)/a,this.y=(i-p)/a,this.z=(S-C)/a,this.w=Math.acos((g+x+e-1)/2),this}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this.z=Math.min(this.z,F.z),this.w=Math.min(this.w,F.w),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this.z=Math.max(this.z,F.z),this.w=Math.max(this.w,F.w),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this.z=Math.max(F.z,Math.min(q.z,this.z)),this.w=Math.max(F.w,Math.min(q.w,this.w)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this.z=Math.max(F,Math.min(q,this.z)),this.w=Math.max(F,Math.min(q,this.w)),this}clampLength(F,q){const lt=this.length();return this.divideScalar(lt||1).multiplyScalar(Math.max(F,Math.min(q,lt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(F){return this.x*F.x+this.y*F.y+this.z*F.z+this.w*F.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this.z+=(F.z-this.z)*q,this.w+=(F.w-this.w)*q,this}lerpVectors(F,q,lt){return this.x=F.x+(q.x-F.x)*lt,this.y=F.y+(q.y-F.y)*lt,this.z=F.z+(q.z-F.z)*lt,this.w=F.w+(q.w-F.w)*lt,this}equals(F){return F.x===this.x&&F.y===this.y&&F.z===this.z&&F.w===this.w}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this.z=F[q+2],this.w=F[q+3],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F[q+2]=this.z,F[q+3]=this.w,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this.z=F.getZ(q),this.w=F.getW(q),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class a2 extends nh{constructor(F=1,q=1,lt={}){super(),this.isRenderTarget=!0,this.width=F,this.height=q,this.depth=1,this.scissor=new No(0,0,F,q),this.scissorTest=!1,this.viewport=new No(0,0,F,q);const Dt={width:F,height:q,depth:1};lt=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:fu,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0,count:1},lt);const Zt=new Es(Dt,lt.mapping,lt.wrapS,lt.wrapT,lt.magFilter,lt.minFilter,lt.format,lt.type,lt.anisotropy,lt.colorSpace);Zt.flipY=!1,Zt.generateMipmaps=lt.generateMipmaps,Zt.internalFormat=lt.internalFormat,this.textures=[];const G=lt.count;for(let U=0;U=0?1:-1,n=1-e*e;if(n>Number.EPSILON){const c=Math.sqrt(n),l=Math.atan2(c,e*a);r=Math.sin(r*l)/c,U=Math.sin(U*l)/c}const f=U*a;if(t=t*r+S*f,g=g*r+x*f,C=C*r+v*f,i=i*r+p*f,r===1-U){const c=1/Math.sqrt(t*t+g*g+C*C+i*i);t*=c,g*=c,C*=c,i*=c}}F[q]=t,F[q+1]=g,F[q+2]=C,F[q+3]=i}static multiplyQuaternionsFlat(F,q,lt,Dt,Zt,G){const U=lt[Dt],t=lt[Dt+1],g=lt[Dt+2],C=lt[Dt+3],i=Zt[G],S=Zt[G+1],x=Zt[G+2],v=Zt[G+3];return F[q]=U*v+C*i+t*x-g*S,F[q+1]=t*v+C*S+g*i-U*x,F[q+2]=g*v+C*x+U*S-t*i,F[q+3]=C*v-U*i-t*S-g*x,F}get x(){return this._x}set x(F){this._x=F,this._onChangeCallback()}get y(){return this._y}set y(F){this._y=F,this._onChangeCallback()}get z(){return this._z}set z(F){this._z=F,this._onChangeCallback()}get w(){return this._w}set w(F){this._w=F,this._onChangeCallback()}set(F,q,lt,Dt){return this._x=F,this._y=q,this._z=lt,this._w=Dt,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(F){return this._x=F.x,this._y=F.y,this._z=F.z,this._w=F.w,this._onChangeCallback(),this}setFromEuler(F,q=!0){const lt=F._x,Dt=F._y,Zt=F._z,G=F._order,U=Math.cos,t=Math.sin,g=U(lt/2),C=U(Dt/2),i=U(Zt/2),S=t(lt/2),x=t(Dt/2),v=t(Zt/2);switch(G){case"XYZ":this._x=S*C*i+g*x*v,this._y=g*x*i-S*C*v,this._z=g*C*v+S*x*i,this._w=g*C*i-S*x*v;break;case"YXZ":this._x=S*C*i+g*x*v,this._y=g*x*i-S*C*v,this._z=g*C*v-S*x*i,this._w=g*C*i+S*x*v;break;case"ZXY":this._x=S*C*i-g*x*v,this._y=g*x*i+S*C*v,this._z=g*C*v+S*x*i,this._w=g*C*i-S*x*v;break;case"ZYX":this._x=S*C*i-g*x*v,this._y=g*x*i+S*C*v,this._z=g*C*v-S*x*i,this._w=g*C*i+S*x*v;break;case"YZX":this._x=S*C*i+g*x*v,this._y=g*x*i+S*C*v,this._z=g*C*v-S*x*i,this._w=g*C*i-S*x*v;break;case"XZY":this._x=S*C*i-g*x*v,this._y=g*x*i-S*C*v,this._z=g*C*v+S*x*i,this._w=g*C*i+S*x*v;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+G)}return q===!0&&this._onChangeCallback(),this}setFromAxisAngle(F,q){const lt=q/2,Dt=Math.sin(lt);return this._x=F.x*Dt,this._y=F.y*Dt,this._z=F.z*Dt,this._w=Math.cos(lt),this._onChangeCallback(),this}setFromRotationMatrix(F){const q=F.elements,lt=q[0],Dt=q[4],Zt=q[8],G=q[1],U=q[5],t=q[9],g=q[2],C=q[6],i=q[10],S=lt+U+i;if(S>0){const x=.5/Math.sqrt(S+1);this._w=.25/x,this._x=(C-t)*x,this._y=(Zt-g)*x,this._z=(G-Dt)*x}else if(lt>U&<>i){const x=2*Math.sqrt(1+lt-U-i);this._w=(C-t)/x,this._x=.25*x,this._y=(Dt+G)/x,this._z=(Zt+g)/x}else if(U>i){const x=2*Math.sqrt(1+U-lt-i);this._w=(Zt-g)/x,this._x=(Dt+G)/x,this._y=.25*x,this._z=(t+C)/x}else{const x=2*Math.sqrt(1+i-lt-U);this._w=(G-Dt)/x,this._x=(Zt+g)/x,this._y=(t+C)/x,this._z=.25*x}return this._onChangeCallback(),this}setFromUnitVectors(F,q){let lt=F.dot(q)+1;return ltMath.abs(F.z)?(this._x=-F.y,this._y=F.x,this._z=0,this._w=lt):(this._x=0,this._y=-F.z,this._z=F.y,this._w=lt)):(this._x=F.y*q.z-F.z*q.y,this._y=F.z*q.x-F.x*q.z,this._z=F.x*q.y-F.y*q.x,this._w=lt),this.normalize()}angleTo(F){return 2*Math.acos(Math.abs(hs(this.dot(F),-1,1)))}rotateTowards(F,q){const lt=this.angleTo(F);if(lt===0)return this;const Dt=Math.min(1,q/lt);return this.slerp(F,Dt),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(F){return this._x*F._x+this._y*F._y+this._z*F._z+this._w*F._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let F=this.length();return F===0?(this._x=0,this._y=0,this._z=0,this._w=1):(F=1/F,this._x=this._x*F,this._y=this._y*F,this._z=this._z*F,this._w=this._w*F),this._onChangeCallback(),this}multiply(F){return this.multiplyQuaternions(this,F)}premultiply(F){return this.multiplyQuaternions(F,this)}multiplyQuaternions(F,q){const lt=F._x,Dt=F._y,Zt=F._z,G=F._w,U=q._x,t=q._y,g=q._z,C=q._w;return this._x=lt*C+G*U+Dt*g-Zt*t,this._y=Dt*C+G*t+Zt*U-lt*g,this._z=Zt*C+G*g+lt*t-Dt*U,this._w=G*C-lt*U-Dt*t-Zt*g,this._onChangeCallback(),this}slerp(F,q){if(q===0)return this;if(q===1)return this.copy(F);const lt=this._x,Dt=this._y,Zt=this._z,G=this._w;let U=G*F._w+lt*F._x+Dt*F._y+Zt*F._z;if(U<0?(this._w=-F._w,this._x=-F._x,this._y=-F._y,this._z=-F._z,U=-U):this.copy(F),U>=1)return this._w=G,this._x=lt,this._y=Dt,this._z=Zt,this;const t=1-U*U;if(t<=Number.EPSILON){const x=1-q;return this._w=x*G+q*this._w,this._x=x*lt+q*this._x,this._y=x*Dt+q*this._y,this._z=x*Zt+q*this._z,this.normalize(),this}const g=Math.sqrt(t),C=Math.atan2(g,U),i=Math.sin((1-q)*C)/g,S=Math.sin(q*C)/g;return this._w=G*i+this._w*S,this._x=lt*i+this._x*S,this._y=Dt*i+this._y*S,this._z=Zt*i+this._z*S,this._onChangeCallback(),this}slerpQuaternions(F,q,lt){return this.copy(F).slerp(q,lt)}random(){const F=2*Math.PI*Math.random(),q=2*Math.PI*Math.random(),lt=Math.random(),Dt=Math.sqrt(1-lt),Zt=Math.sqrt(lt);return this.set(Dt*Math.sin(F),Dt*Math.cos(F),Zt*Math.sin(q),Zt*Math.cos(q))}equals(F){return F._x===this._x&&F._y===this._y&&F._z===this._z&&F._w===this._w}fromArray(F,q=0){return this._x=F[q],this._y=F[q+1],this._z=F[q+2],this._w=F[q+3],this._onChangeCallback(),this}toArray(F=[],q=0){return F[q]=this._x,F[q+1]=this._y,F[q+2]=this._z,F[q+3]=this._w,F}fromBufferAttribute(F,q){return this._x=F.getX(q),this._y=F.getY(q),this._z=F.getZ(q),this._w=F.getW(q),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(F){return this._onChangeCallback=F,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class bn{constructor(F=0,q=0,lt=0){bn.prototype.isVector3=!0,this.x=F,this.y=q,this.z=lt}set(F,q,lt){return lt===void 0&&(lt=this.z),this.x=F,this.y=q,this.z=lt,this}setScalar(F){return this.x=F,this.y=F,this.z=F,this}setX(F){return this.x=F,this}setY(F){return this.y=F,this}setZ(F){return this.z=F,this}setComponent(F,q){switch(F){case 0:this.x=q;break;case 1:this.y=q;break;case 2:this.z=q;break;default:throw new Error("index is out of range: "+F)}return this}getComponent(F){switch(F){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+F)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(F){return this.x=F.x,this.y=F.y,this.z=F.z,this}add(F){return this.x+=F.x,this.y+=F.y,this.z+=F.z,this}addScalar(F){return this.x+=F,this.y+=F,this.z+=F,this}addVectors(F,q){return this.x=F.x+q.x,this.y=F.y+q.y,this.z=F.z+q.z,this}addScaledVector(F,q){return this.x+=F.x*q,this.y+=F.y*q,this.z+=F.z*q,this}sub(F){return this.x-=F.x,this.y-=F.y,this.z-=F.z,this}subScalar(F){return this.x-=F,this.y-=F,this.z-=F,this}subVectors(F,q){return this.x=F.x-q.x,this.y=F.y-q.y,this.z=F.z-q.z,this}multiply(F){return this.x*=F.x,this.y*=F.y,this.z*=F.z,this}multiplyScalar(F){return this.x*=F,this.y*=F,this.z*=F,this}multiplyVectors(F,q){return this.x=F.x*q.x,this.y=F.y*q.y,this.z=F.z*q.z,this}applyEuler(F){return this.applyQuaternion(Bm.setFromEuler(F))}applyAxisAngle(F,q){return this.applyQuaternion(Bm.setFromAxisAngle(F,q))}applyMatrix3(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.elements;return this.x=Zt[0]*q+Zt[3]*lt+Zt[6]*Dt,this.y=Zt[1]*q+Zt[4]*lt+Zt[7]*Dt,this.z=Zt[2]*q+Zt[5]*lt+Zt[8]*Dt,this}applyNormalMatrix(F){return this.applyMatrix3(F).normalize()}applyMatrix4(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.elements,G=1/(Zt[3]*q+Zt[7]*lt+Zt[11]*Dt+Zt[15]);return this.x=(Zt[0]*q+Zt[4]*lt+Zt[8]*Dt+Zt[12])*G,this.y=(Zt[1]*q+Zt[5]*lt+Zt[9]*Dt+Zt[13])*G,this.z=(Zt[2]*q+Zt[6]*lt+Zt[10]*Dt+Zt[14])*G,this}applyQuaternion(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.x,G=F.y,U=F.z,t=F.w,g=2*(G*Dt-U*lt),C=2*(U*q-Zt*Dt),i=2*(Zt*lt-G*q);return this.x=q+t*g+G*i-U*C,this.y=lt+t*C+U*g-Zt*i,this.z=Dt+t*i+Zt*C-G*g,this}project(F){return this.applyMatrix4(F.matrixWorldInverse).applyMatrix4(F.projectionMatrix)}unproject(F){return this.applyMatrix4(F.projectionMatrixInverse).applyMatrix4(F.matrixWorld)}transformDirection(F){const q=this.x,lt=this.y,Dt=this.z,Zt=F.elements;return this.x=Zt[0]*q+Zt[4]*lt+Zt[8]*Dt,this.y=Zt[1]*q+Zt[5]*lt+Zt[9]*Dt,this.z=Zt[2]*q+Zt[6]*lt+Zt[10]*Dt,this.normalize()}divide(F){return this.x/=F.x,this.y/=F.y,this.z/=F.z,this}divideScalar(F){return this.multiplyScalar(1/F)}min(F){return this.x=Math.min(this.x,F.x),this.y=Math.min(this.y,F.y),this.z=Math.min(this.z,F.z),this}max(F){return this.x=Math.max(this.x,F.x),this.y=Math.max(this.y,F.y),this.z=Math.max(this.z,F.z),this}clamp(F,q){return this.x=Math.max(F.x,Math.min(q.x,this.x)),this.y=Math.max(F.y,Math.min(q.y,this.y)),this.z=Math.max(F.z,Math.min(q.z,this.z)),this}clampScalar(F,q){return this.x=Math.max(F,Math.min(q,this.x)),this.y=Math.max(F,Math.min(q,this.y)),this.z=Math.max(F,Math.min(q,this.z)),this}clampLength(F,q){const lt=this.length();return this.divideScalar(lt||1).multiplyScalar(Math.max(F,Math.min(q,lt)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(F){return this.x*F.x+this.y*F.y+this.z*F.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(F){return this.normalize().multiplyScalar(F)}lerp(F,q){return this.x+=(F.x-this.x)*q,this.y+=(F.y-this.y)*q,this.z+=(F.z-this.z)*q,this}lerpVectors(F,q,lt){return this.x=F.x+(q.x-F.x)*lt,this.y=F.y+(q.y-F.y)*lt,this.z=F.z+(q.z-F.z)*lt,this}cross(F){return this.crossVectors(this,F)}crossVectors(F,q){const lt=F.x,Dt=F.y,Zt=F.z,G=q.x,U=q.y,t=q.z;return this.x=Dt*t-Zt*U,this.y=Zt*G-lt*t,this.z=lt*U-Dt*G,this}projectOnVector(F){const q=F.lengthSq();if(q===0)return this.set(0,0,0);const lt=F.dot(this)/q;return this.copy(F).multiplyScalar(lt)}projectOnPlane(F){return s0.copy(this).projectOnVector(F),this.sub(s0)}reflect(F){return this.sub(s0.copy(F).multiplyScalar(2*this.dot(F)))}angleTo(F){const q=Math.sqrt(this.lengthSq()*F.lengthSq());if(q===0)return Math.PI/2;const lt=this.dot(F)/q;return Math.acos(hs(lt,-1,1))}distanceTo(F){return Math.sqrt(this.distanceToSquared(F))}distanceToSquared(F){const q=this.x-F.x,lt=this.y-F.y,Dt=this.z-F.z;return q*q+lt*lt+Dt*Dt}manhattanDistanceTo(F){return Math.abs(this.x-F.x)+Math.abs(this.y-F.y)+Math.abs(this.z-F.z)}setFromSpherical(F){return this.setFromSphericalCoords(F.radius,F.phi,F.theta)}setFromSphericalCoords(F,q,lt){const Dt=Math.sin(q)*F;return this.x=Dt*Math.sin(lt),this.y=Math.cos(q)*F,this.z=Dt*Math.cos(lt),this}setFromCylindrical(F){return this.setFromCylindricalCoords(F.radius,F.theta,F.y)}setFromCylindricalCoords(F,q,lt){return this.x=F*Math.sin(q),this.y=lt,this.z=F*Math.cos(q),this}setFromMatrixPosition(F){const q=F.elements;return this.x=q[12],this.y=q[13],this.z=q[14],this}setFromMatrixScale(F){const q=this.setFromMatrixColumn(F,0).length(),lt=this.setFromMatrixColumn(F,1).length(),Dt=this.setFromMatrixColumn(F,2).length();return this.x=q,this.y=lt,this.z=Dt,this}setFromMatrixColumn(F,q){return this.fromArray(F.elements,q*4)}setFromMatrix3Column(F,q){return this.fromArray(F.elements,q*3)}setFromEuler(F){return this.x=F._x,this.y=F._y,this.z=F._z,this}setFromColor(F){return this.x=F.r,this.y=F.g,this.z=F.b,this}equals(F){return F.x===this.x&&F.y===this.y&&F.z===this.z}fromArray(F,q=0){return this.x=F[q],this.y=F[q+1],this.z=F[q+2],this}toArray(F=[],q=0){return F[q]=this.x,F[q+1]=this.y,F[q+2]=this.z,F}fromBufferAttribute(F,q){return this.x=F.getX(q),this.y=F.getY(q),this.z=F.getZ(q),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const F=Math.random()*Math.PI*2,q=Math.random()*2-1,lt=Math.sqrt(1-q*q);return this.x=lt*Math.cos(F),this.y=q,this.z=lt*Math.sin(F),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const s0=new bn,Bm=new ku;class Qv{constructor(F=new bn(1/0,1/0,1/0),q=new bn(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=F,this.max=q}set(F,q){return this.min.copy(F),this.max.copy(q),this}setFromArray(F){this.makeEmpty();for(let q=0,lt=F.length;qthis.max.x||F.ythis.max.y||F.zthis.max.z)}containsBox(F){return this.min.x<=F.min.x&&F.max.x<=this.max.x&&this.min.y<=F.min.y&&F.max.y<=this.max.y&&this.min.z<=F.min.z&&F.max.z<=this.max.z}getParameter(F,q){return q.set((F.x-this.min.x)/(this.max.x-this.min.x),(F.y-this.min.y)/(this.max.y-this.min.y),(F.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(F){return!(F.max.xthis.max.x||F.max.ythis.max.y||F.max.zthis.max.z)}intersectsSphere(F){return this.clampPoint(F.center,ou),ou.distanceToSquared(F.center)<=F.radius*F.radius}intersectsPlane(F){let q,lt;return F.normal.x>0?(q=F.normal.x*this.min.x,lt=F.normal.x*this.max.x):(q=F.normal.x*this.max.x,lt=F.normal.x*this.min.x),F.normal.y>0?(q+=F.normal.y*this.min.y,lt+=F.normal.y*this.max.y):(q+=F.normal.y*this.max.y,lt+=F.normal.y*this.min.y),F.normal.z>0?(q+=F.normal.z*this.min.z,lt+=F.normal.z*this.max.z):(q+=F.normal.z*this.max.z,lt+=F.normal.z*this.min.z),q<=-F.constant&<>=-F.constant}intersectsTriangle(F){if(this.isEmpty())return!1;this.getCenter(Ov),Dd.subVectors(this.max,Ov),zh.subVectors(F.a,Ov),kh.subVectors(F.b,Ov),Oh.subVectors(F.c,Ov),ic.subVectors(kh,zh),ac.subVectors(Oh,kh),Yc.subVectors(zh,Oh);let q=[0,-ic.z,ic.y,0,-ac.z,ac.y,0,-Yc.z,Yc.y,ic.z,0,-ic.x,ac.z,0,-ac.x,Yc.z,0,-Yc.x,-ic.y,ic.x,0,-ac.y,ac.x,0,-Yc.y,Yc.x,0];return!l0(q,zh,kh,Oh,Dd)||(q=[1,0,0,0,1,0,0,0,1],!l0(q,zh,kh,Oh,Dd))?!1:(Id.crossVectors(ic,ac),q=[Id.x,Id.y,Id.z],l0(q,zh,kh,Oh,Dd))}clampPoint(F,q){return q.copy(F).clamp(this.min,this.max)}distanceToPoint(F){return this.clampPoint(F,ou).distanceTo(F)}getBoundingSphere(F){return this.isEmpty()?F.makeEmpty():(this.getCenter(F.center),F.radius=this.getSize(ou).length()*.5),F}intersect(F){return this.min.max(F.min),this.max.min(F.max),this.isEmpty()&&this.makeEmpty(),this}union(F){return this.min.min(F.min),this.max.max(F.max),this}applyMatrix4(F){return this.isEmpty()?this:(hf[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(F),hf[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(F),hf[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(F),hf[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(F),hf[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(F),hf[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(F),hf[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(F),hf[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(F),this.setFromPoints(hf),this)}translate(F){return this.min.add(F),this.max.add(F),this}equals(F){return F.min.equals(this.min)&&F.max.equals(this.max)}}const hf=[new bn,new bn,new bn,new bn,new bn,new bn,new bn,new bn],ou=new bn,Rd=new Qv,zh=new bn,kh=new bn,Oh=new bn,ic=new bn,ac=new bn,Yc=new bn,Ov=new bn,Dd=new bn,Id=new bn,Xc=new bn;function l0(_t,F,q,lt,Dt){for(let Zt=0,G=_t.length-3;Zt<=G;Zt+=3){Xc.fromArray(_t,Zt);const U=Dt.x*Math.abs(Xc.x)+Dt.y*Math.abs(Xc.y)+Dt.z*Math.abs(Xc.z),t=F.dot(Xc),g=q.dot(Xc),C=lt.dot(Xc);if(Math.max(-Math.max(t,g,C),Math.min(t,g,C))>U)return!1}return!0}const s2=new Qv,Nv=new bn,u0=new bn;class $v{constructor(F=new bn,q=-1){this.isSphere=!0,this.center=F,this.radius=q}set(F,q){return this.center.copy(F),this.radius=q,this}setFromPoints(F,q){const lt=this.center;q!==void 0?lt.copy(q):s2.setFromPoints(F).getCenter(lt);let Dt=0;for(let Zt=0,G=F.length;Ztthis.radius*this.radius&&(q.sub(this.center).normalize(),q.multiplyScalar(this.radius).add(this.center)),q}getBoundingBox(F){return this.isEmpty()?(F.makeEmpty(),F):(F.set(this.center,this.center),F.expandByScalar(this.radius),F)}applyMatrix4(F){return this.center.applyMatrix4(F),this.radius=this.radius*F.getMaxScaleOnAxis(),this}translate(F){return this.center.add(F),this}expandByPoint(F){if(this.isEmpty())return this.center.copy(F),this.radius=0,this;Nv.subVectors(F,this.center);const q=Nv.lengthSq();if(q>this.radius*this.radius){const lt=Math.sqrt(q),Dt=(lt-this.radius)*.5;this.center.addScaledVector(Nv,Dt/lt),this.radius+=Dt}return this}union(F){return F.isEmpty()?this:this.isEmpty()?(this.copy(F),this):(this.center.equals(F.center)===!0?this.radius=Math.max(this.radius,F.radius):(u0.subVectors(F.center,this.center).setLength(F.radius),this.expandByPoint(Nv.copy(F.center).add(u0)),this.expandByPoint(Nv.copy(F.center).sub(u0))),this)}equals(F){return F.center.equals(this.center)&&F.radius===this.radius}clone(){return new this.constructor().copy(this)}}const vf=new bn,f0=new bn,Fd=new bn,oc=new bn,c0=new bn,zd=new bn,h0=new bn;class qv{constructor(F=new bn,q=new bn(0,0,-1)){this.origin=F,this.direction=q}set(F,q){return this.origin.copy(F),this.direction.copy(q),this}copy(F){return this.origin.copy(F.origin),this.direction.copy(F.direction),this}at(F,q){return q.copy(this.origin).addScaledVector(this.direction,F)}lookAt(F){return this.direction.copy(F).sub(this.origin).normalize(),this}recast(F){return this.origin.copy(this.at(F,vf)),this}closestPointToPoint(F,q){q.subVectors(F,this.origin);const lt=q.dot(this.direction);return lt<0?q.copy(this.origin):q.copy(this.origin).addScaledVector(this.direction,lt)}distanceToPoint(F){return Math.sqrt(this.distanceSqToPoint(F))}distanceSqToPoint(F){const q=vf.subVectors(F,this.origin).dot(this.direction);return q<0?this.origin.distanceToSquared(F):(vf.copy(this.origin).addScaledVector(this.direction,q),vf.distanceToSquared(F))}distanceSqToSegment(F,q,lt,Dt){f0.copy(F).add(q).multiplyScalar(.5),Fd.copy(q).sub(F).normalize(),oc.copy(this.origin).sub(f0);const Zt=F.distanceTo(q)*.5,G=-this.direction.dot(Fd),U=oc.dot(this.direction),t=-oc.dot(Fd),g=oc.lengthSq(),C=Math.abs(1-G*G);let i,S,x,v;if(C>0)if(i=G*t-U,S=G*U-t,v=Zt*C,i>=0)if(S>=-v)if(S<=v){const p=1/C;i*=p,S*=p,x=i*(i+G*S+2*U)+S*(G*i+S+2*t)+g}else S=Zt,i=Math.max(0,-(G*S+U)),x=-i*i+S*(S+2*t)+g;else S=-Zt,i=Math.max(0,-(G*S+U)),x=-i*i+S*(S+2*t)+g;else S<=-v?(i=Math.max(0,-(-G*Zt+U)),S=i>0?-Zt:Math.min(Math.max(-Zt,-t),Zt),x=-i*i+S*(S+2*t)+g):S<=v?(i=0,S=Math.min(Math.max(-Zt,-t),Zt),x=S*(S+2*t)+g):(i=Math.max(0,-(G*Zt+U)),S=i>0?Zt:Math.min(Math.max(-Zt,-t),Zt),x=-i*i+S*(S+2*t)+g);else S=G>0?-Zt:Zt,i=Math.max(0,-(G*S+U)),x=-i*i+S*(S+2*t)+g;return lt&<.copy(this.origin).addScaledVector(this.direction,i),Dt&&Dt.copy(f0).addScaledVector(Fd,S),x}intersectSphere(F,q){vf.subVectors(F.center,this.origin);const lt=vf.dot(this.direction),Dt=vf.dot(vf)-lt*lt,Zt=F.radius*F.radius;if(Dt>Zt)return null;const G=Math.sqrt(Zt-Dt),U=lt-G,t=lt+G;return t<0?null:U<0?this.at(t,q):this.at(U,q)}intersectsSphere(F){return this.distanceSqToPoint(F.center)<=F.radius*F.radius}distanceToPlane(F){const q=F.normal.dot(this.direction);if(q===0)return F.distanceToPoint(this.origin)===0?0:null;const lt=-(this.origin.dot(F.normal)+F.constant)/q;return lt>=0?lt:null}intersectPlane(F,q){const lt=this.distanceToPlane(F);return lt===null?null:this.at(lt,q)}intersectsPlane(F){const q=F.distanceToPoint(this.origin);return q===0||F.normal.dot(this.direction)*q<0}intersectBox(F,q){let lt,Dt,Zt,G,U,t;const g=1/this.direction.x,C=1/this.direction.y,i=1/this.direction.z,S=this.origin;return g>=0?(lt=(F.min.x-S.x)*g,Dt=(F.max.x-S.x)*g):(lt=(F.max.x-S.x)*g,Dt=(F.min.x-S.x)*g),C>=0?(Zt=(F.min.y-S.y)*C,G=(F.max.y-S.y)*C):(Zt=(F.max.y-S.y)*C,G=(F.min.y-S.y)*C),lt>G||Zt>Dt||((Zt>lt||isNaN(lt))&&(lt=Zt),(G=0?(U=(F.min.z-S.z)*i,t=(F.max.z-S.z)*i):(U=(F.max.z-S.z)*i,t=(F.min.z-S.z)*i),lt>t||U>Dt)||((U>lt||lt!==lt)&&(lt=U),(t=0?lt:Dt,q)}intersectsBox(F){return this.intersectBox(F,vf)!==null}intersectTriangle(F,q,lt,Dt,Zt){c0.subVectors(q,F),zd.subVectors(lt,F),h0.crossVectors(c0,zd);let G=this.direction.dot(h0),U;if(G>0){if(Dt)return null;U=1}else if(G<0)U=-1,G=-G;else return null;oc.subVectors(this.origin,F);const t=U*this.direction.dot(zd.crossVectors(oc,zd));if(t<0)return null;const g=U*this.direction.dot(c0.cross(oc));if(g<0||t+g>G)return null;const C=-U*oc.dot(h0);return C<0?null:this.at(C/G,Zt)}applyMatrix4(F){return this.origin.applyMatrix4(F),this.direction.transformDirection(F),this}equals(F){return F.origin.equals(this.origin)&&F.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class so{constructor(F,q,lt,Dt,Zt,G,U,t,g,C,i,S,x,v,p,r){so.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],F!==void 0&&this.set(F,q,lt,Dt,Zt,G,U,t,g,C,i,S,x,v,p,r)}set(F,q,lt,Dt,Zt,G,U,t,g,C,i,S,x,v,p,r){const e=this.elements;return e[0]=F,e[4]=q,e[8]=lt,e[12]=Dt,e[1]=Zt,e[5]=G,e[9]=U,e[13]=t,e[2]=g,e[6]=C,e[10]=i,e[14]=S,e[3]=x,e[7]=v,e[11]=p,e[15]=r,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new so().fromArray(this.elements)}copy(F){const q=this.elements,lt=F.elements;return q[0]=lt[0],q[1]=lt[1],q[2]=lt[2],q[3]=lt[3],q[4]=lt[4],q[5]=lt[5],q[6]=lt[6],q[7]=lt[7],q[8]=lt[8],q[9]=lt[9],q[10]=lt[10],q[11]=lt[11],q[12]=lt[12],q[13]=lt[13],q[14]=lt[14],q[15]=lt[15],this}copyPosition(F){const q=this.elements,lt=F.elements;return q[12]=lt[12],q[13]=lt[13],q[14]=lt[14],this}setFromMatrix3(F){const q=F.elements;return this.set(q[0],q[3],q[6],0,q[1],q[4],q[7],0,q[2],q[5],q[8],0,0,0,0,1),this}extractBasis(F,q,lt){return F.setFromMatrixColumn(this,0),q.setFromMatrixColumn(this,1),lt.setFromMatrixColumn(this,2),this}makeBasis(F,q,lt){return this.set(F.x,q.x,lt.x,0,F.y,q.y,lt.y,0,F.z,q.z,lt.z,0,0,0,0,1),this}extractRotation(F){const q=this.elements,lt=F.elements,Dt=1/Nh.setFromMatrixColumn(F,0).length(),Zt=1/Nh.setFromMatrixColumn(F,1).length(),G=1/Nh.setFromMatrixColumn(F,2).length();return q[0]=lt[0]*Dt,q[1]=lt[1]*Dt,q[2]=lt[2]*Dt,q[3]=0,q[4]=lt[4]*Zt,q[5]=lt[5]*Zt,q[6]=lt[6]*Zt,q[7]=0,q[8]=lt[8]*G,q[9]=lt[9]*G,q[10]=lt[10]*G,q[11]=0,q[12]=0,q[13]=0,q[14]=0,q[15]=1,this}makeRotationFromEuler(F){const q=this.elements,lt=F.x,Dt=F.y,Zt=F.z,G=Math.cos(lt),U=Math.sin(lt),t=Math.cos(Dt),g=Math.sin(Dt),C=Math.cos(Zt),i=Math.sin(Zt);if(F.order==="XYZ"){const S=G*C,x=G*i,v=U*C,p=U*i;q[0]=t*C,q[4]=-t*i,q[8]=g,q[1]=x+v*g,q[5]=S-p*g,q[9]=-U*t,q[2]=p-S*g,q[6]=v+x*g,q[10]=G*t}else if(F.order==="YXZ"){const S=t*C,x=t*i,v=g*C,p=g*i;q[0]=S+p*U,q[4]=v*U-x,q[8]=G*g,q[1]=G*i,q[5]=G*C,q[9]=-U,q[2]=x*U-v,q[6]=p+S*U,q[10]=G*t}else if(F.order==="ZXY"){const S=t*C,x=t*i,v=g*C,p=g*i;q[0]=S-p*U,q[4]=-G*i,q[8]=v+x*U,q[1]=x+v*U,q[5]=G*C,q[9]=p-S*U,q[2]=-G*g,q[6]=U,q[10]=G*t}else if(F.order==="ZYX"){const S=G*C,x=G*i,v=U*C,p=U*i;q[0]=t*C,q[4]=v*g-x,q[8]=S*g+p,q[1]=t*i,q[5]=p*g+S,q[9]=x*g-v,q[2]=-g,q[6]=U*t,q[10]=G*t}else if(F.order==="YZX"){const S=G*t,x=G*g,v=U*t,p=U*g;q[0]=t*C,q[4]=p-S*i,q[8]=v*i+x,q[1]=i,q[5]=G*C,q[9]=-U*C,q[2]=-g*C,q[6]=x*i+v,q[10]=S-p*i}else if(F.order==="XZY"){const S=G*t,x=G*g,v=U*t,p=U*g;q[0]=t*C,q[4]=-i,q[8]=g*C,q[1]=S*i+p,q[5]=G*C,q[9]=x*i-v,q[2]=v*i-x,q[6]=U*C,q[10]=p*i+S}return q[3]=0,q[7]=0,q[11]=0,q[12]=0,q[13]=0,q[14]=0,q[15]=1,this}makeRotationFromQuaternion(F){return this.compose(l2,F,u2)}lookAt(F,q,lt){const Dt=this.elements;return al.subVectors(F,q),al.lengthSq()===0&&(al.z=1),al.normalize(),sc.crossVectors(lt,al),sc.lengthSq()===0&&(Math.abs(lt.z)===1?al.x+=1e-4:al.z+=1e-4,al.normalize(),sc.crossVectors(lt,al)),sc.normalize(),kd.crossVectors(al,sc),Dt[0]=sc.x,Dt[4]=kd.x,Dt[8]=al.x,Dt[1]=sc.y,Dt[5]=kd.y,Dt[9]=al.y,Dt[2]=sc.z,Dt[6]=kd.z,Dt[10]=al.z,this}multiply(F){return this.multiplyMatrices(this,F)}premultiply(F){return this.multiplyMatrices(F,this)}multiplyMatrices(F,q){const lt=F.elements,Dt=q.elements,Zt=this.elements,G=lt[0],U=lt[4],t=lt[8],g=lt[12],C=lt[1],i=lt[5],S=lt[9],x=lt[13],v=lt[2],p=lt[6],r=lt[10],e=lt[14],a=lt[3],n=lt[7],f=lt[11],c=lt[15],l=Dt[0],m=Dt[4],h=Dt[8],b=Dt[12],u=Dt[1],o=Dt[5],d=Dt[9],w=Dt[13],A=Dt[2],_=Dt[6],y=Dt[10],E=Dt[14],T=Dt[3],s=Dt[7],L=Dt[11],M=Dt[15];return Zt[0]=G*l+U*u+t*A+g*T,Zt[4]=G*m+U*o+t*_+g*s,Zt[8]=G*h+U*d+t*y+g*L,Zt[12]=G*b+U*w+t*E+g*M,Zt[1]=C*l+i*u+S*A+x*T,Zt[5]=C*m+i*o+S*_+x*s,Zt[9]=C*h+i*d+S*y+x*L,Zt[13]=C*b+i*w+S*E+x*M,Zt[2]=v*l+p*u+r*A+e*T,Zt[6]=v*m+p*o+r*_+e*s,Zt[10]=v*h+p*d+r*y+e*L,Zt[14]=v*b+p*w+r*E+e*M,Zt[3]=a*l+n*u+f*A+c*T,Zt[7]=a*m+n*o+f*_+c*s,Zt[11]=a*h+n*d+f*y+c*L,Zt[15]=a*b+n*w+f*E+c*M,this}multiplyScalar(F){const q=this.elements;return q[0]*=F,q[4]*=F,q[8]*=F,q[12]*=F,q[1]*=F,q[5]*=F,q[9]*=F,q[13]*=F,q[2]*=F,q[6]*=F,q[10]*=F,q[14]*=F,q[3]*=F,q[7]*=F,q[11]*=F,q[15]*=F,this}determinant(){const F=this.elements,q=F[0],lt=F[4],Dt=F[8],Zt=F[12],G=F[1],U=F[5],t=F[9],g=F[13],C=F[2],i=F[6],S=F[10],x=F[14],v=F[3],p=F[7],r=F[11],e=F[15];return v*(+Zt*t*i-Dt*g*i-Zt*U*S+lt*g*S+Dt*U*x-lt*t*x)+p*(+q*t*x-q*g*S+Zt*G*S-Dt*G*x+Dt*g*C-Zt*t*C)+r*(+q*g*i-q*U*x-Zt*G*i+lt*G*x+Zt*U*C-lt*g*C)+e*(-Dt*U*C-q*t*i+q*U*S+Dt*G*i-lt*G*S+lt*t*C)}transpose(){const F=this.elements;let q;return q=F[1],F[1]=F[4],F[4]=q,q=F[2],F[2]=F[8],F[8]=q,q=F[6],F[6]=F[9],F[9]=q,q=F[3],F[3]=F[12],F[12]=q,q=F[7],F[7]=F[13],F[13]=q,q=F[11],F[11]=F[14],F[14]=q,this}setPosition(F,q,lt){const Dt=this.elements;return F.isVector3?(Dt[12]=F.x,Dt[13]=F.y,Dt[14]=F.z):(Dt[12]=F,Dt[13]=q,Dt[14]=lt),this}invert(){const F=this.elements,q=F[0],lt=F[1],Dt=F[2],Zt=F[3],G=F[4],U=F[5],t=F[6],g=F[7],C=F[8],i=F[9],S=F[10],x=F[11],v=F[12],p=F[13],r=F[14],e=F[15],a=i*r*g-p*S*g+p*t*x-U*r*x-i*t*e+U*S*e,n=v*S*g-C*r*g-v*t*x+G*r*x+C*t*e-G*S*e,f=C*p*g-v*i*g+v*U*x-G*p*x-C*U*e+G*i*e,c=v*i*t-C*p*t-v*U*S+G*p*S+C*U*r-G*i*r,l=q*a+lt*n+Dt*f+Zt*c;if(l===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const m=1/l;return F[0]=a*m,F[1]=(p*S*Zt-i*r*Zt-p*Dt*x+lt*r*x+i*Dt*e-lt*S*e)*m,F[2]=(U*r*Zt-p*t*Zt+p*Dt*g-lt*r*g-U*Dt*e+lt*t*e)*m,F[3]=(i*t*Zt-U*S*Zt-i*Dt*g+lt*S*g+U*Dt*x-lt*t*x)*m,F[4]=n*m,F[5]=(C*r*Zt-v*S*Zt+v*Dt*x-q*r*x-C*Dt*e+q*S*e)*m,F[6]=(v*t*Zt-G*r*Zt-v*Dt*g+q*r*g+G*Dt*e-q*t*e)*m,F[7]=(G*S*Zt-C*t*Zt+C*Dt*g-q*S*g-G*Dt*x+q*t*x)*m,F[8]=f*m,F[9]=(v*i*Zt-C*p*Zt-v*lt*x+q*p*x+C*lt*e-q*i*e)*m,F[10]=(G*p*Zt-v*U*Zt+v*lt*g-q*p*g-G*lt*e+q*U*e)*m,F[11]=(C*U*Zt-G*i*Zt-C*lt*g+q*i*g+G*lt*x-q*U*x)*m,F[12]=c*m,F[13]=(C*p*Dt-v*i*Dt+v*lt*S-q*p*S-C*lt*r+q*i*r)*m,F[14]=(v*U*Dt-G*p*Dt-v*lt*t+q*p*t+G*lt*r-q*U*r)*m,F[15]=(G*i*Dt-C*U*Dt+C*lt*t-q*i*t-G*lt*S+q*U*S)*m,this}scale(F){const q=this.elements,lt=F.x,Dt=F.y,Zt=F.z;return q[0]*=lt,q[4]*=Dt,q[8]*=Zt,q[1]*=lt,q[5]*=Dt,q[9]*=Zt,q[2]*=lt,q[6]*=Dt,q[10]*=Zt,q[3]*=lt,q[7]*=Dt,q[11]*=Zt,this}getMaxScaleOnAxis(){const F=this.elements,q=F[0]*F[0]+F[1]*F[1]+F[2]*F[2],lt=F[4]*F[4]+F[5]*F[5]+F[6]*F[6],Dt=F[8]*F[8]+F[9]*F[9]+F[10]*F[10];return Math.sqrt(Math.max(q,lt,Dt))}makeTranslation(F,q,lt){return F.isVector3?this.set(1,0,0,F.x,0,1,0,F.y,0,0,1,F.z,0,0,0,1):this.set(1,0,0,F,0,1,0,q,0,0,1,lt,0,0,0,1),this}makeRotationX(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(1,0,0,0,0,q,-lt,0,0,lt,q,0,0,0,0,1),this}makeRotationY(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(q,0,lt,0,0,1,0,0,-lt,0,q,0,0,0,0,1),this}makeRotationZ(F){const q=Math.cos(F),lt=Math.sin(F);return this.set(q,-lt,0,0,lt,q,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(F,q){const lt=Math.cos(q),Dt=Math.sin(q),Zt=1-lt,G=F.x,U=F.y,t=F.z,g=Zt*G,C=Zt*U;return this.set(g*G+lt,g*U-Dt*t,g*t+Dt*U,0,g*U+Dt*t,C*U+lt,C*t-Dt*G,0,g*t-Dt*U,C*t+Dt*G,Zt*t*t+lt,0,0,0,0,1),this}makeScale(F,q,lt){return this.set(F,0,0,0,0,q,0,0,0,0,lt,0,0,0,0,1),this}makeShear(F,q,lt,Dt,Zt,G){return this.set(1,lt,Zt,0,F,1,G,0,q,Dt,1,0,0,0,0,1),this}compose(F,q,lt){const Dt=this.elements,Zt=q._x,G=q._y,U=q._z,t=q._w,g=Zt+Zt,C=G+G,i=U+U,S=Zt*g,x=Zt*C,v=Zt*i,p=G*C,r=G*i,e=U*i,a=t*g,n=t*C,f=t*i,c=lt.x,l=lt.y,m=lt.z;return Dt[0]=(1-(p+e))*c,Dt[1]=(x+f)*c,Dt[2]=(v-n)*c,Dt[3]=0,Dt[4]=(x-f)*l,Dt[5]=(1-(S+e))*l,Dt[6]=(r+a)*l,Dt[7]=0,Dt[8]=(v+n)*m,Dt[9]=(r-a)*m,Dt[10]=(1-(S+p))*m,Dt[11]=0,Dt[12]=F.x,Dt[13]=F.y,Dt[14]=F.z,Dt[15]=1,this}decompose(F,q,lt){const Dt=this.elements;let Zt=Nh.set(Dt[0],Dt[1],Dt[2]).length();const G=Nh.set(Dt[4],Dt[5],Dt[6]).length(),U=Nh.set(Dt[8],Dt[9],Dt[10]).length();this.determinant()<0&&(Zt=-Zt),F.x=Dt[12],F.y=Dt[13],F.z=Dt[14],su.copy(this);const g=1/Zt,C=1/G,i=1/U;return su.elements[0]*=g,su.elements[1]*=g,su.elements[2]*=g,su.elements[4]*=C,su.elements[5]*=C,su.elements[6]*=C,su.elements[8]*=i,su.elements[9]*=i,su.elements[10]*=i,q.setFromRotationMatrix(su),lt.x=Zt,lt.y=G,lt.z=U,this}makePerspective(F,q,lt,Dt,Zt,G,U=xf){const t=this.elements,g=2*Zt/(q-F),C=2*Zt/(lt-Dt),i=(q+F)/(q-F),S=(lt+Dt)/(lt-Dt);let x,v;if(U===xf)x=-(G+Zt)/(G-Zt),v=-2*G*Zt/(G-Zt);else if(U===fp)x=-G/(G-Zt),v=-G*Zt/(G-Zt);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+U);return t[0]=g,t[4]=0,t[8]=i,t[12]=0,t[1]=0,t[5]=C,t[9]=S,t[13]=0,t[2]=0,t[6]=0,t[10]=x,t[14]=v,t[3]=0,t[7]=0,t[11]=-1,t[15]=0,this}makeOrthographic(F,q,lt,Dt,Zt,G,U=xf){const t=this.elements,g=1/(q-F),C=1/(lt-Dt),i=1/(G-Zt),S=(q+F)*g,x=(lt+Dt)*C;let v,p;if(U===xf)v=(G+Zt)*i,p=-2*i;else if(U===fp)v=Zt*i,p=-1*i;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+U);return t[0]=2*g,t[4]=0,t[8]=0,t[12]=-S,t[1]=0,t[5]=2*C,t[9]=0,t[13]=-x,t[2]=0,t[6]=0,t[10]=p,t[14]=-v,t[3]=0,t[7]=0,t[11]=0,t[15]=1,this}equals(F){const q=this.elements,lt=F.elements;for(let Dt=0;Dt<16;Dt++)if(q[Dt]!==lt[Dt])return!1;return!0}fromArray(F,q=0){for(let lt=0;lt<16;lt++)this.elements[lt]=F[lt+q];return this}toArray(F=[],q=0){const lt=this.elements;return F[q]=lt[0],F[q+1]=lt[1],F[q+2]=lt[2],F[q+3]=lt[3],F[q+4]=lt[4],F[q+5]=lt[5],F[q+6]=lt[6],F[q+7]=lt[7],F[q+8]=lt[8],F[q+9]=lt[9],F[q+10]=lt[10],F[q+11]=lt[11],F[q+12]=lt[12],F[q+13]=lt[13],F[q+14]=lt[14],F[q+15]=lt[15],F}}const Nh=new bn,su=new so,l2=new bn(0,0,0),u2=new bn(1,1,1),sc=new bn,kd=new bn,al=new bn,Um=new so,Hm=new ku;class Ss{constructor(F=0,q=0,lt=0,Dt=Ss.DEFAULT_ORDER){this.isEuler=!0,this._x=F,this._y=q,this._z=lt,this._order=Dt}get x(){return this._x}set x(F){this._x=F,this._onChangeCallback()}get y(){return this._y}set y(F){this._y=F,this._onChangeCallback()}get z(){return this._z}set z(F){this._z=F,this._onChangeCallback()}get order(){return this._order}set order(F){this._order=F,this._onChangeCallback()}set(F,q,lt,Dt=this._order){return this._x=F,this._y=q,this._z=lt,this._order=Dt,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(F){return this._x=F._x,this._y=F._y,this._z=F._z,this._order=F._order,this._onChangeCallback(),this}setFromRotationMatrix(F,q=this._order,lt=!0){const Dt=F.elements,Zt=Dt[0],G=Dt[4],U=Dt[8],t=Dt[1],g=Dt[5],C=Dt[9],i=Dt[2],S=Dt[6],x=Dt[10];switch(q){case"XYZ":this._y=Math.asin(hs(U,-1,1)),Math.abs(U)<.9999999?(this._x=Math.atan2(-C,x),this._z=Math.atan2(-G,Zt)):(this._x=Math.atan2(S,g),this._z=0);break;case"YXZ":this._x=Math.asin(-hs(C,-1,1)),Math.abs(C)<.9999999?(this._y=Math.atan2(U,x),this._z=Math.atan2(t,g)):(this._y=Math.atan2(-i,Zt),this._z=0);break;case"ZXY":this._x=Math.asin(hs(S,-1,1)),Math.abs(S)<.9999999?(this._y=Math.atan2(-i,x),this._z=Math.atan2(-G,g)):(this._y=0,this._z=Math.atan2(t,Zt));break;case"ZYX":this._y=Math.asin(-hs(i,-1,1)),Math.abs(i)<.9999999?(this._x=Math.atan2(S,x),this._z=Math.atan2(t,Zt)):(this._x=0,this._z=Math.atan2(-G,g));break;case"YZX":this._z=Math.asin(hs(t,-1,1)),Math.abs(t)<.9999999?(this._x=Math.atan2(-C,g),this._y=Math.atan2(-i,Zt)):(this._x=0,this._y=Math.atan2(U,x));break;case"XZY":this._z=Math.asin(-hs(G,-1,1)),Math.abs(G)<.9999999?(this._x=Math.atan2(S,g),this._y=Math.atan2(U,Zt)):(this._x=Math.atan2(-C,x),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+q)}return this._order=q,lt===!0&&this._onChangeCallback(),this}setFromQuaternion(F,q,lt){return Um.makeRotationFromQuaternion(F),this.setFromRotationMatrix(Um,q,lt)}setFromVector3(F,q=this._order){return this.set(F.x,F.y,F.z,q)}reorder(F){return Hm.setFromEuler(this),this.setFromQuaternion(Hm,F)}equals(F){return F._x===this._x&&F._y===this._y&&F._z===this._z&&F._order===this._order}fromArray(F){return this._x=F[0],this._y=F[1],this._z=F[2],F[3]!==void 0&&(this._order=F[3]),this._onChangeCallback(),this}toArray(F=[],q=0){return F[q]=this._x,F[q+1]=this._y,F[q+2]=this._z,F[q+3]=this._order,F}_onChange(F){return this._onChangeCallback=F,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Ss.DEFAULT_ORDER="XYZ";class Z0{constructor(){this.mask=1}set(F){this.mask=(1<>>0}enable(F){this.mask|=1<1){for(let q=0;q1){for(let lt=0;lt0&&(Dt.userData=this.userData),Dt.layers=this.layers.mask,Dt.matrix=this.matrix.toArray(),Dt.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(Dt.matrixAutoUpdate=!1),this.isInstancedMesh&&(Dt.type="InstancedMesh",Dt.count=this.count,Dt.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(Dt.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(Dt.type="BatchedMesh",Dt.perObjectFrustumCulled=this.perObjectFrustumCulled,Dt.sortObjects=this.sortObjects,Dt.drawRanges=this._drawRanges,Dt.reservedRanges=this._reservedRanges,Dt.visibility=this._visibility,Dt.active=this._active,Dt.bounds=this._bounds.map(U=>({boxInitialized:U.boxInitialized,boxMin:U.box.min.toArray(),boxMax:U.box.max.toArray(),sphereInitialized:U.sphereInitialized,sphereRadius:U.sphere.radius,sphereCenter:U.sphere.center.toArray()})),Dt.maxGeometryCount=this._maxGeometryCount,Dt.maxVertexCount=this._maxVertexCount,Dt.maxIndexCount=this._maxIndexCount,Dt.geometryInitialized=this._geometryInitialized,Dt.geometryCount=this._geometryCount,Dt.matricesTexture=this._matricesTexture.toJSON(F),this.boundingSphere!==null&&(Dt.boundingSphere={center:Dt.boundingSphere.center.toArray(),radius:Dt.boundingSphere.radius}),this.boundingBox!==null&&(Dt.boundingBox={min:Dt.boundingBox.min.toArray(),max:Dt.boundingBox.max.toArray()}));function Zt(U,t){return U[t.uuid]===void 0&&(U[t.uuid]=t.toJSON(F)),t.uuid}if(this.isScene)this.background&&(this.background.isColor?Dt.background=this.background.toJSON():this.background.isTexture&&(Dt.background=this.background.toJSON(F).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(Dt.environment=this.environment.toJSON(F).uuid);else if(this.isMesh||this.isLine||this.isPoints){Dt.geometry=Zt(F.geometries,this.geometry);const U=this.geometry.parameters;if(U!==void 0&&U.shapes!==void 0){const t=U.shapes;if(Array.isArray(t))for(let g=0,C=t.length;g0){Dt.children=[];for(let U=0;U0){Dt.animations=[];for(let U=0;U0&&(lt.geometries=U),t.length>0&&(lt.materials=t),g.length>0&&(lt.textures=g),C.length>0&&(lt.images=C),i.length>0&&(lt.shapes=i),S.length>0&&(lt.skeletons=S),x.length>0&&(lt.animations=x),v.length>0&&(lt.nodes=v)}return lt.object=Dt,lt;function G(U){const t=[];for(const g in U){const C=U[g];delete C.metadata,t.push(C)}return t}}clone(F){return new this.constructor().copy(this,F)}copy(F,q=!0){if(this.name=F.name,this.up.copy(F.up),this.position.copy(F.position),this.rotation.order=F.rotation.order,this.quaternion.copy(F.quaternion),this.scale.copy(F.scale),this.matrix.copy(F.matrix),this.matrixWorld.copy(F.matrixWorld),this.matrixAutoUpdate=F.matrixAutoUpdate,this.matrixWorldAutoUpdate=F.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=F.matrixWorldNeedsUpdate,this.layers.mask=F.layers.mask,this.visible=F.visible,this.castShadow=F.castShadow,this.receiveShadow=F.receiveShadow,this.frustumCulled=F.frustumCulled,this.renderOrder=F.renderOrder,this.animations=F.animations.slice(),this.userData=JSON.parse(JSON.stringify(F.userData)),q===!0)for(let lt=0;lt0?Dt.multiplyScalar(1/Math.sqrt(Zt)):Dt.set(0,0,0)}static getBarycoord(F,q,lt,Dt,Zt){lu.subVectors(Dt,q),pf.subVectors(lt,q),d0.subVectors(F,q);const G=lu.dot(lu),U=lu.dot(pf),t=lu.dot(d0),g=pf.dot(pf),C=pf.dot(d0),i=G*g-U*U;if(i===0)return Zt.set(0,0,0),null;const S=1/i,x=(g*t-U*C)*S,v=(G*C-U*t)*S;return Zt.set(1-x-v,v,x)}static containsPoint(F,q,lt,Dt){return this.getBarycoord(F,q,lt,Dt,gf)===null?!1:gf.x>=0&&gf.y>=0&&gf.x+gf.y<=1}static getInterpolation(F,q,lt,Dt,Zt,G,U,t){return this.getBarycoord(F,q,lt,Dt,gf)===null?(t.x=0,t.y=0,"z"in t&&(t.z=0),"w"in t&&(t.w=0),null):(t.setScalar(0),t.addScaledVector(Zt,gf.x),t.addScaledVector(G,gf.y),t.addScaledVector(U,gf.z),t)}static isFrontFacing(F,q,lt,Dt){return lu.subVectors(lt,q),pf.subVectors(F,q),lu.cross(pf).dot(Dt)<0}set(F,q,lt){return this.a.copy(F),this.b.copy(q),this.c.copy(lt),this}setFromPointsAndIndices(F,q,lt,Dt){return this.a.copy(F[q]),this.b.copy(F[lt]),this.c.copy(F[Dt]),this}setFromAttributeAndIndices(F,q,lt,Dt){return this.a.fromBufferAttribute(F,q),this.b.fromBufferAttribute(F,lt),this.c.fromBufferAttribute(F,Dt),this}clone(){return new this.constructor().copy(this)}copy(F){return this.a.copy(F.a),this.b.copy(F.b),this.c.copy(F.c),this}getArea(){return lu.subVectors(this.c,this.b),pf.subVectors(this.a,this.b),lu.cross(pf).length()*.5}getMidpoint(F){return F.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(F){return hu.getNormal(this.a,this.b,this.c,F)}getPlane(F){return F.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(F,q){return hu.getBarycoord(F,this.a,this.b,this.c,q)}getInterpolation(F,q,lt,Dt,Zt){return hu.getInterpolation(F,this.a,this.b,this.c,q,lt,Dt,Zt)}containsPoint(F){return hu.containsPoint(F,this.a,this.b,this.c)}isFrontFacing(F){return hu.isFrontFacing(this.a,this.b,this.c,F)}intersectsBox(F){return F.intersectsTriangle(this)}closestPointToPoint(F,q){const lt=this.a,Dt=this.b,Zt=this.c;let G,U;Hh.subVectors(Dt,lt),Vh.subVectors(Zt,lt),p0.subVectors(F,lt);const t=Hh.dot(p0),g=Vh.dot(p0);if(t<=0&&g<=0)return q.copy(lt);g0.subVectors(F,Dt);const C=Hh.dot(g0),i=Vh.dot(g0);if(C>=0&&i<=C)return q.copy(Dt);const S=t*i-C*g;if(S<=0&&t>=0&&C<=0)return G=t/(t-C),q.copy(lt).addScaledVector(Hh,G);m0.subVectors(F,Zt);const x=Hh.dot(m0),v=Vh.dot(m0);if(v>=0&&x<=v)return q.copy(Zt);const p=x*g-t*v;if(p<=0&&g>=0&&v<=0)return U=g/(g-v),q.copy(lt).addScaledVector(Vh,U);const r=C*v-x*i;if(r<=0&&i-C>=0&&x-v>=0)return Zm.subVectors(Zt,Dt),U=(i-C)/(i-C+(x-v)),q.copy(Dt).addScaledVector(Zm,U);const e=1/(r+p+S);return G=p*e,U=S*e,q.copy(lt).addScaledVector(Hh,G).addScaledVector(Vh,U)}equals(F){return F.a.equals(this.a)&&F.b.equals(this.b)&&F.c.equals(this.c)}}const i1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},lc={h:0,s:0,l:0},Nd={h:0,s:0,l:0};function y0(_t,F,q){return q<0&&(q+=1),q>1&&(q-=1),q<1/6?_t+(F-_t)*6*q:q<1/2?F:q<2/3?_t+(F-_t)*6*(2/3-q):_t}class ha{constructor(F,q,lt){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(F,q,lt)}set(F,q,lt){if(q===void 0&<===void 0){const Dt=F;Dt&&Dt.isColor?this.copy(Dt):typeof Dt=="number"?this.setHex(Dt):typeof Dt=="string"&&this.setStyle(Dt)}else this.setRGB(F,q,lt);return this}setScalar(F){return this.r=F,this.g=F,this.b=F,this}setHex(F,q=Iu){return F=Math.floor(F),this.r=(F>>16&255)/255,this.g=(F>>8&255)/255,this.b=(F&255)/255,Fa.toWorkingColorSpace(this,q),this}setRGB(F,q,lt,Dt=Fa.workingColorSpace){return this.r=F,this.g=q,this.b=lt,Fa.toWorkingColorSpace(this,Dt),this}setHSL(F,q,lt,Dt=Fa.workingColorSpace){if(F=X0(F,1),q=hs(q,0,1),lt=hs(lt,0,1),q===0)this.r=this.g=this.b=lt;else{const Zt=lt<=.5?lt*(1+q):lt+q-lt*q,G=2*lt-Zt;this.r=y0(G,Zt,F+1/3),this.g=y0(G,Zt,F),this.b=y0(G,Zt,F-1/3)}return Fa.toWorkingColorSpace(this,Dt),this}setStyle(F,q=Iu){function lt(Zt){Zt!==void 0&&parseFloat(Zt)<1&&console.warn("THREE.Color: Alpha component of "+F+" will be ignored.")}let Dt;if(Dt=/^(\w+)\(([^\)]*)\)/.exec(F)){let Zt;const G=Dt[1],U=Dt[2];switch(G){case"rgb":case"rgba":if(Zt=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return lt(Zt[4]),this.setRGB(Math.min(255,parseInt(Zt[1],10))/255,Math.min(255,parseInt(Zt[2],10))/255,Math.min(255,parseInt(Zt[3],10))/255,q);if(Zt=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return lt(Zt[4]),this.setRGB(Math.min(100,parseInt(Zt[1],10))/100,Math.min(100,parseInt(Zt[2],10))/100,Math.min(100,parseInt(Zt[3],10))/100,q);break;case"hsl":case"hsla":if(Zt=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(U))return lt(Zt[4]),this.setHSL(parseFloat(Zt[1])/360,parseFloat(Zt[2])/100,parseFloat(Zt[3])/100,q);break;default:console.warn("THREE.Color: Unknown color model "+F)}}else if(Dt=/^\#([A-Fa-f\d]+)$/.exec(F)){const Zt=Dt[1],G=Zt.length;if(G===3)return this.setRGB(parseInt(Zt.charAt(0),16)/15,parseInt(Zt.charAt(1),16)/15,parseInt(Zt.charAt(2),16)/15,q);if(G===6)return this.setHex(parseInt(Zt,16),q);console.warn("THREE.Color: Invalid hex color "+F)}else if(F&&F.length>0)return this.setColorName(F,q);return this}setColorName(F,q=Iu){const lt=i1[F.toLowerCase()];return lt!==void 0?this.setHex(lt,q):console.warn("THREE.Color: Unknown color "+F),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(F){return this.r=F.r,this.g=F.g,this.b=F.b,this}copySRGBToLinear(F){return this.r=av(F.r),this.g=av(F.g),this.b=av(F.b),this}copyLinearToSRGB(F){return this.r=a0(F.r),this.g=a0(F.g),this.b=a0(F.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(F=Iu){return Fa.fromWorkingColorSpace(cs.copy(this),F),Math.round(hs(cs.r*255,0,255))*65536+Math.round(hs(cs.g*255,0,255))*256+Math.round(hs(cs.b*255,0,255))}getHexString(F=Iu){return("000000"+this.getHex(F).toString(16)).slice(-6)}getHSL(F,q=Fa.workingColorSpace){Fa.fromWorkingColorSpace(cs.copy(this),q);const lt=cs.r,Dt=cs.g,Zt=cs.b,G=Math.max(lt,Dt,Zt),U=Math.min(lt,Dt,Zt);let t,g;const C=(U+G)/2;if(U===G)t=0,g=0;else{const i=G-U;switch(g=C<=.5?i/(G+U):i/(2-G-U),G){case lt:t=(Dt-Zt)/i+(Dt0!=F>0&&this.version++,this._alphaTest=F}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(F){if(F!==void 0)for(const q in F){const lt=F[q];if(lt===void 0){console.warn(`THREE.Material: parameter '${q}' has value of undefined.`);continue}const Dt=this[q];if(Dt===void 0){console.warn(`THREE.Material: '${q}' is not a property of THREE.${this.type}.`);continue}Dt&&Dt.isColor?Dt.set(lt):Dt&&Dt.isVector3&<&<.isVector3?Dt.copy(lt):this[q]=lt}}toJSON(F){const q=F===void 0||typeof F=="string";q&&(F={textures:{},images:{}});const lt={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};lt.uuid=this.uuid,lt.type=this.type,this.name!==""&&(lt.name=this.name),this.color&&this.color.isColor&&(lt.color=this.color.getHex()),this.roughness!==void 0&&(lt.roughness=this.roughness),this.metalness!==void 0&&(lt.metalness=this.metalness),this.sheen!==void 0&&(lt.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(lt.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(lt.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(lt.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(lt.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(lt.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(lt.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(lt.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(lt.shininess=this.shininess),this.clearcoat!==void 0&&(lt.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(lt.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(lt.clearcoatMap=this.clearcoatMap.toJSON(F).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(lt.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(F).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(lt.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(F).uuid,lt.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(lt.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(lt.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(lt.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(lt.iridescenceMap=this.iridescenceMap.toJSON(F).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(lt.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(F).uuid),this.anisotropy!==void 0&&(lt.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(lt.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(lt.anisotropyMap=this.anisotropyMap.toJSON(F).uuid),this.map&&this.map.isTexture&&(lt.map=this.map.toJSON(F).uuid),this.matcap&&this.matcap.isTexture&&(lt.matcap=this.matcap.toJSON(F).uuid),this.alphaMap&&this.alphaMap.isTexture&&(lt.alphaMap=this.alphaMap.toJSON(F).uuid),this.lightMap&&this.lightMap.isTexture&&(lt.lightMap=this.lightMap.toJSON(F).uuid,lt.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(lt.aoMap=this.aoMap.toJSON(F).uuid,lt.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(lt.bumpMap=this.bumpMap.toJSON(F).uuid,lt.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(lt.normalMap=this.normalMap.toJSON(F).uuid,lt.normalMapType=this.normalMapType,lt.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(lt.displacementMap=this.displacementMap.toJSON(F).uuid,lt.displacementScale=this.displacementScale,lt.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(lt.roughnessMap=this.roughnessMap.toJSON(F).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(lt.metalnessMap=this.metalnessMap.toJSON(F).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(lt.emissiveMap=this.emissiveMap.toJSON(F).uuid),this.specularMap&&this.specularMap.isTexture&&(lt.specularMap=this.specularMap.toJSON(F).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(lt.specularIntensityMap=this.specularIntensityMap.toJSON(F).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(lt.specularColorMap=this.specularColorMap.toJSON(F).uuid),this.envMap&&this.envMap.isTexture&&(lt.envMap=this.envMap.toJSON(F).uuid,this.combine!==void 0&&(lt.combine=this.combine)),this.envMapRotation!==void 0&&(lt.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(lt.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(lt.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(lt.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(lt.gradientMap=this.gradientMap.toJSON(F).uuid),this.transmission!==void 0&&(lt.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(lt.transmissionMap=this.transmissionMap.toJSON(F).uuid),this.thickness!==void 0&&(lt.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(lt.thicknessMap=this.thicknessMap.toJSON(F).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(lt.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(lt.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(lt.size=this.size),this.shadowSide!==null&&(lt.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(lt.sizeAttenuation=this.sizeAttenuation),this.blending!==nv&&(lt.blending=this.blending),this.side!==Nu&&(lt.side=this.side),this.vertexColors===!0&&(lt.vertexColors=!0),this.opacity<1&&(lt.opacity=this.opacity),this.transparent===!0&&(lt.transparent=!0),this.blendSrc!==I0&&(lt.blendSrc=this.blendSrc),this.blendDst!==F0&&(lt.blendDst=this.blendDst),this.blendEquation!==$c&&(lt.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(lt.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(lt.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(lt.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(lt.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(lt.blendAlpha=this.blendAlpha),this.depthFunc!==ap&&(lt.depthFunc=this.depthFunc),this.depthTest===!1&&(lt.depthTest=this.depthTest),this.depthWrite===!1&&(lt.depthWrite=this.depthWrite),this.colorWrite===!1&&(lt.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(lt.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Im&&(lt.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(lt.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(lt.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ih&&(lt.stencilFail=this.stencilFail),this.stencilZFail!==Ih&&(lt.stencilZFail=this.stencilZFail),this.stencilZPass!==Ih&&(lt.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(lt.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(lt.rotation=this.rotation),this.polygonOffset===!0&&(lt.polygonOffset=!0),this.polygonOffsetFactor!==0&&(lt.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(lt.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(lt.linewidth=this.linewidth),this.dashSize!==void 0&&(lt.dashSize=this.dashSize),this.gapSize!==void 0&&(lt.gapSize=this.gapSize),this.scale!==void 0&&(lt.scale=this.scale),this.dithering===!0&&(lt.dithering=!0),this.alphaTest>0&&(lt.alphaTest=this.alphaTest),this.alphaHash===!0&&(lt.alphaHash=!0),this.alphaToCoverage===!0&&(lt.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(lt.premultipliedAlpha=!0),this.forceSinglePass===!0&&(lt.forceSinglePass=!0),this.wireframe===!0&&(lt.wireframe=!0),this.wireframeLinewidth>1&&(lt.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(lt.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(lt.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(lt.flatShading=!0),this.visible===!1&&(lt.visible=!1),this.toneMapped===!1&&(lt.toneMapped=!1),this.fog===!1&&(lt.fog=!1),Object.keys(this.userData).length>0&&(lt.userData=this.userData);function Dt(Zt){const G=[];for(const U in Zt){const t=Zt[U];delete t.metadata,G.push(t)}return G}if(q){const Zt=Dt(F.textures),G=Dt(F.images);Zt.length>0&&(lt.textures=Zt),G.length>0&&(lt.images=G)}return lt}clone(){return new this.constructor().copy(this)}copy(F){this.name=F.name,this.blending=F.blending,this.side=F.side,this.vertexColors=F.vertexColors,this.opacity=F.opacity,this.transparent=F.transparent,this.blendSrc=F.blendSrc,this.blendDst=F.blendDst,this.blendEquation=F.blendEquation,this.blendSrcAlpha=F.blendSrcAlpha,this.blendDstAlpha=F.blendDstAlpha,this.blendEquationAlpha=F.blendEquationAlpha,this.blendColor.copy(F.blendColor),this.blendAlpha=F.blendAlpha,this.depthFunc=F.depthFunc,this.depthTest=F.depthTest,this.depthWrite=F.depthWrite,this.stencilWriteMask=F.stencilWriteMask,this.stencilFunc=F.stencilFunc,this.stencilRef=F.stencilRef,this.stencilFuncMask=F.stencilFuncMask,this.stencilFail=F.stencilFail,this.stencilZFail=F.stencilZFail,this.stencilZPass=F.stencilZPass,this.stencilWrite=F.stencilWrite;const q=F.clippingPlanes;let lt=null;if(q!==null){const Dt=q.length;lt=new Array(Dt);for(let Zt=0;Zt!==Dt;++Zt)lt[Zt]=q[Zt].clone()}return this.clippingPlanes=lt,this.clipIntersection=F.clipIntersection,this.clipShadows=F.clipShadows,this.shadowSide=F.shadowSide,this.colorWrite=F.colorWrite,this.precision=F.precision,this.polygonOffset=F.polygonOffset,this.polygonOffsetFactor=F.polygonOffsetFactor,this.polygonOffsetUnits=F.polygonOffsetUnits,this.dithering=F.dithering,this.alphaTest=F.alphaTest,this.alphaHash=F.alphaHash,this.alphaToCoverage=F.alphaToCoverage,this.premultipliedAlpha=F.premultipliedAlpha,this.forceSinglePass=F.forceSinglePass,this.visible=F.visible,this.toneMapped=F.toneMapped,this.userData=JSON.parse(JSON.stringify(F.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(F){F===!0&&this.version++}}class td extends ih{constructor(F){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ha(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Ss,this.combine=Gy,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(F)}copy(F){return super.copy(F),this.color.copy(F.color),this.map=F.map,this.lightMap=F.lightMap,this.lightMapIntensity=F.lightMapIntensity,this.aoMap=F.aoMap,this.aoMapIntensity=F.aoMapIntensity,this.specularMap=F.specularMap,this.alphaMap=F.alphaMap,this.envMap=F.envMap,this.envMapRotation.copy(F.envMapRotation),this.combine=F.combine,this.reflectivity=F.reflectivity,this.refractionRatio=F.refractionRatio,this.wireframe=F.wireframe,this.wireframeLinewidth=F.wireframeLinewidth,this.wireframeLinecap=F.wireframeLinecap,this.wireframeLinejoin=F.wireframeLinejoin,this.fog=F.fog,this}}const So=new bn,Bd=new Wi;class Ws{constructor(F,q,lt=!1){if(Array.isArray(F))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=F,this.itemSize=q,this.count=F!==void 0?F.length/q:0,this.normalized=lt,this.usage=B0,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=hc,this.version=0}onUploadCallback(){}set needsUpdate(F){F===!0&&this.version++}get updateRange(){return e1("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(F){return this.usage=F,this}addUpdateRange(F,q){this.updateRanges.push({start:F,count:q})}clearUpdateRanges(){this.updateRanges.length=0}copy(F){return this.name=F.name,this.array=new F.array.constructor(F.array),this.itemSize=F.itemSize,this.count=F.count,this.normalized=F.normalized,this.usage=F.usage,this.gpuType=F.gpuType,this}copyAt(F,q,lt){F*=this.itemSize,lt*=q.itemSize;for(let Dt=0,Zt=this.itemSize;Dt0&&(F.userData=this.userData),this.parameters!==void 0){const t=this.parameters;for(const g in t)t[g]!==void 0&&(F[g]=t[g]);return F}F.data={attributes:{}};const q=this.index;q!==null&&(F.data.index={type:q.array.constructor.name,array:Array.prototype.slice.call(q.array)});const lt=this.attributes;for(const t in lt){const g=lt[t];F.data.attributes[t]=g.toJSON(F.data)}const Dt={};let Zt=!1;for(const t in this.morphAttributes){const g=this.morphAttributes[t],C=[];for(let i=0,S=g.length;i0&&(Dt[t]=C,Zt=!0)}Zt&&(F.data.morphAttributes=Dt,F.data.morphTargetsRelative=this.morphTargetsRelative);const G=this.groups;G.length>0&&(F.data.groups=JSON.parse(JSON.stringify(G)));const U=this.boundingSphere;return U!==null&&(F.data.boundingSphere={center:U.center.toArray(),radius:U.radius}),F}clone(){return new this.constructor().copy(this)}copy(F){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const q={};this.name=F.name;const lt=F.index;lt!==null&&this.setIndex(lt.clone(q));const Dt=F.attributes;for(const g in Dt){const C=Dt[g];this.setAttribute(g,C.clone(q))}const Zt=F.morphAttributes;for(const g in Zt){const C=[],i=Zt[g];for(let S=0,x=i.length;S0){const Dt=q[lt[0]];if(Dt!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Zt=0,G=Dt.length;Zt(F.far-F.near)**2))&&(jm.copy(Zt).invert(),Zc.copy(F.ray).applyMatrix4(jm),!(lt.boundingBox!==null&&Zc.intersectsBox(lt.boundingBox)===!1)&&this._computeIntersections(F,q,Zc)))}_computeIntersections(F,q,lt){let Dt;const Zt=this.geometry,G=this.material,U=Zt.index,t=Zt.attributes.position,g=Zt.attributes.uv,C=Zt.attributes.uv1,i=Zt.attributes.normal,S=Zt.groups,x=Zt.drawRange;if(U!==null)if(Array.isArray(G))for(let v=0,p=S.length;vq.far?null:{distance:g,point:Xd.clone(),object:_t}}function Zd(_t,F,q,lt,Dt,Zt,G,U,t,g){_t.getVertexPosition(U,Wh),_t.getVertexPosition(t,Yh),_t.getVertexPosition(g,Xh);const C=g2(_t,F,q,lt,Wh,Yh,Xh,Yd);if(C){Dt&&(Vd.fromBufferAttribute(Dt,U),Gd.fromBufferAttribute(Dt,t),Wd.fromBufferAttribute(Dt,g),C.uv=hu.getInterpolation(Yd,Wh,Yh,Xh,Vd,Gd,Wd,new Wi)),Zt&&(Vd.fromBufferAttribute(Zt,U),Gd.fromBufferAttribute(Zt,t),Wd.fromBufferAttribute(Zt,g),C.uv1=hu.getInterpolation(Yd,Wh,Yh,Xh,Vd,Gd,Wd,new Wi)),G&&(Jm.fromBufferAttribute(G,U),Qm.fromBufferAttribute(G,t),$m.fromBufferAttribute(G,g),C.normal=hu.getInterpolation(Yd,Wh,Yh,Xh,Jm,Qm,$m,new bn),C.normal.dot(lt.direction)>0&&C.normal.multiplyScalar(-1));const i={a:U,b:t,c:g,normal:new bn,materialIndex:0};hu.getNormal(Wh,Yh,Xh,i.normal),C.face=i}return C}class hv extends Ys{constructor(F=1,q=1,lt=1,Dt=1,Zt=1,G=1){super(),this.type="BoxGeometry",this.parameters={width:F,height:q,depth:lt,widthSegments:Dt,heightSegments:Zt,depthSegments:G};const U=this;Dt=Math.floor(Dt),Zt=Math.floor(Zt),G=Math.floor(G);const t=[],g=[],C=[],i=[];let S=0,x=0;v("z","y","x",-1,-1,lt,q,F,G,Zt,0),v("z","y","x",1,-1,lt,q,-F,G,Zt,1),v("x","z","y",1,1,F,lt,q,Dt,G,2),v("x","z","y",1,-1,F,lt,-q,Dt,G,3),v("x","y","z",1,-1,F,q,lt,Dt,Zt,4),v("x","y","z",-1,-1,F,q,-lt,Dt,Zt,5),this.setIndex(t),this.setAttribute("position",new _s(g,3)),this.setAttribute("normal",new _s(C,3)),this.setAttribute("uv",new _s(i,2));function v(p,r,e,a,n,f,c,l,m,h,b){const u=f/m,o=c/h,d=f/2,w=c/2,A=l/2,_=m+1,y=h+1;let E=0,T=0;const s=new bn;for(let L=0;L0?1:-1,C.push(s.x,s.y,s.z),i.push(z/m),i.push(1-L/h),E+=1}}for(let L=0;L0&&(q.defines=this.defines),q.vertexShader=this.vertexShader,q.fragmentShader=this.fragmentShader,q.lights=this.lights,q.clipping=this.clipping;const le={};for(const De in this.extensions)this.extensions[De]===!0&&(le[De]=!0);return Object.keys(le).length>0&&(q.extensions=le),q}}class o1 extends Bo{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new so,this.projectionMatrix=new so,this.projectionMatrixInverse=new so,this.coordinateSystem=yf}copy(F,q){return super.copy(F,q),this.matrixWorldInverse.copy(F.matrixWorldInverse),this.projectionMatrix.copy(F.projectionMatrix),this.projectionMatrixInverse.copy(F.projectionMatrixInverse),this.coordinateSystem=F.coordinateSystem,this}getWorldDirection(F){return super.getWorldDirection(F).negate()}updateMatrixWorld(F){super.updateMatrixWorld(F),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(F,q){super.updateWorldMatrix(F,q),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const lc=new bn,$m=new Wi,qm=new Wi;class uu extends o1{constructor(F=50,q=1,le=.1,De=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=F,this.zoom=1,this.near=le,this.far=De,this.focus=10,this.aspect=q,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(F,q){return super.copy(F,q),this.fov=F.fov,this.zoom=F.zoom,this.near=F.near,this.far=F.far,this.focus=F.focus,this.aspect=F.aspect,this.view=F.view===null?null:Object.assign({},F.view),this.filmGauge=F.filmGauge,this.filmOffset=F.filmOffset,this}setFocalLength(F){const q=.5*this.getFilmHeight()/F;this.fov=Zv*2*Math.atan(q),this.updateProjectionMatrix()}getFocalLength(){const F=Math.tan(Wv*.5*this.fov);return .5*this.getFilmHeight()/F}getEffectiveFOV(){return Zv*2*Math.atan(Math.tan(Wv*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(F,q,le){lc.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),q.set(lc.x,lc.y).multiplyScalar(-F/lc.z),lc.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),le.set(lc.x,lc.y).multiplyScalar(-F/lc.z)}getViewSize(F,q){return this.getViewBounds(F,$m,qm),q.subVectors(qm,$m)}setViewOffset(F,q,le,De,Xe,H){this.aspect=F/q,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=F,this.view.fullHeight=q,this.view.offsetX=le,this.view.offsetY=De,this.view.width=Xe,this.view.height=H,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const F=this.near;let q=F*Math.tan(Wv*.5*this.fov)/this.zoom,le=2*q,De=this.aspect*le,Xe=-.5*De;const H=this.view;if(this.view!==null&&this.view.enabled){const e=H.fullWidth,g=H.fullHeight;Xe+=H.offsetX*De/e,q-=H.offsetY*le/g,De*=H.width/e,le*=H.height/g}const U=this.filmOffset;U!==0&&(Xe+=F*U/this.getFilmWidth()),this.projectionMatrix.makePerspective(Xe,Xe+De,q,q-le,F,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(F){const q=super.toJSON(F);return q.object.fov=this.fov,q.object.zoom=this.zoom,q.object.near=this.near,q.object.far=this.far,q.object.focus=this.focus,q.object.aspect=this.aspect,this.view!==null&&(q.object.view=Object.assign({},this.view)),q.object.filmGauge=this.filmGauge,q.object.filmOffset=this.filmOffset,q}}const jh=-90,Kh=1;class T2 extends Bo{constructor(F,q,le){super(),this.type="CubeCamera",this.renderTarget=le,this.coordinateSystem=null,this.activeMipmapLevel=0;const De=new uu(jh,Kh,F,q);De.layers=this.layers,this.add(De);const Xe=new uu(jh,Kh,F,q);Xe.layers=this.layers,this.add(Xe);const H=new uu(jh,Kh,F,q);H.layers=this.layers,this.add(H);const U=new uu(jh,Kh,F,q);U.layers=this.layers,this.add(U);const e=new uu(jh,Kh,F,q);e.layers=this.layers,this.add(e);const g=new uu(jh,Kh,F,q);g.layers=this.layers,this.add(g)}updateCoordinateSystem(){const F=this.coordinateSystem,q=this.children.concat(),[le,De,Xe,H,U,e]=q;for(const g of q)this.remove(g);if(F===yf)le.up.set(0,1,0),le.lookAt(1,0,0),De.up.set(0,1,0),De.lookAt(-1,0,0),Xe.up.set(0,0,-1),Xe.lookAt(0,1,0),H.up.set(0,0,1),H.lookAt(0,-1,0),U.up.set(0,1,0),U.lookAt(0,0,1),e.up.set(0,1,0),e.lookAt(0,0,-1);else if(F===up)le.up.set(0,-1,0),le.lookAt(-1,0,0),De.up.set(0,-1,0),De.lookAt(1,0,0),Xe.up.set(0,0,1),Xe.lookAt(0,1,0),H.up.set(0,0,-1),H.lookAt(0,-1,0),U.up.set(0,-1,0),U.lookAt(0,0,1),e.up.set(0,-1,0),e.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+F);for(const g of q)this.add(g),g.updateMatrixWorld()}update(F,q){this.parent===null&&this.updateMatrixWorld();const{renderTarget:le,activeMipmapLevel:De}=this;this.coordinateSystem!==F.coordinateSystem&&(this.coordinateSystem=F.coordinateSystem,this.updateCoordinateSystem());const[Xe,H,U,e,g,C]=this.children,i=F.getRenderTarget(),S=F.getActiveCubeFace(),x=F.getActiveMipmapLevel(),v=F.xr.enabled;F.xr.enabled=!1;const p=le.texture.generateMipmaps;le.texture.generateMipmaps=!1,F.setRenderTarget(le,0,De),F.render(q,Xe),F.setRenderTarget(le,1,De),F.render(q,H),F.setRenderTarget(le,2,De),F.render(q,U),F.setRenderTarget(le,3,De),F.render(q,e),F.setRenderTarget(le,4,De),F.render(q,g),le.texture.generateMipmaps=p,F.setRenderTarget(le,5,De),F.render(q,C),F.setRenderTarget(i,S,x),F.xr.enabled=v,le.texture.needsPMREMUpdate=!0}}class s1 extends Es{constructor(F,q,le,De,Xe,H,U,e,g,C){F=F!==void 0?F:[],q=q!==void 0?q:sv,super(F,q,le,De,Xe,H,U,e,g,C),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(F){this.image=F}}class A2 extends nh{constructor(F=1,q={}){super(F,F,q),this.isWebGLCubeRenderTarget=!0;const le={width:F,height:F,depth:1},De=[le,le,le,le,le,le];this.texture=new s1(De,q.mapping,q.wrapS,q.wrapT,q.magFilter,q.minFilter,q.format,q.type,q.anisotropy,q.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=q.generateMipmaps!==void 0?q.generateMipmaps:!1,this.texture.minFilter=q.minFilter!==void 0?q.minFilter:fu}fromEquirectangularTexture(F,q){this.texture.type=q.type,this.texture.colorSpace=q.colorSpace,this.texture.generateMipmaps=q.generateMipmaps,this.texture.minFilter=q.minFilter,this.texture.magFilter=q.magFilter;const le={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class gc extends ih{constructor(F){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=x2,this.fragmentShader=b2,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,F!==void 0&&this.setValues(F)}copy(F){return super.copy(F),this.fragmentShader=F.fragmentShader,this.vertexShader=F.vertexShader,this.uniforms=fv(F.uniforms),this.uniformsGroups=m2(F.uniformsGroups),this.defines=Object.assign({},F.defines),this.wireframe=F.wireframe,this.wireframeLinewidth=F.wireframeLinewidth,this.fog=F.fog,this.lights=F.lights,this.clipping=F.clipping,this.extensions=Object.assign({},F.extensions),this.glslVersion=F.glslVersion,this}toJSON(F){const q=super.toJSON(F);q.glslVersion=this.glslVersion,q.uniforms={};for(const Dt in this.uniforms){const G=this.uniforms[Dt].value;G&&G.isTexture?q.uniforms[Dt]={type:"t",value:G.toJSON(F).uuid}:G&&G.isColor?q.uniforms[Dt]={type:"c",value:G.getHex()}:G&&G.isVector2?q.uniforms[Dt]={type:"v2",value:G.toArray()}:G&&G.isVector3?q.uniforms[Dt]={type:"v3",value:G.toArray()}:G&&G.isVector4?q.uniforms[Dt]={type:"v4",value:G.toArray()}:G&&G.isMatrix3?q.uniforms[Dt]={type:"m3",value:G.toArray()}:G&&G.isMatrix4?q.uniforms[Dt]={type:"m4",value:G.toArray()}:q.uniforms[Dt]={value:G}}Object.keys(this.defines).length>0&&(q.defines=this.defines),q.vertexShader=this.vertexShader,q.fragmentShader=this.fragmentShader,q.lights=this.lights,q.clipping=this.clipping;const lt={};for(const Dt in this.extensions)this.extensions[Dt]===!0&&(lt[Dt]=!0);return Object.keys(lt).length>0&&(q.extensions=lt),q}}class l1 extends Bo{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new so,this.projectionMatrix=new so,this.projectionMatrixInverse=new so,this.coordinateSystem=xf}copy(F,q){return super.copy(F,q),this.matrixWorldInverse.copy(F.matrixWorldInverse),this.projectionMatrix.copy(F.projectionMatrix),this.projectionMatrixInverse.copy(F.projectionMatrixInverse),this.coordinateSystem=F.coordinateSystem,this}getWorldDirection(F){return super.getWorldDirection(F).negate()}updateMatrixWorld(F){super.updateMatrixWorld(F),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(F,q){super.updateWorldMatrix(F,q),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const uc=new bn,qm=new Wi,ty=new Wi;class uu extends l1{constructor(F=50,q=1,lt=.1,Dt=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=F,this.zoom=1,this.near=lt,this.far=Dt,this.focus=10,this.aspect=q,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(F,q){return super.copy(F,q),this.fov=F.fov,this.zoom=F.zoom,this.near=F.near,this.far=F.far,this.focus=F.focus,this.aspect=F.aspect,this.view=F.view===null?null:Object.assign({},F.view),this.filmGauge=F.filmGauge,this.filmOffset=F.filmOffset,this}setFocalLength(F){const q=.5*this.getFilmHeight()/F;this.fov=jv*2*Math.atan(q),this.updateProjectionMatrix()}getFocalLength(){const F=Math.tan(Yv*.5*this.fov);return .5*this.getFilmHeight()/F}getEffectiveFOV(){return jv*2*Math.atan(Math.tan(Yv*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(F,q,lt){uc.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),q.set(uc.x,uc.y).multiplyScalar(-F/uc.z),uc.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),lt.set(uc.x,uc.y).multiplyScalar(-F/uc.z)}getViewSize(F,q){return this.getViewBounds(F,qm,ty),q.subVectors(ty,qm)}setViewOffset(F,q,lt,Dt,Zt,G){this.aspect=F/q,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=F,this.view.fullHeight=q,this.view.offsetX=lt,this.view.offsetY=Dt,this.view.width=Zt,this.view.height=G,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const F=this.near;let q=F*Math.tan(Yv*.5*this.fov)/this.zoom,lt=2*q,Dt=this.aspect*lt,Zt=-.5*Dt;const G=this.view;if(this.view!==null&&this.view.enabled){const t=G.fullWidth,g=G.fullHeight;Zt+=G.offsetX*Dt/t,q-=G.offsetY*lt/g,Dt*=G.width/t,lt*=G.height/g}const U=this.filmOffset;U!==0&&(Zt+=F*U/this.getFilmWidth()),this.projectionMatrix.makePerspective(Zt,Zt+Dt,q,q-lt,F,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(F){const q=super.toJSON(F);return q.object.fov=this.fov,q.object.zoom=this.zoom,q.object.near=this.near,q.object.far=this.far,q.object.focus=this.focus,q.object.aspect=this.aspect,this.view!==null&&(q.object.view=Object.assign({},this.view)),q.object.filmGauge=this.filmGauge,q.object.filmOffset=this.filmOffset,q}}const Zh=-90,jh=1;class w2 extends Bo{constructor(F,q,lt){super(),this.type="CubeCamera",this.renderTarget=lt,this.coordinateSystem=null,this.activeMipmapLevel=0;const Dt=new uu(Zh,jh,F,q);Dt.layers=this.layers,this.add(Dt);const Zt=new uu(Zh,jh,F,q);Zt.layers=this.layers,this.add(Zt);const G=new uu(Zh,jh,F,q);G.layers=this.layers,this.add(G);const U=new uu(Zh,jh,F,q);U.layers=this.layers,this.add(U);const t=new uu(Zh,jh,F,q);t.layers=this.layers,this.add(t);const g=new uu(Zh,jh,F,q);g.layers=this.layers,this.add(g)}updateCoordinateSystem(){const F=this.coordinateSystem,q=this.children.concat(),[lt,Dt,Zt,G,U,t]=q;for(const g of q)this.remove(g);if(F===xf)lt.up.set(0,1,0),lt.lookAt(1,0,0),Dt.up.set(0,1,0),Dt.lookAt(-1,0,0),Zt.up.set(0,0,-1),Zt.lookAt(0,1,0),G.up.set(0,0,1),G.lookAt(0,-1,0),U.up.set(0,1,0),U.lookAt(0,0,1),t.up.set(0,1,0),t.lookAt(0,0,-1);else if(F===fp)lt.up.set(0,-1,0),lt.lookAt(-1,0,0),Dt.up.set(0,-1,0),Dt.lookAt(1,0,0),Zt.up.set(0,0,1),Zt.lookAt(0,1,0),G.up.set(0,0,-1),G.lookAt(0,-1,0),U.up.set(0,-1,0),U.lookAt(0,0,1),t.up.set(0,-1,0),t.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+F);for(const g of q)this.add(g),g.updateMatrixWorld()}update(F,q){this.parent===null&&this.updateMatrixWorld();const{renderTarget:lt,activeMipmapLevel:Dt}=this;this.coordinateSystem!==F.coordinateSystem&&(this.coordinateSystem=F.coordinateSystem,this.updateCoordinateSystem());const[Zt,G,U,t,g,C]=this.children,i=F.getRenderTarget(),S=F.getActiveCubeFace(),x=F.getActiveMipmapLevel(),v=F.xr.enabled;F.xr.enabled=!1;const p=lt.texture.generateMipmaps;lt.texture.generateMipmaps=!1,F.setRenderTarget(lt,0,Dt),F.render(q,Zt),F.setRenderTarget(lt,1,Dt),F.render(q,G),F.setRenderTarget(lt,2,Dt),F.render(q,U),F.setRenderTarget(lt,3,Dt),F.render(q,t),F.setRenderTarget(lt,4,Dt),F.render(q,g),lt.texture.generateMipmaps=p,F.setRenderTarget(lt,5,Dt),F.render(q,C),F.setRenderTarget(i,S,x),F.xr.enabled=v,lt.texture.needsPMREMUpdate=!0}}class u1 extends Es{constructor(F,q,lt,Dt,Zt,G,U,t,g,C){F=F!==void 0?F:[],q=q!==void 0?q:sv,super(F,q,lt,Dt,Zt,G,U,t,g,C),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(F){this.image=F}}class T2 extends rh{constructor(F=1,q={}){super(F,F,q),this.isWebGLCubeRenderTarget=!0;const lt={width:F,height:F,depth:1},Dt=[lt,lt,lt,lt,lt,lt];this.texture=new u1(Dt,q.mapping,q.wrapS,q.wrapT,q.magFilter,q.minFilter,q.format,q.type,q.anisotropy,q.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=q.generateMipmaps!==void 0?q.generateMipmaps:!1,this.texture.minFilter=q.minFilter!==void 0?q.minFilter:fu}fromEquirectangularTexture(F,q){this.texture.type=q.type,this.texture.colorSpace=q.colorSpace,this.texture.generateMipmaps=q.generateMipmaps,this.texture.minFilter=q.minFilter,this.texture.magFilter=q.magFilter;const lt={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -41,9 +41,9 @@ import{j as L3}from"./jsx-runtime-DRTy3Uxn.js";import{g as P3,R as R3,r as D3}fr gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},De=new cv(5,5,5),Xe=new mc({name:"CubemapFromEquirect",uniforms:fv(le.uniforms),vertexShader:le.vertexShader,fragmentShader:le.fragmentShader,side:Hs,blending:hc});Xe.uniforms.tEquirect.value=q;const H=new Il(De,Xe),U=q.minFilter;return q.minFilter===rh&&(q.minFilter=fu),new T2(1,10,this).update(F,H),q.minFilter=U,H.geometry.dispose(),H.material.dispose(),this}clear(F,q,le,De){const Xe=F.getRenderTarget();for(let H=0;H<6;H++)F.setRenderTarget(this,H),F.clear(q,le,De);F.setRenderTarget(Xe)}}const x0=new bn,M2=new bn,S2=new fa;class uc{constructor(F=new bn(1,0,0),q=0){this.isPlane=!0,this.normal=F,this.constant=q}set(F,q){return this.normal.copy(F),this.constant=q,this}setComponents(F,q,le,De){return this.normal.set(F,q,le),this.constant=De,this}setFromNormalAndCoplanarPoint(F,q){return this.normal.copy(F),this.constant=-q.dot(this.normal),this}setFromCoplanarPoints(F,q,le){const De=x0.subVectors(le,q).cross(M2.subVectors(F,q)).normalize();return this.setFromNormalAndCoplanarPoint(De,F),this}copy(F){return this.normal.copy(F.normal),this.constant=F.constant,this}normalize(){const F=1/this.normal.length();return this.normal.multiplyScalar(F),this.constant*=F,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(F){return this.normal.dot(F)+this.constant}distanceToSphere(F){return this.distanceToPoint(F.center)-F.radius}projectPoint(F,q){return q.copy(F).addScaledVector(this.normal,-this.distanceToPoint(F))}intersectLine(F,q){const le=F.delta(x0),De=this.normal.dot(le);if(De===0)return this.distanceToPoint(F.start)===0?q.copy(F.start):null;const Xe=-(F.start.dot(this.normal)+this.constant)/De;return Xe<0||Xe>1?null:q.copy(F.start).addScaledVector(le,Xe)}intersectsLine(F){const q=this.distanceToPoint(F.start),le=this.distanceToPoint(F.end);return q<0&&le>0||le<0&&q>0}intersectsBox(F){return F.intersectsPlane(this)}intersectsSphere(F){return F.intersectsPlane(this)}coplanarPoint(F){return F.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(F,q){const le=q||S2.getNormalMatrix(F),De=this.coplanarPoint(x0).applyMatrix4(F),Xe=this.normal.applyMatrix3(le).normalize();return this.constant=-De.dot(Xe),this}translate(F){return this.constant-=F.dot(this.normal),this}equals(F){return F.normal.equals(this.normal)&&F.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Kc=new Qv,Xd=new bn;class l1{constructor(F=new uc,q=new uc,le=new uc,De=new uc,Xe=new uc,H=new uc){this.planes=[F,q,le,De,Xe,H]}set(F,q,le,De,Xe,H){const U=this.planes;return U[0].copy(F),U[1].copy(q),U[2].copy(le),U[3].copy(De),U[4].copy(Xe),U[5].copy(H),this}copy(F){const q=this.planes;for(let le=0;le<6;le++)q[le].copy(F.planes[le]);return this}setFromProjectionMatrix(F,q=yf){const le=this.planes,De=F.elements,Xe=De[0],H=De[1],U=De[2],e=De[3],g=De[4],C=De[5],i=De[6],S=De[7],x=De[8],v=De[9],p=De[10],r=De[11],t=De[12],a=De[13],n=De[14],f=De[15];if(le[0].setComponents(e-Xe,S-g,r-x,f-t).normalize(),le[1].setComponents(e+Xe,S+g,r+x,f+t).normalize(),le[2].setComponents(e+H,S+C,r+v,f+a).normalize(),le[3].setComponents(e-H,S-C,r-v,f-a).normalize(),le[4].setComponents(e-U,S-i,r-p,f-n).normalize(),q===yf)le[5].setComponents(e+U,S+i,r+p,f+n).normalize();else if(q===up)le[5].setComponents(U,i,p,n).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+q);return this}intersectsObject(F){if(F.boundingSphere!==void 0)F.boundingSphere===null&&F.computeBoundingSphere(),Kc.copy(F.boundingSphere).applyMatrix4(F.matrixWorld);else{const q=F.geometry;q.boundingSphere===null&&q.computeBoundingSphere(),Kc.copy(q.boundingSphere).applyMatrix4(F.matrixWorld)}return this.intersectsSphere(Kc)}intersectsSprite(F){return Kc.center.set(0,0,0),Kc.radius=.7071067811865476,Kc.applyMatrix4(F.matrixWorld),this.intersectsSphere(Kc)}intersectsSphere(F){const q=this.planes,le=F.center,De=-F.radius;for(let Xe=0;Xe<6;Xe++)if(q[Xe].distanceToPoint(le)0?F.max.x:F.min.x,Xd.y=De.normal.y>0?F.max.y:F.min.y,Xd.z=De.normal.z>0?F.max.z:F.min.z,De.distanceToPoint(Xd)<0)return!1}return!0}containsPoint(F){const q=this.planes;for(let le=0;le<6;le++)if(q[le].distanceToPoint(F)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function u1(){let _e=null,F=!1,q=null,le=null;function De(Xe,H){q(Xe,H),le=_e.requestAnimationFrame(De)}return{start:function(){F!==!0&&q!==null&&(le=_e.requestAnimationFrame(De),F=!0)},stop:function(){_e.cancelAnimationFrame(le),F=!1},setAnimationLoop:function(Xe){q=Xe},setContext:function(Xe){_e=Xe}}}function E2(_e){const F=new WeakMap;function q(U,e){const g=U.array,C=U.usage,i=g.byteLength,S=_e.createBuffer();_e.bindBuffer(e,S),_e.bufferData(e,g,C),U.onUploadCallback();let x;if(g instanceof Float32Array)x=_e.FLOAT;else if(g instanceof Uint16Array)U.isFloat16BufferAttribute?x=_e.HALF_FLOAT:x=_e.UNSIGNED_SHORT;else if(g instanceof Int16Array)x=_e.SHORT;else if(g instanceof Uint32Array)x=_e.UNSIGNED_INT;else if(g instanceof Int32Array)x=_e.INT;else if(g instanceof Int8Array)x=_e.BYTE;else if(g instanceof Uint8Array)x=_e.UNSIGNED_BYTE;else if(g instanceof Uint8ClampedArray)x=_e.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+g);return{buffer:S,type:x,bytesPerElement:g.BYTES_PER_ELEMENT,version:U.version,size:i}}function le(U,e,g){const C=e.array,i=e._updateRange,S=e.updateRanges;if(_e.bindBuffer(g,U),i.count===-1&&S.length===0&&_e.bufferSubData(g,0,C),S.length!==0){for(let x=0,v=S.length;x1?null:q.copy(F.start).addScaledVector(lt,Zt)}intersectsLine(F){const q=this.distanceToPoint(F.start),lt=this.distanceToPoint(F.end);return q<0&<>0||lt<0&&q>0}intersectsBox(F){return F.intersectsPlane(this)}intersectsSphere(F){return F.intersectsPlane(this)}coplanarPoint(F){return F.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(F,q){const lt=q||M2.getNormalMatrix(F),Dt=this.coplanarPoint(w0).applyMatrix4(F),Zt=this.normal.applyMatrix3(lt).normalize();return this.constant=-Dt.dot(Zt),this}translate(F){return this.constant-=F.dot(this.normal),this}equals(F){return F.normal.equals(this.normal)&&F.constant===this.constant}clone(){return new this.constructor().copy(this)}}const jc=new $v,jd=new bn;class f1{constructor(F=new fc,q=new fc,lt=new fc,Dt=new fc,Zt=new fc,G=new fc){this.planes=[F,q,lt,Dt,Zt,G]}set(F,q,lt,Dt,Zt,G){const U=this.planes;return U[0].copy(F),U[1].copy(q),U[2].copy(lt),U[3].copy(Dt),U[4].copy(Zt),U[5].copy(G),this}copy(F){const q=this.planes;for(let lt=0;lt<6;lt++)q[lt].copy(F.planes[lt]);return this}setFromProjectionMatrix(F,q=xf){const lt=this.planes,Dt=F.elements,Zt=Dt[0],G=Dt[1],U=Dt[2],t=Dt[3],g=Dt[4],C=Dt[5],i=Dt[6],S=Dt[7],x=Dt[8],v=Dt[9],p=Dt[10],r=Dt[11],e=Dt[12],a=Dt[13],n=Dt[14],f=Dt[15];if(lt[0].setComponents(t-Zt,S-g,r-x,f-e).normalize(),lt[1].setComponents(t+Zt,S+g,r+x,f+e).normalize(),lt[2].setComponents(t+G,S+C,r+v,f+a).normalize(),lt[3].setComponents(t-G,S-C,r-v,f-a).normalize(),lt[4].setComponents(t-U,S-i,r-p,f-n).normalize(),q===xf)lt[5].setComponents(t+U,S+i,r+p,f+n).normalize();else if(q===fp)lt[5].setComponents(U,i,p,n).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+q);return this}intersectsObject(F){if(F.boundingSphere!==void 0)F.boundingSphere===null&&F.computeBoundingSphere(),jc.copy(F.boundingSphere).applyMatrix4(F.matrixWorld);else{const q=F.geometry;q.boundingSphere===null&&q.computeBoundingSphere(),jc.copy(q.boundingSphere).applyMatrix4(F.matrixWorld)}return this.intersectsSphere(jc)}intersectsSprite(F){return jc.center.set(0,0,0),jc.radius=.7071067811865476,jc.applyMatrix4(F.matrixWorld),this.intersectsSphere(jc)}intersectsSphere(F){const q=this.planes,lt=F.center,Dt=-F.radius;for(let Zt=0;Zt<6;Zt++)if(q[Zt].distanceToPoint(lt)0?F.max.x:F.min.x,jd.y=Dt.normal.y>0?F.max.y:F.min.y,jd.z=Dt.normal.z>0?F.max.z:F.min.z,Dt.distanceToPoint(jd)<0)return!1}return!0}containsPoint(F){const q=this.planes;for(let lt=0;lt<6;lt++)if(q[lt].distanceToPoint(F)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function c1(){let _t=null,F=!1,q=null,lt=null;function Dt(Zt,G){q(Zt,G),lt=_t.requestAnimationFrame(Dt)}return{start:function(){F!==!0&&q!==null&&(lt=_t.requestAnimationFrame(Dt),F=!0)},stop:function(){_t.cancelAnimationFrame(lt),F=!1},setAnimationLoop:function(Zt){q=Zt},setContext:function(Zt){_t=Zt}}}function S2(_t){const F=new WeakMap;function q(U,t){const g=U.array,C=U.usage,i=g.byteLength,S=_t.createBuffer();_t.bindBuffer(t,S),_t.bufferData(t,g,C),U.onUploadCallback();let x;if(g instanceof Float32Array)x=_t.FLOAT;else if(g instanceof Uint16Array)U.isFloat16BufferAttribute?x=_t.HALF_FLOAT:x=_t.UNSIGNED_SHORT;else if(g instanceof Int16Array)x=_t.SHORT;else if(g instanceof Uint32Array)x=_t.UNSIGNED_INT;else if(g instanceof Int32Array)x=_t.INT;else if(g instanceof Int8Array)x=_t.BYTE;else if(g instanceof Uint8Array)x=_t.UNSIGNED_BYTE;else if(g instanceof Uint8ClampedArray)x=_t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+g);return{buffer:S,type:x,bytesPerElement:g.BYTES_PER_ELEMENT,version:U.version,size:i}}function lt(U,t,g){const C=t.array,i=t._updateRange,S=t.updateRanges;if(_t.bindBuffer(g,U),i.count===-1&&S.length===0&&_t.bufferSubData(g,0,C),S.length!==0){for(let x=0,v=S.length;x 0 +#endif`,V2=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,W2=`#if NUM_CLIPPING_PLANES > 0 +#endif`,G2=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,Y2=`#if NUM_CLIPPING_PLANES > 0 +#endif`,W2=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,X2=`#if defined( USE_COLOR_ALPHA ) +#endif`,Y2=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,Z2=`#if defined( USE_COLOR_ALPHA ) +#endif`,X2=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,j2=`#if defined( USE_COLOR_ALPHA ) +#endif`,Z2=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,K2=`#if defined( USE_COLOR_ALPHA ) +#endif`,j2=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -302,7 +302,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,J2=`#define PI 3.141592653589793 +#endif`,K2=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -380,7 +380,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,Q2=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,J2=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -473,7 +473,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,$2=`vec3 transformedNormal = objectNormal; +#endif`,Q2=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -502,18 +502,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,q2=`#ifdef USE_DISPLACEMENTMAP +#endif`,$2=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,eT=`#ifdef USE_DISPLACEMENTMAP +#endif`,q2=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); #endif`,tT=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,rT=`#ifdef USE_EMISSIVEMAP +#endif`,eT=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,nT="gl_FragColor = linearToOutputTexel( gl_FragColor );",iT=` +#endif`,rT="gl_FragColor = linearToOutputTexel( gl_FragColor );",nT=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -541,7 +541,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,aT=`#ifdef USE_ENVMAP +}`,iT=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -570,7 +570,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,oT=`#ifdef USE_ENVMAP +#endif`,aT=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform mat3 envMapRotation; @@ -580,7 +580,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,sT=`#ifdef USE_ENVMAP +#endif`,oT=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -591,7 +591,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,lT=`#ifdef USE_ENVMAP +#endif`,sT=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -602,7 +602,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,uT=`#ifdef USE_ENVMAP +#endif`,lT=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -619,18 +619,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,fT=`#ifdef USE_FOG +#endif`,uT=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,cT=`#ifdef USE_FOG +#endif`,fT=`#ifdef USE_FOG varying float vFogDepth; -#endif`,hT=`#ifdef USE_FOG +#endif`,cT=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,vT=`#ifdef USE_FOG +#endif`,hT=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -639,7 +639,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,dT=`#ifdef USE_GRADIENTMAP +#endif`,vT=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -651,16 +651,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,pT=`#ifdef USE_LIGHTMAP +}`,dT=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,gT=`#ifdef USE_LIGHTMAP +#endif`,pT=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,mT=`LambertMaterial material; +#endif`,gT=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,yT=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,mT=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -674,7 +674,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,xT=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,yT=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -797,7 +797,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,bT=`#ifdef USE_ENVMAP +#endif`,xT=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -830,8 +830,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,wT=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,TT=`varying vec3 vViewPosition; +#endif`,bT=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,wT=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -843,11 +843,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,AT=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,TT=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,MT=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,AT=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -864,7 +864,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,ST=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,MT=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -947,7 +947,7 @@ material.roughness = min( material.roughness, 1.0 ); material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,ET=`struct PhysicalMaterial { +#endif`,ST=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1247,7 +1247,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,_T=` +}`,ET=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1362,7 +1362,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,CT=`#if defined( RE_IndirectDiffuse ) +#endif`,_T=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1381,33 +1381,33 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,LT=`#if defined( RE_IndirectDiffuse ) +#endif`,CT=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,PT=`#if defined( USE_LOGDEPTHBUF ) +#endif`,LT=`#if defined( USE_LOGDEPTHBUF ) gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,RT=`#if defined( USE_LOGDEPTHBUF ) +#endif`,PT=`#if defined( USE_LOGDEPTHBUF ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,DT=`#ifdef USE_LOGDEPTHBUF +#endif`,RT=`#ifdef USE_LOGDEPTHBUF varying float vFragDepth; varying float vIsPerspective; -#endif`,IT=`#ifdef USE_LOGDEPTHBUF +#endif`,DT=`#ifdef USE_LOGDEPTHBUF vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); -#endif`,FT=`#ifdef USE_MAP +#endif`,IT=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,zT=`#ifdef USE_MAP +#endif`,FT=`#ifdef USE_MAP uniform sampler2D map; -#endif`,kT=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,zT=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1419,7 +1419,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,OT=`#if defined( USE_POINTS_UV ) +#endif`,kT=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1431,19 +1431,19 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,NT=`float metalnessFactor = metalness; +#endif`,OT=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,BT=`#ifdef USE_METALNESSMAP +#endif`,NT=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,UT=`#ifdef USE_INSTANCING_MORPH +#endif`,BT=`#ifdef USE_INSTANCING_MORPH float morphTargetInfluences[MORPHTARGETS_COUNT]; float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; } -#endif`,VT=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,UT=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1464,7 +1464,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,GT=`#ifdef USE_MORPHTARGETS +#endif`,VT=`#ifdef USE_MORPHTARGETS #ifndef USE_INSTANCING_MORPH uniform float morphTargetBaseInfluence; #endif @@ -1488,7 +1488,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,WT=`#ifdef USE_MORPHTARGETS +#endif`,GT=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1506,7 +1506,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,YT=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,WT=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1547,7 +1547,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,XT=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,YT=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1562,25 +1562,25 @@ vec3 nonPerturbedNormal = normal;`,XT=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,ZT=`#ifndef FLAT_SHADED +#endif`,XT=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,jT=`#ifndef FLAT_SHADED +#endif`,ZT=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,KT=`#ifndef FLAT_SHADED +#endif`,jT=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,JT=`#ifdef USE_NORMALMAP +#endif`,KT=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1602,13 +1602,13 @@ vec3 nonPerturbedNormal = normal;`,XT=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,QT=`#ifdef USE_CLEARCOAT +#endif`,JT=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,$T=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,QT=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,qT=`#ifdef USE_CLEARCOATMAP +#endif`,$T=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1617,7 +1617,7 @@ vec3 nonPerturbedNormal = normal;`,XT=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,eA=`#ifdef USE_IRIDESCENCEMAP +#endif`,qT=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP @@ -1628,7 +1628,7 @@ diffuseColor.a = 1.0; #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,rA=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,eA=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1669,9 +1669,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,nA=`#ifdef PREMULTIPLIED_ALPHA +}`,rA=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,iA=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,nA=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1679,22 +1679,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,aA=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,iA=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,oA=`#ifdef DITHERING +#endif`,aA=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,sA=`float roughnessFactor = roughness; +#endif`,oA=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,lA=`#ifdef USE_ROUGHNESSMAP +#endif`,sA=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,uA=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,lA=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -1877,7 +1877,7 @@ gl_Position = projectionMatrix * mvPosition;`,aA=`#ifdef DITHERING } return shadow; } -#endif`,fA=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,uA=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -1915,7 +1915,7 @@ gl_Position = projectionMatrix * mvPosition;`,aA=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,cA=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,fA=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -1947,7 +1947,7 @@ gl_Position = projectionMatrix * mvPosition;`,aA=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,hA=`float getShadowMask() { +#endif`,cA=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -1979,12 +1979,12 @@ gl_Position = projectionMatrix * mvPosition;`,aA=`#ifdef DITHERING #endif #endif return shadow; -}`,vA=`#ifdef USE_SKINNING +}`,hA=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,dA=`#ifdef USE_SKINNING +#endif`,vA=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -1999,7 +1999,7 @@ gl_Position = projectionMatrix * mvPosition;`,aA=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,pA=`#ifdef USE_SKINNING +#endif`,dA=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2007,7 +2007,7 @@ gl_Position = projectionMatrix * mvPosition;`,aA=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,gA=`#ifdef USE_SKINNING +#endif`,pA=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2018,17 +2018,17 @@ gl_Position = projectionMatrix * mvPosition;`,aA=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,mA=`float specularStrength; +#endif`,gA=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,yA=`#ifdef USE_SPECULARMAP +#endif`,mA=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,xA=`#if defined( TONE_MAPPING ) +#endif`,yA=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,bA=`#ifndef saturate +#endif`,xA=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2125,7 +2125,7 @@ vec3 NeutralToneMapping( vec3 color ) { float g = 1. - 1. / (desaturation * (peak - newPeak) + 1.); return mix(color, newPeak * vec3(1, 1, 1), g); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,wA=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,bA=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2146,7 +2146,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,wA=`#ifdef USE_TRANSMISS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,TA=`#ifdef USE_TRANSMISSION +#endif`,wA=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2252,7 +2252,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,wA=`#ifdef USE_TRANSMISS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,AA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,TA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2322,7 +2322,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,wA=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,MA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,AA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2416,7 +2416,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,wA=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,SA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,MA=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2487,7 +2487,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,wA=`#ifdef USE_TRANSMISS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,EA=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,SA=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; @@ -2496,12 +2496,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,wA=`#ifdef USE_TRANSMISS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const _A=`varying vec2 vUv; +#endif`;const EA=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,CA=`uniform sampler2D t2D; +}`,_A=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2513,14 +2513,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,LA=`varying vec3 vWorldDirection; +}`,CA=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,PA=`#ifdef ENVMAP_TYPE_CUBE +}`,LA=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2543,14 +2543,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,RA=`varying vec3 vWorldDirection; +}`,PA=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,DA=`uniform samplerCube tCube; +}`,RA=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2560,7 +2560,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,IA=`#include +}`,DA=`#include #include #include #include @@ -2587,7 +2587,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,FA=`#if DEPTH_PACKING == 3200 +}`,IA=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2617,7 +2617,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,zA=`#define DISTANCE +}`,FA=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2644,7 +2644,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,kA=`#define DISTANCE +}`,zA=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2668,13 +2668,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,OA=`varying vec3 vWorldDirection; +}`,kA=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,NA=`uniform sampler2D tEquirect; +}`,OA=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2683,7 +2683,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,BA=`uniform float scale; +}`,NA=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2705,7 +2705,7 @@ void main() { #include #include #include -}`,UA=`uniform vec3 diffuse; +}`,BA=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2733,7 +2733,7 @@ void main() { #include #include #include -}`,VA=`#include +}`,UA=`#include #include #include #include @@ -2813,7 +2813,7 @@ void main() { #include #include #include -}`,GA=`#define LAMBERT +}`,VA=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2852,7 +2852,7 @@ void main() { #include #include #include -}`,WA=`#define LAMBERT +}`,GA=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -2909,7 +2909,7 @@ void main() { #include #include #include -}`,YA=`#define MATCAP +}`,WA=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -2943,7 +2943,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,XA=`#define MATCAP +}`,YA=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -2989,7 +2989,7 @@ void main() { #include #include #include -}`,ZA=`#define NORMAL +}`,XA=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3022,7 +3022,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,jA=`#define NORMAL +}`,ZA=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3044,7 +3044,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,KA=`#define PHONG +}`,jA=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3083,7 +3083,7 @@ void main() { #include #include #include -}`,JA=`#define PHONG +}`,KA=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3142,7 +3142,7 @@ void main() { #include #include #include -}`,QA=`#define STANDARD +}`,JA=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3185,7 +3185,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,$A=`#define STANDARD +}`,QA=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3307,7 +3307,7 @@ void main() { #include #include #include -}`,qA=`#define TOON +}`,$A=`#define TOON varying vec3 vViewPosition; #include #include @@ -3344,7 +3344,7 @@ void main() { #include #include #include -}`,eM=`#define TOON +}`,qA=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3428,7 +3428,7 @@ void main() { #include #include #include -}`,rM=`uniform vec3 diffuse; +}`,eM=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3453,7 +3453,7 @@ void main() { #include #include #include -}`,nM=`#include +}`,rM=`#include #include #include #include @@ -3476,7 +3476,7 @@ void main() { #include #include #include -}`,iM=`uniform vec3 color; +}`,nM=`uniform vec3 color; uniform float opacity; #include #include @@ -3492,7 +3492,7 @@ void main() { #include #include #include -}`,aM=`uniform float rotation; +}`,iM=`uniform float rotation; uniform vec2 center; #include #include @@ -3518,7 +3518,7 @@ void main() { #include #include #include -}`,oM=`uniform vec3 diffuse; +}`,aM=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3543,7 +3543,7 @@ void main() { #include #include #include -}`,ua={alphahash_fragment:_2,alphahash_pars_fragment:C2,alphamap_fragment:L2,alphamap_pars_fragment:P2,alphatest_fragment:R2,alphatest_pars_fragment:D2,aomap_fragment:I2,aomap_pars_fragment:F2,batching_pars_vertex:z2,batching_vertex:k2,begin_vertex:O2,beginnormal_vertex:N2,bsdfs:B2,iridescence_fragment:U2,bumpmap_pars_fragment:V2,clipping_planes_fragment:H2,clipping_planes_pars_fragment:G2,clipping_planes_pars_vertex:W2,clipping_planes_vertex:Y2,color_fragment:X2,color_pars_fragment:Z2,color_pars_vertex:j2,color_vertex:K2,common:J2,cube_uv_reflection_fragment:Q2,defaultnormal_vertex:$2,displacementmap_pars_vertex:q2,displacementmap_vertex:eT,emissivemap_fragment:tT,emissivemap_pars_fragment:rT,colorspace_fragment:nT,colorspace_pars_fragment:iT,envmap_fragment:aT,envmap_common_pars_fragment:oT,envmap_pars_fragment:sT,envmap_pars_vertex:lT,envmap_physical_pars_fragment:bT,envmap_vertex:uT,fog_vertex:fT,fog_pars_vertex:cT,fog_fragment:hT,fog_pars_fragment:vT,gradientmap_pars_fragment:dT,lightmap_fragment:pT,lightmap_pars_fragment:gT,lights_lambert_fragment:mT,lights_lambert_pars_fragment:yT,lights_pars_begin:xT,lights_toon_fragment:wT,lights_toon_pars_fragment:TT,lights_phong_fragment:AT,lights_phong_pars_fragment:MT,lights_physical_fragment:ST,lights_physical_pars_fragment:ET,lights_fragment_begin:_T,lights_fragment_maps:CT,lights_fragment_end:LT,logdepthbuf_fragment:PT,logdepthbuf_pars_fragment:RT,logdepthbuf_pars_vertex:DT,logdepthbuf_vertex:IT,map_fragment:FT,map_pars_fragment:zT,map_particle_fragment:kT,map_particle_pars_fragment:OT,metalnessmap_fragment:NT,metalnessmap_pars_fragment:BT,morphinstance_vertex:UT,morphcolor_vertex:VT,morphnormal_vertex:HT,morphtarget_pars_vertex:GT,morphtarget_vertex:WT,normal_fragment_begin:YT,normal_fragment_maps:XT,normal_pars_fragment:ZT,normal_pars_vertex:jT,normal_vertex:KT,normalmap_pars_fragment:JT,clearcoat_normal_fragment_begin:QT,clearcoat_normal_fragment_maps:$T,clearcoat_pars_fragment:qT,iridescence_pars_fragment:eA,opaque_fragment:tA,packing:rA,premultiplied_alpha_fragment:nA,project_vertex:iA,dithering_fragment:aA,dithering_pars_fragment:oA,roughnessmap_fragment:sA,roughnessmap_pars_fragment:lA,shadowmap_pars_fragment:uA,shadowmap_pars_vertex:fA,shadowmap_vertex:cA,shadowmask_pars_fragment:hA,skinbase_vertex:vA,skinning_pars_vertex:dA,skinning_vertex:pA,skinnormal_vertex:gA,specularmap_fragment:mA,specularmap_pars_fragment:yA,tonemapping_fragment:xA,tonemapping_pars_fragment:bA,transmission_fragment:wA,transmission_pars_fragment:TA,uv_pars_fragment:AA,uv_pars_vertex:MA,uv_vertex:SA,worldpos_vertex:EA,background_vert:_A,background_frag:CA,backgroundCube_vert:LA,backgroundCube_frag:PA,cube_vert:RA,cube_frag:DA,depth_vert:IA,depth_frag:FA,distanceRGBA_vert:zA,distanceRGBA_frag:kA,equirect_vert:OA,equirect_frag:NA,linedashed_vert:BA,linedashed_frag:UA,meshbasic_vert:VA,meshbasic_frag:HA,meshlambert_vert:GA,meshlambert_frag:WA,meshmatcap_vert:YA,meshmatcap_frag:XA,meshnormal_vert:ZA,meshnormal_frag:jA,meshphong_vert:KA,meshphong_frag:JA,meshphysical_vert:QA,meshphysical_frag:$A,meshtoon_vert:qA,meshtoon_frag:eM,points_vert:tM,points_frag:rM,shadow_vert:nM,shadow_frag:iM,sprite_vert:aM,sprite_frag:oM},_i={common:{diffuse:{value:new da(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new fa},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new fa}},envmap:{envMap:{value:null},envMapRotation:{value:new fa},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new fa}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new fa}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new fa},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new fa},normalScale:{value:new Wi(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new fa},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new fa}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new fa}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new fa}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new da(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new da(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0},uvTransform:{value:new fa}},sprite:{diffuse:{value:new da(16777215)},opacity:{value:1},center:{value:new Wi(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new fa},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0}}},Fu={basic:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.fog]),vertexShader:ua.meshbasic_vert,fragmentShader:ua.meshbasic_frag},lambert:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,_i.lights,{emissive:{value:new da(0)}}]),vertexShader:ua.meshlambert_vert,fragmentShader:ua.meshlambert_frag},phong:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,_i.lights,{emissive:{value:new da(0)},specular:{value:new da(1118481)},shininess:{value:30}}]),vertexShader:ua.meshphong_vert,fragmentShader:ua.meshphong_frag},standard:{uniforms:Ms([_i.common,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.roughnessmap,_i.metalnessmap,_i.fog,_i.lights,{emissive:{value:new da(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ua.meshphysical_vert,fragmentShader:ua.meshphysical_frag},toon:{uniforms:Ms([_i.common,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.gradientmap,_i.fog,_i.lights,{emissive:{value:new da(0)}}]),vertexShader:ua.meshtoon_vert,fragmentShader:ua.meshtoon_frag},matcap:{uniforms:Ms([_i.common,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,{matcap:{value:null}}]),vertexShader:ua.meshmatcap_vert,fragmentShader:ua.meshmatcap_frag},points:{uniforms:Ms([_i.points,_i.fog]),vertexShader:ua.points_vert,fragmentShader:ua.points_frag},dashed:{uniforms:Ms([_i.common,_i.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ua.linedashed_vert,fragmentShader:ua.linedashed_frag},depth:{uniforms:Ms([_i.common,_i.displacementmap]),vertexShader:ua.depth_vert,fragmentShader:ua.depth_frag},normal:{uniforms:Ms([_i.common,_i.bumpmap,_i.normalmap,_i.displacementmap,{opacity:{value:1}}]),vertexShader:ua.meshnormal_vert,fragmentShader:ua.meshnormal_frag},sprite:{uniforms:Ms([_i.sprite,_i.fog]),vertexShader:ua.sprite_vert,fragmentShader:ua.sprite_frag},background:{uniforms:{uvTransform:{value:new fa},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ua.background_vert,fragmentShader:ua.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new fa}},vertexShader:ua.backgroundCube_vert,fragmentShader:ua.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ua.cube_vert,fragmentShader:ua.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ua.equirect_vert,fragmentShader:ua.equirect_frag},distanceRGBA:{uniforms:Ms([_i.common,_i.displacementmap,{referencePosition:{value:new bn},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ua.distanceRGBA_vert,fragmentShader:ua.distanceRGBA_frag},shadow:{uniforms:Ms([_i.lights,_i.fog,{color:{value:new da(0)},opacity:{value:1}}]),vertexShader:ua.shadow_vert,fragmentShader:ua.shadow_frag}};Fu.physical={uniforms:Ms([Fu.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new fa},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new fa},clearcoatNormalScale:{value:new Wi(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new fa},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new fa},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new fa},sheen:{value:0},sheenColor:{value:new da(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new fa},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new fa},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new fa},transmissionSamplerSize:{value:new Wi},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new fa},attenuationDistance:{value:0},attenuationColor:{value:new da(0)},specularColor:{value:new da(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new fa},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new fa},anisotropyVector:{value:new Wi},anisotropyMap:{value:null},anisotropyMapTransform:{value:new fa}}]),vertexShader:ua.meshphysical_vert,fragmentShader:ua.meshphysical_frag};const Zd={r:0,b:0,g:0},Jc=new Ss,sM=new so;function lM(_e,F,q,le,De,Xe,H){const U=new da(0);let e=Xe===!0?0:1,g,C,i=null,S=0,x=null;function v(r,t){let a=!1,n=t.isScene===!0?t.background:null;n&&n.isTexture&&(n=(t.backgroundBlurriness>0?q:F).get(n)),n===null?p(U,e):n&&n.isColor&&(p(n,1),a=!0);const f=_e.xr.getEnvironmentBlendMode();f==="additive"?le.buffers.color.setClear(0,0,0,1,H):f==="alpha-blend"&&le.buffers.color.setClear(0,0,0,0,H),(_e.autoClear||a)&&_e.clear(_e.autoClearColor,_e.autoClearDepth,_e.autoClearStencil),n&&(n.isCubeTexture||n.mapping===hp)?(C===void 0&&(C=new Il(new cv(1,1,1),new mc({name:"BackgroundCubeMaterial",uniforms:fv(Fu.backgroundCube.uniforms),vertexShader:Fu.backgroundCube.vertexShader,fragmentShader:Fu.backgroundCube.fragmentShader,side:Hs,depthTest:!1,depthWrite:!1,fog:!1})),C.geometry.deleteAttribute("normal"),C.geometry.deleteAttribute("uv"),C.onBeforeRender=function(c,l,m){this.matrixWorld.copyPosition(m.matrixWorld)},Object.defineProperty(C.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),De.update(C)),Jc.copy(t.backgroundRotation),Jc.x*=-1,Jc.y*=-1,Jc.z*=-1,n.isCubeTexture&&n.isRenderTargetTexture===!1&&(Jc.y*=-1,Jc.z*=-1),C.material.uniforms.envMap.value=n,C.material.uniforms.flipEnvMap.value=n.isCubeTexture&&n.isRenderTargetTexture===!1?-1:1,C.material.uniforms.backgroundBlurriness.value=t.backgroundBlurriness,C.material.uniforms.backgroundIntensity.value=t.backgroundIntensity,C.material.uniforms.backgroundRotation.value.setFromMatrix4(sM.makeRotationFromEuler(Jc)),C.material.toneMapped=Fa.getTransfer(n.colorSpace)!==Ya,(i!==n||S!==n.version||x!==_e.toneMapping)&&(C.material.needsUpdate=!0,i=n,S=n.version,x=_e.toneMapping),C.layers.enableAll(),r.unshift(C,C.geometry,C.material,0,0,null)):n&&n.isTexture&&(g===void 0&&(g=new Il(new dp(2,2),new mc({name:"BackgroundMaterial",uniforms:fv(Fu.background.uniforms),vertexShader:Fu.background.vertexShader,fragmentShader:Fu.background.fragmentShader,side:gc,depthTest:!1,depthWrite:!1,fog:!1})),g.geometry.deleteAttribute("normal"),Object.defineProperty(g.material,"map",{get:function(){return this.uniforms.t2D.value}}),De.update(g)),g.material.uniforms.t2D.value=n,g.material.uniforms.backgroundIntensity.value=t.backgroundIntensity,g.material.toneMapped=Fa.getTransfer(n.colorSpace)!==Ya,n.matrixAutoUpdate===!0&&n.updateMatrix(),g.material.uniforms.uvTransform.value.copy(n.matrix),(i!==n||S!==n.version||x!==_e.toneMapping)&&(g.material.needsUpdate=!0,i=n,S=n.version,x=_e.toneMapping),g.layers.enableAll(),r.unshift(g,g.geometry,g.material,0,0,null))}function p(r,t){r.getRGB(Zd,a1(_e)),le.buffers.color.setClear(Zd.r,Zd.g,Zd.b,t,H)}return{getClearColor:function(){return U},setClearColor:function(r,t=1){U.set(r),e=t,p(U,e)},getClearAlpha:function(){return e},setClearAlpha:function(r){e=r,p(U,e)},render:v}}function uM(_e,F){const q=_e.getParameter(_e.MAX_VERTEX_ATTRIBS),le={},De=S(null);let Xe=De,H=!1;function U(u,o,d,w,A){let _=!1;const y=i(w,d,o);Xe!==y&&(Xe=y,g(Xe.object)),_=x(u,w,d,A),_&&v(u,w,d,A),A!==null&&F.update(A,_e.ELEMENT_ARRAY_BUFFER),(_||H)&&(H=!1,f(u,o,d,w),A!==null&&_e.bindBuffer(_e.ELEMENT_ARRAY_BUFFER,F.get(A).buffer))}function e(){return _e.createVertexArray()}function g(u){return _e.bindVertexArray(u)}function C(u){return _e.deleteVertexArray(u)}function i(u,o,d){const w=d.wireframe===!0;let A=le[u.id];A===void 0&&(A={},le[u.id]=A);let _=A[o.id];_===void 0&&(_={},A[o.id]=_);let y=_[w];return y===void 0&&(y=S(e()),_[w]=y),y}function S(u){const o=[],d=[],w=[];for(let A=0;A=0){const L=A[T];let M=_[T];if(M===void 0&&(T==="instanceMatrix"&&u.instanceMatrix&&(M=u.instanceMatrix),T==="instanceColor"&&u.instanceColor&&(M=u.instanceColor)),L===void 0||L.attribute!==M||M&&L.data!==M.data)return!0;y++}return Xe.attributesNum!==y||Xe.index!==w}function v(u,o,d,w){const A={},_=o.attributes;let y=0;const E=d.getAttributes();for(const T in E)if(E[T].location>=0){let L=_[T];L===void 0&&(T==="instanceMatrix"&&u.instanceMatrix&&(L=u.instanceMatrix),T==="instanceColor"&&u.instanceColor&&(L=u.instanceColor));const M={};M.attribute=L,L&&L.data&&(M.data=L.data),A[T]=M,y++}Xe.attributes=A,Xe.attributesNum=y,Xe.index=w}function p(){const u=Xe.newAttributes;for(let o=0,d=u.length;o=0){let s=A[E];if(s===void 0&&(E==="instanceMatrix"&&u.instanceMatrix&&(s=u.instanceMatrix),E==="instanceColor"&&u.instanceColor&&(s=u.instanceColor)),s!==void 0){const L=s.normalized,M=s.itemSize,z=F.get(s);if(z===void 0)continue;const D=z.buffer,N=z.type,I=z.bytesPerElement,k=N===_e.INT||N===_e.UNSIGNED_INT||s.gpuType===Wy;if(s.isInterleavedBufferAttribute){const B=s.data,O=B.stride,V=s.offset;if(B.isInstancedInterleavedBuffer){for(let Y=0;Y0&&_e.getShaderPrecisionFormat(_e.FRAGMENT_SHADER,_e.HIGH_FLOAT).precision>0)return"highp";n="mediump"}return n==="mediump"&&_e.getShaderPrecisionFormat(_e.VERTEX_SHADER,_e.MEDIUM_FLOAT).precision>0&&_e.getShaderPrecisionFormat(_e.FRAGMENT_SHADER,_e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let H=q.precision!==void 0?q.precision:"highp";const U=Xe(H);U!==H&&(console.warn("THREE.WebGLRenderer:",H,"not supported, using",U,"instead."),H=U);const e=q.logarithmicDepthBuffer===!0,g=_e.getParameter(_e.MAX_TEXTURE_IMAGE_UNITS),C=_e.getParameter(_e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),i=_e.getParameter(_e.MAX_TEXTURE_SIZE),S=_e.getParameter(_e.MAX_CUBE_MAP_TEXTURE_SIZE),x=_e.getParameter(_e.MAX_VERTEX_ATTRIBS),v=_e.getParameter(_e.MAX_VERTEX_UNIFORM_VECTORS),p=_e.getParameter(_e.MAX_VARYING_VECTORS),r=_e.getParameter(_e.MAX_FRAGMENT_UNIFORM_VECTORS),t=C>0,a=_e.getParameter(_e.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:De,getMaxPrecision:Xe,precision:H,logarithmicDepthBuffer:e,maxTextures:g,maxVertexTextures:C,maxTextureSize:i,maxCubemapSize:S,maxAttributes:x,maxVertexUniforms:v,maxVaryings:p,maxFragmentUniforms:r,vertexTextures:t,maxSamples:a}}function hM(_e){const F=this;let q=null,le=0,De=!1,Xe=!1;const H=new uc,U=new fa,e={value:null,needsUpdate:!1};this.uniform=e,this.numPlanes=0,this.numIntersection=0,this.init=function(i,S){const x=i.length!==0||S||le!==0||De;return De=S,le=i.length,x},this.beginShadows=function(){Xe=!0,C(null)},this.endShadows=function(){Xe=!1},this.setGlobalState=function(i,S){q=C(i,S,0)},this.setState=function(i,S,x){const v=i.clippingPlanes,p=i.clipIntersection,r=i.clipShadows,t=_e.get(i);if(!De||v===null||v.length===0||Xe&&!r)Xe?C(null):g();else{const a=Xe?0:le,n=a*4;let f=t.clippingState||null;e.value=f,f=C(v,S,n,x);for(let c=0;c!==n;++c)f[c]=q[c];t.clippingState=f,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=a}};function g(){e.value!==q&&(e.value=q,e.needsUpdate=le>0),F.numPlanes=le,F.numIntersection=0}function C(i,S,x,v){const p=i!==null?i.length:0;let r=null;if(p!==0){if(r=e.value,v!==!0||r===null){const t=x+p*4,a=S.matrixWorldInverse;U.getNormalMatrix(a),(r===null||r.length0){const g=new A2(e.height);return g.fromEquirectangularTexture(_e,H),F.set(H,g),H.addEventListener("dispose",De),q(g.texture,H.mapping)}else return null}}return H}function De(H){const U=H.target;U.removeEventListener("dispose",De);const e=F.get(U);e!==void 0&&(F.delete(U),e.dispose())}function Xe(){F=new WeakMap}return{get:le,dispose:Xe}}class pp extends o1{constructor(F=-1,q=1,le=1,De=-1,Xe=.1,H=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=F,this.right=q,this.top=le,this.bottom=De,this.near=Xe,this.far=H,this.updateProjectionMatrix()}copy(F,q){return super.copy(F,q),this.left=F.left,this.right=F.right,this.top=F.top,this.bottom=F.bottom,this.near=F.near,this.far=F.far,this.zoom=F.zoom,this.view=F.view===null?null:Object.assign({},F.view),this}setViewOffset(F,q,le,De,Xe,H){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=F,this.view.fullHeight=q,this.view.offsetX=le,this.view.offsetY=De,this.view.width=Xe,this.view.height=H,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const F=(this.right-this.left)/(2*this.zoom),q=(this.top-this.bottom)/(2*this.zoom),le=(this.right+this.left)/2,De=(this.top+this.bottom)/2;let Xe=le-F,H=le+F,U=De+q,e=De-q;if(this.view!==null&&this.view.enabled){const g=(this.right-this.left)/this.view.fullWidth/this.zoom,C=(this.top-this.bottom)/this.view.fullHeight/this.zoom;Xe+=g*this.view.offsetX,H=Xe+g*this.view.width,U-=C*this.view.offsetY,e=U-C*this.view.height}this.projectionMatrix.makeOrthographic(Xe,H,U,e,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(F){const q=super.toJSON(F);return q.object.zoom=this.zoom,q.object.left=this.left,q.object.right=this.right,q.object.top=this.top,q.object.bottom=this.bottom,q.object.near=this.near,q.object.far=this.far,this.view!==null&&(q.object.view=Object.assign({},this.view)),q}}const rv=4,ey=[.125,.215,.35,.446,.526,.582],eh=20,b0=new pp,ty=new da;let w0=null,T0=0,A0=0,M0=!1;const $c=(1+Math.sqrt(5))/2,Jh=1/$c,ry=[new bn(1,1,1),new bn(-1,1,1),new bn(1,1,-1),new bn(-1,1,-1),new bn(0,$c,Jh),new bn(0,$c,-Jh),new bn(Jh,0,$c),new bn(-Jh,0,$c),new bn($c,Jh,0),new bn(-$c,Jh,0)];class ny{constructor(F){this._renderer=F,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(F,q=0,le=.1,De=100){w0=this._renderer.getRenderTarget(),T0=this._renderer.getActiveCubeFace(),A0=this._renderer.getActiveMipmapLevel(),M0=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const Xe=this._allocateTargets();return Xe.depthBuffer=!0,this._sceneToCubeUV(F,le,De,Xe),q>0&&this._blur(Xe,0,0,q),this._applyPMREM(Xe),this._cleanup(Xe),Xe}fromEquirectangular(F,q=null){return this._fromTexture(F,q)}fromCubemap(F,q=null){return this._fromTexture(F,q)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=oy(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=ay(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(F){this._lodMax=Math.floor(Math.log2(F)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let F=0;F2?n:0,n,n),C.setRenderTarget(De),p&&C.render(v,U),C.render(F,U)}v.geometry.dispose(),v.material.dispose(),C.toneMapping=S,C.autoClear=i,F.background=r}_textureToCubeUV(F,q){const le=this._renderer,De=F.mapping===sv||F.mapping===lv;De?(this._cubemapMaterial===null&&(this._cubemapMaterial=oy()),this._cubemapMaterial.uniforms.flipEnvMap.value=F.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=ay());const Xe=De?this._cubemapMaterial:this._equirectMaterial,H=new Il(this._lodPlanes[0],Xe),U=Xe.uniforms;U.envMap.value=F;const e=this._cubeSize;jd(q,0,0,3*e,2*e),le.setRenderTarget(q),le.render(H,b0)}_applyPMREM(F){const q=this._renderer,le=q.autoClear;q.autoClear=!1;for(let De=1;Deeh&&console.warn(`sigmaRadians, ${Xe}, is too large and will clip, as it requested ${r} samples when the maximum is set to ${eh}`);const t=[];let a=0;for(let m=0;mn-rv?De-n+rv:0),l=4*(this._cubeSize-f);jd(q,c,l,3*f,2*f),e.setRenderTarget(q),e.render(i,b0)}}function dM(_e){const F=[],q=[],le=[];let De=_e;const Xe=_e-rv+1+ey.length;for(let H=0;H_e-rv?e=ey[H-_e+rv-1]:H===0&&(e=0),le.push(e);const g=1/(U-2),C=-g,i=1+g,S=[C,C,i,C,i,i,C,C,i,i,C,i],x=6,v=6,p=3,r=2,t=1,a=new Float32Array(p*v*x),n=new Float32Array(r*v*x),f=new Float32Array(t*v*x);for(let l=0;l2?0:-1,b=[m,h,0,m+2/3,h,0,m+2/3,h+1,0,m,h,0,m+2/3,h+1,0,m,h+1,0];a.set(b,p*v*l),n.set(S,r*v*l);const u=[l,l,l,l,l,l];f.set(u,t*v*l)}const c=new Ws;c.setAttribute("position",new Gs(a,p)),c.setAttribute("uv",new Gs(n,r)),c.setAttribute("faceIndex",new Gs(f,t)),F.push(c),De>rv&&De--}return{lodPlanes:F,sizeLods:q,sigmas:le}}function iy(_e,F,q){const le=new nh(_e,F,q);return le.texture.mapping=hp,le.texture.name="PMREM.cubeUv",le.scissorTest=!0,le}function jd(_e,F,q,le,De){_e.viewport.set(F,q,le,De),_e.scissor.set(F,q,le,De)}function pM(_e,F,q){const le=new Float32Array(eh),De=new bn(0,1,0);return new mc({name:"SphericalGaussianBlur",defines:{n:eh,CUBEUV_TEXEL_WIDTH:1/F,CUBEUV_TEXEL_HEIGHT:1/q,CUBEUV_MAX_MIP:`${_e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:le},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:De}},vertexShader:Z0(),fragmentShader:` +}`,ua={alphahash_fragment:E2,alphahash_pars_fragment:_2,alphamap_fragment:C2,alphamap_pars_fragment:L2,alphatest_fragment:P2,alphatest_pars_fragment:R2,aomap_fragment:D2,aomap_pars_fragment:I2,batching_pars_vertex:F2,batching_vertex:z2,begin_vertex:k2,beginnormal_vertex:O2,bsdfs:N2,iridescence_fragment:B2,bumpmap_pars_fragment:U2,clipping_planes_fragment:H2,clipping_planes_pars_fragment:V2,clipping_planes_pars_vertex:G2,clipping_planes_vertex:W2,color_fragment:Y2,color_pars_fragment:X2,color_pars_vertex:Z2,color_vertex:j2,common:K2,cube_uv_reflection_fragment:J2,defaultnormal_vertex:Q2,displacementmap_pars_vertex:$2,displacementmap_vertex:q2,emissivemap_fragment:tT,emissivemap_pars_fragment:eT,colorspace_fragment:rT,colorspace_pars_fragment:nT,envmap_fragment:iT,envmap_common_pars_fragment:aT,envmap_pars_fragment:oT,envmap_pars_vertex:sT,envmap_physical_pars_fragment:xT,envmap_vertex:lT,fog_vertex:uT,fog_pars_vertex:fT,fog_fragment:cT,fog_pars_fragment:hT,gradientmap_pars_fragment:vT,lightmap_fragment:dT,lightmap_pars_fragment:pT,lights_lambert_fragment:gT,lights_lambert_pars_fragment:mT,lights_pars_begin:yT,lights_toon_fragment:bT,lights_toon_pars_fragment:wT,lights_phong_fragment:TT,lights_phong_pars_fragment:AT,lights_physical_fragment:MT,lights_physical_pars_fragment:ST,lights_fragment_begin:ET,lights_fragment_maps:_T,lights_fragment_end:CT,logdepthbuf_fragment:LT,logdepthbuf_pars_fragment:PT,logdepthbuf_pars_vertex:RT,logdepthbuf_vertex:DT,map_fragment:IT,map_pars_fragment:FT,map_particle_fragment:zT,map_particle_pars_fragment:kT,metalnessmap_fragment:OT,metalnessmap_pars_fragment:NT,morphinstance_vertex:BT,morphcolor_vertex:UT,morphnormal_vertex:HT,morphtarget_pars_vertex:VT,morphtarget_vertex:GT,normal_fragment_begin:WT,normal_fragment_maps:YT,normal_pars_fragment:XT,normal_pars_vertex:ZT,normal_vertex:jT,normalmap_pars_fragment:KT,clearcoat_normal_fragment_begin:JT,clearcoat_normal_fragment_maps:QT,clearcoat_pars_fragment:$T,iridescence_pars_fragment:qT,opaque_fragment:tA,packing:eA,premultiplied_alpha_fragment:rA,project_vertex:nA,dithering_fragment:iA,dithering_pars_fragment:aA,roughnessmap_fragment:oA,roughnessmap_pars_fragment:sA,shadowmap_pars_fragment:lA,shadowmap_pars_vertex:uA,shadowmap_vertex:fA,shadowmask_pars_fragment:cA,skinbase_vertex:hA,skinning_pars_vertex:vA,skinning_vertex:dA,skinnormal_vertex:pA,specularmap_fragment:gA,specularmap_pars_fragment:mA,tonemapping_fragment:yA,tonemapping_pars_fragment:xA,transmission_fragment:bA,transmission_pars_fragment:wA,uv_pars_fragment:TA,uv_pars_vertex:AA,uv_vertex:MA,worldpos_vertex:SA,background_vert:EA,background_frag:_A,backgroundCube_vert:CA,backgroundCube_frag:LA,cube_vert:PA,cube_frag:RA,depth_vert:DA,depth_frag:IA,distanceRGBA_vert:FA,distanceRGBA_frag:zA,equirect_vert:kA,equirect_frag:OA,linedashed_vert:NA,linedashed_frag:BA,meshbasic_vert:UA,meshbasic_frag:HA,meshlambert_vert:VA,meshlambert_frag:GA,meshmatcap_vert:WA,meshmatcap_frag:YA,meshnormal_vert:XA,meshnormal_frag:ZA,meshphong_vert:jA,meshphong_frag:KA,meshphysical_vert:JA,meshphysical_frag:QA,meshtoon_vert:$A,meshtoon_frag:qA,points_vert:tM,points_frag:eM,shadow_vert:rM,shadow_frag:nM,sprite_vert:iM,sprite_frag:aM},_i={common:{diffuse:{value:new ha(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new fa},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new fa}},envmap:{envMap:{value:null},envMapRotation:{value:new fa},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new fa}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new fa}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new fa},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new fa},normalScale:{value:new Wi(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new fa},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new fa}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new fa}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new fa}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new ha(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ha(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0},uvTransform:{value:new fa}},sprite:{diffuse:{value:new ha(16777215)},opacity:{value:1},center:{value:new Wi(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new fa},alphaMap:{value:null},alphaMapTransform:{value:new fa},alphaTest:{value:0}}},Fu={basic:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.fog]),vertexShader:ua.meshbasic_vert,fragmentShader:ua.meshbasic_frag},lambert:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,_i.lights,{emissive:{value:new ha(0)}}]),vertexShader:ua.meshlambert_vert,fragmentShader:ua.meshlambert_frag},phong:{uniforms:Ms([_i.common,_i.specularmap,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,_i.lights,{emissive:{value:new ha(0)},specular:{value:new ha(1118481)},shininess:{value:30}}]),vertexShader:ua.meshphong_vert,fragmentShader:ua.meshphong_frag},standard:{uniforms:Ms([_i.common,_i.envmap,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.roughnessmap,_i.metalnessmap,_i.fog,_i.lights,{emissive:{value:new ha(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ua.meshphysical_vert,fragmentShader:ua.meshphysical_frag},toon:{uniforms:Ms([_i.common,_i.aomap,_i.lightmap,_i.emissivemap,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.gradientmap,_i.fog,_i.lights,{emissive:{value:new ha(0)}}]),vertexShader:ua.meshtoon_vert,fragmentShader:ua.meshtoon_frag},matcap:{uniforms:Ms([_i.common,_i.bumpmap,_i.normalmap,_i.displacementmap,_i.fog,{matcap:{value:null}}]),vertexShader:ua.meshmatcap_vert,fragmentShader:ua.meshmatcap_frag},points:{uniforms:Ms([_i.points,_i.fog]),vertexShader:ua.points_vert,fragmentShader:ua.points_frag},dashed:{uniforms:Ms([_i.common,_i.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ua.linedashed_vert,fragmentShader:ua.linedashed_frag},depth:{uniforms:Ms([_i.common,_i.displacementmap]),vertexShader:ua.depth_vert,fragmentShader:ua.depth_frag},normal:{uniforms:Ms([_i.common,_i.bumpmap,_i.normalmap,_i.displacementmap,{opacity:{value:1}}]),vertexShader:ua.meshnormal_vert,fragmentShader:ua.meshnormal_frag},sprite:{uniforms:Ms([_i.sprite,_i.fog]),vertexShader:ua.sprite_vert,fragmentShader:ua.sprite_frag},background:{uniforms:{uvTransform:{value:new fa},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ua.background_vert,fragmentShader:ua.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new fa}},vertexShader:ua.backgroundCube_vert,fragmentShader:ua.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ua.cube_vert,fragmentShader:ua.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ua.equirect_vert,fragmentShader:ua.equirect_frag},distanceRGBA:{uniforms:Ms([_i.common,_i.displacementmap,{referencePosition:{value:new bn},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ua.distanceRGBA_vert,fragmentShader:ua.distanceRGBA_frag},shadow:{uniforms:Ms([_i.lights,_i.fog,{color:{value:new ha(0)},opacity:{value:1}}]),vertexShader:ua.shadow_vert,fragmentShader:ua.shadow_frag}};Fu.physical={uniforms:Ms([Fu.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new fa},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new fa},clearcoatNormalScale:{value:new Wi(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new fa},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new fa},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new fa},sheen:{value:0},sheenColor:{value:new ha(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new fa},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new fa},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new fa},transmissionSamplerSize:{value:new Wi},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new fa},attenuationDistance:{value:0},attenuationColor:{value:new ha(0)},specularColor:{value:new ha(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new fa},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new fa},anisotropyVector:{value:new Wi},anisotropyMap:{value:null},anisotropyMapTransform:{value:new fa}}]),vertexShader:ua.meshphysical_vert,fragmentShader:ua.meshphysical_frag};const Kd={r:0,b:0,g:0},Kc=new Ss,oM=new so;function sM(_t,F,q,lt,Dt,Zt,G){const U=new ha(0);let t=Zt===!0?0:1,g,C,i=null,S=0,x=null;function v(r,e){let a=!1,n=e.isScene===!0?e.background:null;n&&n.isTexture&&(n=(e.backgroundBlurriness>0?q:F).get(n)),n===null?p(U,t):n&&n.isColor&&(p(n,1),a=!0);const f=_t.xr.getEnvironmentBlendMode();f==="additive"?lt.buffers.color.setClear(0,0,0,1,G):f==="alpha-blend"&<.buffers.color.setClear(0,0,0,0,G),(_t.autoClear||a)&&_t.clear(_t.autoClearColor,_t.autoClearDepth,_t.autoClearStencil),n&&(n.isCubeTexture||n.mapping===vp)?(C===void 0&&(C=new Vs(new hv(1,1,1),new gc({name:"BackgroundCubeMaterial",uniforms:fv(Fu.backgroundCube.uniforms),vertexShader:Fu.backgroundCube.vertexShader,fragmentShader:Fu.backgroundCube.fragmentShader,side:Gs,depthTest:!1,depthWrite:!1,fog:!1})),C.geometry.deleteAttribute("normal"),C.geometry.deleteAttribute("uv"),C.onBeforeRender=function(c,l,m){this.matrixWorld.copyPosition(m.matrixWorld)},Object.defineProperty(C.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),Dt.update(C)),Kc.copy(e.backgroundRotation),Kc.x*=-1,Kc.y*=-1,Kc.z*=-1,n.isCubeTexture&&n.isRenderTargetTexture===!1&&(Kc.y*=-1,Kc.z*=-1),C.material.uniforms.envMap.value=n,C.material.uniforms.flipEnvMap.value=n.isCubeTexture&&n.isRenderTargetTexture===!1?-1:1,C.material.uniforms.backgroundBlurriness.value=e.backgroundBlurriness,C.material.uniforms.backgroundIntensity.value=e.backgroundIntensity,C.material.uniforms.backgroundRotation.value.setFromMatrix4(oM.makeRotationFromEuler(Kc)),C.material.toneMapped=Fa.getTransfer(n.colorSpace)!==Ya,(i!==n||S!==n.version||x!==_t.toneMapping)&&(C.material.needsUpdate=!0,i=n,S=n.version,x=_t.toneMapping),C.layers.enableAll(),r.unshift(C,C.geometry,C.material,0,0,null)):n&&n.isTexture&&(g===void 0&&(g=new Vs(new pp(2,2),new gc({name:"BackgroundMaterial",uniforms:fv(Fu.background.uniforms),vertexShader:Fu.background.vertexShader,fragmentShader:Fu.background.fragmentShader,side:Nu,depthTest:!1,depthWrite:!1,fog:!1})),g.geometry.deleteAttribute("normal"),Object.defineProperty(g.material,"map",{get:function(){return this.uniforms.t2D.value}}),Dt.update(g)),g.material.uniforms.t2D.value=n,g.material.uniforms.backgroundIntensity.value=e.backgroundIntensity,g.material.toneMapped=Fa.getTransfer(n.colorSpace)!==Ya,n.matrixAutoUpdate===!0&&n.updateMatrix(),g.material.uniforms.uvTransform.value.copy(n.matrix),(i!==n||S!==n.version||x!==_t.toneMapping)&&(g.material.needsUpdate=!0,i=n,S=n.version,x=_t.toneMapping),g.layers.enableAll(),r.unshift(g,g.geometry,g.material,0,0,null))}function p(r,e){r.getRGB(Kd,s1(_t)),lt.buffers.color.setClear(Kd.r,Kd.g,Kd.b,e,G)}return{getClearColor:function(){return U},setClearColor:function(r,e=1){U.set(r),t=e,p(U,t)},getClearAlpha:function(){return t},setClearAlpha:function(r){t=r,p(U,t)},render:v}}function lM(_t,F){const q=_t.getParameter(_t.MAX_VERTEX_ATTRIBS),lt={},Dt=S(null);let Zt=Dt,G=!1;function U(u,o,d,w,A){let _=!1;const y=i(w,d,o);Zt!==y&&(Zt=y,g(Zt.object)),_=x(u,w,d,A),_&&v(u,w,d,A),A!==null&&F.update(A,_t.ELEMENT_ARRAY_BUFFER),(_||G)&&(G=!1,f(u,o,d,w),A!==null&&_t.bindBuffer(_t.ELEMENT_ARRAY_BUFFER,F.get(A).buffer))}function t(){return _t.createVertexArray()}function g(u){return _t.bindVertexArray(u)}function C(u){return _t.deleteVertexArray(u)}function i(u,o,d){const w=d.wireframe===!0;let A=lt[u.id];A===void 0&&(A={},lt[u.id]=A);let _=A[o.id];_===void 0&&(_={},A[o.id]=_);let y=_[w];return y===void 0&&(y=S(t()),_[w]=y),y}function S(u){const o=[],d=[],w=[];for(let A=0;A=0){const L=A[T];let M=_[T];if(M===void 0&&(T==="instanceMatrix"&&u.instanceMatrix&&(M=u.instanceMatrix),T==="instanceColor"&&u.instanceColor&&(M=u.instanceColor)),L===void 0||L.attribute!==M||M&&L.data!==M.data)return!0;y++}return Zt.attributesNum!==y||Zt.index!==w}function v(u,o,d,w){const A={},_=o.attributes;let y=0;const E=d.getAttributes();for(const T in E)if(E[T].location>=0){let L=_[T];L===void 0&&(T==="instanceMatrix"&&u.instanceMatrix&&(L=u.instanceMatrix),T==="instanceColor"&&u.instanceColor&&(L=u.instanceColor));const M={};M.attribute=L,L&&L.data&&(M.data=L.data),A[T]=M,y++}Zt.attributes=A,Zt.attributesNum=y,Zt.index=w}function p(){const u=Zt.newAttributes;for(let o=0,d=u.length;o=0){let s=A[E];if(s===void 0&&(E==="instanceMatrix"&&u.instanceMatrix&&(s=u.instanceMatrix),E==="instanceColor"&&u.instanceColor&&(s=u.instanceColor)),s!==void 0){const L=s.normalized,M=s.itemSize,z=F.get(s);if(z===void 0)continue;const D=z.buffer,N=z.type,I=z.bytesPerElement,k=N===_t.INT||N===_t.UNSIGNED_INT||s.gpuType===Xy;if(s.isInterleavedBufferAttribute){const B=s.data,O=B.stride,H=s.offset;if(B.isInstancedInterleavedBuffer){for(let Y=0;Y0&&_t.getShaderPrecisionFormat(_t.FRAGMENT_SHADER,_t.HIGH_FLOAT).precision>0)return"highp";n="mediump"}return n==="mediump"&&_t.getShaderPrecisionFormat(_t.VERTEX_SHADER,_t.MEDIUM_FLOAT).precision>0&&_t.getShaderPrecisionFormat(_t.FRAGMENT_SHADER,_t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let G=q.precision!==void 0?q.precision:"highp";const U=Zt(G);U!==G&&(console.warn("THREE.WebGLRenderer:",G,"not supported, using",U,"instead."),G=U);const t=q.logarithmicDepthBuffer===!0,g=_t.getParameter(_t.MAX_TEXTURE_IMAGE_UNITS),C=_t.getParameter(_t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),i=_t.getParameter(_t.MAX_TEXTURE_SIZE),S=_t.getParameter(_t.MAX_CUBE_MAP_TEXTURE_SIZE),x=_t.getParameter(_t.MAX_VERTEX_ATTRIBS),v=_t.getParameter(_t.MAX_VERTEX_UNIFORM_VECTORS),p=_t.getParameter(_t.MAX_VARYING_VECTORS),r=_t.getParameter(_t.MAX_FRAGMENT_UNIFORM_VECTORS),e=C>0,a=_t.getParameter(_t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:Dt,getMaxPrecision:Zt,precision:G,logarithmicDepthBuffer:t,maxTextures:g,maxVertexTextures:C,maxTextureSize:i,maxCubemapSize:S,maxAttributes:x,maxVertexUniforms:v,maxVaryings:p,maxFragmentUniforms:r,vertexTextures:e,maxSamples:a}}function cM(_t){const F=this;let q=null,lt=0,Dt=!1,Zt=!1;const G=new fc,U=new fa,t={value:null,needsUpdate:!1};this.uniform=t,this.numPlanes=0,this.numIntersection=0,this.init=function(i,S){const x=i.length!==0||S||lt!==0||Dt;return Dt=S,lt=i.length,x},this.beginShadows=function(){Zt=!0,C(null)},this.endShadows=function(){Zt=!1},this.setGlobalState=function(i,S){q=C(i,S,0)},this.setState=function(i,S,x){const v=i.clippingPlanes,p=i.clipIntersection,r=i.clipShadows,e=_t.get(i);if(!Dt||v===null||v.length===0||Zt&&!r)Zt?C(null):g();else{const a=Zt?0:lt,n=a*4;let f=e.clippingState||null;t.value=f,f=C(v,S,n,x);for(let c=0;c!==n;++c)f[c]=q[c];e.clippingState=f,this.numIntersection=p?this.numPlanes:0,this.numPlanes+=a}};function g(){t.value!==q&&(t.value=q,t.needsUpdate=lt>0),F.numPlanes=lt,F.numIntersection=0}function C(i,S,x,v){const p=i!==null?i.length:0;let r=null;if(p!==0){if(r=t.value,v!==!0||r===null){const e=x+p*4,a=S.matrixWorldInverse;U.getNormalMatrix(a),(r===null||r.length0){const g=new T2(t.height);return g.fromEquirectangularTexture(_t,G),F.set(G,g),G.addEventListener("dispose",Dt),q(g.texture,G.mapping)}else return null}}return G}function Dt(G){const U=G.target;U.removeEventListener("dispose",Dt);const t=F.get(U);t!==void 0&&(F.delete(U),t.dispose())}function Zt(){F=new WeakMap}return{get:lt,dispose:Zt}}class gp extends l1{constructor(F=-1,q=1,lt=1,Dt=-1,Zt=.1,G=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=F,this.right=q,this.top=lt,this.bottom=Dt,this.near=Zt,this.far=G,this.updateProjectionMatrix()}copy(F,q){return super.copy(F,q),this.left=F.left,this.right=F.right,this.top=F.top,this.bottom=F.bottom,this.near=F.near,this.far=F.far,this.zoom=F.zoom,this.view=F.view===null?null:Object.assign({},F.view),this}setViewOffset(F,q,lt,Dt,Zt,G){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=F,this.view.fullHeight=q,this.view.offsetX=lt,this.view.offsetY=Dt,this.view.width=Zt,this.view.height=G,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const F=(this.right-this.left)/(2*this.zoom),q=(this.top-this.bottom)/(2*this.zoom),lt=(this.right+this.left)/2,Dt=(this.top+this.bottom)/2;let Zt=lt-F,G=lt+F,U=Dt+q,t=Dt-q;if(this.view!==null&&this.view.enabled){const g=(this.right-this.left)/this.view.fullWidth/this.zoom,C=(this.top-this.bottom)/this.view.fullHeight/this.zoom;Zt+=g*this.view.offsetX,G=Zt+g*this.view.width,U-=C*this.view.offsetY,t=U-C*this.view.height}this.projectionMatrix.makeOrthographic(Zt,G,U,t,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(F){const q=super.toJSON(F);return q.object.zoom=this.zoom,q.object.left=this.left,q.object.right=this.right,q.object.top=this.top,q.object.bottom=this.bottom,q.object.near=this.near,q.object.far=this.far,this.view!==null&&(q.object.view=Object.assign({},this.view)),q}}const ev=4,ey=[.125,.215,.35,.446,.526,.582],qc=20,T0=new gp,ry=new ha;let A0=null,M0=0,S0=0,E0=!1;const Qc=(1+Math.sqrt(5))/2,Kh=1/Qc,ny=[new bn(1,1,1),new bn(-1,1,1),new bn(1,1,-1),new bn(-1,1,-1),new bn(0,Qc,Kh),new bn(0,Qc,-Kh),new bn(Kh,0,Qc),new bn(-Kh,0,Qc),new bn(Qc,Kh,0),new bn(-Qc,Kh,0)];class iy{constructor(F){this._renderer=F,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(F,q=0,lt=.1,Dt=100){A0=this._renderer.getRenderTarget(),M0=this._renderer.getActiveCubeFace(),S0=this._renderer.getActiveMipmapLevel(),E0=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const Zt=this._allocateTargets();return Zt.depthBuffer=!0,this._sceneToCubeUV(F,lt,Dt,Zt),q>0&&this._blur(Zt,0,0,q),this._applyPMREM(Zt),this._cleanup(Zt),Zt}fromEquirectangular(F,q=null){return this._fromTexture(F,q)}fromCubemap(F,q=null){return this._fromTexture(F,q)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=sy(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=oy(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(F){this._lodMax=Math.floor(Math.log2(F)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let F=0;F2?n:0,n,n),C.setRenderTarget(Dt),p&&C.render(v,U),C.render(F,U)}v.geometry.dispose(),v.material.dispose(),C.toneMapping=S,C.autoClear=i,F.background=r}_textureToCubeUV(F,q){const lt=this._renderer,Dt=F.mapping===sv||F.mapping===lv;Dt?(this._cubemapMaterial===null&&(this._cubemapMaterial=sy()),this._cubemapMaterial.uniforms.flipEnvMap.value=F.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=oy());const Zt=Dt?this._cubemapMaterial:this._equirectMaterial,G=new Vs(this._lodPlanes[0],Zt),U=Zt.uniforms;U.envMap.value=F;const t=this._cubeSize;Jd(q,0,0,3*t,2*t),lt.setRenderTarget(q),lt.render(G,T0)}_applyPMREM(F){const q=this._renderer,lt=q.autoClear;q.autoClear=!1;for(let Dt=1;Dtqc&&console.warn(`sigmaRadians, ${Zt}, is too large and will clip, as it requested ${r} samples when the maximum is set to ${qc}`);const e=[];let a=0;for(let m=0;mn-ev?Dt-n+ev:0),l=4*(this._cubeSize-f);Jd(q,c,l,3*f,2*f),t.setRenderTarget(q),t.render(i,T0)}}function vM(_t){const F=[],q=[],lt=[];let Dt=_t;const Zt=_t-ev+1+ey.length;for(let G=0;G_t-ev?t=ey[G-_t+ev-1]:G===0&&(t=0),lt.push(t);const g=1/(U-2),C=-g,i=1+g,S=[C,C,i,C,i,i,C,C,i,i,C,i],x=6,v=6,p=3,r=2,e=1,a=new Float32Array(p*v*x),n=new Float32Array(r*v*x),f=new Float32Array(e*v*x);for(let l=0;l2?0:-1,b=[m,h,0,m+2/3,h,0,m+2/3,h+1,0,m,h,0,m+2/3,h+1,0,m,h+1,0];a.set(b,p*v*l),n.set(S,r*v*l);const u=[l,l,l,l,l,l];f.set(u,e*v*l)}const c=new Ys;c.setAttribute("position",new Ws(a,p)),c.setAttribute("uv",new Ws(n,r)),c.setAttribute("faceIndex",new Ws(f,e)),F.push(c),Dt>ev&&Dt--}return{lodPlanes:F,sizeLods:q,sigmas:lt}}function ay(_t,F,q){const lt=new rh(_t,F,q);return lt.texture.mapping=vp,lt.texture.name="PMREM.cubeUv",lt.scissorTest=!0,lt}function Jd(_t,F,q,lt,Dt){_t.viewport.set(F,q,lt,Dt),_t.scissor.set(F,q,lt,Dt)}function dM(_t,F,q){const lt=new Float32Array(qc),Dt=new bn(0,1,0);return new gc({name:"SphericalGaussianBlur",defines:{n:qc,CUBEUV_TEXEL_WIDTH:1/F,CUBEUV_TEXEL_HEIGHT:1/q,CUBEUV_MAX_MIP:`${_t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:lt},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:Dt}},vertexShader:j0(),fragmentShader:` precision mediump float; precision mediump int; @@ -3603,7 +3603,7 @@ void main() { } } - `,blending:hc,depthTest:!1,depthWrite:!1})}function ay(){return new mc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Z0(),fragmentShader:` + `,blending:vc,depthTest:!1,depthWrite:!1})}function oy(){return new gc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:j0(),fragmentShader:` precision mediump float; precision mediump int; @@ -3622,7 +3622,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:hc,depthTest:!1,depthWrite:!1})}function oy(){return new mc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Z0(),fragmentShader:` + `,blending:vc,depthTest:!1,depthWrite:!1})}function sy(){return new gc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:j0(),fragmentShader:` precision mediump float; precision mediump int; @@ -3638,7 +3638,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:hc,depthTest:!1,depthWrite:!1})}function Z0(){return` + `,blending:vc,depthTest:!1,depthWrite:!1})}function j0(){return` precision mediump float; precision mediump int; @@ -3693,58 +3693,58 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function gM(_e){let F=new WeakMap,q=null;function le(U){if(U&&U.isTexture){const e=U.mapping,g=e===I0||e===F0,C=e===sv||e===lv;if(g||C){let i=F.get(U);const S=i!==void 0?i.texture.pmremVersion:0;if(U.isRenderTargetTexture&&U.pmremVersion!==S)return q===null&&(q=new ny(_e)),i=g?q.fromEquirectangular(U,i):q.fromCubemap(U,i),i.texture.pmremVersion=U.pmremVersion,F.set(U,i),i.texture;if(i!==void 0)return i.texture;{const x=U.image;return g&&x&&x.height>0||C&&x&&De(x)?(q===null&&(q=new ny(_e)),i=g?q.fromEquirectangular(U):q.fromCubemap(U),i.texture.pmremVersion=U.pmremVersion,F.set(U,i),U.addEventListener("dispose",Xe),i.texture):null}}}return U}function De(U){let e=0;const g=6;for(let C=0;CF.maxTextureSize&&(c=Math.ceil(f/F.maxTextureSize),f=F.maxTextureSize);const l=new Float32Array(f*c*4*i),m=new t1(l,f,c,i);m.type=cc,m.needsUpdate=!0;const h=n*4;for(let u=0;u0)return _e;const De=F*q;let Xe=sy[De];if(Xe===void 0&&(Xe=new Float32Array(De),sy[De]=Xe),F!==0){le.toArray(Xe,0);for(let H=1,U=0;H!==F;++H)U+=q,_e[H].toArray(Xe,U)}return Xe}function Po(_e,F){if(_e.length!==F.length)return!1;for(let q=0,le=_e.length;q":" "} ${U}: ${q[H]}`)}return le.join(` -`)}function g4(_e){const F=Fa.getPrimaries(Fa.workingColorSpace),q=Fa.getPrimaries(_e);let le;switch(F===q?le="":F===lp&&q===sp?le="LinearDisplayP3ToLinearSRGB":F===sp&&q===lp&&(le="LinearSRGBToLinearDisplayP3"),_e){case yc:case vp:return[le,"LinearTransferOETF"];case Iu:case G0:return[le,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",_e),[le,"LinearTransferOETF"]}}function dy(_e,F,q){const le=_e.getShaderParameter(F,_e.COMPILE_STATUS),De=_e.getShaderInfoLog(F).trim();if(le&&De==="")return"";const Xe=/ERROR: 0:(\d+)/.exec(De);if(Xe){const H=parseInt(Xe[1]);return q.toUpperCase()+` - -`+De+` - -`+p4(_e.getShaderSource(F),H)}else return De}function m4(_e,F){const q=g4(F);return`vec4 ${_e}( vec4 value ) { return ${q[0]}( ${q[1]}( value ) ); }`}function y4(_e,F){let q;switch(F){case uw:q="Linear";break;case fw:q="Reinhard";break;case cw:q="OptimizedCineon";break;case hw:q="ACESFilmic";break;case dw:q="AgX";break;case pw:q="Neutral";break;case vw:q="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",F),q="Linear"}return"vec3 "+_e+"( vec3 color ) { return "+q+"ToneMapping( color ); }"}function x4(_e){return[_e.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",_e.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Gv).join(` -`)}function b4(_e){const F=[];for(const q in _e){const le=_e[q];le!==!1&&F.push("#define "+q+" "+le)}return F.join(` -`)}function w4(_e,F){const q={},le=_e.getProgramParameter(F,_e.ACTIVE_ATTRIBUTES);for(let De=0;De/gm;function N0(_e){return _e.replace(T4,M4)}const A4=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function M4(_e,F){let q=ua[F];if(q===void 0){const le=A4.get(F);if(le!==void 0)q=ua[le],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',F,le);else throw new Error("Can not resolve #include <"+F+">")}return N0(q)}const S4=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function my(_e){return _e.replace(S4,E4)}function E4(_e,F,q,le){let De="";for(let Xe=parseInt(F);Xe0||C&&x&&Dt(x)?(q===null&&(q=new iy(_t)),i=g?q.fromEquirectangular(U):q.fromCubemap(U),i.texture.pmremVersion=U.pmremVersion,F.set(U,i),U.addEventListener("dispose",Zt),i.texture):null}}}return U}function Dt(U){let t=0;const g=6;for(let C=0;CF.maxTextureSize&&(c=Math.ceil(f/F.maxTextureSize),f=F.maxTextureSize);const l=new Float32Array(f*c*4*i),m=new n1(l,f,c,i);m.type=hc,m.needsUpdate=!0;const h=n*4;for(let u=0;u0)return _t;const Dt=F*q;let Zt=ly[Dt];if(Zt===void 0&&(Zt=new Float32Array(Dt),ly[Dt]=Zt),F!==0){lt.toArray(Zt,0);for(let G=1,U=0;G!==F;++G)U+=q,_t[G].toArray(Zt,U)}return Zt}function Po(_t,F){if(_t.length!==F.length)return!1;for(let q=0,lt=_t.length;q":" "} ${U}: ${q[G]}`)}return lt.join(` +`)}function p4(_t){const F=Fa.getPrimaries(Fa.workingColorSpace),q=Fa.getPrimaries(_t);let lt;switch(F===q?lt="":F===up&&q===lp?lt="LinearDisplayP3ToLinearSRGB":F===lp&&q===up&&(lt="LinearSRGBToLinearDisplayP3"),_t){case mc:case dp:return[lt,"LinearTransferOETF"];case Iu:case Y0:return[lt,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",_t),[lt,"LinearTransferOETF"]}}function py(_t,F,q){const lt=_t.getShaderParameter(F,_t.COMPILE_STATUS),Dt=_t.getShaderInfoLog(F).trim();if(lt&&Dt==="")return"";const Zt=/ERROR: 0:(\d+)/.exec(Dt);if(Zt){const G=parseInt(Zt[1]);return q.toUpperCase()+` + +`+Dt+` + +`+d4(_t.getShaderSource(F),G)}else return Dt}function g4(_t,F){const q=p4(F);return`vec4 ${_t}( vec4 value ) { return ${q[0]}( ${q[1]}( value ) ); }`}function m4(_t,F){let q;switch(F){case lw:q="Linear";break;case uw:q="Reinhard";break;case fw:q="OptimizedCineon";break;case cw:q="ACESFilmic";break;case vw:q="AgX";break;case dw:q="Neutral";break;case hw:q="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",F),q="Linear"}return"vec3 "+_t+"( vec3 color ) { return "+q+"ToneMapping( color ); }"}function y4(_t){return[_t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",_t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Wv).join(` +`)}function x4(_t){const F=[];for(const q in _t){const lt=_t[q];lt!==!1&&F.push("#define "+q+" "+lt)}return F.join(` +`)}function b4(_t,F){const q={},lt=_t.getProgramParameter(F,_t.ACTIVE_ATTRIBUTES);for(let Dt=0;Dt/gm;function U0(_t){return _t.replace(w4,A4)}const T4=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function A4(_t,F){let q=ua[F];if(q===void 0){const lt=T4.get(F);if(lt!==void 0)q=ua[lt],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',F,lt);else throw new Error("Can not resolve #include <"+F+">")}return U0(q)}const M4=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function yy(_t){return _t.replace(M4,S4)}function S4(_t,F,q,lt){let Dt="";for(let Zt=parseInt(F);Zt0&&(r+=` -`),t=["#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,v].filter(Gv).join(` -`),t.length>0&&(t+=` -`)):(r=[yy(q),"#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,v,q.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",q.batching?"#define USE_BATCHING":"",q.instancing?"#define USE_INSTANCING":"",q.instancingColor?"#define USE_INSTANCING_COLOR":"",q.instancingMorph?"#define USE_INSTANCING_MORPH":"",q.useFog&&q.fog?"#define USE_FOG":"",q.useFog&&q.fogExp2?"#define FOG_EXP2":"",q.map?"#define USE_MAP":"",q.envMap?"#define USE_ENVMAP":"",q.envMap?"#define "+C:"",q.lightMap?"#define USE_LIGHTMAP":"",q.aoMap?"#define USE_AOMAP":"",q.bumpMap?"#define USE_BUMPMAP":"",q.normalMap?"#define USE_NORMALMAP":"",q.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",q.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",q.displacementMap?"#define USE_DISPLACEMENTMAP":"",q.emissiveMap?"#define USE_EMISSIVEMAP":"",q.anisotropy?"#define USE_ANISOTROPY":"",q.anisotropyMap?"#define USE_ANISOTROPYMAP":"",q.clearcoatMap?"#define USE_CLEARCOATMAP":"",q.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",q.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",q.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",q.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",q.specularMap?"#define USE_SPECULARMAP":"",q.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",q.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",q.roughnessMap?"#define USE_ROUGHNESSMAP":"",q.metalnessMap?"#define USE_METALNESSMAP":"",q.alphaMap?"#define USE_ALPHAMAP":"",q.alphaHash?"#define USE_ALPHAHASH":"",q.transmission?"#define USE_TRANSMISSION":"",q.transmissionMap?"#define USE_TRANSMISSIONMAP":"",q.thicknessMap?"#define USE_THICKNESSMAP":"",q.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",q.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",q.mapUv?"#define MAP_UV "+q.mapUv:"",q.alphaMapUv?"#define ALPHAMAP_UV "+q.alphaMapUv:"",q.lightMapUv?"#define LIGHTMAP_UV "+q.lightMapUv:"",q.aoMapUv?"#define AOMAP_UV "+q.aoMapUv:"",q.emissiveMapUv?"#define EMISSIVEMAP_UV "+q.emissiveMapUv:"",q.bumpMapUv?"#define BUMPMAP_UV "+q.bumpMapUv:"",q.normalMapUv?"#define NORMALMAP_UV "+q.normalMapUv:"",q.displacementMapUv?"#define DISPLACEMENTMAP_UV "+q.displacementMapUv:"",q.metalnessMapUv?"#define METALNESSMAP_UV "+q.metalnessMapUv:"",q.roughnessMapUv?"#define ROUGHNESSMAP_UV "+q.roughnessMapUv:"",q.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+q.anisotropyMapUv:"",q.clearcoatMapUv?"#define CLEARCOATMAP_UV "+q.clearcoatMapUv:"",q.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+q.clearcoatNormalMapUv:"",q.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+q.clearcoatRoughnessMapUv:"",q.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+q.iridescenceMapUv:"",q.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+q.iridescenceThicknessMapUv:"",q.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+q.sheenColorMapUv:"",q.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+q.sheenRoughnessMapUv:"",q.specularMapUv?"#define SPECULARMAP_UV "+q.specularMapUv:"",q.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+q.specularColorMapUv:"",q.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+q.specularIntensityMapUv:"",q.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+q.transmissionMapUv:"",q.thicknessMapUv?"#define THICKNESSMAP_UV "+q.thicknessMapUv:"",q.vertexTangents&&q.flatShading===!1?"#define USE_TANGENT":"",q.vertexColors?"#define USE_COLOR":"",q.vertexAlphas?"#define USE_COLOR_ALPHA":"",q.vertexUv1s?"#define USE_UV1":"",q.vertexUv2s?"#define USE_UV2":"",q.vertexUv3s?"#define USE_UV3":"",q.pointsUvs?"#define USE_POINTS_UV":"",q.flatShading?"#define FLAT_SHADED":"",q.skinning?"#define USE_SKINNING":"",q.morphTargets?"#define USE_MORPHTARGETS":"",q.morphNormals&&q.flatShading===!1?"#define USE_MORPHNORMALS":"",q.morphColors?"#define USE_MORPHCOLORS":"",q.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE":"",q.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+q.morphTextureStride:"",q.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+q.morphTargetsCount:"",q.doubleSided?"#define DOUBLE_SIDED":"",q.flipSided?"#define FLIP_SIDED":"",q.shadowMapEnabled?"#define USE_SHADOWMAP":"",q.shadowMapEnabled?"#define "+e:"",q.sizeAttenuation?"#define USE_SIZEATTENUATION":"",q.numLightProbes>0?"#define USE_LIGHT_PROBES":"",q.useLegacyLights?"#define LEGACY_LIGHTS":"",q.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(Gv).join(` -`),t=[yy(q),"#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,v,q.useFog&&q.fog?"#define USE_FOG":"",q.useFog&&q.fogExp2?"#define FOG_EXP2":"",q.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",q.map?"#define USE_MAP":"",q.matcap?"#define USE_MATCAP":"",q.envMap?"#define USE_ENVMAP":"",q.envMap?"#define "+g:"",q.envMap?"#define "+C:"",q.envMap?"#define "+i:"",S?"#define CUBEUV_TEXEL_WIDTH "+S.texelWidth:"",S?"#define CUBEUV_TEXEL_HEIGHT "+S.texelHeight:"",S?"#define CUBEUV_MAX_MIP "+S.maxMip+".0":"",q.lightMap?"#define USE_LIGHTMAP":"",q.aoMap?"#define USE_AOMAP":"",q.bumpMap?"#define USE_BUMPMAP":"",q.normalMap?"#define USE_NORMALMAP":"",q.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",q.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",q.emissiveMap?"#define USE_EMISSIVEMAP":"",q.anisotropy?"#define USE_ANISOTROPY":"",q.anisotropyMap?"#define USE_ANISOTROPYMAP":"",q.clearcoat?"#define USE_CLEARCOAT":"",q.clearcoatMap?"#define USE_CLEARCOATMAP":"",q.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",q.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",q.iridescence?"#define USE_IRIDESCENCE":"",q.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",q.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",q.specularMap?"#define USE_SPECULARMAP":"",q.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",q.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",q.roughnessMap?"#define USE_ROUGHNESSMAP":"",q.metalnessMap?"#define USE_METALNESSMAP":"",q.alphaMap?"#define USE_ALPHAMAP":"",q.alphaTest?"#define USE_ALPHATEST":"",q.alphaHash?"#define USE_ALPHAHASH":"",q.sheen?"#define USE_SHEEN":"",q.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",q.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",q.transmission?"#define USE_TRANSMISSION":"",q.transmissionMap?"#define USE_TRANSMISSIONMAP":"",q.thicknessMap?"#define USE_THICKNESSMAP":"",q.vertexTangents&&q.flatShading===!1?"#define USE_TANGENT":"",q.vertexColors||q.instancingColor?"#define USE_COLOR":"",q.vertexAlphas?"#define USE_COLOR_ALPHA":"",q.vertexUv1s?"#define USE_UV1":"",q.vertexUv2s?"#define USE_UV2":"",q.vertexUv3s?"#define USE_UV3":"",q.pointsUvs?"#define USE_POINTS_UV":"",q.gradientMap?"#define USE_GRADIENTMAP":"",q.flatShading?"#define FLAT_SHADED":"",q.doubleSided?"#define DOUBLE_SIDED":"",q.flipSided?"#define FLIP_SIDED":"",q.shadowMapEnabled?"#define USE_SHADOWMAP":"",q.shadowMapEnabled?"#define "+e:"",q.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",q.numLightProbes>0?"#define USE_LIGHT_PROBES":"",q.useLegacyLights?"#define LEGACY_LIGHTS":"",q.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",q.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",q.toneMapping!==vc?"#define TONE_MAPPING":"",q.toneMapping!==vc?ua.tonemapping_pars_fragment:"",q.toneMapping!==vc?y4("toneMapping",q.toneMapping):"",q.dithering?"#define DITHERING":"",q.opaque?"#define OPAQUE":"",ua.colorspace_pars_fragment,m4("linearToOutputTexel",q.outputColorSpace),q.useDepthPacking?"#define DEPTH_PACKING "+q.depthPacking:"",` -`].filter(Gv).join(` -`)),H=N0(H),H=py(H,q),H=gy(H,q),U=N0(U),U=py(U,q),U=gy(U,q),H=my(H),U=my(U),q.isRawShaderMaterial!==!0&&(a=`#version 300 es +`),e=["#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,v].filter(Wv).join(` +`),e.length>0&&(e+=` +`)):(r=[xy(q),"#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,v,q.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",q.batching?"#define USE_BATCHING":"",q.instancing?"#define USE_INSTANCING":"",q.instancingColor?"#define USE_INSTANCING_COLOR":"",q.instancingMorph?"#define USE_INSTANCING_MORPH":"",q.useFog&&q.fog?"#define USE_FOG":"",q.useFog&&q.fogExp2?"#define FOG_EXP2":"",q.map?"#define USE_MAP":"",q.envMap?"#define USE_ENVMAP":"",q.envMap?"#define "+C:"",q.lightMap?"#define USE_LIGHTMAP":"",q.aoMap?"#define USE_AOMAP":"",q.bumpMap?"#define USE_BUMPMAP":"",q.normalMap?"#define USE_NORMALMAP":"",q.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",q.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",q.displacementMap?"#define USE_DISPLACEMENTMAP":"",q.emissiveMap?"#define USE_EMISSIVEMAP":"",q.anisotropy?"#define USE_ANISOTROPY":"",q.anisotropyMap?"#define USE_ANISOTROPYMAP":"",q.clearcoatMap?"#define USE_CLEARCOATMAP":"",q.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",q.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",q.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",q.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",q.specularMap?"#define USE_SPECULARMAP":"",q.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",q.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",q.roughnessMap?"#define USE_ROUGHNESSMAP":"",q.metalnessMap?"#define USE_METALNESSMAP":"",q.alphaMap?"#define USE_ALPHAMAP":"",q.alphaHash?"#define USE_ALPHAHASH":"",q.transmission?"#define USE_TRANSMISSION":"",q.transmissionMap?"#define USE_TRANSMISSIONMAP":"",q.thicknessMap?"#define USE_THICKNESSMAP":"",q.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",q.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",q.mapUv?"#define MAP_UV "+q.mapUv:"",q.alphaMapUv?"#define ALPHAMAP_UV "+q.alphaMapUv:"",q.lightMapUv?"#define LIGHTMAP_UV "+q.lightMapUv:"",q.aoMapUv?"#define AOMAP_UV "+q.aoMapUv:"",q.emissiveMapUv?"#define EMISSIVEMAP_UV "+q.emissiveMapUv:"",q.bumpMapUv?"#define BUMPMAP_UV "+q.bumpMapUv:"",q.normalMapUv?"#define NORMALMAP_UV "+q.normalMapUv:"",q.displacementMapUv?"#define DISPLACEMENTMAP_UV "+q.displacementMapUv:"",q.metalnessMapUv?"#define METALNESSMAP_UV "+q.metalnessMapUv:"",q.roughnessMapUv?"#define ROUGHNESSMAP_UV "+q.roughnessMapUv:"",q.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+q.anisotropyMapUv:"",q.clearcoatMapUv?"#define CLEARCOATMAP_UV "+q.clearcoatMapUv:"",q.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+q.clearcoatNormalMapUv:"",q.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+q.clearcoatRoughnessMapUv:"",q.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+q.iridescenceMapUv:"",q.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+q.iridescenceThicknessMapUv:"",q.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+q.sheenColorMapUv:"",q.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+q.sheenRoughnessMapUv:"",q.specularMapUv?"#define SPECULARMAP_UV "+q.specularMapUv:"",q.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+q.specularColorMapUv:"",q.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+q.specularIntensityMapUv:"",q.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+q.transmissionMapUv:"",q.thicknessMapUv?"#define THICKNESSMAP_UV "+q.thicknessMapUv:"",q.vertexTangents&&q.flatShading===!1?"#define USE_TANGENT":"",q.vertexColors?"#define USE_COLOR":"",q.vertexAlphas?"#define USE_COLOR_ALPHA":"",q.vertexUv1s?"#define USE_UV1":"",q.vertexUv2s?"#define USE_UV2":"",q.vertexUv3s?"#define USE_UV3":"",q.pointsUvs?"#define USE_POINTS_UV":"",q.flatShading?"#define FLAT_SHADED":"",q.skinning?"#define USE_SKINNING":"",q.morphTargets?"#define USE_MORPHTARGETS":"",q.morphNormals&&q.flatShading===!1?"#define USE_MORPHNORMALS":"",q.morphColors?"#define USE_MORPHCOLORS":"",q.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE":"",q.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+q.morphTextureStride:"",q.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+q.morphTargetsCount:"",q.doubleSided?"#define DOUBLE_SIDED":"",q.flipSided?"#define FLIP_SIDED":"",q.shadowMapEnabled?"#define USE_SHADOWMAP":"",q.shadowMapEnabled?"#define "+t:"",q.sizeAttenuation?"#define USE_SIZEATTENUATION":"",q.numLightProbes>0?"#define USE_LIGHT_PROBES":"",q.useLegacyLights?"#define LEGACY_LIGHTS":"",q.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(Wv).join(` +`),e=[xy(q),"#define SHADER_TYPE "+q.shaderType,"#define SHADER_NAME "+q.shaderName,v,q.useFog&&q.fog?"#define USE_FOG":"",q.useFog&&q.fogExp2?"#define FOG_EXP2":"",q.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",q.map?"#define USE_MAP":"",q.matcap?"#define USE_MATCAP":"",q.envMap?"#define USE_ENVMAP":"",q.envMap?"#define "+g:"",q.envMap?"#define "+C:"",q.envMap?"#define "+i:"",S?"#define CUBEUV_TEXEL_WIDTH "+S.texelWidth:"",S?"#define CUBEUV_TEXEL_HEIGHT "+S.texelHeight:"",S?"#define CUBEUV_MAX_MIP "+S.maxMip+".0":"",q.lightMap?"#define USE_LIGHTMAP":"",q.aoMap?"#define USE_AOMAP":"",q.bumpMap?"#define USE_BUMPMAP":"",q.normalMap?"#define USE_NORMALMAP":"",q.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",q.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",q.emissiveMap?"#define USE_EMISSIVEMAP":"",q.anisotropy?"#define USE_ANISOTROPY":"",q.anisotropyMap?"#define USE_ANISOTROPYMAP":"",q.clearcoat?"#define USE_CLEARCOAT":"",q.clearcoatMap?"#define USE_CLEARCOATMAP":"",q.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",q.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",q.iridescence?"#define USE_IRIDESCENCE":"",q.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",q.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",q.specularMap?"#define USE_SPECULARMAP":"",q.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",q.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",q.roughnessMap?"#define USE_ROUGHNESSMAP":"",q.metalnessMap?"#define USE_METALNESSMAP":"",q.alphaMap?"#define USE_ALPHAMAP":"",q.alphaTest?"#define USE_ALPHATEST":"",q.alphaHash?"#define USE_ALPHAHASH":"",q.sheen?"#define USE_SHEEN":"",q.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",q.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",q.transmission?"#define USE_TRANSMISSION":"",q.transmissionMap?"#define USE_TRANSMISSIONMAP":"",q.thicknessMap?"#define USE_THICKNESSMAP":"",q.vertexTangents&&q.flatShading===!1?"#define USE_TANGENT":"",q.vertexColors||q.instancingColor?"#define USE_COLOR":"",q.vertexAlphas?"#define USE_COLOR_ALPHA":"",q.vertexUv1s?"#define USE_UV1":"",q.vertexUv2s?"#define USE_UV2":"",q.vertexUv3s?"#define USE_UV3":"",q.pointsUvs?"#define USE_POINTS_UV":"",q.gradientMap?"#define USE_GRADIENTMAP":"",q.flatShading?"#define FLAT_SHADED":"",q.doubleSided?"#define DOUBLE_SIDED":"",q.flipSided?"#define FLIP_SIDED":"",q.shadowMapEnabled?"#define USE_SHADOWMAP":"",q.shadowMapEnabled?"#define "+t:"",q.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",q.numLightProbes>0?"#define USE_LIGHT_PROBES":"",q.useLegacyLights?"#define LEGACY_LIGHTS":"",q.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",q.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",q.toneMapping!==dc?"#define TONE_MAPPING":"",q.toneMapping!==dc?ua.tonemapping_pars_fragment:"",q.toneMapping!==dc?m4("toneMapping",q.toneMapping):"",q.dithering?"#define DITHERING":"",q.opaque?"#define OPAQUE":"",ua.colorspace_pars_fragment,g4("linearToOutputTexel",q.outputColorSpace),q.useDepthPacking?"#define DEPTH_PACKING "+q.depthPacking:"",` +`].filter(Wv).join(` +`)),G=U0(G),G=gy(G,q),G=my(G,q),U=U0(U),U=gy(U,q),U=my(U,q),G=yy(G),U=yy(U),q.isRawShaderMaterial!==!0&&(a=`#version 300 es `,r=[x,"#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+r,t=["#define varying in",q.glslVersion===Im?"":"layout(location = 0) out highp vec4 pc_fragColor;",q.glslVersion===Im?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`+r,e=["#define varying in",q.glslVersion===Fm?"":"layout(location = 0) out highp vec4 pc_fragColor;",q.glslVersion===Fm?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+t);const n=a+r+H,f=a+t+U,c=vy(De,De.VERTEX_SHADER,n),l=vy(De,De.FRAGMENT_SHADER,f);De.attachShader(p,c),De.attachShader(p,l),q.index0AttributeName!==void 0?De.bindAttribLocation(p,0,q.index0AttributeName):q.morphTargets===!0&&De.bindAttribLocation(p,0,"position"),De.linkProgram(p);function m(o){if(_e.debug.checkShaderErrors){const d=De.getProgramInfoLog(p).trim(),w=De.getShaderInfoLog(c).trim(),A=De.getShaderInfoLog(l).trim();let _=!0,y=!0;if(De.getProgramParameter(p,De.LINK_STATUS)===!1)if(_=!1,typeof _e.debug.onShaderError=="function")_e.debug.onShaderError(De,p,c,l);else{const E=dy(De,c,"vertex"),T=dy(De,l,"fragment");console.error("THREE.WebGLProgram: Shader Error "+De.getError()+" - VALIDATE_STATUS "+De.getProgramParameter(p,De.VALIDATE_STATUS)+` +`+e);const n=a+r+G,f=a+e+U,c=dy(Dt,Dt.VERTEX_SHADER,n),l=dy(Dt,Dt.FRAGMENT_SHADER,f);Dt.attachShader(p,c),Dt.attachShader(p,l),q.index0AttributeName!==void 0?Dt.bindAttribLocation(p,0,q.index0AttributeName):q.morphTargets===!0&&Dt.bindAttribLocation(p,0,"position"),Dt.linkProgram(p);function m(o){if(_t.debug.checkShaderErrors){const d=Dt.getProgramInfoLog(p).trim(),w=Dt.getShaderInfoLog(c).trim(),A=Dt.getShaderInfoLog(l).trim();let _=!0,y=!0;if(Dt.getProgramParameter(p,Dt.LINK_STATUS)===!1)if(_=!1,typeof _t.debug.onShaderError=="function")_t.debug.onShaderError(Dt,p,c,l);else{const E=py(Dt,c,"vertex"),T=py(Dt,l,"fragment");console.error("THREE.WebGLProgram: Shader Error "+Dt.getError()+" - VALIDATE_STATUS "+Dt.getProgramParameter(p,Dt.VALIDATE_STATUS)+` Material Name: `+o.name+` Material Type: `+o.type+` Program Info Log: `+d+` `+E+` -`+T)}else d!==""?console.warn("THREE.WebGLProgram: Program Info Log:",d):(w===""||A==="")&&(y=!1);y&&(o.diagnostics={runnable:_,programLog:d,vertexShader:{log:w,prefix:r},fragmentShader:{log:A,prefix:t}})}De.deleteShader(c),De.deleteShader(l),h=new np(De,p),b=w4(De,p)}let h;this.getUniforms=function(){return h===void 0&&m(this),h};let b;this.getAttributes=function(){return b===void 0&&m(this),b};let u=q.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return u===!1&&(u=De.getProgramParameter(p,v4)),u},this.destroy=function(){le.releaseStatesOfProgram(this),De.deleteProgram(p),this.program=void 0},this.type=q.shaderType,this.name=q.shaderName,this.id=d4++,this.cacheKey=F,this.usedTimes=1,this.program=p,this.vertexShader=c,this.fragmentShader=l,this}let I4=0;class F4{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(F){const q=F.vertexShader,le=F.fragmentShader,De=this._getShaderStage(q),Xe=this._getShaderStage(le),H=this._getShaderCacheForMaterial(F);return H.has(De)===!1&&(H.add(De),De.usedTimes++),H.has(Xe)===!1&&(H.add(Xe),Xe.usedTimes++),this}remove(F){const q=this.materialCache.get(F);for(const le of q)le.usedTimes--,le.usedTimes===0&&this.shaderCache.delete(le.code);return this.materialCache.delete(F),this}getVertexShaderID(F){return this._getShaderStage(F.vertexShader).id}getFragmentShaderID(F){return this._getShaderStage(F.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(F){const q=this.materialCache;let le=q.get(F);return le===void 0&&(le=new Set,q.set(F,le)),le}_getShaderStage(F){const q=this.shaderCache;let le=q.get(F);return le===void 0&&(le=new z4(F),q.set(F,le)),le}}class z4{constructor(F){this.id=I4++,this.code=F,this.usedTimes=0}}function k4(_e,F,q,le,De,Xe,H){const U=new Y0,e=new F4,g=new Set,C=[],i=De.logarithmicDepthBuffer,S=De.vertexTextures;let x=De.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function p(b){return g.add(b),b===0?"uv":`uv${b}`}function r(b,u,o,d,w){const A=d.fog,_=w.geometry,y=b.isMeshStandardMaterial?d.environment:null,E=(b.isMeshStandardMaterial?q:F).get(b.envMap||y),T=E&&E.mapping===hp?E.image.height:null,s=v[b.type];b.precision!==null&&(x=De.getMaxPrecision(b.precision),x!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",x,"instead."));const L=_.morphAttributes.position||_.morphAttributes.normal||_.morphAttributes.color,M=L!==void 0?L.length:0;let z=0;_.morphAttributes.position!==void 0&&(z=1),_.morphAttributes.normal!==void 0&&(z=2),_.morphAttributes.color!==void 0&&(z=3);let D,N,I,k;if(s){const St=Fu[s];D=St.vertexShader,N=St.fragmentShader}else D=b.vertexShader,N=b.fragmentShader,e.update(b),I=e.getVertexShaderID(b),k=e.getFragmentShaderID(b);const B=_e.getRenderTarget(),O=w.isInstancedMesh===!0,V=w.isBatchedMesh===!0,Y=!!b.map,j=!!b.matcap,te=!!E,ie=!!b.aoMap,ue=!!b.lightMap,J=!!b.bumpMap,X=!!b.normalMap,ee=!!b.displacementMap,G=!!b.emissiveMap,Q=!!b.metalnessMap,oe=!!b.roughnessMap,$=b.anisotropy>0,Z=b.clearcoat>0,se=b.iridescence>0,ne=b.sheen>0,ce=b.transmission>0,ge=$&&!!b.anisotropyMap,Te=Z&&!!b.clearcoatMap,we=Z&&!!b.clearcoatNormalMap,Re=Z&&!!b.clearcoatRoughnessMap,be=se&&!!b.iridescenceMap,Ae=se&&!!b.iridescenceThicknessMap,me=ne&&!!b.sheenColorMap,Le=ne&&!!b.sheenRoughnessMap,Ve=!!b.specularMap,Ue=!!b.specularColorMap,ke=!!b.specularIntensityMap,He=ce&&!!b.transmissionMap,Ie=ce&&!!b.thicknessMap,rt=!!b.gradientMap,Ke=!!b.alphaMap,$e=b.alphaTest>0,lt=!!b.alphaHash,ht=!!b.extensions;let dt=vc;b.toneMapped&&(B===null||B.isXRRenderTarget===!0)&&(dt=_e.toneMapping);const xt={shaderID:s,shaderType:b.type,shaderName:b.name,vertexShader:D,fragmentShader:N,defines:b.defines,customVertexShaderID:I,customFragmentShaderID:k,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:x,batching:V,instancing:O,instancingColor:O&&w.instanceColor!==null,instancingMorph:O&&w.morphTexture!==null,supportsVertexTextures:S,outputColorSpace:B===null?_e.outputColorSpace:B.isXRRenderTarget===!0?B.texture.colorSpace:yc,alphaToCoverage:!!b.alphaToCoverage,map:Y,matcap:j,envMap:te,envMapMode:te&&E.mapping,envMapCubeUVHeight:T,aoMap:ie,lightMap:ue,bumpMap:J,normalMap:X,displacementMap:S&&ee,emissiveMap:G,normalMapObjectSpace:X&&b.normalMapType===Pw,normalMapTangentSpace:X&&b.normalMapType===Lw,metalnessMap:Q,roughnessMap:oe,anisotropy:$,anisotropyMap:ge,clearcoat:Z,clearcoatMap:Te,clearcoatNormalMap:we,clearcoatRoughnessMap:Re,iridescence:se,iridescenceMap:be,iridescenceThicknessMap:Ae,sheen:ne,sheenColorMap:me,sheenRoughnessMap:Le,specularMap:Ve,specularColorMap:Ue,specularIntensityMap:ke,transmission:ce,transmissionMap:He,thicknessMap:Ie,gradientMap:rt,opaque:b.transparent===!1&&b.blending===nv&&b.alphaToCoverage===!1,alphaMap:Ke,alphaTest:$e,alphaHash:lt,combine:b.combine,mapUv:Y&&p(b.map.channel),aoMapUv:ie&&p(b.aoMap.channel),lightMapUv:ue&&p(b.lightMap.channel),bumpMapUv:J&&p(b.bumpMap.channel),normalMapUv:X&&p(b.normalMap.channel),displacementMapUv:ee&&p(b.displacementMap.channel),emissiveMapUv:G&&p(b.emissiveMap.channel),metalnessMapUv:Q&&p(b.metalnessMap.channel),roughnessMapUv:oe&&p(b.roughnessMap.channel),anisotropyMapUv:ge&&p(b.anisotropyMap.channel),clearcoatMapUv:Te&&p(b.clearcoatMap.channel),clearcoatNormalMapUv:we&&p(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Re&&p(b.clearcoatRoughnessMap.channel),iridescenceMapUv:be&&p(b.iridescenceMap.channel),iridescenceThicknessMapUv:Ae&&p(b.iridescenceThicknessMap.channel),sheenColorMapUv:me&&p(b.sheenColorMap.channel),sheenRoughnessMapUv:Le&&p(b.sheenRoughnessMap.channel),specularMapUv:Ve&&p(b.specularMap.channel),specularColorMapUv:Ue&&p(b.specularColorMap.channel),specularIntensityMapUv:ke&&p(b.specularIntensityMap.channel),transmissionMapUv:He&&p(b.transmissionMap.channel),thicknessMapUv:Ie&&p(b.thicknessMap.channel),alphaMapUv:Ke&&p(b.alphaMap.channel),vertexTangents:!!_.attributes.tangent&&(X||$),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!_.attributes.color&&_.attributes.color.itemSize===4,pointsUvs:w.isPoints===!0&&!!_.attributes.uv&&(Y||Ke),fog:!!A,useFog:b.fog===!0,fogExp2:!!A&&A.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:i,skinning:w.isSkinnedMesh===!0,morphTargets:_.morphAttributes.position!==void 0,morphNormals:_.morphAttributes.normal!==void 0,morphColors:_.morphAttributes.color!==void 0,morphTargetsCount:M,morphTextureStride:z,numDirLights:u.directional.length,numPointLights:u.point.length,numSpotLights:u.spot.length,numSpotLightMaps:u.spotLightMap.length,numRectAreaLights:u.rectArea.length,numHemiLights:u.hemi.length,numDirLightShadows:u.directionalShadowMap.length,numPointLightShadows:u.pointShadowMap.length,numSpotLightShadows:u.spotShadowMap.length,numSpotLightShadowsWithMaps:u.numSpotLightShadowsWithMaps,numLightProbes:u.numLightProbes,numClippingPlanes:H.numPlanes,numClipIntersection:H.numIntersection,dithering:b.dithering,shadowMapEnabled:_e.shadowMap.enabled&&o.length>0,shadowMapType:_e.shadowMap.type,toneMapping:dt,useLegacyLights:_e._useLegacyLights,decodeVideoTexture:Y&&b.map.isVideoTexture===!0&&Fa.getTransfer(b.map.colorSpace)===Ya,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===mf,flipSided:b.side===Hs,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionClipCullDistance:ht&&b.extensions.clipCullDistance===!0&&le.has("WEBGL_clip_cull_distance"),extensionMultiDraw:ht&&b.extensions.multiDraw===!0&&le.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:le.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return xt.vertexUv1s=g.has(1),xt.vertexUv2s=g.has(2),xt.vertexUv3s=g.has(3),g.clear(),xt}function t(b){const u=[];if(b.shaderID?u.push(b.shaderID):(u.push(b.customVertexShaderID),u.push(b.customFragmentShaderID)),b.defines!==void 0)for(const o in b.defines)u.push(o),u.push(b.defines[o]);return b.isRawShaderMaterial===!1&&(a(u,b),n(u,b),u.push(_e.outputColorSpace)),u.push(b.customProgramCacheKey),u.join()}function a(b,u){b.push(u.precision),b.push(u.outputColorSpace),b.push(u.envMapMode),b.push(u.envMapCubeUVHeight),b.push(u.mapUv),b.push(u.alphaMapUv),b.push(u.lightMapUv),b.push(u.aoMapUv),b.push(u.bumpMapUv),b.push(u.normalMapUv),b.push(u.displacementMapUv),b.push(u.emissiveMapUv),b.push(u.metalnessMapUv),b.push(u.roughnessMapUv),b.push(u.anisotropyMapUv),b.push(u.clearcoatMapUv),b.push(u.clearcoatNormalMapUv),b.push(u.clearcoatRoughnessMapUv),b.push(u.iridescenceMapUv),b.push(u.iridescenceThicknessMapUv),b.push(u.sheenColorMapUv),b.push(u.sheenRoughnessMapUv),b.push(u.specularMapUv),b.push(u.specularColorMapUv),b.push(u.specularIntensityMapUv),b.push(u.transmissionMapUv),b.push(u.thicknessMapUv),b.push(u.combine),b.push(u.fogExp2),b.push(u.sizeAttenuation),b.push(u.morphTargetsCount),b.push(u.morphAttributeCount),b.push(u.numDirLights),b.push(u.numPointLights),b.push(u.numSpotLights),b.push(u.numSpotLightMaps),b.push(u.numHemiLights),b.push(u.numRectAreaLights),b.push(u.numDirLightShadows),b.push(u.numPointLightShadows),b.push(u.numSpotLightShadows),b.push(u.numSpotLightShadowsWithMaps),b.push(u.numLightProbes),b.push(u.shadowMapType),b.push(u.toneMapping),b.push(u.numClippingPlanes),b.push(u.numClipIntersection),b.push(u.depthPacking)}function n(b,u){U.disableAll(),u.supportsVertexTextures&&U.enable(0),u.instancing&&U.enable(1),u.instancingColor&&U.enable(2),u.instancingMorph&&U.enable(3),u.matcap&&U.enable(4),u.envMap&&U.enable(5),u.normalMapObjectSpace&&U.enable(6),u.normalMapTangentSpace&&U.enable(7),u.clearcoat&&U.enable(8),u.iridescence&&U.enable(9),u.alphaTest&&U.enable(10),u.vertexColors&&U.enable(11),u.vertexAlphas&&U.enable(12),u.vertexUv1s&&U.enable(13),u.vertexUv2s&&U.enable(14),u.vertexUv3s&&U.enable(15),u.vertexTangents&&U.enable(16),u.anisotropy&&U.enable(17),u.alphaHash&&U.enable(18),u.batching&&U.enable(19),b.push(U.mask),U.disableAll(),u.fog&&U.enable(0),u.useFog&&U.enable(1),u.flatShading&&U.enable(2),u.logarithmicDepthBuffer&&U.enable(3),u.skinning&&U.enable(4),u.morphTargets&&U.enable(5),u.morphNormals&&U.enable(6),u.morphColors&&U.enable(7),u.premultipliedAlpha&&U.enable(8),u.shadowMapEnabled&&U.enable(9),u.useLegacyLights&&U.enable(10),u.doubleSided&&U.enable(11),u.flipSided&&U.enable(12),u.useDepthPacking&&U.enable(13),u.dithering&&U.enable(14),u.transmission&&U.enable(15),u.sheen&&U.enable(16),u.opaque&&U.enable(17),u.pointsUvs&&U.enable(18),u.decodeVideoTexture&&U.enable(19),u.alphaToCoverage&&U.enable(20),b.push(U.mask)}function f(b){const u=v[b.type];let o;if(u){const d=Fu[u];o=x2.clone(d.uniforms)}else o=b.uniforms;return o}function c(b,u){let o;for(let d=0,w=C.length;d0?le.push(t):x.transparent===!0?De.push(t):q.push(t)}function e(i,S,x,v,p,r){const t=H(i,S,x,v,p,r);x.transmission>0?le.unshift(t):x.transparent===!0?De.unshift(t):q.unshift(t)}function g(i,S){q.length>1&&q.sort(i||N4),le.length>1&&le.sort(S||xy),De.length>1&&De.sort(S||xy)}function C(){for(let i=F,S=_e.length;i=Xe.length?(H=new by,Xe.push(H)):H=Xe[De],H}function q(){_e=new WeakMap}return{get:F,dispose:q}}function U4(){const _e={};return{get:function(F){if(_e[F.id]!==void 0)return _e[F.id];let q;switch(F.type){case"DirectionalLight":q={direction:new bn,color:new da};break;case"SpotLight":q={position:new bn,direction:new bn,color:new da,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":q={position:new bn,color:new da,distance:0,decay:0};break;case"HemisphereLight":q={direction:new bn,skyColor:new da,groundColor:new da};break;case"RectAreaLight":q={color:new da,position:new bn,halfWidth:new bn,halfHeight:new bn};break}return _e[F.id]=q,q}}}function V4(){const _e={};return{get:function(F){if(_e[F.id]!==void 0)return _e[F.id];let q;switch(F.type){case"DirectionalLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi};break;case"SpotLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi};break;case"PointLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi,shadowCameraNear:1,shadowCameraFar:1e3};break}return _e[F.id]=q,q}}}let H4=0;function G4(_e,F){return(F.castShadow?2:0)-(_e.castShadow?2:0)+(F.map?1:0)-(_e.map?1:0)}function W4(_e){const F=new U4,q=V4(),le={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let g=0;g<9;g++)le.probe.push(new bn);const De=new bn,Xe=new so,H=new so;function U(g,C){let i=0,S=0,x=0;for(let o=0;o<9;o++)le.probe[o].set(0,0,0);let v=0,p=0,r=0,t=0,a=0,n=0,f=0,c=0,l=0,m=0,h=0;g.sort(G4);const b=C===!0?Math.PI:1;for(let o=0,d=g.length;o0&&(_e.has("OES_texture_float_linear")===!0?(le.rectAreaLTC1=_i.LTC_FLOAT_1,le.rectAreaLTC2=_i.LTC_FLOAT_2):(le.rectAreaLTC1=_i.LTC_HALF_1,le.rectAreaLTC2=_i.LTC_HALF_2)),le.ambient[0]=i,le.ambient[1]=S,le.ambient[2]=x;const u=le.hash;(u.directionalLength!==v||u.pointLength!==p||u.spotLength!==r||u.rectAreaLength!==t||u.hemiLength!==a||u.numDirectionalShadows!==n||u.numPointShadows!==f||u.numSpotShadows!==c||u.numSpotMaps!==l||u.numLightProbes!==h)&&(le.directional.length=v,le.spot.length=r,le.rectArea.length=t,le.point.length=p,le.hemi.length=a,le.directionalShadow.length=n,le.directionalShadowMap.length=n,le.pointShadow.length=f,le.pointShadowMap.length=f,le.spotShadow.length=c,le.spotShadowMap.length=c,le.directionalShadowMatrix.length=n,le.pointShadowMatrix.length=f,le.spotLightMatrix.length=c+l-m,le.spotLightMap.length=l,le.numSpotLightShadowsWithMaps=m,le.numLightProbes=h,u.directionalLength=v,u.pointLength=p,u.spotLength=r,u.rectAreaLength=t,u.hemiLength=a,u.numDirectionalShadows=n,u.numPointShadows=f,u.numSpotShadows=c,u.numSpotMaps=l,u.numLightProbes=h,le.version=H4++)}function e(g,C){let i=0,S=0,x=0,v=0,p=0;const r=C.matrixWorldInverse;for(let t=0,a=g.length;t=H.length?(U=new wy(_e),H.push(U)):U=H[Xe],U}function le(){F=new WeakMap}return{get:q,dispose:le}}class X4 extends ah{constructor(F){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=_w,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(F)}copy(F){return super.copy(F),this.depthPacking=F.depthPacking,this.map=F.map,this.alphaMap=F.alphaMap,this.displacementMap=F.displacementMap,this.displacementScale=F.displacementScale,this.displacementBias=F.displacementBias,this.wireframe=F.wireframe,this.wireframeLinewidth=F.wireframeLinewidth,this}}class Z4 extends ah{constructor(F){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(F)}copy(F){return super.copy(F),this.map=F.map,this.alphaMap=F.alphaMap,this.displacementMap=F.displacementMap,this.displacementScale=F.displacementScale,this.displacementBias=F.displacementBias,this}}const j4=`void main() { +`+T)}else d!==""?console.warn("THREE.WebGLProgram: Program Info Log:",d):(w===""||A==="")&&(y=!1);y&&(o.diagnostics={runnable:_,programLog:d,vertexShader:{log:w,prefix:r},fragmentShader:{log:A,prefix:e}})}Dt.deleteShader(c),Dt.deleteShader(l),h=new ip(Dt,p),b=b4(Dt,p)}let h;this.getUniforms=function(){return h===void 0&&m(this),h};let b;this.getAttributes=function(){return b===void 0&&m(this),b};let u=q.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return u===!1&&(u=Dt.getProgramParameter(p,h4)),u},this.destroy=function(){lt.releaseStatesOfProgram(this),Dt.deleteProgram(p),this.program=void 0},this.type=q.shaderType,this.name=q.shaderName,this.id=v4++,this.cacheKey=F,this.usedTimes=1,this.program=p,this.vertexShader=c,this.fragmentShader=l,this}let D4=0;class I4{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(F){const q=F.vertexShader,lt=F.fragmentShader,Dt=this._getShaderStage(q),Zt=this._getShaderStage(lt),G=this._getShaderCacheForMaterial(F);return G.has(Dt)===!1&&(G.add(Dt),Dt.usedTimes++),G.has(Zt)===!1&&(G.add(Zt),Zt.usedTimes++),this}remove(F){const q=this.materialCache.get(F);for(const lt of q)lt.usedTimes--,lt.usedTimes===0&&this.shaderCache.delete(lt.code);return this.materialCache.delete(F),this}getVertexShaderID(F){return this._getShaderStage(F.vertexShader).id}getFragmentShaderID(F){return this._getShaderStage(F.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(F){const q=this.materialCache;let lt=q.get(F);return lt===void 0&&(lt=new Set,q.set(F,lt)),lt}_getShaderStage(F){const q=this.shaderCache;let lt=q.get(F);return lt===void 0&&(lt=new F4(F),q.set(F,lt)),lt}}class F4{constructor(F){this.id=D4++,this.code=F,this.usedTimes=0}}function z4(_t,F,q,lt,Dt,Zt,G){const U=new Z0,t=new I4,g=new Set,C=[],i=Dt.logarithmicDepthBuffer,S=Dt.vertexTextures;let x=Dt.precision;const v={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function p(b){return g.add(b),b===0?"uv":`uv${b}`}function r(b,u,o,d,w){const A=d.fog,_=w.geometry,y=b.isMeshStandardMaterial?d.environment:null,E=(b.isMeshStandardMaterial?q:F).get(b.envMap||y),T=E&&E.mapping===vp?E.image.height:null,s=v[b.type];b.precision!==null&&(x=Dt.getMaxPrecision(b.precision),x!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",x,"instead."));const L=_.morphAttributes.position||_.morphAttributes.normal||_.morphAttributes.color,M=L!==void 0?L.length:0;let z=0;_.morphAttributes.position!==void 0&&(z=1),_.morphAttributes.normal!==void 0&&(z=2),_.morphAttributes.color!==void 0&&(z=3);let D,N,I,k;if(s){const Se=Fu[s];D=Se.vertexShader,N=Se.fragmentShader}else D=b.vertexShader,N=b.fragmentShader,t.update(b),I=t.getVertexShaderID(b),k=t.getFragmentShaderID(b);const B=_t.getRenderTarget(),O=w.isInstancedMesh===!0,H=w.isBatchedMesh===!0,Y=!!b.map,j=!!b.matcap,et=!!E,it=!!b.aoMap,ut=!!b.lightMap,J=!!b.bumpMap,X=!!b.normalMap,tt=!!b.displacementMap,V=!!b.emissiveMap,Q=!!b.metalnessMap,ot=!!b.roughnessMap,$=b.anisotropy>0,Z=b.clearcoat>0,st=b.iridescence>0,nt=b.sheen>0,ct=b.transmission>0,gt=$&&!!b.anisotropyMap,Tt=Z&&!!b.clearcoatMap,wt=Z&&!!b.clearcoatNormalMap,Rt=Z&&!!b.clearcoatRoughnessMap,bt=st&&!!b.iridescenceMap,At=st&&!!b.iridescenceThicknessMap,mt=nt&&!!b.sheenColorMap,Lt=nt&&!!b.sheenRoughnessMap,Ht=!!b.specularMap,Ut=!!b.specularColorMap,kt=!!b.specularIntensityMap,Vt=ct&&!!b.transmissionMap,It=ct&&!!b.thicknessMap,re=!!b.gradientMap,Kt=!!b.alphaMap,$t=b.alphaTest>0,le=!!b.alphaHash,he=!!b.extensions;let de=dc;b.toneMapped&&(B===null||B.isXRRenderTarget===!0)&&(de=_t.toneMapping);const xe={shaderID:s,shaderType:b.type,shaderName:b.name,vertexShader:D,fragmentShader:N,defines:b.defines,customVertexShaderID:I,customFragmentShaderID:k,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:x,batching:H,instancing:O,instancingColor:O&&w.instanceColor!==null,instancingMorph:O&&w.morphTexture!==null,supportsVertexTextures:S,outputColorSpace:B===null?_t.outputColorSpace:B.isXRRenderTarget===!0?B.texture.colorSpace:mc,alphaToCoverage:!!b.alphaToCoverage,map:Y,matcap:j,envMap:et,envMapMode:et&&E.mapping,envMapCubeUVHeight:T,aoMap:it,lightMap:ut,bumpMap:J,normalMap:X,displacementMap:S&&tt,emissiveMap:V,normalMapObjectSpace:X&&b.normalMapType===Lw,normalMapTangentSpace:X&&b.normalMapType===Cw,metalnessMap:Q,roughnessMap:ot,anisotropy:$,anisotropyMap:gt,clearcoat:Z,clearcoatMap:Tt,clearcoatNormalMap:wt,clearcoatRoughnessMap:Rt,iridescence:st,iridescenceMap:bt,iridescenceThicknessMap:At,sheen:nt,sheenColorMap:mt,sheenRoughnessMap:Lt,specularMap:Ht,specularColorMap:Ut,specularIntensityMap:kt,transmission:ct,transmissionMap:Vt,thicknessMap:It,gradientMap:re,opaque:b.transparent===!1&&b.blending===nv&&b.alphaToCoverage===!1,alphaMap:Kt,alphaTest:$t,alphaHash:le,combine:b.combine,mapUv:Y&&p(b.map.channel),aoMapUv:it&&p(b.aoMap.channel),lightMapUv:ut&&p(b.lightMap.channel),bumpMapUv:J&&p(b.bumpMap.channel),normalMapUv:X&&p(b.normalMap.channel),displacementMapUv:tt&&p(b.displacementMap.channel),emissiveMapUv:V&&p(b.emissiveMap.channel),metalnessMapUv:Q&&p(b.metalnessMap.channel),roughnessMapUv:ot&&p(b.roughnessMap.channel),anisotropyMapUv:gt&&p(b.anisotropyMap.channel),clearcoatMapUv:Tt&&p(b.clearcoatMap.channel),clearcoatNormalMapUv:wt&&p(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Rt&&p(b.clearcoatRoughnessMap.channel),iridescenceMapUv:bt&&p(b.iridescenceMap.channel),iridescenceThicknessMapUv:At&&p(b.iridescenceThicknessMap.channel),sheenColorMapUv:mt&&p(b.sheenColorMap.channel),sheenRoughnessMapUv:Lt&&p(b.sheenRoughnessMap.channel),specularMapUv:Ht&&p(b.specularMap.channel),specularColorMapUv:Ut&&p(b.specularColorMap.channel),specularIntensityMapUv:kt&&p(b.specularIntensityMap.channel),transmissionMapUv:Vt&&p(b.transmissionMap.channel),thicknessMapUv:It&&p(b.thicknessMap.channel),alphaMapUv:Kt&&p(b.alphaMap.channel),vertexTangents:!!_.attributes.tangent&&(X||$),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!_.attributes.color&&_.attributes.color.itemSize===4,pointsUvs:w.isPoints===!0&&!!_.attributes.uv&&(Y||Kt),fog:!!A,useFog:b.fog===!0,fogExp2:!!A&&A.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:i,skinning:w.isSkinnedMesh===!0,morphTargets:_.morphAttributes.position!==void 0,morphNormals:_.morphAttributes.normal!==void 0,morphColors:_.morphAttributes.color!==void 0,morphTargetsCount:M,morphTextureStride:z,numDirLights:u.directional.length,numPointLights:u.point.length,numSpotLights:u.spot.length,numSpotLightMaps:u.spotLightMap.length,numRectAreaLights:u.rectArea.length,numHemiLights:u.hemi.length,numDirLightShadows:u.directionalShadowMap.length,numPointLightShadows:u.pointShadowMap.length,numSpotLightShadows:u.spotShadowMap.length,numSpotLightShadowsWithMaps:u.numSpotLightShadowsWithMaps,numLightProbes:u.numLightProbes,numClippingPlanes:G.numPlanes,numClipIntersection:G.numIntersection,dithering:b.dithering,shadowMapEnabled:_t.shadowMap.enabled&&o.length>0,shadowMapType:_t.shadowMap.type,toneMapping:de,useLegacyLights:_t._useLegacyLights,decodeVideoTexture:Y&&b.map.isVideoTexture===!0&&Fa.getTransfer(b.map.colorSpace)===Ya,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===yf,flipSided:b.side===Gs,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionClipCullDistance:he&&b.extensions.clipCullDistance===!0&<.has("WEBGL_clip_cull_distance"),extensionMultiDraw:he&&b.extensions.multiDraw===!0&<.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:lt.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return xe.vertexUv1s=g.has(1),xe.vertexUv2s=g.has(2),xe.vertexUv3s=g.has(3),g.clear(),xe}function e(b){const u=[];if(b.shaderID?u.push(b.shaderID):(u.push(b.customVertexShaderID),u.push(b.customFragmentShaderID)),b.defines!==void 0)for(const o in b.defines)u.push(o),u.push(b.defines[o]);return b.isRawShaderMaterial===!1&&(a(u,b),n(u,b),u.push(_t.outputColorSpace)),u.push(b.customProgramCacheKey),u.join()}function a(b,u){b.push(u.precision),b.push(u.outputColorSpace),b.push(u.envMapMode),b.push(u.envMapCubeUVHeight),b.push(u.mapUv),b.push(u.alphaMapUv),b.push(u.lightMapUv),b.push(u.aoMapUv),b.push(u.bumpMapUv),b.push(u.normalMapUv),b.push(u.displacementMapUv),b.push(u.emissiveMapUv),b.push(u.metalnessMapUv),b.push(u.roughnessMapUv),b.push(u.anisotropyMapUv),b.push(u.clearcoatMapUv),b.push(u.clearcoatNormalMapUv),b.push(u.clearcoatRoughnessMapUv),b.push(u.iridescenceMapUv),b.push(u.iridescenceThicknessMapUv),b.push(u.sheenColorMapUv),b.push(u.sheenRoughnessMapUv),b.push(u.specularMapUv),b.push(u.specularColorMapUv),b.push(u.specularIntensityMapUv),b.push(u.transmissionMapUv),b.push(u.thicknessMapUv),b.push(u.combine),b.push(u.fogExp2),b.push(u.sizeAttenuation),b.push(u.morphTargetsCount),b.push(u.morphAttributeCount),b.push(u.numDirLights),b.push(u.numPointLights),b.push(u.numSpotLights),b.push(u.numSpotLightMaps),b.push(u.numHemiLights),b.push(u.numRectAreaLights),b.push(u.numDirLightShadows),b.push(u.numPointLightShadows),b.push(u.numSpotLightShadows),b.push(u.numSpotLightShadowsWithMaps),b.push(u.numLightProbes),b.push(u.shadowMapType),b.push(u.toneMapping),b.push(u.numClippingPlanes),b.push(u.numClipIntersection),b.push(u.depthPacking)}function n(b,u){U.disableAll(),u.supportsVertexTextures&&U.enable(0),u.instancing&&U.enable(1),u.instancingColor&&U.enable(2),u.instancingMorph&&U.enable(3),u.matcap&&U.enable(4),u.envMap&&U.enable(5),u.normalMapObjectSpace&&U.enable(6),u.normalMapTangentSpace&&U.enable(7),u.clearcoat&&U.enable(8),u.iridescence&&U.enable(9),u.alphaTest&&U.enable(10),u.vertexColors&&U.enable(11),u.vertexAlphas&&U.enable(12),u.vertexUv1s&&U.enable(13),u.vertexUv2s&&U.enable(14),u.vertexUv3s&&U.enable(15),u.vertexTangents&&U.enable(16),u.anisotropy&&U.enable(17),u.alphaHash&&U.enable(18),u.batching&&U.enable(19),b.push(U.mask),U.disableAll(),u.fog&&U.enable(0),u.useFog&&U.enable(1),u.flatShading&&U.enable(2),u.logarithmicDepthBuffer&&U.enable(3),u.skinning&&U.enable(4),u.morphTargets&&U.enable(5),u.morphNormals&&U.enable(6),u.morphColors&&U.enable(7),u.premultipliedAlpha&&U.enable(8),u.shadowMapEnabled&&U.enable(9),u.useLegacyLights&&U.enable(10),u.doubleSided&&U.enable(11),u.flipSided&&U.enable(12),u.useDepthPacking&&U.enable(13),u.dithering&&U.enable(14),u.transmission&&U.enable(15),u.sheen&&U.enable(16),u.opaque&&U.enable(17),u.pointsUvs&&U.enable(18),u.decodeVideoTexture&&U.enable(19),u.alphaToCoverage&&U.enable(20),b.push(U.mask)}function f(b){const u=v[b.type];let o;if(u){const d=Fu[u];o=y2.clone(d.uniforms)}else o=b.uniforms;return o}function c(b,u){let o;for(let d=0,w=C.length;d0?lt.push(e):x.transparent===!0?Dt.push(e):q.push(e)}function t(i,S,x,v,p,r){const e=G(i,S,x,v,p,r);x.transmission>0?lt.unshift(e):x.transparent===!0?Dt.unshift(e):q.unshift(e)}function g(i,S){q.length>1&&q.sort(i||O4),lt.length>1&<.sort(S||by),Dt.length>1&&Dt.sort(S||by)}function C(){for(let i=F,S=_t.length;i=Zt.length?(G=new wy,Zt.push(G)):G=Zt[Dt],G}function q(){_t=new WeakMap}return{get:F,dispose:q}}function B4(){const _t={};return{get:function(F){if(_t[F.id]!==void 0)return _t[F.id];let q;switch(F.type){case"DirectionalLight":q={direction:new bn,color:new ha};break;case"SpotLight":q={position:new bn,direction:new bn,color:new ha,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":q={position:new bn,color:new ha,distance:0,decay:0};break;case"HemisphereLight":q={direction:new bn,skyColor:new ha,groundColor:new ha};break;case"RectAreaLight":q={color:new ha,position:new bn,halfWidth:new bn,halfHeight:new bn};break}return _t[F.id]=q,q}}}function U4(){const _t={};return{get:function(F){if(_t[F.id]!==void 0)return _t[F.id];let q;switch(F.type){case"DirectionalLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi};break;case"SpotLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi};break;case"PointLight":q={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wi,shadowCameraNear:1,shadowCameraFar:1e3};break}return _t[F.id]=q,q}}}let H4=0;function V4(_t,F){return(F.castShadow?2:0)-(_t.castShadow?2:0)+(F.map?1:0)-(_t.map?1:0)}function G4(_t){const F=new B4,q=U4(),lt={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let g=0;g<9;g++)lt.probe.push(new bn);const Dt=new bn,Zt=new so,G=new so;function U(g,C){let i=0,S=0,x=0;for(let o=0;o<9;o++)lt.probe[o].set(0,0,0);let v=0,p=0,r=0,e=0,a=0,n=0,f=0,c=0,l=0,m=0,h=0;g.sort(V4);const b=C===!0?Math.PI:1;for(let o=0,d=g.length;o0&&(_t.has("OES_texture_float_linear")===!0?(lt.rectAreaLTC1=_i.LTC_FLOAT_1,lt.rectAreaLTC2=_i.LTC_FLOAT_2):(lt.rectAreaLTC1=_i.LTC_HALF_1,lt.rectAreaLTC2=_i.LTC_HALF_2)),lt.ambient[0]=i,lt.ambient[1]=S,lt.ambient[2]=x;const u=lt.hash;(u.directionalLength!==v||u.pointLength!==p||u.spotLength!==r||u.rectAreaLength!==e||u.hemiLength!==a||u.numDirectionalShadows!==n||u.numPointShadows!==f||u.numSpotShadows!==c||u.numSpotMaps!==l||u.numLightProbes!==h)&&(lt.directional.length=v,lt.spot.length=r,lt.rectArea.length=e,lt.point.length=p,lt.hemi.length=a,lt.directionalShadow.length=n,lt.directionalShadowMap.length=n,lt.pointShadow.length=f,lt.pointShadowMap.length=f,lt.spotShadow.length=c,lt.spotShadowMap.length=c,lt.directionalShadowMatrix.length=n,lt.pointShadowMatrix.length=f,lt.spotLightMatrix.length=c+l-m,lt.spotLightMap.length=l,lt.numSpotLightShadowsWithMaps=m,lt.numLightProbes=h,u.directionalLength=v,u.pointLength=p,u.spotLength=r,u.rectAreaLength=e,u.hemiLength=a,u.numDirectionalShadows=n,u.numPointShadows=f,u.numSpotShadows=c,u.numSpotMaps=l,u.numLightProbes=h,lt.version=H4++)}function t(g,C){let i=0,S=0,x=0,v=0,p=0;const r=C.matrixWorldInverse;for(let e=0,a=g.length;e=G.length?(U=new Ty(_t),G.push(U)):U=G[Zt],U}function lt(){F=new WeakMap}return{get:q,dispose:lt}}class Y4 extends ih{constructor(F){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Ew,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(F)}copy(F){return super.copy(F),this.depthPacking=F.depthPacking,this.map=F.map,this.alphaMap=F.alphaMap,this.displacementMap=F.displacementMap,this.displacementScale=F.displacementScale,this.displacementBias=F.displacementBias,this.wireframe=F.wireframe,this.wireframeLinewidth=F.wireframeLinewidth,this}}class X4 extends ih{constructor(F){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(F)}copy(F){return super.copy(F),this.map=F.map,this.alphaMap=F.alphaMap,this.displacementMap=F.displacementMap,this.displacementScale=F.displacementScale,this.displacementBias=F.displacementBias,this}}const Z4=`void main() { gl_Position = vec4( position, 1.0 ); -}`,K4=`uniform sampler2D shadow_pass; +}`,j4=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3770,12 +3770,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function J4(_e,F,q){let le=new l1;const De=new Wi,Xe=new Wi,H=new No,U=new X4({depthPacking:Cw}),e=new Z4,g={},C=q.maxTextureSize,i={[gc]:Hs,[Hs]:gc,[mf]:mf},S=new mc({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Wi},radius:{value:4}},vertexShader:j4,fragmentShader:K4}),x=S.clone();x.defines.HORIZONTAL_PASS=1;const v=new Ws;v.setAttribute("position",new Gs(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new Il(v,S),r=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Uy;let t=this.type;this.render=function(l,m,h){if(r.enabled===!1||r.autoUpdate===!1&&r.needsUpdate===!1||l.length===0)return;const b=_e.getRenderTarget(),u=_e.getActiveCubeFace(),o=_e.getActiveMipmapLevel(),d=_e.state;d.setBlending(hc),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);const w=t!==gf&&this.type===gf,A=t===gf&&this.type!==gf;for(let _=0,y=l.length;_C||De.y>C)&&(De.x>C&&(Xe.x=Math.floor(C/s.x),De.x=Xe.x*s.x,T.mapSize.x=Xe.x),De.y>C&&(Xe.y=Math.floor(C/s.y),De.y=Xe.y*s.y,T.mapSize.y=Xe.y)),T.map===null||w===!0||A===!0){const M=this.type!==gf?{minFilter:Dl,magFilter:Dl}:{};T.map!==null&&T.map.dispose(),T.map=new nh(De.x,De.y,M),T.map.texture.name=E.name+".shadowMap",T.camera.updateProjectionMatrix()}_e.setRenderTarget(T.map),_e.clear();const L=T.getViewportCount();for(let M=0;M0||m.map&&m.alphaTest>0){const d=u.uuid,w=m.uuid;let A=g[d];A===void 0&&(A={},g[d]=A);let _=A[w];_===void 0&&(_=u.clone(),A[w]=_,m.addEventListener("dispose",c)),u=_}if(u.visible=m.visible,u.wireframe=m.wireframe,b===gf?u.side=m.shadowSide!==null?m.shadowSide:m.side:u.side=m.shadowSide!==null?m.shadowSide:i[m.side],u.alphaMap=m.alphaMap,u.alphaTest=m.alphaTest,u.map=m.map,u.clipShadows=m.clipShadows,u.clippingPlanes=m.clippingPlanes,u.clipIntersection=m.clipIntersection,u.displacementMap=m.displacementMap,u.displacementScale=m.displacementScale,u.displacementBias=m.displacementBias,u.wireframeLinewidth=m.wireframeLinewidth,u.linewidth=m.linewidth,h.isPointLight===!0&&u.isMeshDistanceMaterial===!0){const d=_e.properties.get(u);d.light=h}return u}function f(l,m,h,b,u){if(l.visible===!1)return;if(l.layers.test(m.layers)&&(l.isMesh||l.isLine||l.isPoints)&&(l.castShadow||l.receiveShadow&&u===gf)&&(!l.frustumCulled||le.intersectsObject(l))){l.modelViewMatrix.multiplyMatrices(h.matrixWorldInverse,l.matrixWorld);const w=F.update(l),A=l.material;if(Array.isArray(A)){const _=w.groups;for(let y=0,E=_.length;y=1):E.indexOf("OpenGL ES")!==-1&&(y=parseFloat(/^OpenGL ES (\d)/.exec(E)[1]),_=y>=2);let T=null,s={};const L=_e.getParameter(_e.SCISSOR_BOX),M=_e.getParameter(_e.VIEWPORT),z=new No().fromArray(L),D=new No().fromArray(M);function N(Ie,rt,Ke,$e){const lt=new Uint8Array(4),ht=_e.createTexture();_e.bindTexture(Ie,ht),_e.texParameteri(Ie,_e.TEXTURE_MIN_FILTER,_e.NEAREST),_e.texParameteri(Ie,_e.TEXTURE_MAG_FILTER,_e.NEAREST);for(let dt=0;dt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new Wi,C=new WeakMap;let i;const S=new WeakMap;let x=!1;try{x=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(ee,G){return x?new OffscreenCanvas(ee,G):fp("canvas")}function p(ee,G,Q){let oe=1;const $=X(ee);if(($.width>Q||$.height>Q)&&(oe=Q/Math.max($.width,$.height)),oe<1)if(typeof HTMLImageElement<"u"&&ee instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&ee instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&ee instanceof ImageBitmap||typeof VideoFrame<"u"&&ee instanceof VideoFrame){const Z=Math.floor(oe*$.width),se=Math.floor(oe*$.height);i===void 0&&(i=v(Z,se));const ne=G?v(Z,se):i;return ne.width=Z,ne.height=se,ne.getContext("2d").drawImage(ee,0,0,Z,se),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+$.width+"x"+$.height+") to ("+Z+"x"+se+")."),ne}else return"data"in ee&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+$.width+"x"+$.height+")."),ee;return ee}function r(ee){return ee.generateMipmaps&&ee.minFilter!==Dl&&ee.minFilter!==fu}function t(ee){_e.generateMipmap(ee)}function a(ee,G,Q,oe,$=!1){if(ee!==null){if(_e[ee]!==void 0)return _e[ee];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+ee+"'")}let Z=G;if(G===_e.RED&&(Q===_e.FLOAT&&(Z=_e.R32F),Q===_e.HALF_FLOAT&&(Z=_e.R16F),Q===_e.UNSIGNED_BYTE&&(Z=_e.R8)),G===_e.RED_INTEGER&&(Q===_e.UNSIGNED_BYTE&&(Z=_e.R8UI),Q===_e.UNSIGNED_SHORT&&(Z=_e.R16UI),Q===_e.UNSIGNED_INT&&(Z=_e.R32UI),Q===_e.BYTE&&(Z=_e.R8I),Q===_e.SHORT&&(Z=_e.R16I),Q===_e.INT&&(Z=_e.R32I)),G===_e.RG&&(Q===_e.FLOAT&&(Z=_e.RG32F),Q===_e.HALF_FLOAT&&(Z=_e.RG16F),Q===_e.UNSIGNED_BYTE&&(Z=_e.RG8)),G===_e.RG_INTEGER&&(Q===_e.UNSIGNED_BYTE&&(Z=_e.RG8UI),Q===_e.UNSIGNED_SHORT&&(Z=_e.RG16UI),Q===_e.UNSIGNED_INT&&(Z=_e.RG32UI),Q===_e.BYTE&&(Z=_e.RG8I),Q===_e.SHORT&&(Z=_e.RG16I),Q===_e.INT&&(Z=_e.RG32I)),G===_e.RGB&&Q===_e.UNSIGNED_INT_5_9_9_9_REV&&(Z=_e.RGB9_E5),G===_e.RGBA){const se=$?op:Fa.getTransfer(oe);Q===_e.FLOAT&&(Z=_e.RGBA32F),Q===_e.HALF_FLOAT&&(Z=_e.RGBA16F),Q===_e.UNSIGNED_BYTE&&(Z=se===Ya?_e.SRGB8_ALPHA8:_e.RGBA8),Q===_e.UNSIGNED_SHORT_4_4_4_4&&(Z=_e.RGBA4),Q===_e.UNSIGNED_SHORT_5_5_5_1&&(Z=_e.RGB5_A1)}return(Z===_e.R16F||Z===_e.R32F||Z===_e.RG16F||Z===_e.RG32F||Z===_e.RGBA16F||Z===_e.RGBA32F)&&F.get("EXT_color_buffer_float"),Z}function n(ee,G){return r(ee)===!0||ee.isFramebufferTexture&&ee.minFilter!==Dl&&ee.minFilter!==fu?Math.log2(Math.max(G.width,G.height))+1:ee.mipmaps!==void 0&&ee.mipmaps.length>0?ee.mipmaps.length:ee.isCompressedTexture&&Array.isArray(ee.image)?G.mipmaps.length:1}function f(ee){const G=ee.target;G.removeEventListener("dispose",f),l(G),G.isVideoTexture&&C.delete(G)}function c(ee){const G=ee.target;G.removeEventListener("dispose",c),h(G)}function l(ee){const G=le.get(ee);if(G.__webglInit===void 0)return;const Q=ee.source,oe=S.get(Q);if(oe){const $=oe[G.__cacheKey];$.usedTimes--,$.usedTimes===0&&m(ee),Object.keys(oe).length===0&&S.delete(Q)}le.remove(ee)}function m(ee){const G=le.get(ee);_e.deleteTexture(G.__webglTexture);const Q=ee.source,oe=S.get(Q);delete oe[G.__cacheKey],H.memory.textures--}function h(ee){const G=le.get(ee);if(ee.depthTexture&&ee.depthTexture.dispose(),ee.isWebGLCubeRenderTarget)for(let oe=0;oe<6;oe++){if(Array.isArray(G.__webglFramebuffer[oe]))for(let $=0;$=De.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+ee+" texture units while this GPU supports only "+De.maxTextures),b+=1,ee}function d(ee){const G=[];return G.push(ee.wrapS),G.push(ee.wrapT),G.push(ee.wrapR||0),G.push(ee.magFilter),G.push(ee.minFilter),G.push(ee.anisotropy),G.push(ee.internalFormat),G.push(ee.format),G.push(ee.type),G.push(ee.generateMipmaps),G.push(ee.premultiplyAlpha),G.push(ee.flipY),G.push(ee.unpackAlignment),G.push(ee.colorSpace),G.join()}function w(ee,G){const Q=le.get(ee);if(ee.isVideoTexture&&ue(ee),ee.isRenderTargetTexture===!1&&ee.version>0&&Q.__version!==ee.version){const oe=ee.image;if(oe===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(oe.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{z(Q,ee,G);return}}q.bindTexture(_e.TEXTURE_2D,Q.__webglTexture,_e.TEXTURE0+G)}function A(ee,G){const Q=le.get(ee);if(ee.version>0&&Q.__version!==ee.version){z(Q,ee,G);return}q.bindTexture(_e.TEXTURE_2D_ARRAY,Q.__webglTexture,_e.TEXTURE0+G)}function _(ee,G){const Q=le.get(ee);if(ee.version>0&&Q.__version!==ee.version){z(Q,ee,G);return}q.bindTexture(_e.TEXTURE_3D,Q.__webglTexture,_e.TEXTURE0+G)}function y(ee,G){const Q=le.get(ee);if(ee.version>0&&Q.__version!==ee.version){D(Q,ee,G);return}q.bindTexture(_e.TEXTURE_CUBE_MAP,Q.__webglTexture,_e.TEXTURE0+G)}const E={[z0]:_e.REPEAT,[th]:_e.CLAMP_TO_EDGE,[k0]:_e.MIRRORED_REPEAT},T={[Dl]:_e.NEAREST,[gw]:_e.NEAREST_MIPMAP_NEAREST,[_d]:_e.NEAREST_MIPMAP_LINEAR,[fu]:_e.LINEAR,[Jp]:_e.LINEAR_MIPMAP_NEAREST,[rh]:_e.LINEAR_MIPMAP_LINEAR},s={[Rw]:_e.NEVER,[Ow]:_e.ALWAYS,[Dw]:_e.LESS,[Qy]:_e.LEQUAL,[Iw]:_e.EQUAL,[kw]:_e.GEQUAL,[Fw]:_e.GREATER,[zw]:_e.NOTEQUAL};function L(ee,G){if(G.type===cc&&F.has("OES_texture_float_linear")===!1&&(G.magFilter===fu||G.magFilter===Jp||G.magFilter===_d||G.magFilter===rh||G.minFilter===fu||G.minFilter===Jp||G.minFilter===_d||G.minFilter===rh)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),_e.texParameteri(ee,_e.TEXTURE_WRAP_S,E[G.wrapS]),_e.texParameteri(ee,_e.TEXTURE_WRAP_T,E[G.wrapT]),(ee===_e.TEXTURE_3D||ee===_e.TEXTURE_2D_ARRAY)&&_e.texParameteri(ee,_e.TEXTURE_WRAP_R,E[G.wrapR]),_e.texParameteri(ee,_e.TEXTURE_MAG_FILTER,T[G.magFilter]),_e.texParameteri(ee,_e.TEXTURE_MIN_FILTER,T[G.minFilter]),G.compareFunction&&(_e.texParameteri(ee,_e.TEXTURE_COMPARE_MODE,_e.COMPARE_REF_TO_TEXTURE),_e.texParameteri(ee,_e.TEXTURE_COMPARE_FUNC,s[G.compareFunction])),F.has("EXT_texture_filter_anisotropic")===!0){if(G.magFilter===Dl||G.minFilter!==_d&&G.minFilter!==rh||G.type===cc&&F.has("OES_texture_float_linear")===!1)return;if(G.anisotropy>1||le.get(G).__currentAnisotropy){const Q=F.get("EXT_texture_filter_anisotropic");_e.texParameterf(ee,Q.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(G.anisotropy,De.getMaxAnisotropy())),le.get(G).__currentAnisotropy=G.anisotropy}}}function M(ee,G){let Q=!1;ee.__webglInit===void 0&&(ee.__webglInit=!0,G.addEventListener("dispose",f));const oe=G.source;let $=S.get(oe);$===void 0&&($={},S.set(oe,$));const Z=d(G);if(Z!==ee.__cacheKey){$[Z]===void 0&&($[Z]={texture:_e.createTexture(),usedTimes:0},H.memory.textures++,Q=!0),$[Z].usedTimes++;const se=$[ee.__cacheKey];se!==void 0&&($[ee.__cacheKey].usedTimes--,se.usedTimes===0&&m(G)),ee.__cacheKey=Z,ee.__webglTexture=$[Z].texture}return Q}function z(ee,G,Q){let oe=_e.TEXTURE_2D;(G.isDataArrayTexture||G.isCompressedArrayTexture)&&(oe=_e.TEXTURE_2D_ARRAY),G.isData3DTexture&&(oe=_e.TEXTURE_3D);const $=M(ee,G),Z=G.source;q.bindTexture(oe,ee.__webglTexture,_e.TEXTURE0+Q);const se=le.get(Z);if(Z.version!==se.__version||$===!0){q.activeTexture(_e.TEXTURE0+Q);const ne=Fa.getPrimaries(Fa.workingColorSpace),ce=G.colorSpace===fc?null:Fa.getPrimaries(G.colorSpace),ge=G.colorSpace===fc||ne===ce?_e.NONE:_e.BROWSER_DEFAULT_WEBGL;_e.pixelStorei(_e.UNPACK_FLIP_Y_WEBGL,G.flipY),_e.pixelStorei(_e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,G.premultiplyAlpha),_e.pixelStorei(_e.UNPACK_ALIGNMENT,G.unpackAlignment),_e.pixelStorei(_e.UNPACK_COLORSPACE_CONVERSION_WEBGL,ge);let Te=p(G.image,!1,De.maxTextureSize);Te=J(G,Te);const we=Xe.convert(G.format,G.colorSpace),Re=Xe.convert(G.type);let be=a(G.internalFormat,we,Re,G.colorSpace,G.isVideoTexture);L(oe,G);let Ae;const me=G.mipmaps,Le=G.isVideoTexture!==!0&&be!==Jy,Ve=se.__version===void 0||$===!0,Ue=Z.dataReady,ke=n(G,Te);if(G.isDepthTexture)be=_e.DEPTH_COMPONENT16,G.type===cc?be=_e.DEPTH_COMPONENT32F:G.type===uv?be=_e.DEPTH_COMPONENT24:G.type===Kv&&(be=_e.DEPTH24_STENCIL8),Ve&&(Le?q.texStorage2D(_e.TEXTURE_2D,1,be,Te.width,Te.height):q.texImage2D(_e.TEXTURE_2D,0,be,Te.width,Te.height,0,we,Re,null));else if(G.isDataTexture)if(me.length>0){Le&&Ve&&q.texStorage2D(_e.TEXTURE_2D,ke,be,me[0].width,me[0].height);for(let He=0,Ie=me.length;He>=1,Ie>>=1}}else if(me.length>0){if(Le&&Ve){const He=X(me[0]);q.texStorage2D(_e.TEXTURE_2D,ke,be,He.width,He.height)}for(let He=0,Ie=me.length;He0&&ke++;const Ie=X(we[0]);q.texStorage2D(_e.TEXTURE_CUBE_MAP,ke,me,Ie.width,Ie.height)}for(let Ie=0;Ie<6;Ie++)if(Te){Le?Ue&&q.texSubImage2D(_e.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,0,0,we[Ie].width,we[Ie].height,be,Ae,we[Ie].data):q.texImage2D(_e.TEXTURE_CUBE_MAP_POSITIVE_X+Ie,0,me,we[Ie].width,we[Ie].height,0,be,Ae,we[Ie].data);for(let rt=0;rt>Z),we=Math.max(1,G.height>>Z);$===_e.TEXTURE_3D||$===_e.TEXTURE_2D_ARRAY?q.texImage3D($,Z,ce,Te,we,G.depth,0,se,ne,null):q.texImage2D($,Z,ce,Te,we,0,se,ne,null)}q.bindFramebuffer(_e.FRAMEBUFFER,ee),ie(G)?U.framebufferTexture2DMultisampleEXT(_e.FRAMEBUFFER,oe,$,le.get(Q).__webglTexture,0,te(G)):($===_e.TEXTURE_2D||$>=_e.TEXTURE_CUBE_MAP_POSITIVE_X&&$<=_e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&_e.framebufferTexture2D(_e.FRAMEBUFFER,oe,$,le.get(Q).__webglTexture,Z),q.bindFramebuffer(_e.FRAMEBUFFER,null)}function I(ee,G,Q){if(_e.bindRenderbuffer(_e.RENDERBUFFER,ee),G.depthBuffer&&!G.stencilBuffer){let oe=_e.DEPTH_COMPONENT24;if(Q||ie(G)){const $=G.depthTexture;$&&$.isDepthTexture&&($.type===cc?oe=_e.DEPTH_COMPONENT32F:$.type===uv&&(oe=_e.DEPTH_COMPONENT24));const Z=te(G);ie(G)?U.renderbufferStorageMultisampleEXT(_e.RENDERBUFFER,Z,oe,G.width,G.height):_e.renderbufferStorageMultisample(_e.RENDERBUFFER,Z,oe,G.width,G.height)}else _e.renderbufferStorage(_e.RENDERBUFFER,oe,G.width,G.height);_e.framebufferRenderbuffer(_e.FRAMEBUFFER,_e.DEPTH_ATTACHMENT,_e.RENDERBUFFER,ee)}else if(G.depthBuffer&&G.stencilBuffer){const oe=te(G);Q&&ie(G)===!1?_e.renderbufferStorageMultisample(_e.RENDERBUFFER,oe,_e.DEPTH24_STENCIL8,G.width,G.height):ie(G)?U.renderbufferStorageMultisampleEXT(_e.RENDERBUFFER,oe,_e.DEPTH24_STENCIL8,G.width,G.height):_e.renderbufferStorage(_e.RENDERBUFFER,_e.DEPTH_STENCIL,G.width,G.height),_e.framebufferRenderbuffer(_e.FRAMEBUFFER,_e.DEPTH_STENCIL_ATTACHMENT,_e.RENDERBUFFER,ee)}else{const oe=G.textures;for(let $=0;$1;if(se||(oe.__webglTexture===void 0&&(oe.__webglTexture=_e.createTexture()),oe.__version=G.version,H.memory.textures++),Z){Q.__webglFramebuffer=[];for(let ne=0;ne<6;ne++)if(G.mipmaps&&G.mipmaps.length>0){Q.__webglFramebuffer[ne]=[];for(let ce=0;ce0){Q.__webglFramebuffer=[];for(let ne=0;ne0&&ie(ee)===!1){Q.__webglMultisampledFramebuffer=_e.createFramebuffer(),Q.__webglColorRenderbuffer=[],q.bindFramebuffer(_e.FRAMEBUFFER,Q.__webglMultisampledFramebuffer);for(let ne=0;ne<$.length;ne++){const ce=$[ne];Q.__webglColorRenderbuffer[ne]=_e.createRenderbuffer(),_e.bindRenderbuffer(_e.RENDERBUFFER,Q.__webglColorRenderbuffer[ne]);const ge=Xe.convert(ce.format,ce.colorSpace),Te=Xe.convert(ce.type),we=a(ce.internalFormat,ge,Te,ce.colorSpace,ee.isXRRenderTarget===!0),Re=te(ee);_e.renderbufferStorageMultisample(_e.RENDERBUFFER,Re,we,ee.width,ee.height),_e.framebufferRenderbuffer(_e.FRAMEBUFFER,_e.COLOR_ATTACHMENT0+ne,_e.RENDERBUFFER,Q.__webglColorRenderbuffer[ne])}_e.bindRenderbuffer(_e.RENDERBUFFER,null),ee.depthBuffer&&(Q.__webglDepthRenderbuffer=_e.createRenderbuffer(),I(Q.__webglDepthRenderbuffer,ee,!0)),q.bindFramebuffer(_e.FRAMEBUFFER,null)}}if(Z){q.bindTexture(_e.TEXTURE_CUBE_MAP,oe.__webglTexture),L(_e.TEXTURE_CUBE_MAP,G);for(let ne=0;ne<6;ne++)if(G.mipmaps&&G.mipmaps.length>0)for(let ce=0;ce0)for(let ce=0;ce0&&ie(ee)===!1){const G=ee.textures,Q=ee.width,oe=ee.height;let $=_e.COLOR_BUFFER_BIT;const Z=[],se=ee.stencilBuffer?_e.DEPTH_STENCIL_ATTACHMENT:_e.DEPTH_ATTACHMENT,ne=le.get(ee),ce=G.length>1;if(ce)for(let ge=0;ge0&&F.has("WEBGL_multisampled_render_to_texture")===!0&&G.__useRenderToTexture!==!1}function ue(ee){const G=H.render.frame;C.get(ee)!==G&&(C.set(ee,G),ee.update())}function J(ee,G){const Q=ee.colorSpace,oe=ee.format,$=ee.type;return ee.isCompressedTexture===!0||ee.isVideoTexture===!0||Q!==yc&&Q!==fc&&(Fa.getTransfer(Q)===Ya?(oe!==zu||$!==dc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Q)),G}function X(ee){return typeof HTMLImageElement<"u"&&ee instanceof HTMLImageElement?(g.width=ee.naturalWidth||ee.width,g.height=ee.naturalHeight||ee.height):typeof VideoFrame<"u"&&ee instanceof VideoFrame?(g.width=ee.displayWidth,g.height=ee.displayHeight):(g.width=ee.width,g.height=ee.height),g}this.allocateTextureUnit=o,this.resetTextureUnits=u,this.setTexture2D=w,this.setTexture2DArray=A,this.setTexture3D=_,this.setTextureCube=y,this.rebindTextures=O,this.setupRenderTarget=V,this.updateRenderTargetMipmap=Y,this.updateMultisampleRenderTarget=j,this.setupDepthRenderbuffer=B,this.setupFrameBufferTexture=N,this.useMultisampledRTT=ie}function q4(_e,F){function q(le,De=fc){let Xe;const H=Fa.getTransfer(De);if(le===dc)return _e.UNSIGNED_BYTE;if(le===Yy)return _e.UNSIGNED_SHORT_4_4_4_4;if(le===Xy)return _e.UNSIGNED_SHORT_5_5_5_1;if(le===xw)return _e.UNSIGNED_INT_5_9_9_9_REV;if(le===mw)return _e.BYTE;if(le===yw)return _e.SHORT;if(le===Gy)return _e.UNSIGNED_SHORT;if(le===Wy)return _e.INT;if(le===uv)return _e.UNSIGNED_INT;if(le===cc)return _e.FLOAT;if(le===ap)return _e.HALF_FLOAT;if(le===bw)return _e.ALPHA;if(le===ww)return _e.RGB;if(le===zu)return _e.RGBA;if(le===Tw)return _e.LUMINANCE;if(le===Aw)return _e.LUMINANCE_ALPHA;if(le===iv)return _e.DEPTH_COMPONENT;if(le===Xv)return _e.DEPTH_STENCIL;if(le===Mw)return _e.RED;if(le===Zy)return _e.RED_INTEGER;if(le===Sw)return _e.RG;if(le===jy)return _e.RG_INTEGER;if(le===Ky)return _e.RGBA_INTEGER;if(le===Qp||le===$p||le===qp||le===e0)if(H===Ya)if(Xe=F.get("WEBGL_compressed_texture_s3tc_srgb"),Xe!==null){if(le===Qp)return Xe.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(le===$p)return Xe.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(le===qp)return Xe.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(le===e0)return Xe.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(Xe=F.get("WEBGL_compressed_texture_s3tc"),Xe!==null){if(le===Qp)return Xe.COMPRESSED_RGB_S3TC_DXT1_EXT;if(le===$p)return Xe.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(le===qp)return Xe.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(le===e0)return Xe.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(le===sm||le===lm||le===um||le===fm)if(Xe=F.get("WEBGL_compressed_texture_pvrtc"),Xe!==null){if(le===sm)return Xe.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(le===lm)return Xe.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(le===um)return Xe.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(le===fm)return Xe.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(le===Jy)return Xe=F.get("WEBGL_compressed_texture_etc1"),Xe!==null?Xe.COMPRESSED_RGB_ETC1_WEBGL:null;if(le===cm||le===hm)if(Xe=F.get("WEBGL_compressed_texture_etc"),Xe!==null){if(le===cm)return H===Ya?Xe.COMPRESSED_SRGB8_ETC2:Xe.COMPRESSED_RGB8_ETC2;if(le===hm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:Xe.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(le===vm||le===dm||le===pm||le===gm||le===mm||le===ym||le===xm||le===bm||le===wm||le===Tm||le===Am||le===Mm||le===Sm||le===Em)if(Xe=F.get("WEBGL_compressed_texture_astc"),Xe!==null){if(le===vm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:Xe.COMPRESSED_RGBA_ASTC_4x4_KHR;if(le===dm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:Xe.COMPRESSED_RGBA_ASTC_5x4_KHR;if(le===pm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:Xe.COMPRESSED_RGBA_ASTC_5x5_KHR;if(le===gm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:Xe.COMPRESSED_RGBA_ASTC_6x5_KHR;if(le===mm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:Xe.COMPRESSED_RGBA_ASTC_6x6_KHR;if(le===ym)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:Xe.COMPRESSED_RGBA_ASTC_8x5_KHR;if(le===xm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:Xe.COMPRESSED_RGBA_ASTC_8x6_KHR;if(le===bm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:Xe.COMPRESSED_RGBA_ASTC_8x8_KHR;if(le===wm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:Xe.COMPRESSED_RGBA_ASTC_10x5_KHR;if(le===Tm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:Xe.COMPRESSED_RGBA_ASTC_10x6_KHR;if(le===Am)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:Xe.COMPRESSED_RGBA_ASTC_10x8_KHR;if(le===Mm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:Xe.COMPRESSED_RGBA_ASTC_10x10_KHR;if(le===Sm)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:Xe.COMPRESSED_RGBA_ASTC_12x10_KHR;if(le===Em)return H===Ya?Xe.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:Xe.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(le===t0||le===_m||le===Cm)if(Xe=F.get("EXT_texture_compression_bptc"),Xe!==null){if(le===t0)return H===Ya?Xe.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:Xe.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(le===_m)return Xe.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(le===Cm)return Xe.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(le===Ew||le===Lm||le===Pm||le===Rm)if(Xe=F.get("EXT_texture_compression_rgtc"),Xe!==null){if(le===t0)return Xe.COMPRESSED_RED_RGTC1_EXT;if(le===Lm)return Xe.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(le===Pm)return Xe.COMPRESSED_RED_GREEN_RGTC2_EXT;if(le===Rm)return Xe.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return le===Kv?_e.UNSIGNED_INT_24_8:_e[le]!==void 0?_e[le]:null}return{convert:q}}class eS extends uu{constructor(F=[]){super(),this.isArrayCamera=!0,this.cameras=F}}class Kd extends Bo{constructor(){super(),this.isGroup=!0,this.type="Group"}}const tS={type:"move"};class E0{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Kd,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Kd,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new bn,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new bn),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Kd,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new bn,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new bn),this._grip}dispatchEvent(F){return this._targetRay!==null&&this._targetRay.dispatchEvent(F),this._grip!==null&&this._grip.dispatchEvent(F),this._hand!==null&&this._hand.dispatchEvent(F),this}connect(F){if(F&&F.hand){const q=this._hand;if(q)for(const le of F.hand.values())this._getHandJoint(q,le)}return this.dispatchEvent({type:"connected",data:F}),this}disconnect(F){return this.dispatchEvent({type:"disconnected",data:F}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(F,q,le){let De=null,Xe=null,H=null;const U=this._targetRay,e=this._grip,g=this._hand;if(F&&q.session.visibilityState!=="visible-blurred"){if(g&&F.hand){H=!0;for(const p of F.hand.values()){const r=q.getJointPose(p,le),t=this._getHandJoint(g,p);r!==null&&(t.matrix.fromArray(r.transform.matrix),t.matrix.decompose(t.position,t.rotation,t.scale),t.matrixWorldNeedsUpdate=!0,t.jointRadius=r.radius),t.visible=r!==null}const C=g.joints["index-finger-tip"],i=g.joints["thumb-tip"],S=C.position.distanceTo(i.position),x=.02,v=.005;g.inputState.pinching&&S>x+v?(g.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:F.handedness,target:this})):!g.inputState.pinching&&S<=x-v&&(g.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:F.handedness,target:this}))}else e!==null&&F.gripSpace&&(Xe=q.getPose(F.gripSpace,le),Xe!==null&&(e.matrix.fromArray(Xe.transform.matrix),e.matrix.decompose(e.position,e.rotation,e.scale),e.matrixWorldNeedsUpdate=!0,Xe.linearVelocity?(e.hasLinearVelocity=!0,e.linearVelocity.copy(Xe.linearVelocity)):e.hasLinearVelocity=!1,Xe.angularVelocity?(e.hasAngularVelocity=!0,e.angularVelocity.copy(Xe.angularVelocity)):e.hasAngularVelocity=!1));U!==null&&(De=q.getPose(F.targetRaySpace,le),De===null&&Xe!==null&&(De=Xe),De!==null&&(U.matrix.fromArray(De.transform.matrix),U.matrix.decompose(U.position,U.rotation,U.scale),U.matrixWorldNeedsUpdate=!0,De.linearVelocity?(U.hasLinearVelocity=!0,U.linearVelocity.copy(De.linearVelocity)):U.hasLinearVelocity=!1,De.angularVelocity?(U.hasAngularVelocity=!0,U.angularVelocity.copy(De.angularVelocity)):U.hasAngularVelocity=!1,this.dispatchEvent(tS)))}return U!==null&&(U.visible=De!==null),e!==null&&(e.visible=Xe!==null),g!==null&&(g.visible=H!==null),this}_getHandJoint(F,q){if(F.joints[q.jointName]===void 0){const le=new Kd;le.matrixAutoUpdate=!1,le.visible=!1,F.joints[q.jointName]=le,F.add(le)}return F.joints[q.jointName]}}const rS=` +}`;function K4(_t,F,q){let lt=new f1;const Dt=new Wi,Zt=new Wi,G=new No,U=new Y4({depthPacking:_w}),t=new X4,g={},C=q.maxTextureSize,i={[Nu]:Gs,[Gs]:Nu,[yf]:yf},S=new gc({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Wi},radius:{value:4}},vertexShader:Z4,fragmentShader:j4}),x=S.clone();x.defines.HORIZONTAL_PASS=1;const v=new Ys;v.setAttribute("position",new Ws(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const p=new Vs(v,S),r=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Vy;let e=this.type;this.render=function(l,m,h){if(r.enabled===!1||r.autoUpdate===!1&&r.needsUpdate===!1||l.length===0)return;const b=_t.getRenderTarget(),u=_t.getActiveCubeFace(),o=_t.getActiveMipmapLevel(),d=_t.state;d.setBlending(vc),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);const w=e!==mf&&this.type===mf,A=e===mf&&this.type!==mf;for(let _=0,y=l.length;_C||Dt.y>C)&&(Dt.x>C&&(Zt.x=Math.floor(C/s.x),Dt.x=Zt.x*s.x,T.mapSize.x=Zt.x),Dt.y>C&&(Zt.y=Math.floor(C/s.y),Dt.y=Zt.y*s.y,T.mapSize.y=Zt.y)),T.map===null||w===!0||A===!0){const M=this.type!==mf?{minFilter:Il,magFilter:Il}:{};T.map!==null&&T.map.dispose(),T.map=new rh(Dt.x,Dt.y,M),T.map.texture.name=E.name+".shadowMap",T.camera.updateProjectionMatrix()}_t.setRenderTarget(T.map),_t.clear();const L=T.getViewportCount();for(let M=0;M0||m.map&&m.alphaTest>0){const d=u.uuid,w=m.uuid;let A=g[d];A===void 0&&(A={},g[d]=A);let _=A[w];_===void 0&&(_=u.clone(),A[w]=_,m.addEventListener("dispose",c)),u=_}if(u.visible=m.visible,u.wireframe=m.wireframe,b===mf?u.side=m.shadowSide!==null?m.shadowSide:m.side:u.side=m.shadowSide!==null?m.shadowSide:i[m.side],u.alphaMap=m.alphaMap,u.alphaTest=m.alphaTest,u.map=m.map,u.clipShadows=m.clipShadows,u.clippingPlanes=m.clippingPlanes,u.clipIntersection=m.clipIntersection,u.displacementMap=m.displacementMap,u.displacementScale=m.displacementScale,u.displacementBias=m.displacementBias,u.wireframeLinewidth=m.wireframeLinewidth,u.linewidth=m.linewidth,h.isPointLight===!0&&u.isMeshDistanceMaterial===!0){const d=_t.properties.get(u);d.light=h}return u}function f(l,m,h,b,u){if(l.visible===!1)return;if(l.layers.test(m.layers)&&(l.isMesh||l.isLine||l.isPoints)&&(l.castShadow||l.receiveShadow&&u===mf)&&(!l.frustumCulled||lt.intersectsObject(l))){l.modelViewMatrix.multiplyMatrices(h.matrixWorldInverse,l.matrixWorld);const w=F.update(l),A=l.material;if(Array.isArray(A)){const _=w.groups;for(let y=0,E=_.length;y=1):E.indexOf("OpenGL ES")!==-1&&(y=parseFloat(/^OpenGL ES (\d)/.exec(E)[1]),_=y>=2);let T=null,s={};const L=_t.getParameter(_t.SCISSOR_BOX),M=_t.getParameter(_t.VIEWPORT),z=new No().fromArray(L),D=new No().fromArray(M);function N(It,re,Kt,$t){const le=new Uint8Array(4),he=_t.createTexture();_t.bindTexture(It,he),_t.texParameteri(It,_t.TEXTURE_MIN_FILTER,_t.NEAREST),_t.texParameteri(It,_t.TEXTURE_MAG_FILTER,_t.NEAREST);for(let de=0;de"u"?!1:/OculusBrowser/g.test(navigator.userAgent),g=new Wi,C=new WeakMap;let i;const S=new WeakMap;let x=!1;try{x=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function v(tt,V){return x?new OffscreenCanvas(tt,V):cp("canvas")}function p(tt,V,Q){let ot=1;const $=X(tt);if(($.width>Q||$.height>Q)&&(ot=Q/Math.max($.width,$.height)),ot<1)if(typeof HTMLImageElement<"u"&&tt instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&tt instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&tt instanceof ImageBitmap||typeof VideoFrame<"u"&&tt instanceof VideoFrame){const Z=Math.floor(ot*$.width),st=Math.floor(ot*$.height);i===void 0&&(i=v(Z,st));const nt=V?v(Z,st):i;return nt.width=Z,nt.height=st,nt.getContext("2d").drawImage(tt,0,0,Z,st),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+$.width+"x"+$.height+") to ("+Z+"x"+st+")."),nt}else return"data"in tt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+$.width+"x"+$.height+")."),tt;return tt}function r(tt){return tt.generateMipmaps&&tt.minFilter!==Il&&tt.minFilter!==fu}function e(tt){_t.generateMipmap(tt)}function a(tt,V,Q,ot,$=!1){if(tt!==null){if(_t[tt]!==void 0)return _t[tt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+tt+"'")}let Z=V;if(V===_t.RED&&(Q===_t.FLOAT&&(Z=_t.R32F),Q===_t.HALF_FLOAT&&(Z=_t.R16F),Q===_t.UNSIGNED_BYTE&&(Z=_t.R8)),V===_t.RED_INTEGER&&(Q===_t.UNSIGNED_BYTE&&(Z=_t.R8UI),Q===_t.UNSIGNED_SHORT&&(Z=_t.R16UI),Q===_t.UNSIGNED_INT&&(Z=_t.R32UI),Q===_t.BYTE&&(Z=_t.R8I),Q===_t.SHORT&&(Z=_t.R16I),Q===_t.INT&&(Z=_t.R32I)),V===_t.RG&&(Q===_t.FLOAT&&(Z=_t.RG32F),Q===_t.HALF_FLOAT&&(Z=_t.RG16F),Q===_t.UNSIGNED_BYTE&&(Z=_t.RG8)),V===_t.RG_INTEGER&&(Q===_t.UNSIGNED_BYTE&&(Z=_t.RG8UI),Q===_t.UNSIGNED_SHORT&&(Z=_t.RG16UI),Q===_t.UNSIGNED_INT&&(Z=_t.RG32UI),Q===_t.BYTE&&(Z=_t.RG8I),Q===_t.SHORT&&(Z=_t.RG16I),Q===_t.INT&&(Z=_t.RG32I)),V===_t.RGB&&Q===_t.UNSIGNED_INT_5_9_9_9_REV&&(Z=_t.RGB9_E5),V===_t.RGBA){const st=$?sp:Fa.getTransfer(ot);Q===_t.FLOAT&&(Z=_t.RGBA32F),Q===_t.HALF_FLOAT&&(Z=_t.RGBA16F),Q===_t.UNSIGNED_BYTE&&(Z=st===Ya?_t.SRGB8_ALPHA8:_t.RGBA8),Q===_t.UNSIGNED_SHORT_4_4_4_4&&(Z=_t.RGBA4),Q===_t.UNSIGNED_SHORT_5_5_5_1&&(Z=_t.RGB5_A1)}return(Z===_t.R16F||Z===_t.R32F||Z===_t.RG16F||Z===_t.RG32F||Z===_t.RGBA16F||Z===_t.RGBA32F)&&F.get("EXT_color_buffer_float"),Z}function n(tt,V){return r(tt)===!0||tt.isFramebufferTexture&&tt.minFilter!==Il&&tt.minFilter!==fu?Math.log2(Math.max(V.width,V.height))+1:tt.mipmaps!==void 0&&tt.mipmaps.length>0?tt.mipmaps.length:tt.isCompressedTexture&&Array.isArray(tt.image)?V.mipmaps.length:1}function f(tt){const V=tt.target;V.removeEventListener("dispose",f),l(V),V.isVideoTexture&&C.delete(V)}function c(tt){const V=tt.target;V.removeEventListener("dispose",c),h(V)}function l(tt){const V=lt.get(tt);if(V.__webglInit===void 0)return;const Q=tt.source,ot=S.get(Q);if(ot){const $=ot[V.__cacheKey];$.usedTimes--,$.usedTimes===0&&m(tt),Object.keys(ot).length===0&&S.delete(Q)}lt.remove(tt)}function m(tt){const V=lt.get(tt);_t.deleteTexture(V.__webglTexture);const Q=tt.source,ot=S.get(Q);delete ot[V.__cacheKey],G.memory.textures--}function h(tt){const V=lt.get(tt);if(tt.depthTexture&&tt.depthTexture.dispose(),tt.isWebGLCubeRenderTarget)for(let ot=0;ot<6;ot++){if(Array.isArray(V.__webglFramebuffer[ot]))for(let $=0;$=Dt.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+tt+" texture units while this GPU supports only "+Dt.maxTextures),b+=1,tt}function d(tt){const V=[];return V.push(tt.wrapS),V.push(tt.wrapT),V.push(tt.wrapR||0),V.push(tt.magFilter),V.push(tt.minFilter),V.push(tt.anisotropy),V.push(tt.internalFormat),V.push(tt.format),V.push(tt.type),V.push(tt.generateMipmaps),V.push(tt.premultiplyAlpha),V.push(tt.flipY),V.push(tt.unpackAlignment),V.push(tt.colorSpace),V.join()}function w(tt,V){const Q=lt.get(tt);if(tt.isVideoTexture&&ut(tt),tt.isRenderTargetTexture===!1&&tt.version>0&&Q.__version!==tt.version){const ot=tt.image;if(ot===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ot.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{z(Q,tt,V);return}}q.bindTexture(_t.TEXTURE_2D,Q.__webglTexture,_t.TEXTURE0+V)}function A(tt,V){const Q=lt.get(tt);if(tt.version>0&&Q.__version!==tt.version){z(Q,tt,V);return}q.bindTexture(_t.TEXTURE_2D_ARRAY,Q.__webglTexture,_t.TEXTURE0+V)}function _(tt,V){const Q=lt.get(tt);if(tt.version>0&&Q.__version!==tt.version){z(Q,tt,V);return}q.bindTexture(_t.TEXTURE_3D,Q.__webglTexture,_t.TEXTURE0+V)}function y(tt,V){const Q=lt.get(tt);if(tt.version>0&&Q.__version!==tt.version){D(Q,tt,V);return}q.bindTexture(_t.TEXTURE_CUBE_MAP,Q.__webglTexture,_t.TEXTURE0+V)}const E={[O0]:_t.REPEAT,[th]:_t.CLAMP_TO_EDGE,[N0]:_t.MIRRORED_REPEAT},T={[Il]:_t.NEAREST,[pw]:_t.NEAREST_MIPMAP_NEAREST,[Ld]:_t.NEAREST_MIPMAP_LINEAR,[fu]:_t.LINEAR,[$p]:_t.LINEAR_MIPMAP_NEAREST,[eh]:_t.LINEAR_MIPMAP_LINEAR},s={[Pw]:_t.NEVER,[kw]:_t.ALWAYS,[Rw]:_t.LESS,[qy]:_t.LEQUAL,[Dw]:_t.EQUAL,[zw]:_t.GEQUAL,[Iw]:_t.GREATER,[Fw]:_t.NOTEQUAL};function L(tt,V){if(V.type===hc&&F.has("OES_texture_float_linear")===!1&&(V.magFilter===fu||V.magFilter===$p||V.magFilter===Ld||V.magFilter===eh||V.minFilter===fu||V.minFilter===$p||V.minFilter===Ld||V.minFilter===eh)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),_t.texParameteri(tt,_t.TEXTURE_WRAP_S,E[V.wrapS]),_t.texParameteri(tt,_t.TEXTURE_WRAP_T,E[V.wrapT]),(tt===_t.TEXTURE_3D||tt===_t.TEXTURE_2D_ARRAY)&&_t.texParameteri(tt,_t.TEXTURE_WRAP_R,E[V.wrapR]),_t.texParameteri(tt,_t.TEXTURE_MAG_FILTER,T[V.magFilter]),_t.texParameteri(tt,_t.TEXTURE_MIN_FILTER,T[V.minFilter]),V.compareFunction&&(_t.texParameteri(tt,_t.TEXTURE_COMPARE_MODE,_t.COMPARE_REF_TO_TEXTURE),_t.texParameteri(tt,_t.TEXTURE_COMPARE_FUNC,s[V.compareFunction])),F.has("EXT_texture_filter_anisotropic")===!0){if(V.magFilter===Il||V.minFilter!==Ld&&V.minFilter!==eh||V.type===hc&&F.has("OES_texture_float_linear")===!1)return;if(V.anisotropy>1||lt.get(V).__currentAnisotropy){const Q=F.get("EXT_texture_filter_anisotropic");_t.texParameterf(tt,Q.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(V.anisotropy,Dt.getMaxAnisotropy())),lt.get(V).__currentAnisotropy=V.anisotropy}}}function M(tt,V){let Q=!1;tt.__webglInit===void 0&&(tt.__webglInit=!0,V.addEventListener("dispose",f));const ot=V.source;let $=S.get(ot);$===void 0&&($={},S.set(ot,$));const Z=d(V);if(Z!==tt.__cacheKey){$[Z]===void 0&&($[Z]={texture:_t.createTexture(),usedTimes:0},G.memory.textures++,Q=!0),$[Z].usedTimes++;const st=$[tt.__cacheKey];st!==void 0&&($[tt.__cacheKey].usedTimes--,st.usedTimes===0&&m(V)),tt.__cacheKey=Z,tt.__webglTexture=$[Z].texture}return Q}function z(tt,V,Q){let ot=_t.TEXTURE_2D;(V.isDataArrayTexture||V.isCompressedArrayTexture)&&(ot=_t.TEXTURE_2D_ARRAY),V.isData3DTexture&&(ot=_t.TEXTURE_3D);const $=M(tt,V),Z=V.source;q.bindTexture(ot,tt.__webglTexture,_t.TEXTURE0+Q);const st=lt.get(Z);if(Z.version!==st.__version||$===!0){q.activeTexture(_t.TEXTURE0+Q);const nt=Fa.getPrimaries(Fa.workingColorSpace),ct=V.colorSpace===cc?null:Fa.getPrimaries(V.colorSpace),gt=V.colorSpace===cc||nt===ct?_t.NONE:_t.BROWSER_DEFAULT_WEBGL;_t.pixelStorei(_t.UNPACK_FLIP_Y_WEBGL,V.flipY),_t.pixelStorei(_t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,V.premultiplyAlpha),_t.pixelStorei(_t.UNPACK_ALIGNMENT,V.unpackAlignment),_t.pixelStorei(_t.UNPACK_COLORSPACE_CONVERSION_WEBGL,gt);let Tt=p(V.image,!1,Dt.maxTextureSize);Tt=J(V,Tt);const wt=Zt.convert(V.format,V.colorSpace),Rt=Zt.convert(V.type);let bt=a(V.internalFormat,wt,Rt,V.colorSpace,V.isVideoTexture);L(ot,V);let At;const mt=V.mipmaps,Lt=V.isVideoTexture!==!0&&bt!==$y,Ht=st.__version===void 0||$===!0,Ut=Z.dataReady,kt=n(V,Tt);if(V.isDepthTexture)bt=_t.DEPTH_COMPONENT16,V.type===hc?bt=_t.DEPTH_COMPONENT32F:V.type===uv?bt=_t.DEPTH_COMPONENT24:V.type===Jv&&(bt=_t.DEPTH24_STENCIL8),Ht&&(Lt?q.texStorage2D(_t.TEXTURE_2D,1,bt,Tt.width,Tt.height):q.texImage2D(_t.TEXTURE_2D,0,bt,Tt.width,Tt.height,0,wt,Rt,null));else if(V.isDataTexture)if(mt.length>0){Lt&&Ht&&q.texStorage2D(_t.TEXTURE_2D,kt,bt,mt[0].width,mt[0].height);for(let Vt=0,It=mt.length;Vt>=1,It>>=1}}else if(mt.length>0){if(Lt&&Ht){const Vt=X(mt[0]);q.texStorage2D(_t.TEXTURE_2D,kt,bt,Vt.width,Vt.height)}for(let Vt=0,It=mt.length;Vt0&&kt++;const It=X(wt[0]);q.texStorage2D(_t.TEXTURE_CUBE_MAP,kt,mt,It.width,It.height)}for(let It=0;It<6;It++)if(Tt){Lt?Ut&&q.texSubImage2D(_t.TEXTURE_CUBE_MAP_POSITIVE_X+It,0,0,0,wt[It].width,wt[It].height,bt,At,wt[It].data):q.texImage2D(_t.TEXTURE_CUBE_MAP_POSITIVE_X+It,0,mt,wt[It].width,wt[It].height,0,bt,At,wt[It].data);for(let re=0;re>Z),wt=Math.max(1,V.height>>Z);$===_t.TEXTURE_3D||$===_t.TEXTURE_2D_ARRAY?q.texImage3D($,Z,ct,Tt,wt,V.depth,0,st,nt,null):q.texImage2D($,Z,ct,Tt,wt,0,st,nt,null)}q.bindFramebuffer(_t.FRAMEBUFFER,tt),it(V)?U.framebufferTexture2DMultisampleEXT(_t.FRAMEBUFFER,ot,$,lt.get(Q).__webglTexture,0,et(V)):($===_t.TEXTURE_2D||$>=_t.TEXTURE_CUBE_MAP_POSITIVE_X&&$<=_t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&_t.framebufferTexture2D(_t.FRAMEBUFFER,ot,$,lt.get(Q).__webglTexture,Z),q.bindFramebuffer(_t.FRAMEBUFFER,null)}function I(tt,V,Q){if(_t.bindRenderbuffer(_t.RENDERBUFFER,tt),V.depthBuffer&&!V.stencilBuffer){let ot=_t.DEPTH_COMPONENT24;if(Q||it(V)){const $=V.depthTexture;$&&$.isDepthTexture&&($.type===hc?ot=_t.DEPTH_COMPONENT32F:$.type===uv&&(ot=_t.DEPTH_COMPONENT24));const Z=et(V);it(V)?U.renderbufferStorageMultisampleEXT(_t.RENDERBUFFER,Z,ot,V.width,V.height):_t.renderbufferStorageMultisample(_t.RENDERBUFFER,Z,ot,V.width,V.height)}else _t.renderbufferStorage(_t.RENDERBUFFER,ot,V.width,V.height);_t.framebufferRenderbuffer(_t.FRAMEBUFFER,_t.DEPTH_ATTACHMENT,_t.RENDERBUFFER,tt)}else if(V.depthBuffer&&V.stencilBuffer){const ot=et(V);Q&&it(V)===!1?_t.renderbufferStorageMultisample(_t.RENDERBUFFER,ot,_t.DEPTH24_STENCIL8,V.width,V.height):it(V)?U.renderbufferStorageMultisampleEXT(_t.RENDERBUFFER,ot,_t.DEPTH24_STENCIL8,V.width,V.height):_t.renderbufferStorage(_t.RENDERBUFFER,_t.DEPTH_STENCIL,V.width,V.height),_t.framebufferRenderbuffer(_t.FRAMEBUFFER,_t.DEPTH_STENCIL_ATTACHMENT,_t.RENDERBUFFER,tt)}else{const ot=V.textures;for(let $=0;$1;if(st||(ot.__webglTexture===void 0&&(ot.__webglTexture=_t.createTexture()),ot.__version=V.version,G.memory.textures++),Z){Q.__webglFramebuffer=[];for(let nt=0;nt<6;nt++)if(V.mipmaps&&V.mipmaps.length>0){Q.__webglFramebuffer[nt]=[];for(let ct=0;ct0){Q.__webglFramebuffer=[];for(let nt=0;nt0&&it(tt)===!1){Q.__webglMultisampledFramebuffer=_t.createFramebuffer(),Q.__webglColorRenderbuffer=[],q.bindFramebuffer(_t.FRAMEBUFFER,Q.__webglMultisampledFramebuffer);for(let nt=0;nt<$.length;nt++){const ct=$[nt];Q.__webglColorRenderbuffer[nt]=_t.createRenderbuffer(),_t.bindRenderbuffer(_t.RENDERBUFFER,Q.__webglColorRenderbuffer[nt]);const gt=Zt.convert(ct.format,ct.colorSpace),Tt=Zt.convert(ct.type),wt=a(ct.internalFormat,gt,Tt,ct.colorSpace,tt.isXRRenderTarget===!0),Rt=et(tt);_t.renderbufferStorageMultisample(_t.RENDERBUFFER,Rt,wt,tt.width,tt.height),_t.framebufferRenderbuffer(_t.FRAMEBUFFER,_t.COLOR_ATTACHMENT0+nt,_t.RENDERBUFFER,Q.__webglColorRenderbuffer[nt])}_t.bindRenderbuffer(_t.RENDERBUFFER,null),tt.depthBuffer&&(Q.__webglDepthRenderbuffer=_t.createRenderbuffer(),I(Q.__webglDepthRenderbuffer,tt,!0)),q.bindFramebuffer(_t.FRAMEBUFFER,null)}}if(Z){q.bindTexture(_t.TEXTURE_CUBE_MAP,ot.__webglTexture),L(_t.TEXTURE_CUBE_MAP,V);for(let nt=0;nt<6;nt++)if(V.mipmaps&&V.mipmaps.length>0)for(let ct=0;ct0)for(let ct=0;ct0&&it(tt)===!1){const V=tt.textures,Q=tt.width,ot=tt.height;let $=_t.COLOR_BUFFER_BIT;const Z=[],st=tt.stencilBuffer?_t.DEPTH_STENCIL_ATTACHMENT:_t.DEPTH_ATTACHMENT,nt=lt.get(tt),ct=V.length>1;if(ct)for(let gt=0;gt0&&F.has("WEBGL_multisampled_render_to_texture")===!0&&V.__useRenderToTexture!==!1}function ut(tt){const V=G.render.frame;C.get(tt)!==V&&(C.set(tt,V),tt.update())}function J(tt,V){const Q=tt.colorSpace,ot=tt.format,$=tt.type;return tt.isCompressedTexture===!0||tt.isVideoTexture===!0||Q!==mc&&Q!==cc&&(Fa.getTransfer(Q)===Ya?(ot!==zu||$!==pc)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Q)),V}function X(tt){return typeof HTMLImageElement<"u"&&tt instanceof HTMLImageElement?(g.width=tt.naturalWidth||tt.width,g.height=tt.naturalHeight||tt.height):typeof VideoFrame<"u"&&tt instanceof VideoFrame?(g.width=tt.displayWidth,g.height=tt.displayHeight):(g.width=tt.width,g.height=tt.height),g}this.allocateTextureUnit=o,this.resetTextureUnits=u,this.setTexture2D=w,this.setTexture2DArray=A,this.setTexture3D=_,this.setTextureCube=y,this.rebindTextures=O,this.setupRenderTarget=H,this.updateRenderTargetMipmap=Y,this.updateMultisampleRenderTarget=j,this.setupDepthRenderbuffer=B,this.setupFrameBufferTexture=N,this.useMultisampledRTT=it}function $4(_t,F){function q(lt,Dt=cc){let Zt;const G=Fa.getTransfer(Dt);if(lt===pc)return _t.UNSIGNED_BYTE;if(lt===Zy)return _t.UNSIGNED_SHORT_4_4_4_4;if(lt===jy)return _t.UNSIGNED_SHORT_5_5_5_1;if(lt===yw)return _t.UNSIGNED_INT_5_9_9_9_REV;if(lt===gw)return _t.BYTE;if(lt===mw)return _t.SHORT;if(lt===Yy)return _t.UNSIGNED_SHORT;if(lt===Xy)return _t.INT;if(lt===uv)return _t.UNSIGNED_INT;if(lt===hc)return _t.FLOAT;if(lt===op)return _t.HALF_FLOAT;if(lt===xw)return _t.ALPHA;if(lt===bw)return _t.RGB;if(lt===zu)return _t.RGBA;if(lt===ww)return _t.LUMINANCE;if(lt===Tw)return _t.LUMINANCE_ALPHA;if(lt===iv)return _t.DEPTH_COMPONENT;if(lt===Zv)return _t.DEPTH_STENCIL;if(lt===Aw)return _t.RED;if(lt===Ky)return _t.RED_INTEGER;if(lt===Mw)return _t.RG;if(lt===Jy)return _t.RG_INTEGER;if(lt===Qy)return _t.RGBA_INTEGER;if(lt===qp||lt===t0||lt===e0||lt===r0)if(G===Ya)if(Zt=F.get("WEBGL_compressed_texture_s3tc_srgb"),Zt!==null){if(lt===qp)return Zt.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(lt===t0)return Zt.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(lt===e0)return Zt.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(lt===r0)return Zt.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(Zt=F.get("WEBGL_compressed_texture_s3tc"),Zt!==null){if(lt===qp)return Zt.COMPRESSED_RGB_S3TC_DXT1_EXT;if(lt===t0)return Zt.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(lt===e0)return Zt.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(lt===r0)return Zt.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(lt===lm||lt===um||lt===fm||lt===cm)if(Zt=F.get("WEBGL_compressed_texture_pvrtc"),Zt!==null){if(lt===lm)return Zt.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(lt===um)return Zt.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(lt===fm)return Zt.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(lt===cm)return Zt.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(lt===$y)return Zt=F.get("WEBGL_compressed_texture_etc1"),Zt!==null?Zt.COMPRESSED_RGB_ETC1_WEBGL:null;if(lt===hm||lt===vm)if(Zt=F.get("WEBGL_compressed_texture_etc"),Zt!==null){if(lt===hm)return G===Ya?Zt.COMPRESSED_SRGB8_ETC2:Zt.COMPRESSED_RGB8_ETC2;if(lt===vm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:Zt.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(lt===dm||lt===pm||lt===gm||lt===mm||lt===ym||lt===xm||lt===bm||lt===wm||lt===Tm||lt===Am||lt===Mm||lt===Sm||lt===Em||lt===_m)if(Zt=F.get("WEBGL_compressed_texture_astc"),Zt!==null){if(lt===dm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:Zt.COMPRESSED_RGBA_ASTC_4x4_KHR;if(lt===pm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:Zt.COMPRESSED_RGBA_ASTC_5x4_KHR;if(lt===gm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:Zt.COMPRESSED_RGBA_ASTC_5x5_KHR;if(lt===mm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:Zt.COMPRESSED_RGBA_ASTC_6x5_KHR;if(lt===ym)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:Zt.COMPRESSED_RGBA_ASTC_6x6_KHR;if(lt===xm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:Zt.COMPRESSED_RGBA_ASTC_8x5_KHR;if(lt===bm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:Zt.COMPRESSED_RGBA_ASTC_8x6_KHR;if(lt===wm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:Zt.COMPRESSED_RGBA_ASTC_8x8_KHR;if(lt===Tm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:Zt.COMPRESSED_RGBA_ASTC_10x5_KHR;if(lt===Am)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:Zt.COMPRESSED_RGBA_ASTC_10x6_KHR;if(lt===Mm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:Zt.COMPRESSED_RGBA_ASTC_10x8_KHR;if(lt===Sm)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:Zt.COMPRESSED_RGBA_ASTC_10x10_KHR;if(lt===Em)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:Zt.COMPRESSED_RGBA_ASTC_12x10_KHR;if(lt===_m)return G===Ya?Zt.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:Zt.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(lt===n0||lt===Cm||lt===Lm)if(Zt=F.get("EXT_texture_compression_bptc"),Zt!==null){if(lt===n0)return G===Ya?Zt.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:Zt.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(lt===Cm)return Zt.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(lt===Lm)return Zt.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(lt===Sw||lt===Pm||lt===Rm||lt===Dm)if(Zt=F.get("EXT_texture_compression_rgtc"),Zt!==null){if(lt===n0)return Zt.COMPRESSED_RED_RGTC1_EXT;if(lt===Pm)return Zt.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(lt===Rm)return Zt.COMPRESSED_RED_GREEN_RGTC2_EXT;if(lt===Dm)return Zt.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return lt===Jv?_t.UNSIGNED_INT_24_8:_t[lt]!==void 0?_t[lt]:null}return{convert:q}}class q4 extends uu{constructor(F=[]){super(),this.isArrayCamera=!0,this.cameras=F}}class rv extends Bo{constructor(){super(),this.isGroup=!0,this.type="Group"}}const tS={type:"move"};class C0{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new rv,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new rv,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new bn,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new bn),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new rv,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new bn,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new bn),this._grip}dispatchEvent(F){return this._targetRay!==null&&this._targetRay.dispatchEvent(F),this._grip!==null&&this._grip.dispatchEvent(F),this._hand!==null&&this._hand.dispatchEvent(F),this}connect(F){if(F&&F.hand){const q=this._hand;if(q)for(const lt of F.hand.values())this._getHandJoint(q,lt)}return this.dispatchEvent({type:"connected",data:F}),this}disconnect(F){return this.dispatchEvent({type:"disconnected",data:F}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(F,q,lt){let Dt=null,Zt=null,G=null;const U=this._targetRay,t=this._grip,g=this._hand;if(F&&q.session.visibilityState!=="visible-blurred"){if(g&&F.hand){G=!0;for(const p of F.hand.values()){const r=q.getJointPose(p,lt),e=this._getHandJoint(g,p);r!==null&&(e.matrix.fromArray(r.transform.matrix),e.matrix.decompose(e.position,e.rotation,e.scale),e.matrixWorldNeedsUpdate=!0,e.jointRadius=r.radius),e.visible=r!==null}const C=g.joints["index-finger-tip"],i=g.joints["thumb-tip"],S=C.position.distanceTo(i.position),x=.02,v=.005;g.inputState.pinching&&S>x+v?(g.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:F.handedness,target:this})):!g.inputState.pinching&&S<=x-v&&(g.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:F.handedness,target:this}))}else t!==null&&F.gripSpace&&(Zt=q.getPose(F.gripSpace,lt),Zt!==null&&(t.matrix.fromArray(Zt.transform.matrix),t.matrix.decompose(t.position,t.rotation,t.scale),t.matrixWorldNeedsUpdate=!0,Zt.linearVelocity?(t.hasLinearVelocity=!0,t.linearVelocity.copy(Zt.linearVelocity)):t.hasLinearVelocity=!1,Zt.angularVelocity?(t.hasAngularVelocity=!0,t.angularVelocity.copy(Zt.angularVelocity)):t.hasAngularVelocity=!1));U!==null&&(Dt=q.getPose(F.targetRaySpace,lt),Dt===null&&Zt!==null&&(Dt=Zt),Dt!==null&&(U.matrix.fromArray(Dt.transform.matrix),U.matrix.decompose(U.position,U.rotation,U.scale),U.matrixWorldNeedsUpdate=!0,Dt.linearVelocity?(U.hasLinearVelocity=!0,U.linearVelocity.copy(Dt.linearVelocity)):U.hasLinearVelocity=!1,Dt.angularVelocity?(U.hasAngularVelocity=!0,U.angularVelocity.copy(Dt.angularVelocity)):U.hasAngularVelocity=!1,this.dispatchEvent(tS)))}return U!==null&&(U.visible=Dt!==null),t!==null&&(t.visible=Zt!==null),g!==null&&(g.visible=G!==null),this}_getHandJoint(F,q){if(F.joints[q.jointName]===void 0){const lt=new rv;lt.matrixAutoUpdate=!1,lt.visible=!1,F.joints[q.jointName]=lt,F.add(lt)}return F.joints[q.jointName]}}const eS=` void main() { gl_Position = vec4( position, 1.0 ); -}`,nS=` +}`,rS=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; @@ -3794,13 +3794,13 @@ void main() { } -}`;class iS{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(F,q,le){if(this.texture===null){const De=new Es,Xe=F.properties.get(De);Xe.__webglTexture=q.texture,(q.depthNear!=le.depthNear||q.depthFar!=le.depthFar)&&(this.depthNear=q.depthNear,this.depthFar=q.depthFar),this.texture=De}}render(F,q){if(this.texture!==null){if(this.mesh===null){const le=q.cameras[0].viewport,De=new mc({vertexShader:rS,fragmentShader:nS,uniforms:{depthColor:{value:this.texture},depthWidth:{value:le.z},depthHeight:{value:le.w}}});this.mesh=new Il(new dp(20,20),De)}F.render(this.mesh,q)}}reset(){this.texture=null,this.mesh=null}}class aS extends ih{constructor(F,q){super();const le=this;let De=null,Xe=1,H=null,U="local-floor",e=1,g=null,C=null,i=null,S=null,x=null,v=null;const p=new iS,r=q.getContextAttributes();let t=null,a=null;const n=[],f=[],c=new Wi;let l=null;const m=new uu;m.layers.enable(1),m.viewport=new No;const h=new uu;h.layers.enable(2),h.viewport=new No;const b=[m,h],u=new eS;u.layers.enable(1),u.layers.enable(2);let o=null,d=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(N){let I=n[N];return I===void 0&&(I=new E0,n[N]=I),I.getTargetRaySpace()},this.getControllerGrip=function(N){let I=n[N];return I===void 0&&(I=new E0,n[N]=I),I.getGripSpace()},this.getHand=function(N){let I=n[N];return I===void 0&&(I=new E0,n[N]=I),I.getHandSpace()};function w(N){const I=f.indexOf(N.inputSource);if(I===-1)return;const k=n[I];k!==void 0&&(k.update(N.inputSource,N.frame,g||H),k.dispatchEvent({type:N.type,data:N.inputSource}))}function A(){De.removeEventListener("select",w),De.removeEventListener("selectstart",w),De.removeEventListener("selectend",w),De.removeEventListener("squeeze",w),De.removeEventListener("squeezestart",w),De.removeEventListener("squeezeend",w),De.removeEventListener("end",A),De.removeEventListener("inputsourceschange",_);for(let N=0;N=0&&(f[B]=null,n[B].disconnect(k))}for(let I=0;I=f.length){f.push(k),B=V;break}else if(f[V]===null){f[V]=k,B=V;break}if(B===-1)break}const O=n[B];O&&O.connect(k)}}const y=new bn,E=new bn;function T(N,I,k){y.setFromMatrixPosition(I.matrixWorld),E.setFromMatrixPosition(k.matrixWorld);const B=y.distanceTo(E),O=I.projectionMatrix.elements,V=k.projectionMatrix.elements,Y=O[14]/(O[10]-1),j=O[14]/(O[10]+1),te=(O[9]+1)/O[5],ie=(O[9]-1)/O[5],ue=(O[8]-1)/O[0],J=(V[8]+1)/V[0],X=Y*ue,ee=Y*J,G=B/(-ue+J),Q=G*-ue;I.matrixWorld.decompose(N.position,N.quaternion,N.scale),N.translateX(Q),N.translateZ(G),N.matrixWorld.compose(N.position,N.quaternion,N.scale),N.matrixWorldInverse.copy(N.matrixWorld).invert();const oe=Y+G,$=j+G,Z=X-Q,se=ee+(B-Q),ne=te*j/$*oe,ce=ie*j/$*oe;N.projectionMatrix.makePerspective(Z,se,ne,ce,oe,$),N.projectionMatrixInverse.copy(N.projectionMatrix).invert()}function s(N,I){I===null?N.matrixWorld.copy(N.matrix):N.matrixWorld.multiplyMatrices(I.matrixWorld,N.matrix),N.matrixWorldInverse.copy(N.matrixWorld).invert()}this.updateCamera=function(N){if(De===null)return;p.texture!==null&&(N.near=p.depthNear,N.far=p.depthFar),u.near=h.near=m.near=N.near,u.far=h.far=m.far=N.far,(o!==u.near||d!==u.far)&&(De.updateRenderState({depthNear:u.near,depthFar:u.far}),o=u.near,d=u.far,m.near=o,m.far=d,h.near=o,h.far=d,m.updateProjectionMatrix(),h.updateProjectionMatrix(),N.updateProjectionMatrix());const I=N.parent,k=u.cameras;s(u,I);for(let B=0;B0&&(r.alphaTest.value=t.alphaTest);const a=F.get(t),n=a.envMap,f=a.envMapRotation;if(n&&(r.envMap.value=n,Qc.copy(f),Qc.x*=-1,Qc.y*=-1,Qc.z*=-1,n.isCubeTexture&&n.isRenderTargetTexture===!1&&(Qc.y*=-1,Qc.z*=-1),r.envMapRotation.value.setFromMatrix4(oS.makeRotationFromEuler(Qc)),r.flipEnvMap.value=n.isCubeTexture&&n.isRenderTargetTexture===!1?-1:1,r.reflectivity.value=t.reflectivity,r.ior.value=t.ior,r.refractionRatio.value=t.refractionRatio),t.lightMap){r.lightMap.value=t.lightMap;const c=_e._useLegacyLights===!0?Math.PI:1;r.lightMapIntensity.value=t.lightMapIntensity*c,q(t.lightMap,r.lightMapTransform)}t.aoMap&&(r.aoMap.value=t.aoMap,r.aoMapIntensity.value=t.aoMapIntensity,q(t.aoMap,r.aoMapTransform))}function H(r,t){r.diffuse.value.copy(t.color),r.opacity.value=t.opacity,t.map&&(r.map.value=t.map,q(t.map,r.mapTransform))}function U(r,t){r.dashSize.value=t.dashSize,r.totalSize.value=t.dashSize+t.gapSize,r.scale.value=t.scale}function e(r,t,a,n){r.diffuse.value.copy(t.color),r.opacity.value=t.opacity,r.size.value=t.size*a,r.scale.value=n*.5,t.map&&(r.map.value=t.map,q(t.map,r.uvTransform)),t.alphaMap&&(r.alphaMap.value=t.alphaMap,q(t.alphaMap,r.alphaMapTransform)),t.alphaTest>0&&(r.alphaTest.value=t.alphaTest)}function g(r,t){r.diffuse.value.copy(t.color),r.opacity.value=t.opacity,r.rotation.value=t.rotation,t.map&&(r.map.value=t.map,q(t.map,r.mapTransform)),t.alphaMap&&(r.alphaMap.value=t.alphaMap,q(t.alphaMap,r.alphaMapTransform)),t.alphaTest>0&&(r.alphaTest.value=t.alphaTest)}function C(r,t){r.specular.value.copy(t.specular),r.shininess.value=Math.max(t.shininess,1e-4)}function i(r,t){t.gradientMap&&(r.gradientMap.value=t.gradientMap)}function S(r,t){r.metalness.value=t.metalness,t.metalnessMap&&(r.metalnessMap.value=t.metalnessMap,q(t.metalnessMap,r.metalnessMapTransform)),r.roughness.value=t.roughness,t.roughnessMap&&(r.roughnessMap.value=t.roughnessMap,q(t.roughnessMap,r.roughnessMapTransform)),t.envMap&&(r.envMapIntensity.value=t.envMapIntensity)}function x(r,t,a){r.ior.value=t.ior,t.sheen>0&&(r.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),r.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(r.sheenColorMap.value=t.sheenColorMap,q(t.sheenColorMap,r.sheenColorMapTransform)),t.sheenRoughnessMap&&(r.sheenRoughnessMap.value=t.sheenRoughnessMap,q(t.sheenRoughnessMap,r.sheenRoughnessMapTransform))),t.clearcoat>0&&(r.clearcoat.value=t.clearcoat,r.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(r.clearcoatMap.value=t.clearcoatMap,q(t.clearcoatMap,r.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,q(t.clearcoatRoughnessMap,r.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(r.clearcoatNormalMap.value=t.clearcoatNormalMap,q(t.clearcoatNormalMap,r.clearcoatNormalMapTransform),r.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===Hs&&r.clearcoatNormalScale.value.negate())),t.iridescence>0&&(r.iridescence.value=t.iridescence,r.iridescenceIOR.value=t.iridescenceIOR,r.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(r.iridescenceMap.value=t.iridescenceMap,q(t.iridescenceMap,r.iridescenceMapTransform)),t.iridescenceThicknessMap&&(r.iridescenceThicknessMap.value=t.iridescenceThicknessMap,q(t.iridescenceThicknessMap,r.iridescenceThicknessMapTransform))),t.transmission>0&&(r.transmission.value=t.transmission,r.transmissionSamplerMap.value=a.texture,r.transmissionSamplerSize.value.set(a.width,a.height),t.transmissionMap&&(r.transmissionMap.value=t.transmissionMap,q(t.transmissionMap,r.transmissionMapTransform)),r.thickness.value=t.thickness,t.thicknessMap&&(r.thicknessMap.value=t.thicknessMap,q(t.thicknessMap,r.thicknessMapTransform)),r.attenuationDistance.value=t.attenuationDistance,r.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(r.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(r.anisotropyMap.value=t.anisotropyMap,q(t.anisotropyMap,r.anisotropyMapTransform))),r.specularIntensity.value=t.specularIntensity,r.specularColor.value.copy(t.specularColor),t.specularColorMap&&(r.specularColorMap.value=t.specularColorMap,q(t.specularColorMap,r.specularColorMapTransform)),t.specularIntensityMap&&(r.specularIntensityMap.value=t.specularIntensityMap,q(t.specularIntensityMap,r.specularIntensityMapTransform))}function v(r,t){t.matcap&&(r.matcap.value=t.matcap)}function p(r,t){const a=F.get(t).light;r.referencePosition.value.setFromMatrixPosition(a.matrixWorld),r.nearDistance.value=a.shadow.camera.near,r.farDistance.value=a.shadow.camera.far}return{refreshFogUniforms:le,refreshMaterialUniforms:De}}function lS(_e,F,q,le){let De={},Xe={},H=[];const U=_e.getParameter(_e.MAX_UNIFORM_BUFFER_BINDINGS);function e(a,n){const f=n.program;le.uniformBlockBinding(a,f)}function g(a,n){let f=De[a.id];f===void 0&&(v(a),f=C(a),De[a.id]=f,a.addEventListener("dispose",r));const c=n.program;le.updateUBOMapping(a,c);const l=F.render.frame;Xe[a.id]!==l&&(S(a),Xe[a.id]=l)}function C(a){const n=i();a.__bindingPointIndex=n;const f=_e.createBuffer(),c=a.__size,l=a.usage;return _e.bindBuffer(_e.UNIFORM_BUFFER,f),_e.bufferData(_e.UNIFORM_BUFFER,c,l),_e.bindBuffer(_e.UNIFORM_BUFFER,null),_e.bindBufferBase(_e.UNIFORM_BUFFER,n,f),f}function i(){for(let a=0;a0&&(f+=c-l),a.__size=f,a.__cache={},this}function p(a){const n={boundary:0,storage:0};return typeof a=="number"||typeof a=="boolean"?(n.boundary=4,n.storage=4):a.isVector2?(n.boundary=8,n.storage=8):a.isVector3||a.isColor?(n.boundary=16,n.storage=12):a.isVector4?(n.boundary=16,n.storage=16):a.isMatrix3?(n.boundary=48,n.storage=48):a.isMatrix4?(n.boundary=64,n.storage=64):a.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",a),n}function r(a){const n=a.target;n.removeEventListener("dispose",r);const f=H.indexOf(n.__bindingPointIndex);H.splice(f,1),_e.deleteBuffer(De[n.id]),delete De[n.id],delete Xe[n.id]}function t(){for(const a in De)_e.deleteBuffer(De[a]);H=[],De={},Xe={}}return{bind:e,update:g,dispose:t}}class g1{constructor(F={}){const{canvas:q=t2(),context:le=null,depth:De=!0,stencil:Xe=!1,alpha:H=!1,antialias:U=!1,premultipliedAlpha:e=!0,preserveDrawingBuffer:g=!1,powerPreference:C="default",failIfMajorPerformanceCaveat:i=!1}=F;this.isWebGLRenderer=!0;let S;if(le!==null){if(typeof WebGLRenderingContext<"u"&&le instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");S=le.getContextAttributes().alpha}else S=H;const x=new Uint32Array(4),v=new Int32Array(4);let p=null,r=null;const t=[],a=[];this.domElement=q,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Iu,this._useLegacyLights=!1,this.toneMapping=vc,this.toneMappingExposure=1;const n=this;let f=!1,c=0,l=0,m=null,h=-1,b=null;const u=new No,o=new No;let d=null;const w=new da(0);let A=0,_=q.width,y=q.height,E=1,T=null,s=null;const L=new No(0,0,_,y),M=new No(0,0,_,y);let z=!1;const D=new l1;let N=!1,I=!1;const k=new so,B=new Wi,O=new bn,V={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Y(){return m===null?E:1}let j=le;function te(vt,Lt){const ct=q.getContext(vt,Lt);return ct!==null?ct:null}try{const vt={alpha:!0,depth:De,stencil:Xe,antialias:U,premultipliedAlpha:e,preserveDrawingBuffer:g,powerPreference:C,failIfMajorPerformanceCaveat:i};if("setAttribute"in q&&q.setAttribute("data-engine",`three.js r${H0}`),q.addEventListener("webglcontextlost",rt,!1),q.addEventListener("webglcontextrestored",Ke,!1),q.addEventListener("webglcontextcreationerror",$e,!1),j===null){const Lt="webgl2";if(j=te(Lt,vt),j===null)throw te(Lt)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(vt){throw console.error("THREE.WebGLRenderer: "+vt.message),vt}let ie,ue,J,X,ee,G,Q,oe,$,Z,se,ne,ce,ge,Te,we,Re,be,Ae,me,Le,Ve,Ue,ke;function He(){ie=new mM(j),ie.init(),ue=new cM(j,ie,F),Ve=new q4(j,ie),J=new Q4(j),X=new bM(j),ee=new O4,G=new $4(j,ie,J,ee,ue,Ve,X),Q=new vM(n),oe=new gM(n),$=new E2(j),Ue=new uM(j,$),Z=new yM(j,$,X,Ue),se=new TM(j,Z,$,X),Ae=new wM(j,ue,G),we=new hM(ee),ne=new k4(n,Q,oe,ie,ue,Ue,we),ce=new sS(n,ee),ge=new B4,Te=new Y4(ie),be=new lM(n,Q,oe,J,se,S,e),Re=new J4(n,se,ue),ke=new lS(j,X,ue,J),me=new fM(j,ie,X),Le=new xM(j,ie,X),X.programs=ne.programs,n.capabilities=ue,n.extensions=ie,n.properties=ee,n.renderLists=ge,n.shadowMap=Re,n.state=J,n.info=X}He();const Ie=new aS(n,j);this.xr=Ie,this.getContext=function(){return j},this.getContextAttributes=function(){return j.getContextAttributes()},this.forceContextLoss=function(){const vt=ie.get("WEBGL_lose_context");vt&&vt.loseContext()},this.forceContextRestore=function(){const vt=ie.get("WEBGL_lose_context");vt&&vt.restoreContext()},this.getPixelRatio=function(){return E},this.setPixelRatio=function(vt){vt!==void 0&&(E=vt,this.setSize(_,y,!1))},this.getSize=function(vt){return vt.set(_,y)},this.setSize=function(vt,Lt,ct=!0){if(Ie.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}_=vt,y=Lt,q.width=Math.floor(vt*E),q.height=Math.floor(Lt*E),ct===!0&&(q.style.width=vt+"px",q.style.height=Lt+"px"),this.setViewport(0,0,vt,Lt)},this.getDrawingBufferSize=function(vt){return vt.set(_*E,y*E).floor()},this.setDrawingBufferSize=function(vt,Lt,ct){_=vt,y=Lt,E=ct,q.width=Math.floor(vt*ct),q.height=Math.floor(Lt*ct),this.setViewport(0,0,vt,Lt)},this.getCurrentViewport=function(vt){return vt.copy(u)},this.getViewport=function(vt){return vt.copy(L)},this.setViewport=function(vt,Lt,ct,Tt){vt.isVector4?L.set(vt.x,vt.y,vt.z,vt.w):L.set(vt,Lt,ct,Tt),J.viewport(u.copy(L).multiplyScalar(E).round())},this.getScissor=function(vt){return vt.copy(M)},this.setScissor=function(vt,Lt,ct,Tt){vt.isVector4?M.set(vt.x,vt.y,vt.z,vt.w):M.set(vt,Lt,ct,Tt),J.scissor(o.copy(M).multiplyScalar(E).round())},this.getScissorTest=function(){return z},this.setScissorTest=function(vt){J.setScissorTest(z=vt)},this.setOpaqueSort=function(vt){T=vt},this.setTransparentSort=function(vt){s=vt},this.getClearColor=function(vt){return vt.copy(be.getClearColor())},this.setClearColor=function(){be.setClearColor.apply(be,arguments)},this.getClearAlpha=function(){return be.getClearAlpha()},this.setClearAlpha=function(){be.setClearAlpha.apply(be,arguments)},this.clear=function(vt=!0,Lt=!0,ct=!0){let Tt=0;if(vt){let Bt=!1;if(m!==null){const ir=m.texture.format;Bt=ir===Ky||ir===jy||ir===Zy}if(Bt){const ir=m.texture.type,pt=ir===dc||ir===uv||ir===Gy||ir===Kv||ir===Yy||ir===Xy,Xt=be.getClearColor(),Kt=be.getClearAlpha(),or=Xt.r,$t=Xt.g,gt=Xt.b;pt?(x[0]=or,x[1]=$t,x[2]=gt,x[3]=Kt,j.clearBufferuiv(j.COLOR,0,x)):(v[0]=or,v[1]=$t,v[2]=gt,v[3]=Kt,j.clearBufferiv(j.COLOR,0,v))}else Tt|=j.COLOR_BUFFER_BIT}Lt&&(Tt|=j.DEPTH_BUFFER_BIT),ct&&(Tt|=j.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),j.clear(Tt)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){q.removeEventListener("webglcontextlost",rt,!1),q.removeEventListener("webglcontextrestored",Ke,!1),q.removeEventListener("webglcontextcreationerror",$e,!1),ge.dispose(),Te.dispose(),ee.dispose(),Q.dispose(),oe.dispose(),se.dispose(),Ue.dispose(),ke.dispose(),ne.dispose(),Ie.dispose(),Ie.removeEventListener("sessionstart",ze),Ie.removeEventListener("sessionend",Ze),Je.stop()};function rt(vt){vt.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),f=!0}function Ke(){console.log("THREE.WebGLRenderer: Context Restored."),f=!1;const vt=X.autoReset,Lt=Re.enabled,ct=Re.autoUpdate,Tt=Re.needsUpdate,Bt=Re.type;He(),X.autoReset=vt,Re.enabled=Lt,Re.autoUpdate=ct,Re.needsUpdate=Tt,Re.type=Bt}function $e(vt){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",vt.statusMessage)}function lt(vt){const Lt=vt.target;Lt.removeEventListener("dispose",lt),ht(Lt)}function ht(vt){dt(vt),ee.remove(vt)}function dt(vt){const Lt=ee.get(vt).programs;Lt!==void 0&&(Lt.forEach(function(ct){ne.releaseProgram(ct)}),vt.isShaderMaterial&&ne.releaseShaderCache(vt))}this.renderBufferDirect=function(vt,Lt,ct,Tt,Bt,ir){Lt===null&&(Lt=V);const pt=Bt.isMesh&&Bt.matrixWorld.determinant()<0,Xt=it(vt,Lt,ct,Tt,Bt);J.setMaterial(Tt,pt);let Kt=ct.index,or=1;if(Tt.wireframe===!0){if(Kt=Z.getWireframeAttribute(ct),Kt===void 0)return;or=2}const $t=ct.drawRange,gt=ct.attributes.position;let st=$t.start*or,At=($t.start+$t.count)*or;ir!==null&&(st=Math.max(st,ir.start*or),At=Math.min(At,(ir.start+ir.count)*or)),Kt!==null?(st=Math.max(st,0),At=Math.min(At,Kt.count)):gt!=null&&(st=Math.max(st,0),At=Math.min(At,gt.count));const Ct=At-st;if(Ct<0||Ct===1/0)return;Ue.setup(Bt,Tt,Xt,ct,Kt);let It,Pt=me;if(Kt!==null&&(It=$.get(Kt),Pt=Le,Pt.setIndex(It)),Bt.isMesh)Tt.wireframe===!0?(J.setLineWidth(Tt.wireframeLinewidth*Y()),Pt.setMode(j.LINES)):Pt.setMode(j.TRIANGLES);else if(Bt.isLine){let kt=Tt.linewidth;kt===void 0&&(kt=1),J.setLineWidth(kt*Y()),Bt.isLineSegments?Pt.setMode(j.LINES):Bt.isLineLoop?Pt.setMode(j.LINE_LOOP):Pt.setMode(j.LINE_STRIP)}else Bt.isPoints?Pt.setMode(j.POINTS):Bt.isSprite&&Pt.setMode(j.TRIANGLES);if(Bt.isBatchedMesh)Pt.renderMultiDraw(Bt._multiDrawStarts,Bt._multiDrawCounts,Bt._multiDrawCount);else if(Bt.isInstancedMesh)Pt.renderInstances(st,Ct,Bt.count);else if(ct.isInstancedBufferGeometry){const kt=ct._maxInstanceCount!==void 0?ct._maxInstanceCount:1/0,Ht=Math.min(ct.instanceCount,kt);Pt.renderInstances(st,Ct,Ht)}else Pt.render(st,Ct)};function xt(vt,Lt,ct){vt.transparent===!0&&vt.side===mf&&vt.forceSinglePass===!1?(vt.side=Hs,vt.needsUpdate=!0,Me(vt,Lt,ct),vt.side=gc,vt.needsUpdate=!0,Me(vt,Lt,ct),vt.side=mf):Me(vt,Lt,ct)}this.compile=function(vt,Lt,ct=null){ct===null&&(ct=vt),r=Te.get(ct),r.init(),a.push(r),ct.traverseVisible(function(Bt){Bt.isLight&&Bt.layers.test(Lt.layers)&&(r.pushLight(Bt),Bt.castShadow&&r.pushShadow(Bt))}),vt!==ct&&vt.traverseVisible(function(Bt){Bt.isLight&&Bt.layers.test(Lt.layers)&&(r.pushLight(Bt),Bt.castShadow&&r.pushShadow(Bt))}),r.setupLights(n._useLegacyLights);const Tt=new Set;return vt.traverse(function(Bt){const ir=Bt.material;if(ir)if(Array.isArray(ir))for(let pt=0;pt{function ir(){if(Tt.forEach(function(pt){ee.get(pt).currentProgram.isReady()&&Tt.delete(pt)}),Tt.size===0){Bt(vt);return}setTimeout(ir,10)}ie.get("KHR_parallel_shader_compile")!==null?ir():setTimeout(ir,10)})};let St=null;function nt(vt){St&&St(vt)}function ze(){Je.stop()}function Ze(){Je.start()}const Je=new u1;Je.setAnimationLoop(nt),typeof self<"u"&&Je.setContext(self),this.setAnimationLoop=function(vt){St=vt,Ie.setAnimationLoop(vt),vt===null?Je.stop():Je.start()},Ie.addEventListener("sessionstart",ze),Ie.addEventListener("sessionend",Ze),this.render=function(vt,Lt){if(Lt!==void 0&&Lt.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(f===!0)return;vt.matrixWorldAutoUpdate===!0&&vt.updateMatrixWorld(),Lt.parent===null&&Lt.matrixWorldAutoUpdate===!0&&Lt.updateMatrixWorld(),Ie.enabled===!0&&Ie.isPresenting===!0&&(Ie.cameraAutoUpdate===!0&&Ie.updateCamera(Lt),Lt=Ie.getCamera()),vt.isScene===!0&&vt.onBeforeRender(n,vt,Lt,m),r=Te.get(vt,a.length),r.init(),a.push(r),k.multiplyMatrices(Lt.projectionMatrix,Lt.matrixWorldInverse),D.setFromProjectionMatrix(k),I=this.localClippingEnabled,N=we.init(this.clippingPlanes,I),p=ge.get(vt,t.length),p.init(),t.push(p),We(vt,Lt,0,n.sortObjects),p.finish(),n.sortObjects===!0&&p.sort(T,s),this.info.render.frame++,N===!0&&we.beginShadows();const ct=r.state.shadowsArray;if(Re.render(ct,vt,Lt),N===!0&&we.endShadows(),this.info.autoReset===!0&&this.info.reset(),(Ie.enabled===!1||Ie.isPresenting===!1||Ie.hasDepthSensing()===!1)&&be.render(p,vt),r.setupLights(n._useLegacyLights),Lt.isArrayCamera){const Tt=Lt.cameras;for(let Bt=0,ir=Tt.length;Bt0?r=a[a.length-1]:r=null,t.pop(),t.length>0?p=t[t.length-1]:p=null};function We(vt,Lt,ct,Tt){if(vt.visible===!1)return;if(vt.layers.test(Lt.layers)){if(vt.isGroup)ct=vt.renderOrder;else if(vt.isLOD)vt.autoUpdate===!0&&vt.update(Lt);else if(vt.isLight)r.pushLight(vt),vt.castShadow&&r.pushShadow(vt);else if(vt.isSprite){if(!vt.frustumCulled||D.intersectsSprite(vt)){Tt&&O.setFromMatrixPosition(vt.matrixWorld).applyMatrix4(k);const pt=se.update(vt),Xt=vt.material;Xt.visible&&p.push(vt,pt,Xt,ct,O.z,null)}}else if((vt.isMesh||vt.isLine||vt.isPoints)&&(!vt.frustumCulled||D.intersectsObject(vt))){const pt=se.update(vt),Xt=vt.material;if(Tt&&(vt.boundingSphere!==void 0?(vt.boundingSphere===null&&vt.computeBoundingSphere(),O.copy(vt.boundingSphere.center)):(pt.boundingSphere===null&&pt.computeBoundingSphere(),O.copy(pt.boundingSphere.center)),O.applyMatrix4(vt.matrixWorld).applyMatrix4(k)),Array.isArray(Xt)){const Kt=pt.groups;for(let or=0,$t=Kt.length;or<$t;or++){const gt=Kt[or],st=Xt[gt.materialIndex];st&&st.visible&&p.push(vt,pt,st,ct,O.z,gt)}}else Xt.visible&&p.push(vt,pt,Xt,ct,O.z,null)}}const ir=vt.children;for(let pt=0,Xt=ir.length;pt0&&xe(Bt,ir,Lt,ct),Tt&&J.viewport(u.copy(Tt)),Bt.length>0&&ye(Bt,Lt,ct),ir.length>0&&ye(ir,Lt,ct),pt.length>0&&ye(pt,Lt,ct),J.buffers.depth.setTest(!0),J.buffers.depth.setMask(!0),J.buffers.color.setMask(!0),J.setPolygonOffset(!1)}function xe(vt,Lt,ct,Tt){if((ct.isScene===!0?ct.overrideMaterial:null)!==null)return;if(r.state.transmissionRenderTarget===null){r.state.transmissionRenderTarget=new nh(1,1,{generateMipmaps:!0,type:ie.has("EXT_color_buffer_half_float")||ie.has("EXT_color_buffer_float")?ap:dc,minFilter:rh,samples:4,stencilBuffer:Xe});const or=ee.get(r.state.transmissionRenderTarget);or.__isTransmissionRenderTarget=!0}const ir=r.state.transmissionRenderTarget;n.getDrawingBufferSize(B),ir.setSize(B.x,B.y);const pt=n.getRenderTarget();n.setRenderTarget(ir),n.getClearColor(w),A=n.getClearAlpha(),A<1&&n.setClearColor(16777215,.5),n.clear();const Xt=n.toneMapping;n.toneMapping=vc,ye(vt,ct,Tt),G.updateMultisampleRenderTarget(ir),G.updateRenderTargetMipmap(ir);let Kt=!1;for(let or=0,$t=Lt.length;or<$t;or++){const gt=Lt[or],st=gt.object,At=gt.geometry,Ct=gt.material,It=gt.group;if(Ct.side===mf&&st.layers.test(Tt.layers)){const Pt=Ct.side;Ct.side=Hs,Ct.needsUpdate=!0,Ee(st,ct,Tt,At,Ct,It),Ct.side=Pt,Ct.needsUpdate=!0,Kt=!0}}Kt===!0&&(G.updateMultisampleRenderTarget(ir),G.updateRenderTargetMipmap(ir)),n.setRenderTarget(pt),n.setClearColor(w,A),n.toneMapping=Xt}function ye(vt,Lt,ct){const Tt=Lt.isScene===!0?Lt.overrideMaterial:null;for(let Bt=0,ir=vt.length;Bt0),gt=!!ct.morphAttributes.position,st=!!ct.morphAttributes.normal,At=!!ct.morphAttributes.color;let Ct=vc;Tt.toneMapped&&(m===null||m.isXRRenderTarget===!0)&&(Ct=n.toneMapping);const It=ct.morphAttributes.position||ct.morphAttributes.normal||ct.morphAttributes.color,Pt=It!==void 0?It.length:0,kt=ee.get(Tt),Ht=r.state.lights;if(N===!0&&(I===!0||vt!==b)){const Qt=vt===b&&Tt.id===h;we.setState(Tt,vt,Qt)}let Jt=!1;Tt.version===kt.__version?(kt.needsLights&&kt.lightsStateVersion!==Ht.state.version||kt.outputColorSpace!==Xt||Bt.isBatchedMesh&&kt.batching===!1||!Bt.isBatchedMesh&&kt.batching===!0||Bt.isInstancedMesh&&kt.instancing===!1||!Bt.isInstancedMesh&&kt.instancing===!0||Bt.isSkinnedMesh&&kt.skinning===!1||!Bt.isSkinnedMesh&&kt.skinning===!0||Bt.isInstancedMesh&&kt.instancingColor===!0&&Bt.instanceColor===null||Bt.isInstancedMesh&&kt.instancingColor===!1&&Bt.instanceColor!==null||Bt.isInstancedMesh&&kt.instancingMorph===!0&&Bt.morphTexture===null||Bt.isInstancedMesh&&kt.instancingMorph===!1&&Bt.morphTexture!==null||kt.envMap!==Kt||Tt.fog===!0&&kt.fog!==ir||kt.numClippingPlanes!==void 0&&(kt.numClippingPlanes!==we.numPlanes||kt.numIntersection!==we.numIntersection)||kt.vertexAlphas!==or||kt.vertexTangents!==$t||kt.morphTargets!==gt||kt.morphNormals!==st||kt.morphColors!==At||kt.toneMapping!==Ct||kt.morphTargetsCount!==Pt)&&(Jt=!0):(Jt=!0,kt.__version=Tt.version);let ur=kt.currentProgram;Jt===!0&&(ur=Me(Tt,Lt,Bt));let hr=!1,vr=!1,Ye=!1;const Ge=ur.getUniforms(),Nt=kt.uniforms;if(J.useProgram(ur.program)&&(hr=!0,vr=!0,Ye=!0),Tt.id!==h&&(h=Tt.id,vr=!0),hr||b!==vt){Ge.setValue(j,"projectionMatrix",vt.projectionMatrix),Ge.setValue(j,"viewMatrix",vt.matrixWorldInverse);const Qt=Ge.map.cameraPosition;Qt!==void 0&&Qt.setValue(j,O.setFromMatrixPosition(vt.matrixWorld)),ue.logarithmicDepthBuffer&&Ge.setValue(j,"logDepthBufFC",2/(Math.log(vt.far+1)/Math.LN2)),(Tt.isMeshPhongMaterial||Tt.isMeshToonMaterial||Tt.isMeshLambertMaterial||Tt.isMeshBasicMaterial||Tt.isMeshStandardMaterial||Tt.isShaderMaterial)&&Ge.setValue(j,"isOrthographic",vt.isOrthographicCamera===!0),b!==vt&&(b=vt,vr=!0,Ye=!0)}if(Bt.isSkinnedMesh){Ge.setOptional(j,Bt,"bindMatrix"),Ge.setOptional(j,Bt,"bindMatrixInverse");const Qt=Bt.skeleton;Qt&&(Qt.boneTexture===null&&Qt.computeBoneTexture(),Ge.setValue(j,"boneTexture",Qt.boneTexture,G))}Bt.isBatchedMesh&&(Ge.setOptional(j,Bt,"batchingTexture"),Ge.setValue(j,"batchingTexture",Bt._matricesTexture,G));const Ot=ct.morphAttributes;if((Ot.position!==void 0||Ot.normal!==void 0||Ot.color!==void 0)&&Ae.update(Bt,ct,ur),(vr||kt.receiveShadow!==Bt.receiveShadow)&&(kt.receiveShadow=Bt.receiveShadow,Ge.setValue(j,"receiveShadow",Bt.receiveShadow)),Tt.isMeshGouraudMaterial&&Tt.envMap!==null&&(Nt.envMap.value=Kt,Nt.flipEnvMap.value=Kt.isCubeTexture&&Kt.isRenderTargetTexture===!1?-1:1),Tt.isMeshStandardMaterial&&Tt.envMap===null&&Lt.environment!==null&&(Nt.envMapIntensity.value=Lt.environmentIntensity),vr&&(Ge.setValue(j,"toneMappingExposure",n.toneMappingExposure),kt.needsLights&&mt(Nt,Ye),ir&&Tt.fog===!0&&ce.refreshFogUniforms(Nt,ir),ce.refreshMaterialUniforms(Nt,Tt,E,y,r.state.transmissionRenderTarget),np.upload(j,Ne(kt),Nt,G)),Tt.isShaderMaterial&&Tt.uniformsNeedUpdate===!0&&(np.upload(j,Ne(kt),Nt,G),Tt.uniformsNeedUpdate=!1),Tt.isSpriteMaterial&&Ge.setValue(j,"center",Bt.center),Ge.setValue(j,"modelViewMatrix",Bt.modelViewMatrix),Ge.setValue(j,"normalMatrix",Bt.normalMatrix),Ge.setValue(j,"modelMatrix",Bt.matrixWorld),Tt.isShaderMaterial||Tt.isRawShaderMaterial){const Qt=Tt.uniformsGroups;for(let tr=0,fr=Qt.length;tr0&&G.useMultisampledRTT(vt)===!1?Bt=ee.get(vt).__webglMultisampledFramebuffer:Array.isArray($t)?Bt=$t[ct]:Bt=$t,u.copy(vt.viewport),o.copy(vt.scissor),d=vt.scissorTest}else u.copy(L).multiplyScalar(E).floor(),o.copy(M).multiplyScalar(E).floor(),d=z;if(J.bindFramebuffer(j.FRAMEBUFFER,Bt)&&Tt&&J.drawBuffers(vt,Bt),J.viewport(u),J.scissor(o),J.setScissorTest(d),ir){const Kt=ee.get(vt.texture);j.framebufferTexture2D(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,j.TEXTURE_CUBE_MAP_POSITIVE_X+Lt,Kt.__webglTexture,ct)}else if(pt){const Kt=ee.get(vt.texture),or=Lt||0;j.framebufferTextureLayer(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,Kt.__webglTexture,ct||0,or)}h=-1},this.readRenderTargetPixels=function(vt,Lt,ct,Tt,Bt,ir,pt){if(!(vt&&vt.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Xt=ee.get(vt).__webglFramebuffer;if(vt.isWebGLCubeRenderTarget&&pt!==void 0&&(Xt=Xt[pt]),Xt){J.bindFramebuffer(j.FRAMEBUFFER,Xt);try{const Kt=vt.texture,or=Kt.format,$t=Kt.type;if(or!==zu&&Ve.convert(or)!==j.getParameter(j.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const gt=$t===ap&&(ie.has("EXT_color_buffer_half_float")||ie.has("EXT_color_buffer_float"));if($t!==dc&&Ve.convert($t)!==j.getParameter(j.IMPLEMENTATION_COLOR_READ_TYPE)&&$t!==cc&&!gt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Lt>=0&&Lt<=vt.width-Tt&&ct>=0&&ct<=vt.height-Bt&&j.readPixels(Lt,ct,Tt,Bt,Ve.convert(or),Ve.convert($t),ir)}finally{const Kt=m!==null?ee.get(m).__webglFramebuffer:null;J.bindFramebuffer(j.FRAMEBUFFER,Kt)}}},this.copyFramebufferToTexture=function(vt,Lt,ct=0){const Tt=Math.pow(2,-ct),Bt=Math.floor(Lt.image.width*Tt),ir=Math.floor(Lt.image.height*Tt);G.setTexture2D(Lt,0),j.copyTexSubImage2D(j.TEXTURE_2D,ct,0,0,vt.x,vt.y,Bt,ir),J.unbindTexture()},this.copyTextureToTexture=function(vt,Lt,ct,Tt=0){const Bt=Lt.image.width,ir=Lt.image.height,pt=Ve.convert(ct.format),Xt=Ve.convert(ct.type);G.setTexture2D(ct,0),j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,ct.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ct.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,ct.unpackAlignment),Lt.isDataTexture?j.texSubImage2D(j.TEXTURE_2D,Tt,vt.x,vt.y,Bt,ir,pt,Xt,Lt.image.data):Lt.isCompressedTexture?j.compressedTexSubImage2D(j.TEXTURE_2D,Tt,vt.x,vt.y,Lt.mipmaps[0].width,Lt.mipmaps[0].height,pt,Lt.mipmaps[0].data):j.texSubImage2D(j.TEXTURE_2D,Tt,vt.x,vt.y,pt,Xt,Lt.image),Tt===0&&ct.generateMipmaps&&j.generateMipmap(j.TEXTURE_2D),J.unbindTexture()},this.copyTextureToTexture3D=function(vt,Lt,ct,Tt,Bt=0){const ir=Math.round(vt.max.x-vt.min.x),pt=Math.round(vt.max.y-vt.min.y),Xt=vt.max.z-vt.min.z+1,Kt=Ve.convert(Tt.format),or=Ve.convert(Tt.type);let $t;if(Tt.isData3DTexture)G.setTexture3D(Tt,0),$t=j.TEXTURE_3D;else if(Tt.isDataArrayTexture||Tt.isCompressedArrayTexture)G.setTexture2DArray(Tt,0),$t=j.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,Tt.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Tt.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,Tt.unpackAlignment);const gt=j.getParameter(j.UNPACK_ROW_LENGTH),st=j.getParameter(j.UNPACK_IMAGE_HEIGHT),At=j.getParameter(j.UNPACK_SKIP_PIXELS),Ct=j.getParameter(j.UNPACK_SKIP_ROWS),It=j.getParameter(j.UNPACK_SKIP_IMAGES),Pt=ct.isCompressedTexture?ct.mipmaps[Bt]:ct.image;j.pixelStorei(j.UNPACK_ROW_LENGTH,Pt.width),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,Pt.height),j.pixelStorei(j.UNPACK_SKIP_PIXELS,vt.min.x),j.pixelStorei(j.UNPACK_SKIP_ROWS,vt.min.y),j.pixelStorei(j.UNPACK_SKIP_IMAGES,vt.min.z),ct.isDataTexture||ct.isData3DTexture?j.texSubImage3D($t,Bt,Lt.x,Lt.y,Lt.z,ir,pt,Xt,Kt,or,Pt.data):Tt.isCompressedArrayTexture?j.compressedTexSubImage3D($t,Bt,Lt.x,Lt.y,Lt.z,ir,pt,Xt,Kt,Pt.data):j.texSubImage3D($t,Bt,Lt.x,Lt.y,Lt.z,ir,pt,Xt,Kt,or,Pt),j.pixelStorei(j.UNPACK_ROW_LENGTH,gt),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,st),j.pixelStorei(j.UNPACK_SKIP_PIXELS,At),j.pixelStorei(j.UNPACK_SKIP_ROWS,Ct),j.pixelStorei(j.UNPACK_SKIP_IMAGES,It),Bt===0&&Tt.generateMipmaps&&j.generateMipmap($t),J.unbindTexture()},this.initTexture=function(vt){vt.isCubeTexture?G.setTextureCube(vt,0):vt.isData3DTexture?G.setTexture3D(vt,0):vt.isDataArrayTexture||vt.isCompressedArrayTexture?G.setTexture2DArray(vt,0):G.setTexture2D(vt,0),J.unbindTexture()},this.resetState=function(){c=0,l=0,m=null,J.reset(),Ue.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return yf}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(F){this._outputColorSpace=F;const q=this.getContext();q.drawingBufferColorSpace=F===G0?"display-p3":"srgb",q.unpackColorSpace=Fa.workingColorSpace===vp?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(F){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=F}}class m1 extends Bo{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Ss,this.environmentIntensity=1,this.environmentRotation=new Ss,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(F,q){return super.copy(F,q),F.background!==null&&(this.background=F.background.clone()),F.environment!==null&&(this.environment=F.environment.clone()),F.fog!==null&&(this.fog=F.fog.clone()),this.backgroundBlurriness=F.backgroundBlurriness,this.backgroundIntensity=F.backgroundIntensity,this.backgroundRotation.copy(F.backgroundRotation),this.environmentIntensity=F.environmentIntensity,this.environmentRotation.copy(F.environmentRotation),F.overrideMaterial!==null&&(this.overrideMaterial=F.overrideMaterial.clone()),this.matrixAutoUpdate=F.matrixAutoUpdate,this}toJSON(F){const q=super.toJSON(F);return this.fog!==null&&(q.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(q.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(q.object.backgroundIntensity=this.backgroundIntensity),q.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(q.object.environmentIntensity=this.environmentIntensity),q.object.environmentRotation=this.environmentRotation.toArray(),q}}class uS{constructor(F,q){this.isInterleavedBuffer=!0,this.array=F,this.stride=q,this.count=F!==void 0?F.length/q:0,this.usage=O0,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=xf()}onUploadCallback(){}set needsUpdate(F){F===!0&&this.version++}get updateRange(){return qy("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(F){return this.usage=F,this}addUpdateRange(F,q){this.updateRanges.push({start:F,count:q})}clearUpdateRanges(){this.updateRanges.length=0}copy(F){return this.array=new F.array.constructor(F.array),this.count=F.count,this.stride=F.stride,this.usage=F.usage,this}copyAt(F,q,le){F*=this.stride,le*=q.stride;for(let De=0,Xe=this.stride;DeF.far||q.push({distance:e,point:Uv.clone(),uv:hu.getInterpolation(Uv,Jd,Hv,Qd,Ty,_0,Ay,new Wi),face:null,object:this})}copy(F,q){return super.copy(F,q),F.center!==void 0&&this.center.copy(F.center),this.material=F.material,this}}function $d(_e,F,q,le,De,Xe){ev.subVectors(_e,q).addScalar(.5).multiply(le),De!==void 0?(Vv.x=Xe*ev.x-De*ev.y,Vv.y=De*ev.x+Xe*ev.y):Vv.copy(ev),_e.copy(F),_e.x+=Vv.x,_e.y+=Vv.y,_e.applyMatrix4(x1)}class mp extends ah{constructor(F){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new da(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(F)}copy(F){return super.copy(F),this.color.copy(F.color),this.map=F.map,this.linewidth=F.linewidth,this.linecap=F.linecap,this.linejoin=F.linejoin,this.fog=F.fog,this}}const My=new bn,Sy=new bn,Ey=new so,C0=new $v,qd=new Qv;class fS extends Bo{constructor(F=new Ws,q=new mp){super(),this.isLine=!0,this.type="Line",this.geometry=F,this.material=q,this.updateMorphTargets()}copy(F,q){return super.copy(F,q),this.material=Array.isArray(F.material)?F.material.slice():F.material,this.geometry=F.geometry,this}computeLineDistances(){const F=this.geometry;if(F.index===null){const q=F.attributes.position,le=[0];for(let De=1,Xe=q.count;Dee)continue;S.applyMatrix4(this.matrixWorld);const h=F.ray.origin.distanceTo(S);hF.far||q.push({distance:h,point:i.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{const t=Math.max(0,H.start),a=Math.min(r.count,H.start+H.count);for(let n=t,f=a-1;ne)continue;S.applyMatrix4(this.matrixWorld);const l=F.ray.origin.distanceTo(S);lF.far||q.push({distance:l,point:i.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const q=this.geometry.morphAttributes,le=Object.keys(q);if(le.length>0){const De=q[le[0]];if(De!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Xe=0,H=De.length;Xe0){const De=q[le[0]];if(De!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Xe=0,H=De.length;XeDe.far)return;Xe.push({distance:g,distanceToRay:Math.sqrt(U),point:e,index:F,face:null,object:H})}}class hS extends Es{constructor(F,q,le,De,Xe,H,U,e,g){super(F,q,le,De,Xe,H,U,e,g),this.isCanvasTexture=!0,this.needsUpdate=!0}}class yp extends Ws{constructor(F=1,q=32,le=16,De=0,Xe=Math.PI*2,H=0,U=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:F,widthSegments:q,heightSegments:le,phiStart:De,phiLength:Xe,thetaStart:H,thetaLength:U},q=Math.max(3,Math.floor(q)),le=Math.max(2,Math.floor(le));const e=Math.min(H+U,Math.PI);let g=0;const C=[],i=new bn,S=new bn,x=[],v=[],p=[],r=[];for(let t=0;t<=le;t++){const a=[],n=t/le;let f=0;t===0&&H===0?f=.5/q:t===le&&e===Math.PI&&(f=-.5/q);for(let c=0;c<=q;c++){const l=c/q;i.x=-F*Math.cos(De+l*Xe)*Math.sin(H+n*U),i.y=F*Math.cos(H+n*U),i.z=F*Math.sin(De+l*Xe)*Math.sin(H+n*U),v.push(i.x,i.y,i.z),S.copy(i).normalize(),p.push(S.x,S.y,S.z),r.push(l+f,1-n),a.push(g++)}C.push(a)}for(let t=0;t0)&&x.push(n,f,l),(t!==le-1||eF.clone()))}}class kS{constructor(F=new A1){this.force=F}simulate(F,q){const le=q.bodies.map(Xe=>{const H=this.rateUpdate(Xe.velocity,Xe.acceleration,F);return Xe.clone(this.rateUpdate(Xe.position,H,F),H)}),De=this.force.getForces(le);return le.forEach((Xe,H)=>{Xe.acceleration=De[H].divideScalar(Xe.mass)}),new xp(le)}rateUpdate(F,q,le){return q.clone().multiplyScalar(le).add(F)}}class OS{constructor(F=new A1,q=[1,2,2,1]){if(this.force=F,q.length!==4)throw new Error("Weights for RK4 must be of length 4");this.weights=q}simulate(F,q){let le=q.bodies.map(S=>({kv:[S.acceleration.clone()],kx:[S.velocity.clone()]}));const De=this.getInterKV(q.bodies,le,0,F/2),Xe=this.getInterKX(q.bodies,le,0,F/2);le.forEach((S,x)=>{S.kv.push(De[x]),S.kx.push(Xe[x])});const H=this.getInterKV(q.bodies,le,1,F/2),U=this.getInterKX(q.bodies,le,1,F/2);le.forEach((S,x)=>{S.kv.push(H[x]),S.kx.push(U[x])});const e=this.getInterKV(q.bodies,le,2,F),g=this.getInterKX(q.bodies,le,2,F);le.forEach((S,x)=>{S.kv.push(e[x]),S.kx.push(g[x])});const C=q.bodies.map((S,x)=>{const v=new bn,p=new bn;return le[x].kx.forEach((r,t)=>{v.add(r.multiplyScalar(this.weights[t]))}),le[x].kv.forEach((r,t)=>{p.add(r.multiplyScalar(this.weights[t]))}),S.clone(v.multiplyScalar(F/6).add(S.position),p.multiplyScalar(F/6).add(S.velocity))}),i=this.force.getForces(C);return C.forEach((S,x)=>{S.acceleration=i[x].divideScalar(S.mass)}),new xp(C)}getInterKV(F,q,le,De){let Xe=F.map((H,U)=>{let e=H.clone();return e.position.add(q[U].kx[le].clone().multiplyScalar(De)),e});return this.force.getForces(Xe).map((H,U)=>H.divideScalar(F[U].mass))}getInterKX(F,q,le,De){return F.map((Xe,H)=>Xe.velocity.clone().add(q[H].kv[le].clone().multiplyScalar(De)))}}/** +}`;class nS{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(F,q,lt){if(this.texture===null){const Dt=new Es,Zt=F.properties.get(Dt);Zt.__webglTexture=q.texture,(q.depthNear!=lt.depthNear||q.depthFar!=lt.depthFar)&&(this.depthNear=q.depthNear,this.depthFar=q.depthFar),this.texture=Dt}}render(F,q){if(this.texture!==null){if(this.mesh===null){const lt=q.cameras[0].viewport,Dt=new gc({vertexShader:eS,fragmentShader:rS,uniforms:{depthColor:{value:this.texture},depthWidth:{value:lt.z},depthHeight:{value:lt.w}}});this.mesh=new Vs(new pp(20,20),Dt)}F.render(this.mesh,q)}}reset(){this.texture=null,this.mesh=null}}class iS extends nh{constructor(F,q){super();const lt=this;let Dt=null,Zt=1,G=null,U="local-floor",t=1,g=null,C=null,i=null,S=null,x=null,v=null;const p=new nS,r=q.getContextAttributes();let e=null,a=null;const n=[],f=[],c=new Wi;let l=null;const m=new uu;m.layers.enable(1),m.viewport=new No;const h=new uu;h.layers.enable(2),h.viewport=new No;const b=[m,h],u=new q4;u.layers.enable(1),u.layers.enable(2);let o=null,d=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(N){let I=n[N];return I===void 0&&(I=new C0,n[N]=I),I.getTargetRaySpace()},this.getControllerGrip=function(N){let I=n[N];return I===void 0&&(I=new C0,n[N]=I),I.getGripSpace()},this.getHand=function(N){let I=n[N];return I===void 0&&(I=new C0,n[N]=I),I.getHandSpace()};function w(N){const I=f.indexOf(N.inputSource);if(I===-1)return;const k=n[I];k!==void 0&&(k.update(N.inputSource,N.frame,g||G),k.dispatchEvent({type:N.type,data:N.inputSource}))}function A(){Dt.removeEventListener("select",w),Dt.removeEventListener("selectstart",w),Dt.removeEventListener("selectend",w),Dt.removeEventListener("squeeze",w),Dt.removeEventListener("squeezestart",w),Dt.removeEventListener("squeezeend",w),Dt.removeEventListener("end",A),Dt.removeEventListener("inputsourceschange",_);for(let N=0;N=0&&(f[B]=null,n[B].disconnect(k))}for(let I=0;I=f.length){f.push(k),B=H;break}else if(f[H]===null){f[H]=k,B=H;break}if(B===-1)break}const O=n[B];O&&O.connect(k)}}const y=new bn,E=new bn;function T(N,I,k){y.setFromMatrixPosition(I.matrixWorld),E.setFromMatrixPosition(k.matrixWorld);const B=y.distanceTo(E),O=I.projectionMatrix.elements,H=k.projectionMatrix.elements,Y=O[14]/(O[10]-1),j=O[14]/(O[10]+1),et=(O[9]+1)/O[5],it=(O[9]-1)/O[5],ut=(O[8]-1)/O[0],J=(H[8]+1)/H[0],X=Y*ut,tt=Y*J,V=B/(-ut+J),Q=V*-ut;I.matrixWorld.decompose(N.position,N.quaternion,N.scale),N.translateX(Q),N.translateZ(V),N.matrixWorld.compose(N.position,N.quaternion,N.scale),N.matrixWorldInverse.copy(N.matrixWorld).invert();const ot=Y+V,$=j+V,Z=X-Q,st=tt+(B-Q),nt=et*j/$*ot,ct=it*j/$*ot;N.projectionMatrix.makePerspective(Z,st,nt,ct,ot,$),N.projectionMatrixInverse.copy(N.projectionMatrix).invert()}function s(N,I){I===null?N.matrixWorld.copy(N.matrix):N.matrixWorld.multiplyMatrices(I.matrixWorld,N.matrix),N.matrixWorldInverse.copy(N.matrixWorld).invert()}this.updateCamera=function(N){if(Dt===null)return;p.texture!==null&&(N.near=p.depthNear,N.far=p.depthFar),u.near=h.near=m.near=N.near,u.far=h.far=m.far=N.far,(o!==u.near||d!==u.far)&&(Dt.updateRenderState({depthNear:u.near,depthFar:u.far}),o=u.near,d=u.far,m.near=o,m.far=d,h.near=o,h.far=d,m.updateProjectionMatrix(),h.updateProjectionMatrix(),N.updateProjectionMatrix());const I=N.parent,k=u.cameras;s(u,I);for(let B=0;B0&&(r.alphaTest.value=e.alphaTest);const a=F.get(e),n=a.envMap,f=a.envMapRotation;if(n&&(r.envMap.value=n,Jc.copy(f),Jc.x*=-1,Jc.y*=-1,Jc.z*=-1,n.isCubeTexture&&n.isRenderTargetTexture===!1&&(Jc.y*=-1,Jc.z*=-1),r.envMapRotation.value.setFromMatrix4(aS.makeRotationFromEuler(Jc)),r.flipEnvMap.value=n.isCubeTexture&&n.isRenderTargetTexture===!1?-1:1,r.reflectivity.value=e.reflectivity,r.ior.value=e.ior,r.refractionRatio.value=e.refractionRatio),e.lightMap){r.lightMap.value=e.lightMap;const c=_t._useLegacyLights===!0?Math.PI:1;r.lightMapIntensity.value=e.lightMapIntensity*c,q(e.lightMap,r.lightMapTransform)}e.aoMap&&(r.aoMap.value=e.aoMap,r.aoMapIntensity.value=e.aoMapIntensity,q(e.aoMap,r.aoMapTransform))}function G(r,e){r.diffuse.value.copy(e.color),r.opacity.value=e.opacity,e.map&&(r.map.value=e.map,q(e.map,r.mapTransform))}function U(r,e){r.dashSize.value=e.dashSize,r.totalSize.value=e.dashSize+e.gapSize,r.scale.value=e.scale}function t(r,e,a,n){r.diffuse.value.copy(e.color),r.opacity.value=e.opacity,r.size.value=e.size*a,r.scale.value=n*.5,e.map&&(r.map.value=e.map,q(e.map,r.uvTransform)),e.alphaMap&&(r.alphaMap.value=e.alphaMap,q(e.alphaMap,r.alphaMapTransform)),e.alphaTest>0&&(r.alphaTest.value=e.alphaTest)}function g(r,e){r.diffuse.value.copy(e.color),r.opacity.value=e.opacity,r.rotation.value=e.rotation,e.map&&(r.map.value=e.map,q(e.map,r.mapTransform)),e.alphaMap&&(r.alphaMap.value=e.alphaMap,q(e.alphaMap,r.alphaMapTransform)),e.alphaTest>0&&(r.alphaTest.value=e.alphaTest)}function C(r,e){r.specular.value.copy(e.specular),r.shininess.value=Math.max(e.shininess,1e-4)}function i(r,e){e.gradientMap&&(r.gradientMap.value=e.gradientMap)}function S(r,e){r.metalness.value=e.metalness,e.metalnessMap&&(r.metalnessMap.value=e.metalnessMap,q(e.metalnessMap,r.metalnessMapTransform)),r.roughness.value=e.roughness,e.roughnessMap&&(r.roughnessMap.value=e.roughnessMap,q(e.roughnessMap,r.roughnessMapTransform)),e.envMap&&(r.envMapIntensity.value=e.envMapIntensity)}function x(r,e,a){r.ior.value=e.ior,e.sheen>0&&(r.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),r.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(r.sheenColorMap.value=e.sheenColorMap,q(e.sheenColorMap,r.sheenColorMapTransform)),e.sheenRoughnessMap&&(r.sheenRoughnessMap.value=e.sheenRoughnessMap,q(e.sheenRoughnessMap,r.sheenRoughnessMapTransform))),e.clearcoat>0&&(r.clearcoat.value=e.clearcoat,r.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(r.clearcoatMap.value=e.clearcoatMap,q(e.clearcoatMap,r.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,q(e.clearcoatRoughnessMap,r.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(r.clearcoatNormalMap.value=e.clearcoatNormalMap,q(e.clearcoatNormalMap,r.clearcoatNormalMapTransform),r.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),e.side===Gs&&r.clearcoatNormalScale.value.negate())),e.iridescence>0&&(r.iridescence.value=e.iridescence,r.iridescenceIOR.value=e.iridescenceIOR,r.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],r.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(r.iridescenceMap.value=e.iridescenceMap,q(e.iridescenceMap,r.iridescenceMapTransform)),e.iridescenceThicknessMap&&(r.iridescenceThicknessMap.value=e.iridescenceThicknessMap,q(e.iridescenceThicknessMap,r.iridescenceThicknessMapTransform))),e.transmission>0&&(r.transmission.value=e.transmission,r.transmissionSamplerMap.value=a.texture,r.transmissionSamplerSize.value.set(a.width,a.height),e.transmissionMap&&(r.transmissionMap.value=e.transmissionMap,q(e.transmissionMap,r.transmissionMapTransform)),r.thickness.value=e.thickness,e.thicknessMap&&(r.thicknessMap.value=e.thicknessMap,q(e.thicknessMap,r.thicknessMapTransform)),r.attenuationDistance.value=e.attenuationDistance,r.attenuationColor.value.copy(e.attenuationColor)),e.anisotropy>0&&(r.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(r.anisotropyMap.value=e.anisotropyMap,q(e.anisotropyMap,r.anisotropyMapTransform))),r.specularIntensity.value=e.specularIntensity,r.specularColor.value.copy(e.specularColor),e.specularColorMap&&(r.specularColorMap.value=e.specularColorMap,q(e.specularColorMap,r.specularColorMapTransform)),e.specularIntensityMap&&(r.specularIntensityMap.value=e.specularIntensityMap,q(e.specularIntensityMap,r.specularIntensityMapTransform))}function v(r,e){e.matcap&&(r.matcap.value=e.matcap)}function p(r,e){const a=F.get(e).light;r.referencePosition.value.setFromMatrixPosition(a.matrixWorld),r.nearDistance.value=a.shadow.camera.near,r.farDistance.value=a.shadow.camera.far}return{refreshFogUniforms:lt,refreshMaterialUniforms:Dt}}function sS(_t,F,q,lt){let Dt={},Zt={},G=[];const U=_t.getParameter(_t.MAX_UNIFORM_BUFFER_BINDINGS);function t(a,n){const f=n.program;lt.uniformBlockBinding(a,f)}function g(a,n){let f=Dt[a.id];f===void 0&&(v(a),f=C(a),Dt[a.id]=f,a.addEventListener("dispose",r));const c=n.program;lt.updateUBOMapping(a,c);const l=F.render.frame;Zt[a.id]!==l&&(S(a),Zt[a.id]=l)}function C(a){const n=i();a.__bindingPointIndex=n;const f=_t.createBuffer(),c=a.__size,l=a.usage;return _t.bindBuffer(_t.UNIFORM_BUFFER,f),_t.bufferData(_t.UNIFORM_BUFFER,c,l),_t.bindBuffer(_t.UNIFORM_BUFFER,null),_t.bindBufferBase(_t.UNIFORM_BUFFER,n,f),f}function i(){for(let a=0;a0&&(f+=c-l),a.__size=f,a.__cache={},this}function p(a){const n={boundary:0,storage:0};return typeof a=="number"||typeof a=="boolean"?(n.boundary=4,n.storage=4):a.isVector2?(n.boundary=8,n.storage=8):a.isVector3||a.isColor?(n.boundary=16,n.storage=12):a.isVector4?(n.boundary=16,n.storage=16):a.isMatrix3?(n.boundary=48,n.storage=48):a.isMatrix4?(n.boundary=64,n.storage=64):a.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",a),n}function r(a){const n=a.target;n.removeEventListener("dispose",r);const f=G.indexOf(n.__bindingPointIndex);G.splice(f,1),_t.deleteBuffer(Dt[n.id]),delete Dt[n.id],delete Zt[n.id]}function e(){for(const a in Dt)_t.deleteBuffer(Dt[a]);G=[],Dt={},Zt={}}return{bind:t,update:g,dispose:e}}class y1{constructor(F={}){const{canvas:q=t2(),context:lt=null,depth:Dt=!0,stencil:Zt=!1,alpha:G=!1,antialias:U=!1,premultipliedAlpha:t=!0,preserveDrawingBuffer:g=!1,powerPreference:C="default",failIfMajorPerformanceCaveat:i=!1}=F;this.isWebGLRenderer=!0;let S;if(lt!==null){if(typeof WebGLRenderingContext<"u"&< instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");S=lt.getContextAttributes().alpha}else S=G;const x=new Uint32Array(4),v=new Int32Array(4);let p=null,r=null;const e=[],a=[];this.domElement=q,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Iu,this._useLegacyLights=!1,this.toneMapping=dc,this.toneMappingExposure=1;const n=this;let f=!1,c=0,l=0,m=null,h=-1,b=null;const u=new No,o=new No;let d=null;const w=new ha(0);let A=0,_=q.width,y=q.height,E=1,T=null,s=null;const L=new No(0,0,_,y),M=new No(0,0,_,y);let z=!1;const D=new f1;let N=!1,I=!1;const k=new so,B=new Wi,O=new bn,H={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Y(){return m===null?E:1}let j=lt;function et(ve,Le){const ce=q.getContext(ve,Le);return ce!==null?ce:null}try{const ve={alpha:!0,depth:Dt,stencil:Zt,antialias:U,premultipliedAlpha:t,preserveDrawingBuffer:g,powerPreference:C,failIfMajorPerformanceCaveat:i};if("setAttribute"in q&&q.setAttribute("data-engine",`three.js r${W0}`),q.addEventListener("webglcontextlost",re,!1),q.addEventListener("webglcontextrestored",Kt,!1),q.addEventListener("webglcontextcreationerror",$t,!1),j===null){const Le="webgl2";if(j=et(Le,ve),j===null)throw et(Le)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(ve){throw console.error("THREE.WebGLRenderer: "+ve.message),ve}let it,ut,J,X,tt,V,Q,ot,$,Z,st,nt,ct,gt,Tt,wt,Rt,bt,At,mt,Lt,Ht,Ut,kt;function Vt(){it=new gM(j),it.init(),ut=new fM(j,it,F),Ht=new $4(j,it),J=new J4(j),X=new xM(j),tt=new k4,V=new Q4(j,it,J,tt,ut,Ht,X),Q=new hM(n),ot=new pM(n),$=new S2(j),Ut=new lM(j,$),Z=new mM(j,$,X,Ut),st=new wM(j,Z,$,X),At=new bM(j,ut,V),wt=new cM(tt),nt=new z4(n,Q,ot,it,ut,Ut,wt),ct=new oS(n,tt),gt=new N4,Tt=new W4(it),bt=new sM(n,Q,ot,J,st,S,t),Rt=new K4(n,st,ut),kt=new sS(j,X,ut,J),mt=new uM(j,it,X),Lt=new yM(j,it,X),X.programs=nt.programs,n.capabilities=ut,n.extensions=it,n.properties=tt,n.renderLists=gt,n.shadowMap=Rt,n.state=J,n.info=X}Vt();const It=new iS(n,j);this.xr=It,this.getContext=function(){return j},this.getContextAttributes=function(){return j.getContextAttributes()},this.forceContextLoss=function(){const ve=it.get("WEBGL_lose_context");ve&&ve.loseContext()},this.forceContextRestore=function(){const ve=it.get("WEBGL_lose_context");ve&&ve.restoreContext()},this.getPixelRatio=function(){return E},this.setPixelRatio=function(ve){ve!==void 0&&(E=ve,this.setSize(_,y,!1))},this.getSize=function(ve){return ve.set(_,y)},this.setSize=function(ve,Le,ce=!0){if(It.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}_=ve,y=Le,q.width=Math.floor(ve*E),q.height=Math.floor(Le*E),ce===!0&&(q.style.width=ve+"px",q.style.height=Le+"px"),this.setViewport(0,0,ve,Le)},this.getDrawingBufferSize=function(ve){return ve.set(_*E,y*E).floor()},this.setDrawingBufferSize=function(ve,Le,ce){_=ve,y=Le,E=ce,q.width=Math.floor(ve*ce),q.height=Math.floor(Le*ce),this.setViewport(0,0,ve,Le)},this.getCurrentViewport=function(ve){return ve.copy(u)},this.getViewport=function(ve){return ve.copy(L)},this.setViewport=function(ve,Le,ce,Te){ve.isVector4?L.set(ve.x,ve.y,ve.z,ve.w):L.set(ve,Le,ce,Te),J.viewport(u.copy(L).multiplyScalar(E).round())},this.getScissor=function(ve){return ve.copy(M)},this.setScissor=function(ve,Le,ce,Te){ve.isVector4?M.set(ve.x,ve.y,ve.z,ve.w):M.set(ve,Le,ce,Te),J.scissor(o.copy(M).multiplyScalar(E).round())},this.getScissorTest=function(){return z},this.setScissorTest=function(ve){J.setScissorTest(z=ve)},this.setOpaqueSort=function(ve){T=ve},this.setTransparentSort=function(ve){s=ve},this.getClearColor=function(ve){return ve.copy(bt.getClearColor())},this.setClearColor=function(){bt.setClearColor.apply(bt,arguments)},this.getClearAlpha=function(){return bt.getClearAlpha()},this.setClearAlpha=function(){bt.setClearAlpha.apply(bt,arguments)},this.clear=function(ve=!0,Le=!0,ce=!0){let Te=0;if(ve){let Be=!1;if(m!==null){const ir=m.texture.format;Be=ir===Qy||ir===Jy||ir===Ky}if(Be){const ir=m.texture.type,pe=ir===pc||ir===uv||ir===Yy||ir===Jv||ir===Zy||ir===jy,Xe=bt.getClearColor(),Ke=bt.getClearAlpha(),or=Xe.r,$e=Xe.g,ge=Xe.b;pe?(x[0]=or,x[1]=$e,x[2]=ge,x[3]=Ke,j.clearBufferuiv(j.COLOR,0,x)):(v[0]=or,v[1]=$e,v[2]=ge,v[3]=Ke,j.clearBufferiv(j.COLOR,0,v))}else Te|=j.COLOR_BUFFER_BIT}Le&&(Te|=j.DEPTH_BUFFER_BIT),ce&&(Te|=j.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),j.clear(Te)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){q.removeEventListener("webglcontextlost",re,!1),q.removeEventListener("webglcontextrestored",Kt,!1),q.removeEventListener("webglcontextcreationerror",$t,!1),gt.dispose(),Tt.dispose(),tt.dispose(),Q.dispose(),ot.dispose(),st.dispose(),Ut.dispose(),kt.dispose(),nt.dispose(),It.dispose(),It.removeEventListener("sessionstart",zt),It.removeEventListener("sessionend",Xt),Jt.stop()};function re(ve){ve.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),f=!0}function Kt(){console.log("THREE.WebGLRenderer: Context Restored."),f=!1;const ve=X.autoReset,Le=Rt.enabled,ce=Rt.autoUpdate,Te=Rt.needsUpdate,Be=Rt.type;Vt(),X.autoReset=ve,Rt.enabled=Le,Rt.autoUpdate=ce,Rt.needsUpdate=Te,Rt.type=Be}function $t(ve){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",ve.statusMessage)}function le(ve){const Le=ve.target;Le.removeEventListener("dispose",le),he(Le)}function he(ve){de(ve),tt.remove(ve)}function de(ve){const Le=tt.get(ve).programs;Le!==void 0&&(Le.forEach(function(ce){nt.releaseProgram(ce)}),ve.isShaderMaterial&&nt.releaseShaderCache(ve))}this.renderBufferDirect=function(ve,Le,ce,Te,Be,ir){Le===null&&(Le=H);const pe=Be.isMesh&&Be.matrixWorld.determinant()<0,Xe=ie(ve,Le,ce,Te,Be);J.setMaterial(Te,pe);let Ke=ce.index,or=1;if(Te.wireframe===!0){if(Ke=Z.getWireframeAttribute(ce),Ke===void 0)return;or=2}const $e=ce.drawRange,ge=ce.attributes.position;let se=$e.start*or,Ae=($e.start+$e.count)*or;ir!==null&&(se=Math.max(se,ir.start*or),Ae=Math.min(Ae,(ir.start+ir.count)*or)),Ke!==null?(se=Math.max(se,0),Ae=Math.min(Ae,Ke.count)):ge!=null&&(se=Math.max(se,0),Ae=Math.min(Ae,ge.count));const Ce=Ae-se;if(Ce<0||Ce===1/0)return;Ut.setup(Be,Te,Xe,ce,Ke);let Ie,Pe=mt;if(Ke!==null&&(Ie=$.get(Ke),Pe=Lt,Pe.setIndex(Ie)),Be.isMesh)Te.wireframe===!0?(J.setLineWidth(Te.wireframeLinewidth*Y()),Pe.setMode(j.LINES)):Pe.setMode(j.TRIANGLES);else if(Be.isLine){let ke=Te.linewidth;ke===void 0&&(ke=1),J.setLineWidth(ke*Y()),Be.isLineSegments?Pe.setMode(j.LINES):Be.isLineLoop?Pe.setMode(j.LINE_LOOP):Pe.setMode(j.LINE_STRIP)}else Be.isPoints?Pe.setMode(j.POINTS):Be.isSprite&&Pe.setMode(j.TRIANGLES);if(Be.isBatchedMesh)Pe.renderMultiDraw(Be._multiDrawStarts,Be._multiDrawCounts,Be._multiDrawCount);else if(Be.isInstancedMesh)Pe.renderInstances(se,Ce,Be.count);else if(ce.isInstancedBufferGeometry){const ke=ce._maxInstanceCount!==void 0?ce._maxInstanceCount:1/0,Ve=Math.min(ce.instanceCount,ke);Pe.renderInstances(se,Ce,Ve)}else Pe.render(se,Ce)};function xe(ve,Le,ce){ve.transparent===!0&&ve.side===yf&&ve.forceSinglePass===!1?(ve.side=Gs,ve.needsUpdate=!0,Mt(ve,Le,ce),ve.side=Nu,ve.needsUpdate=!0,Mt(ve,Le,ce),ve.side=yf):Mt(ve,Le,ce)}this.compile=function(ve,Le,ce=null){ce===null&&(ce=ve),r=Tt.get(ce),r.init(),a.push(r),ce.traverseVisible(function(Be){Be.isLight&&Be.layers.test(Le.layers)&&(r.pushLight(Be),Be.castShadow&&r.pushShadow(Be))}),ve!==ce&&ve.traverseVisible(function(Be){Be.isLight&&Be.layers.test(Le.layers)&&(r.pushLight(Be),Be.castShadow&&r.pushShadow(Be))}),r.setupLights(n._useLegacyLights);const Te=new Set;return ve.traverse(function(Be){const ir=Be.material;if(ir)if(Array.isArray(ir))for(let pe=0;pe{function ir(){if(Te.forEach(function(pe){tt.get(pe).currentProgram.isReady()&&Te.delete(pe)}),Te.size===0){Be(ve);return}setTimeout(ir,10)}it.get("KHR_parallel_shader_compile")!==null?ir():setTimeout(ir,10)})};let Se=null;function ne(ve){Se&&Se(ve)}function zt(){Jt.stop()}function Xt(){Jt.start()}const Jt=new c1;Jt.setAnimationLoop(ne),typeof self<"u"&&Jt.setContext(self),this.setAnimationLoop=function(ve){Se=ve,It.setAnimationLoop(ve),ve===null?Jt.stop():Jt.start()},It.addEventListener("sessionstart",zt),It.addEventListener("sessionend",Xt),this.render=function(ve,Le){if(Le!==void 0&&Le.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(f===!0)return;ve.matrixWorldAutoUpdate===!0&&ve.updateMatrixWorld(),Le.parent===null&&Le.matrixWorldAutoUpdate===!0&&Le.updateMatrixWorld(),It.enabled===!0&&It.isPresenting===!0&&(It.cameraAutoUpdate===!0&&It.updateCamera(Le),Le=It.getCamera()),ve.isScene===!0&&ve.onBeforeRender(n,ve,Le,m),r=Tt.get(ve,a.length),r.init(),a.push(r),k.multiplyMatrices(Le.projectionMatrix,Le.matrixWorldInverse),D.setFromProjectionMatrix(k),I=this.localClippingEnabled,N=wt.init(this.clippingPlanes,I),p=gt.get(ve,e.length),p.init(),e.push(p),Wt(ve,Le,0,n.sortObjects),p.finish(),n.sortObjects===!0&&p.sort(T,s),this.info.render.frame++,N===!0&&wt.beginShadows();const ce=r.state.shadowsArray;if(Rt.render(ce,ve,Le),N===!0&&wt.endShadows(),this.info.autoReset===!0&&this.info.reset(),(It.enabled===!1||It.isPresenting===!1||It.hasDepthSensing()===!1)&&bt.render(p,ve),r.setupLights(n._useLegacyLights),Le.isArrayCamera){const Te=Le.cameras;for(let Be=0,ir=Te.length;Be0?r=a[a.length-1]:r=null,e.pop(),e.length>0?p=e[e.length-1]:p=null};function Wt(ve,Le,ce,Te){if(ve.visible===!1)return;if(ve.layers.test(Le.layers)){if(ve.isGroup)ce=ve.renderOrder;else if(ve.isLOD)ve.autoUpdate===!0&&ve.update(Le);else if(ve.isLight)r.pushLight(ve),ve.castShadow&&r.pushShadow(ve);else if(ve.isSprite){if(!ve.frustumCulled||D.intersectsSprite(ve)){Te&&O.setFromMatrixPosition(ve.matrixWorld).applyMatrix4(k);const pe=st.update(ve),Xe=ve.material;Xe.visible&&p.push(ve,pe,Xe,ce,O.z,null)}}else if((ve.isMesh||ve.isLine||ve.isPoints)&&(!ve.frustumCulled||D.intersectsObject(ve))){const pe=st.update(ve),Xe=ve.material;if(Te&&(ve.boundingSphere!==void 0?(ve.boundingSphere===null&&ve.computeBoundingSphere(),O.copy(ve.boundingSphere.center)):(pe.boundingSphere===null&&pe.computeBoundingSphere(),O.copy(pe.boundingSphere.center)),O.applyMatrix4(ve.matrixWorld).applyMatrix4(k)),Array.isArray(Xe)){const Ke=pe.groups;for(let or=0,$e=Ke.length;or<$e;or++){const ge=Ke[or],se=Xe[ge.materialIndex];se&&se.visible&&p.push(ve,pe,se,ce,O.z,ge)}}else Xe.visible&&p.push(ve,pe,Xe,ce,O.z,null)}}const ir=ve.children;for(let pe=0,Xe=ir.length;pe0&&xt(Be,ir,Le,ce),Te&&J.viewport(u.copy(Te)),Be.length>0&&yt(Be,Le,ce),ir.length>0&&yt(ir,Le,ce),pe.length>0&&yt(pe,Le,ce),J.buffers.depth.setTest(!0),J.buffers.depth.setMask(!0),J.buffers.color.setMask(!0),J.setPolygonOffset(!1)}function xt(ve,Le,ce,Te){if((ce.isScene===!0?ce.overrideMaterial:null)!==null)return;if(r.state.transmissionRenderTarget===null){r.state.transmissionRenderTarget=new rh(1,1,{generateMipmaps:!0,type:it.has("EXT_color_buffer_half_float")||it.has("EXT_color_buffer_float")?op:pc,minFilter:eh,samples:4,stencilBuffer:Zt});const or=tt.get(r.state.transmissionRenderTarget);or.__isTransmissionRenderTarget=!0}const ir=r.state.transmissionRenderTarget;n.getDrawingBufferSize(B),ir.setSize(B.x,B.y);const pe=n.getRenderTarget();n.setRenderTarget(ir),n.getClearColor(w),A=n.getClearAlpha(),A<1&&n.setClearColor(16777215,.5),n.clear();const Xe=n.toneMapping;n.toneMapping=dc,yt(ve,ce,Te),V.updateMultisampleRenderTarget(ir),V.updateRenderTargetMipmap(ir);let Ke=!1;for(let or=0,$e=Le.length;or<$e;or++){const ge=Le[or],se=ge.object,Ae=ge.geometry,Ce=ge.material,Ie=ge.group;if(Ce.side===yf&&se.layers.test(Te.layers)){const Pe=Ce.side;Ce.side=Gs,Ce.needsUpdate=!0,Et(se,ce,Te,Ae,Ce,Ie),Ce.side=Pe,Ce.needsUpdate=!0,Ke=!0}}Ke===!0&&(V.updateMultisampleRenderTarget(ir),V.updateRenderTargetMipmap(ir)),n.setRenderTarget(pe),n.setClearColor(w,A),n.toneMapping=Xe}function yt(ve,Le,ce){const Te=Le.isScene===!0?Le.overrideMaterial:null;for(let Be=0,ir=ve.length;Be0),ge=!!ce.morphAttributes.position,se=!!ce.morphAttributes.normal,Ae=!!ce.morphAttributes.color;let Ce=dc;Te.toneMapped&&(m===null||m.isXRRenderTarget===!0)&&(Ce=n.toneMapping);const Ie=ce.morphAttributes.position||ce.morphAttributes.normal||ce.morphAttributes.color,Pe=Ie!==void 0?Ie.length:0,ke=tt.get(Te),Ve=r.state.lights;if(N===!0&&(I===!0||ve!==b)){const Qe=ve===b&&Te.id===h;wt.setState(Te,ve,Qe)}let Je=!1;Te.version===ke.__version?(ke.needsLights&&ke.lightsStateVersion!==Ve.state.version||ke.outputColorSpace!==Xe||Be.isBatchedMesh&&ke.batching===!1||!Be.isBatchedMesh&&ke.batching===!0||Be.isInstancedMesh&&ke.instancing===!1||!Be.isInstancedMesh&&ke.instancing===!0||Be.isSkinnedMesh&&ke.skinning===!1||!Be.isSkinnedMesh&&ke.skinning===!0||Be.isInstancedMesh&&ke.instancingColor===!0&&Be.instanceColor===null||Be.isInstancedMesh&&ke.instancingColor===!1&&Be.instanceColor!==null||Be.isInstancedMesh&&ke.instancingMorph===!0&&Be.morphTexture===null||Be.isInstancedMesh&&ke.instancingMorph===!1&&Be.morphTexture!==null||ke.envMap!==Ke||Te.fog===!0&&ke.fog!==ir||ke.numClippingPlanes!==void 0&&(ke.numClippingPlanes!==wt.numPlanes||ke.numIntersection!==wt.numIntersection)||ke.vertexAlphas!==or||ke.vertexTangents!==$e||ke.morphTargets!==ge||ke.morphNormals!==se||ke.morphColors!==Ae||ke.toneMapping!==Ce||ke.morphTargetsCount!==Pe)&&(Je=!0):(Je=!0,ke.__version=Te.version);let ur=ke.currentProgram;Je===!0&&(ur=Mt(Te,Le,Be));let hr=!1,vr=!1,Yt=!1;const Gt=ur.getUniforms(),Ne=ke.uniforms;if(J.useProgram(ur.program)&&(hr=!0,vr=!0,Yt=!0),Te.id!==h&&(h=Te.id,vr=!0),hr||b!==ve){Gt.setValue(j,"projectionMatrix",ve.projectionMatrix),Gt.setValue(j,"viewMatrix",ve.matrixWorldInverse);const Qe=Gt.map.cameraPosition;Qe!==void 0&&Qe.setValue(j,O.setFromMatrixPosition(ve.matrixWorld)),ut.logarithmicDepthBuffer&&Gt.setValue(j,"logDepthBufFC",2/(Math.log(ve.far+1)/Math.LN2)),(Te.isMeshPhongMaterial||Te.isMeshToonMaterial||Te.isMeshLambertMaterial||Te.isMeshBasicMaterial||Te.isMeshStandardMaterial||Te.isShaderMaterial)&&Gt.setValue(j,"isOrthographic",ve.isOrthographicCamera===!0),b!==ve&&(b=ve,vr=!0,Yt=!0)}if(Be.isSkinnedMesh){Gt.setOptional(j,Be,"bindMatrix"),Gt.setOptional(j,Be,"bindMatrixInverse");const Qe=Be.skeleton;Qe&&(Qe.boneTexture===null&&Qe.computeBoneTexture(),Gt.setValue(j,"boneTexture",Qe.boneTexture,V))}Be.isBatchedMesh&&(Gt.setOptional(j,Be,"batchingTexture"),Gt.setValue(j,"batchingTexture",Be._matricesTexture,V));const Oe=ce.morphAttributes;if((Oe.position!==void 0||Oe.normal!==void 0||Oe.color!==void 0)&&At.update(Be,ce,ur),(vr||ke.receiveShadow!==Be.receiveShadow)&&(ke.receiveShadow=Be.receiveShadow,Gt.setValue(j,"receiveShadow",Be.receiveShadow)),Te.isMeshGouraudMaterial&&Te.envMap!==null&&(Ne.envMap.value=Ke,Ne.flipEnvMap.value=Ke.isCubeTexture&&Ke.isRenderTargetTexture===!1?-1:1),Te.isMeshStandardMaterial&&Te.envMap===null&&Le.environment!==null&&(Ne.envMapIntensity.value=Le.environmentIntensity),vr&&(Gt.setValue(j,"toneMappingExposure",n.toneMappingExposure),ke.needsLights&&me(Ne,Yt),ir&&Te.fog===!0&&ct.refreshFogUniforms(Ne,ir),ct.refreshMaterialUniforms(Ne,Te,E,y,r.state.transmissionRenderTarget),ip.upload(j,Nt(ke),Ne,V)),Te.isShaderMaterial&&Te.uniformsNeedUpdate===!0&&(ip.upload(j,Nt(ke),Ne,V),Te.uniformsNeedUpdate=!1),Te.isSpriteMaterial&&Gt.setValue(j,"center",Be.center),Gt.setValue(j,"modelViewMatrix",Be.modelViewMatrix),Gt.setValue(j,"normalMatrix",Be.normalMatrix),Gt.setValue(j,"modelMatrix",Be.matrixWorld),Te.isShaderMaterial||Te.isRawShaderMaterial){const Qe=Te.uniformsGroups;for(let er=0,fr=Qe.length;er0&&V.useMultisampledRTT(ve)===!1?Be=tt.get(ve).__webglMultisampledFramebuffer:Array.isArray($e)?Be=$e[ce]:Be=$e,u.copy(ve.viewport),o.copy(ve.scissor),d=ve.scissorTest}else u.copy(L).multiplyScalar(E).floor(),o.copy(M).multiplyScalar(E).floor(),d=z;if(J.bindFramebuffer(j.FRAMEBUFFER,Be)&&Te&&J.drawBuffers(ve,Be),J.viewport(u),J.scissor(o),J.setScissorTest(d),ir){const Ke=tt.get(ve.texture);j.framebufferTexture2D(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,j.TEXTURE_CUBE_MAP_POSITIVE_X+Le,Ke.__webglTexture,ce)}else if(pe){const Ke=tt.get(ve.texture),or=Le||0;j.framebufferTextureLayer(j.FRAMEBUFFER,j.COLOR_ATTACHMENT0,Ke.__webglTexture,ce||0,or)}h=-1},this.readRenderTargetPixels=function(ve,Le,ce,Te,Be,ir,pe){if(!(ve&&ve.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Xe=tt.get(ve).__webglFramebuffer;if(ve.isWebGLCubeRenderTarget&&pe!==void 0&&(Xe=Xe[pe]),Xe){J.bindFramebuffer(j.FRAMEBUFFER,Xe);try{const Ke=ve.texture,or=Ke.format,$e=Ke.type;if(or!==zu&&Ht.convert(or)!==j.getParameter(j.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const ge=$e===op&&(it.has("EXT_color_buffer_half_float")||it.has("EXT_color_buffer_float"));if($e!==pc&&Ht.convert($e)!==j.getParameter(j.IMPLEMENTATION_COLOR_READ_TYPE)&&$e!==hc&&!ge){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Le>=0&&Le<=ve.width-Te&&ce>=0&&ce<=ve.height-Be&&j.readPixels(Le,ce,Te,Be,Ht.convert(or),Ht.convert($e),ir)}finally{const Ke=m!==null?tt.get(m).__webglFramebuffer:null;J.bindFramebuffer(j.FRAMEBUFFER,Ke)}}},this.copyFramebufferToTexture=function(ve,Le,ce=0){const Te=Math.pow(2,-ce),Be=Math.floor(Le.image.width*Te),ir=Math.floor(Le.image.height*Te);V.setTexture2D(Le,0),j.copyTexSubImage2D(j.TEXTURE_2D,ce,0,0,ve.x,ve.y,Be,ir),J.unbindTexture()},this.copyTextureToTexture=function(ve,Le,ce,Te=0){const Be=Le.image.width,ir=Le.image.height,pe=Ht.convert(ce.format),Xe=Ht.convert(ce.type);V.setTexture2D(ce,0),j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,ce.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ce.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,ce.unpackAlignment),Le.isDataTexture?j.texSubImage2D(j.TEXTURE_2D,Te,ve.x,ve.y,Be,ir,pe,Xe,Le.image.data):Le.isCompressedTexture?j.compressedTexSubImage2D(j.TEXTURE_2D,Te,ve.x,ve.y,Le.mipmaps[0].width,Le.mipmaps[0].height,pe,Le.mipmaps[0].data):j.texSubImage2D(j.TEXTURE_2D,Te,ve.x,ve.y,pe,Xe,Le.image),Te===0&&ce.generateMipmaps&&j.generateMipmap(j.TEXTURE_2D),J.unbindTexture()},this.copyTextureToTexture3D=function(ve,Le,ce,Te,Be=0){const ir=Math.round(ve.max.x-ve.min.x),pe=Math.round(ve.max.y-ve.min.y),Xe=ve.max.z-ve.min.z+1,Ke=Ht.convert(Te.format),or=Ht.convert(Te.type);let $e;if(Te.isData3DTexture)V.setTexture3D(Te,0),$e=j.TEXTURE_3D;else if(Te.isDataArrayTexture||Te.isCompressedArrayTexture)V.setTexture2DArray(Te,0),$e=j.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}j.pixelStorei(j.UNPACK_FLIP_Y_WEBGL,Te.flipY),j.pixelStorei(j.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Te.premultiplyAlpha),j.pixelStorei(j.UNPACK_ALIGNMENT,Te.unpackAlignment);const ge=j.getParameter(j.UNPACK_ROW_LENGTH),se=j.getParameter(j.UNPACK_IMAGE_HEIGHT),Ae=j.getParameter(j.UNPACK_SKIP_PIXELS),Ce=j.getParameter(j.UNPACK_SKIP_ROWS),Ie=j.getParameter(j.UNPACK_SKIP_IMAGES),Pe=ce.isCompressedTexture?ce.mipmaps[Be]:ce.image;j.pixelStorei(j.UNPACK_ROW_LENGTH,Pe.width),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,Pe.height),j.pixelStorei(j.UNPACK_SKIP_PIXELS,ve.min.x),j.pixelStorei(j.UNPACK_SKIP_ROWS,ve.min.y),j.pixelStorei(j.UNPACK_SKIP_IMAGES,ve.min.z),ce.isDataTexture||ce.isData3DTexture?j.texSubImage3D($e,Be,Le.x,Le.y,Le.z,ir,pe,Xe,Ke,or,Pe.data):Te.isCompressedArrayTexture?j.compressedTexSubImage3D($e,Be,Le.x,Le.y,Le.z,ir,pe,Xe,Ke,Pe.data):j.texSubImage3D($e,Be,Le.x,Le.y,Le.z,ir,pe,Xe,Ke,or,Pe),j.pixelStorei(j.UNPACK_ROW_LENGTH,ge),j.pixelStorei(j.UNPACK_IMAGE_HEIGHT,se),j.pixelStorei(j.UNPACK_SKIP_PIXELS,Ae),j.pixelStorei(j.UNPACK_SKIP_ROWS,Ce),j.pixelStorei(j.UNPACK_SKIP_IMAGES,Ie),Be===0&&Te.generateMipmaps&&j.generateMipmap($e),J.unbindTexture()},this.initTexture=function(ve){ve.isCubeTexture?V.setTextureCube(ve,0):ve.isData3DTexture?V.setTexture3D(ve,0):ve.isDataArrayTexture||ve.isCompressedArrayTexture?V.setTexture2DArray(ve,0):V.setTexture2D(ve,0),J.unbindTexture()},this.resetState=function(){c=0,l=0,m=null,J.reset(),Ut.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return xf}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(F){this._outputColorSpace=F;const q=this.getContext();q.drawingBufferColorSpace=F===Y0?"display-p3":"srgb",q.unpackColorSpace=Fa.workingColorSpace===dp?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(F){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=F}}class x1 extends Bo{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Ss,this.environmentIntensity=1,this.environmentRotation=new Ss,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(F,q){return super.copy(F,q),F.background!==null&&(this.background=F.background.clone()),F.environment!==null&&(this.environment=F.environment.clone()),F.fog!==null&&(this.fog=F.fog.clone()),this.backgroundBlurriness=F.backgroundBlurriness,this.backgroundIntensity=F.backgroundIntensity,this.backgroundRotation.copy(F.backgroundRotation),this.environmentIntensity=F.environmentIntensity,this.environmentRotation.copy(F.environmentRotation),F.overrideMaterial!==null&&(this.overrideMaterial=F.overrideMaterial.clone()),this.matrixAutoUpdate=F.matrixAutoUpdate,this}toJSON(F){const q=super.toJSON(F);return this.fog!==null&&(q.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(q.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(q.object.backgroundIntensity=this.backgroundIntensity),q.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(q.object.environmentIntensity=this.environmentIntensity),q.object.environmentRotation=this.environmentRotation.toArray(),q}}class lS{constructor(F,q){this.isInterleavedBuffer=!0,this.array=F,this.stride=q,this.count=F!==void 0?F.length/q:0,this.usage=B0,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=bf()}onUploadCallback(){}set needsUpdate(F){F===!0&&this.version++}get updateRange(){return e1("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(F){return this.usage=F,this}addUpdateRange(F,q){this.updateRanges.push({start:F,count:q})}clearUpdateRanges(){this.updateRanges.length=0}copy(F){return this.array=new F.array.constructor(F.array),this.count=F.count,this.stride=F.stride,this.usage=F.usage,this}copyAt(F,q,lt){F*=this.stride,lt*=q.stride;for(let Dt=0,Zt=this.stride;DtF.far||q.push({distance:t,point:Hv.clone(),uv:hu.getInterpolation(Hv,Qd,Gv,$d,Ay,L0,My,new Wi),face:null,object:this})}copy(F,q){return super.copy(F,q),F.center!==void 0&&this.center.copy(F.center),this.material=F.material,this}}function qd(_t,F,q,lt,Dt,Zt){qh.subVectors(_t,q).addScalar(.5).multiply(lt),Dt!==void 0?(Vv.x=Zt*qh.x-Dt*qh.y,Vv.y=Dt*qh.x+Zt*qh.y):Vv.copy(qh),_t.copy(F),_t.x+=Vv.x,_t.y+=Vv.y,_t.applyMatrix4(w1)}class yp extends ih{constructor(F){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new ha(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(F)}copy(F){return super.copy(F),this.color.copy(F.color),this.map=F.map,this.linewidth=F.linewidth,this.linecap=F.linecap,this.linejoin=F.linejoin,this.fog=F.fog,this}}const Sy=new bn,Ey=new bn,_y=new so,P0=new qv,tp=new $v;class uS extends Bo{constructor(F=new Ys,q=new yp){super(),this.isLine=!0,this.type="Line",this.geometry=F,this.material=q,this.updateMorphTargets()}copy(F,q){return super.copy(F,q),this.material=Array.isArray(F.material)?F.material.slice():F.material,this.geometry=F.geometry,this}computeLineDistances(){const F=this.geometry;if(F.index===null){const q=F.attributes.position,lt=[0];for(let Dt=1,Zt=q.count;Dtt)continue;S.applyMatrix4(this.matrixWorld);const h=F.ray.origin.distanceTo(S);hF.far||q.push({distance:h,point:i.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{const e=Math.max(0,G.start),a=Math.min(r.count,G.start+G.count);for(let n=e,f=a-1;nt)continue;S.applyMatrix4(this.matrixWorld);const l=F.ray.origin.distanceTo(S);lF.far||q.push({distance:l,point:i.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const q=this.geometry.morphAttributes,lt=Object.keys(q);if(lt.length>0){const Dt=q[lt[0]];if(Dt!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Zt=0,G=Dt.length;Zt0){const Dt=q[lt[0]];if(Dt!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let Zt=0,G=Dt.length;ZtDt.far)return;Zt.push({distance:g,distanceToRay:Math.sqrt(U),point:t,index:F,face:null,object:G})}}class cS extends Es{constructor(F,q,lt,Dt,Zt,G,U,t,g){super(F,q,lt,Dt,Zt,G,U,t,g),this.isCanvasTexture=!0,this.needsUpdate=!0}}class xp extends Ys{constructor(F=1,q=32,lt=16,Dt=0,Zt=Math.PI*2,G=0,U=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:F,widthSegments:q,heightSegments:lt,phiStart:Dt,phiLength:Zt,thetaStart:G,thetaLength:U},q=Math.max(3,Math.floor(q)),lt=Math.max(2,Math.floor(lt));const t=Math.min(G+U,Math.PI);let g=0;const C=[],i=new bn,S=new bn,x=[],v=[],p=[],r=[];for(let e=0;e<=lt;e++){const a=[],n=e/lt;let f=0;e===0&&G===0?f=.5/q:e===lt&&t===Math.PI&&(f=-.5/q);for(let c=0;c<=q;c++){const l=c/q;i.x=-F*Math.cos(Dt+l*Zt)*Math.sin(G+n*U),i.y=F*Math.cos(G+n*U),i.z=F*Math.sin(Dt+l*Zt)*Math.sin(G+n*U),v.push(i.x,i.y,i.z),S.copy(i).normalize(),p.push(S.x,S.y,S.z),r.push(l+f,1-n),a.push(g++)}C.push(a)}for(let e=0;e0)&&x.push(n,f,l),(e!==lt-1||tF.clone()))}}class IS{constructor(F=new S1){this.force=F}simulate(F,q){const lt=q.bodies.map(Zt=>{const G=this.rateUpdate(Zt.velocity,Zt.acceleration,F);return Zt.clone(this.rateUpdate(Zt.position,G,F),G)}),Dt=this.force.getForces(lt);return lt.forEach((Zt,G)=>{Zt.acceleration=Dt[G].divideScalar(Zt.mass)}),new bp(lt)}rateUpdate(F,q,lt){return q.clone().multiplyScalar(lt).add(F)}}class FS{constructor(F=new S1,q=[1,2,2,1]){if(this.force=F,q.length!==4)throw new Error("Weights for RK4 must be of length 4");this.weights=q}simulate(F,q){let lt=q.bodies.map(S=>({kv:[S.acceleration.clone()],kx:[S.velocity.clone()]}));const Dt=this.getInterKV(q.bodies,lt,0,F/2),Zt=this.getInterKX(q.bodies,lt,0,F/2);lt.forEach((S,x)=>{S.kv.push(Dt[x]),S.kx.push(Zt[x])});const G=this.getInterKV(q.bodies,lt,1,F/2),U=this.getInterKX(q.bodies,lt,1,F/2);lt.forEach((S,x)=>{S.kv.push(G[x]),S.kx.push(U[x])});const t=this.getInterKV(q.bodies,lt,2,F),g=this.getInterKX(q.bodies,lt,2,F);lt.forEach((S,x)=>{S.kv.push(t[x]),S.kx.push(g[x])});const C=q.bodies.map((S,x)=>{const v=new bn,p=new bn;return lt[x].kx.forEach((r,e)=>{v.add(r.multiplyScalar(this.weights[e]))}),lt[x].kv.forEach((r,e)=>{p.add(r.multiplyScalar(this.weights[e]))}),S.clone(v.multiplyScalar(F/6).add(S.position),p.multiplyScalar(F/6).add(S.velocity))}),i=this.force.getForces(C);return C.forEach((S,x)=>{S.acceleration=i[x].divideScalar(S.mass)}),new bp(C)}getInterKV(F,q,lt,Dt){let Zt=F.map((G,U)=>{let t=G.clone();return t.position.add(q[U].kx[lt].clone().multiplyScalar(Dt)),t});return this.force.getForces(Zt).map((G,U)=>G.divideScalar(F[U].mass))}getInterKX(F,q,lt,Dt){return F.map((Zt,G)=>Zt.velocity.clone().add(q[G].kv[lt].clone().multiplyScalar(Dt)))}}/** * lil-gui * https://lil-gui.georgealways.com * @version 0.19.2 * @author George Michael Brower * @license MIT - */class Ou{constructor(F,q,le,De,Xe="div"){this.parent=F,this.object=q,this.property=le,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(Xe),this.domElement.classList.add("controller"),this.domElement.classList.add(De),this.$name=document.createElement("div"),this.$name.classList.add("name"),Ou.nextNameID=Ou.nextNameID||0,this.$name.id=`lil-gui-name-${++Ou.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",H=>H.stopPropagation()),this.domElement.addEventListener("keyup",H=>H.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(le)}name(F){return this._name=F,this.$name.textContent=F,this}onChange(F){return this._onChange=F,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(F){return this._onFinishChange=F,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(F=!0){return this.disable(!F)}disable(F=!0){return F===this._disabled?this:(this._disabled=F,this.domElement.classList.toggle("disabled",F),this.$disable.toggleAttribute("disabled",F),this)}show(F=!0){return this._hidden=!F,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(F){const q=this.parent.add(this.object,this.property,F);return q.name(this._name),this.destroy(),q}min(F){return this}max(F){return this}step(F){return this}decimals(F){return this}listen(F=!0){return this._listening=F,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const F=this.save();F!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=F}getValue(){return this.object[this.property]}setValue(F){return this.getValue()!==F&&(this.object[this.property]=F,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(F){return this.setValue(F),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class dS extends Ou{constructor(F,q,le){super(F,q,le,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function V0(_e){let F,q;return(F=_e.match(/(#|0x)?([a-f0-9]{6})/i))?q=F[2]:(F=_e.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?q=parseInt(F[1]).toString(16).padStart(2,0)+parseInt(F[2]).toString(16).padStart(2,0)+parseInt(F[3]).toString(16).padStart(2,0):(F=_e.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(q=F[1]+F[1]+F[2]+F[2]+F[3]+F[3]),q?"#"+q:!1}const pS={isPrimitive:!0,match:_e=>typeof _e=="string",fromHexString:V0,toHexString:V0},jv={isPrimitive:!0,match:_e=>typeof _e=="number",fromHexString:_e=>parseInt(_e.substring(1),16),toHexString:_e=>"#"+_e.toString(16).padStart(6,0)},gS={isPrimitive:!1,match:_e=>Array.isArray(_e),fromHexString(_e,F,q=1){const le=jv.fromHexString(_e);F[0]=(le>>16&255)/255*q,F[1]=(le>>8&255)/255*q,F[2]=(le&255)/255*q},toHexString([_e,F,q],le=1){le=255/le;const De=_e*le<<16^F*le<<8^q*le<<0;return jv.toHexString(De)}},mS={isPrimitive:!1,match:_e=>Object(_e)===_e,fromHexString(_e,F,q=1){const le=jv.fromHexString(_e);F.r=(le>>16&255)/255*q,F.g=(le>>8&255)/255*q,F.b=(le&255)/255*q},toHexString({r:_e,g:F,b:q},le=1){le=255/le;const De=_e*le<<16^F*le<<8^q*le<<0;return jv.toHexString(De)}},yS=[pS,jv,gS,mS];function xS(_e){return yS.find(F=>F.match(_e))}class bS extends Ou{constructor(F,q,le,De){super(F,q,le,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=xS(this.initialValue),this._rgbScale=De,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const Xe=V0(this.$text.value);Xe&&this._setValueFromHexString(Xe)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(F){if(this._format.isPrimitive){const q=this._format.fromHexString(F);this.setValue(q)}else this._format.fromHexString(F,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(F){return this._setValueFromHexString(F),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class L0 extends Ou{constructor(F,q,le){super(F,q,le,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",De=>{De.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class wS extends Ou{constructor(F,q,le,De,Xe,H){super(F,q,le,"number"),this._initInput(),this.min(De),this.max(Xe);const U=H!==void 0;this.step(U?H:this._getImplicitStep(),U),this.updateDisplay()}decimals(F){return this._decimals=F,this.updateDisplay(),this}min(F){return this._min=F,this._onUpdateMinMax(),this}max(F){return this._max=F,this._onUpdateMinMax(),this}step(F,q=!0){return this._step=F,this._stepExplicit=q,this}updateDisplay(){const F=this.getValue();if(this._hasSlider){let q=(F-this._min)/(this._max-this._min);q=Math.max(0,Math.min(q,1)),this.$fill.style.width=q*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?F:F.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const q=()=>{let a=parseFloat(this.$input.value);isNaN(a)||(this._stepExplicit&&(a=this._snap(a)),this.setValue(this._clamp(a)))},le=a=>{const n=parseFloat(this.$input.value);isNaN(n)||(this._snapClampSetValue(n+a),this.$input.value=this.getValue())},De=a=>{a.key==="Enter"&&this.$input.blur(),a.code==="ArrowUp"&&(a.preventDefault(),le(this._step*this._arrowKeyMultiplier(a))),a.code==="ArrowDown"&&(a.preventDefault(),le(this._step*this._arrowKeyMultiplier(a)*-1))},Xe=a=>{this._inputFocused&&(a.preventDefault(),le(this._step*this._normalizeMouseWheel(a)))};let H=!1,U,e,g,C,i;const S=5,x=a=>{U=a.clientX,e=g=a.clientY,H=!0,C=this.getValue(),i=0,window.addEventListener("mousemove",v),window.addEventListener("mouseup",p)},v=a=>{if(H){const n=a.clientX-U,f=a.clientY-e;Math.abs(f)>S?(a.preventDefault(),this.$input.blur(),H=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(n)>S&&p()}if(!H){const n=a.clientY-g;i-=n*this._step*this._arrowKeyMultiplier(a),C+i>this._max?i=this._max-C:C+i{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",p)},r=()=>{this._inputFocused=!0},t=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",q),this.$input.addEventListener("keydown",De),this.$input.addEventListener("wheel",Xe,{passive:!1}),this.$input.addEventListener("mousedown",x),this.$input.addEventListener("focus",r),this.$input.addEventListener("blur",t)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const F=(t,a,n,f,c)=>(t-a)/(n-a)*(c-f)+f,q=t=>{const a=this.$slider.getBoundingClientRect();let n=F(t,a.left,a.right,this._min,this._max);this._snapClampSetValue(n)},le=t=>{this._setDraggingStyle(!0),q(t.clientX),window.addEventListener("mousemove",De),window.addEventListener("mouseup",Xe)},De=t=>{q(t.clientX)},Xe=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",De),window.removeEventListener("mouseup",Xe)};let H=!1,U,e;const g=t=>{t.preventDefault(),this._setDraggingStyle(!0),q(t.touches[0].clientX),H=!1},C=t=>{t.touches.length>1||(this._hasScrollBar?(U=t.touches[0].clientX,e=t.touches[0].clientY,H=!0):g(t),window.addEventListener("touchmove",i,{passive:!1}),window.addEventListener("touchend",S))},i=t=>{if(H){const a=t.touches[0].clientX-U,n=t.touches[0].clientY-e;Math.abs(a)>Math.abs(n)?g(t):(window.removeEventListener("touchmove",i),window.removeEventListener("touchend",S))}else t.preventDefault(),q(t.touches[0].clientX)},S=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",i),window.removeEventListener("touchend",S)},x=this._callOnFinishChange.bind(this),v=400;let p;const r=t=>{if(Math.abs(t.deltaX)this._max&&(F=this._max),F}_snapClampSetValue(F){this.setValue(this._clamp(this._snap(F)))}get _hasScrollBar(){const F=this.parent.root.$children;return F.scrollHeight>F.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}}class TS extends Ou{constructor(F,q,le,De){super(F,q,le,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(De)}options(F){return this._values=Array.isArray(F)?F:Object.values(F),this._names=Array.isArray(F)?F:Object.keys(F),this.$select.replaceChildren(),this._names.forEach(q=>{const le=document.createElement("option");le.textContent=q,this.$select.appendChild(le)}),this.updateDisplay(),this}updateDisplay(){const F=this.getValue(),q=this._values.indexOf(F);return this.$select.selectedIndex=q,this.$display.textContent=q===-1?F:this._names[q],this}}class AS extends Ou{constructor(F,q,le){super(F,q,le,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",De=>{De.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}const MS=`.lil-gui { + */class Ou{constructor(F,q,lt,Dt,Zt="div"){this.parent=F,this.object=q,this.property=lt,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(Zt),this.domElement.classList.add("controller"),this.domElement.classList.add(Dt),this.$name=document.createElement("div"),this.$name.classList.add("name"),Ou.nextNameID=Ou.nextNameID||0,this.$name.id=`lil-gui-name-${++Ou.nextNameID}`,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",G=>G.stopPropagation()),this.domElement.addEventListener("keyup",G=>G.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(lt)}name(F){return this._name=F,this.$name.textContent=F,this}onChange(F){return this._onChange=F,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(F){return this._onFinishChange=F,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(F=!0){return this.disable(!F)}disable(F=!0){return F===this._disabled?this:(this._disabled=F,this.domElement.classList.toggle("disabled",F),this.$disable.toggleAttribute("disabled",F),this)}show(F=!0){return this._hidden=!F,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(F){const q=this.parent.add(this.object,this.property,F);return q.name(this._name),this.destroy(),q}min(F){return this}max(F){return this}step(F){return this}decimals(F){return this}listen(F=!0){return this._listening=F,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const F=this.save();F!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=F}getValue(){return this.object[this.property]}setValue(F){return this.getValue()!==F&&(this.object[this.property]=F,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(F){return this.setValue(F),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class vS extends Ou{constructor(F,q,lt){super(F,q,lt,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function G0(_t){let F,q;return(F=_t.match(/(#|0x)?([a-f0-9]{6})/i))?q=F[2]:(F=_t.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?q=parseInt(F[1]).toString(16).padStart(2,0)+parseInt(F[2]).toString(16).padStart(2,0)+parseInt(F[3]).toString(16).padStart(2,0):(F=_t.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(q=F[1]+F[1]+F[2]+F[2]+F[3]+F[3]),q?"#"+q:!1}const dS={isPrimitive:!0,match:_t=>typeof _t=="string",fromHexString:G0,toHexString:G0},Kv={isPrimitive:!0,match:_t=>typeof _t=="number",fromHexString:_t=>parseInt(_t.substring(1),16),toHexString:_t=>"#"+_t.toString(16).padStart(6,0)},pS={isPrimitive:!1,match:_t=>Array.isArray(_t),fromHexString(_t,F,q=1){const lt=Kv.fromHexString(_t);F[0]=(lt>>16&255)/255*q,F[1]=(lt>>8&255)/255*q,F[2]=(lt&255)/255*q},toHexString([_t,F,q],lt=1){lt=255/lt;const Dt=_t*lt<<16^F*lt<<8^q*lt<<0;return Kv.toHexString(Dt)}},gS={isPrimitive:!1,match:_t=>Object(_t)===_t,fromHexString(_t,F,q=1){const lt=Kv.fromHexString(_t);F.r=(lt>>16&255)/255*q,F.g=(lt>>8&255)/255*q,F.b=(lt&255)/255*q},toHexString({r:_t,g:F,b:q},lt=1){lt=255/lt;const Dt=_t*lt<<16^F*lt<<8^q*lt<<0;return Kv.toHexString(Dt)}},mS=[dS,Kv,pS,gS];function yS(_t){return mS.find(F=>F.match(_t))}class xS extends Ou{constructor(F,q,lt,Dt){super(F,q,lt,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=yS(this.initialValue),this._rgbScale=Dt,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{const Zt=G0(this.$text.value);Zt&&this._setValueFromHexString(Zt)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(F){if(this._format.isPrimitive){const q=this._format.fromHexString(F);this.setValue(q)}else this._format.fromHexString(F,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(F){return this._setValueFromHexString(F),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class R0 extends Ou{constructor(F,q,lt){super(F,q,lt,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",Dt=>{Dt.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}}class bS extends Ou{constructor(F,q,lt,Dt,Zt,G){super(F,q,lt,"number"),this._initInput(),this.min(Dt),this.max(Zt);const U=G!==void 0;this.step(U?G:this._getImplicitStep(),U),this.updateDisplay()}decimals(F){return this._decimals=F,this.updateDisplay(),this}min(F){return this._min=F,this._onUpdateMinMax(),this}max(F){return this._max=F,this._onUpdateMinMax(),this}step(F,q=!0){return this._step=F,this._stepExplicit=q,this}updateDisplay(){const F=this.getValue();if(this._hasSlider){let q=(F-this._min)/(this._max-this._min);q=Math.max(0,Math.min(q,1)),this.$fill.style.width=q*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?F:F.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const q=()=>{let a=parseFloat(this.$input.value);isNaN(a)||(this._stepExplicit&&(a=this._snap(a)),this.setValue(this._clamp(a)))},lt=a=>{const n=parseFloat(this.$input.value);isNaN(n)||(this._snapClampSetValue(n+a),this.$input.value=this.getValue())},Dt=a=>{a.key==="Enter"&&this.$input.blur(),a.code==="ArrowUp"&&(a.preventDefault(),lt(this._step*this._arrowKeyMultiplier(a))),a.code==="ArrowDown"&&(a.preventDefault(),lt(this._step*this._arrowKeyMultiplier(a)*-1))},Zt=a=>{this._inputFocused&&(a.preventDefault(),lt(this._step*this._normalizeMouseWheel(a)))};let G=!1,U,t,g,C,i;const S=5,x=a=>{U=a.clientX,t=g=a.clientY,G=!0,C=this.getValue(),i=0,window.addEventListener("mousemove",v),window.addEventListener("mouseup",p)},v=a=>{if(G){const n=a.clientX-U,f=a.clientY-t;Math.abs(f)>S?(a.preventDefault(),this.$input.blur(),G=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(n)>S&&p()}if(!G){const n=a.clientY-g;i-=n*this._step*this._arrowKeyMultiplier(a),C+i>this._max?i=this._max-C:C+i{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",p)},r=()=>{this._inputFocused=!0},e=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",q),this.$input.addEventListener("keydown",Dt),this.$input.addEventListener("wheel",Zt,{passive:!1}),this.$input.addEventListener("mousedown",x),this.$input.addEventListener("focus",r),this.$input.addEventListener("blur",e)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const F=(e,a,n,f,c)=>(e-a)/(n-a)*(c-f)+f,q=e=>{const a=this.$slider.getBoundingClientRect();let n=F(e,a.left,a.right,this._min,this._max);this._snapClampSetValue(n)},lt=e=>{this._setDraggingStyle(!0),q(e.clientX),window.addEventListener("mousemove",Dt),window.addEventListener("mouseup",Zt)},Dt=e=>{q(e.clientX)},Zt=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",Dt),window.removeEventListener("mouseup",Zt)};let G=!1,U,t;const g=e=>{e.preventDefault(),this._setDraggingStyle(!0),q(e.touches[0].clientX),G=!1},C=e=>{e.touches.length>1||(this._hasScrollBar?(U=e.touches[0].clientX,t=e.touches[0].clientY,G=!0):g(e),window.addEventListener("touchmove",i,{passive:!1}),window.addEventListener("touchend",S))},i=e=>{if(G){const a=e.touches[0].clientX-U,n=e.touches[0].clientY-t;Math.abs(a)>Math.abs(n)?g(e):(window.removeEventListener("touchmove",i),window.removeEventListener("touchend",S))}else e.preventDefault(),q(e.touches[0].clientX)},S=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",i),window.removeEventListener("touchend",S)},x=this._callOnFinishChange.bind(this),v=400;let p;const r=e=>{if(Math.abs(e.deltaX)this._max&&(F=this._max),F}_snapClampSetValue(F){this.setValue(this._clamp(this._snap(F)))}get _hasScrollBar(){const F=this.parent.root.$children;return F.scrollHeight>F.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}}class wS extends Ou{constructor(F,q,lt,Dt){super(F,q,lt,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(Dt)}options(F){return this._values=Array.isArray(F)?F:Object.values(F),this._names=Array.isArray(F)?F:Object.keys(F),this.$select.replaceChildren(),this._names.forEach(q=>{const lt=document.createElement("option");lt.textContent=q,this.$select.appendChild(lt)}),this.updateDisplay(),this}updateDisplay(){const F=this.getValue(),q=this._values.indexOf(F);return this.$select.selectedIndex=q,this.$display.textContent=q===-1?F:this._names[q],this}}class TS extends Ou{constructor(F,q,lt){super(F,q,lt,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",Dt=>{Dt.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}const AS=`.lil-gui { font-family: var(--font-family); font-size: var(--font-size); line-height: 1; @@ -4221,29 +4221,29 @@ void main() { @font-face { font-family: "lil-gui"; src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff"); -}`;function SS(_e){const F=document.createElement("style");F.innerHTML=_e;const q=document.querySelector("head link[rel=stylesheet], head style");q?document.head.insertBefore(F,q):document.head.appendChild(F)}let zy=!1;class vv{constructor({parent:F,autoPlace:q=F===void 0,container:le,width:De,title:Xe="Controls",closeFolders:H=!1,injectStyles:U=!0,touchStyles:e=!0}={}){if(this.parent=F,this.root=F?F.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",g=>{(g.code==="Enter"||g.code==="Space")&&(g.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(Xe),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),e&&this.domElement.classList.add("allow-touch-styles"),!zy&&U&&(SS(MS),zy=!0),le?le.appendChild(this.domElement):q&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),De&&this.domElement.style.setProperty("--width",De+"px"),this._closeFolders=H}add(F,q,le,De,Xe){if(Object(le)===le)return new TS(this,F,q,le);const H=F[q];switch(typeof H){case"number":return new wS(this,F,q,le,De,Xe);case"boolean":return new dS(this,F,q);case"string":return new AS(this,F,q);case"function":return new L0(this,F,q)}console.error(`gui.add failed +}`;function MS(_t){const F=document.createElement("style");F.innerHTML=_t;const q=document.querySelector("head link[rel=stylesheet], head style");q?document.head.insertBefore(F,q):document.head.appendChild(F)}let ky=!1;class dv{constructor({parent:F,autoPlace:q=F===void 0,container:lt,width:Dt,title:Zt="Controls",closeFolders:G=!1,injectStyles:U=!0,touchStyles:t=!0}={}){if(this.parent=F,this.root=F?F.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",g=>{(g.code==="Enter"||g.code==="Space")&&(g.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(Zt),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),t&&this.domElement.classList.add("allow-touch-styles"),!ky&&U&&(MS(AS),ky=!0),lt?lt.appendChild(this.domElement):q&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),Dt&&this.domElement.style.setProperty("--width",Dt+"px"),this._closeFolders=G}add(F,q,lt,Dt,Zt){if(Object(lt)===lt)return new wS(this,F,q,lt);const G=F[q];switch(typeof G){case"number":return new bS(this,F,q,lt,Dt,Zt);case"boolean":return new vS(this,F,q);case"string":return new TS(this,F,q);case"function":return new R0(this,F,q)}console.error(`gui.add failed property:`,q,` object:`,F,` - value:`,H)}addColor(F,q,le=1){return new bS(this,F,q,le)}addFolder(F){const q=new vv({parent:this,title:F});return this.root._closeFolders&&q.close(),q}load(F,q=!0){return F.controllers&&this.controllers.forEach(le=>{le instanceof L0||le._name in F.controllers&&le.load(F.controllers[le._name])}),q&&F.folders&&this.folders.forEach(le=>{le._title in F.folders&&le.load(F.folders[le._title])}),this}save(F=!0){const q={controllers:{},folders:{}};return this.controllers.forEach(le=>{if(!(le instanceof L0)){if(le._name in q.controllers)throw new Error(`Cannot save GUI with duplicate property "${le._name}"`);q.controllers[le._name]=le.save()}}),F&&this.folders.forEach(le=>{if(le._title in q.folders)throw new Error(`Cannot save GUI with duplicate folder "${le._title}"`);q.folders[le._title]=le.save()}),q}open(F=!0){return this._setClosed(!F),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(F){this._closed!==F&&(this._closed=F,this._callOnOpenClose(this))}show(F=!0){return this._hidden=!F,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(F=!0){return this._setClosed(!F),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{const q=this.$children.clientHeight;this.$children.style.height=q+"px",this.domElement.classList.add("transition");const le=Xe=>{Xe.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",le))};this.$children.addEventListener("transitionend",le);const De=F?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!F),requestAnimationFrame(()=>{this.$children.style.height=De+"px"})}),this}title(F){return this._title=F,this.$title.textContent=F,this}reset(F=!0){return(F?this.controllersRecursive():this.controllers).forEach(le=>le.reset()),this}onChange(F){return this._onChange=F,this}_callOnChange(F){this.parent&&this.parent._callOnChange(F),this._onChange!==void 0&&this._onChange.call(this,{object:F.object,property:F.property,value:F.getValue(),controller:F})}onFinishChange(F){return this._onFinishChange=F,this}_callOnFinishChange(F){this.parent&&this.parent._callOnFinishChange(F),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:F.object,property:F.property,value:F.getValue(),controller:F})}onOpenClose(F){return this._onOpenClose=F,this}_callOnOpenClose(F){this.parent&&this.parent._callOnOpenClose(F),this._onOpenClose!==void 0&&this._onOpenClose.call(this,F)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(F=>F.destroy())}controllersRecursive(){let F=Array.from(this.controllers);return this.folders.forEach(q=>{F=F.concat(q.controllersRecursive())}),F}foldersRecursive(){let F=Array.from(this.folders);return this.folders.forEach(q=>{F=F.concat(q.foldersRecursive())}),F}}var M1={exports:{}};(function(_e,F){(function(le,De){_e.exports=De()})(self,function(){return function(){var q={79288:function(H,U,e){var g=e(3400),C={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in C){var S=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");g.addStyleRule(S,C[i])}},86712:function(H,U,e){H.exports=e(84224)},37240:function(H,U,e){H.exports=e(51132)},29744:function(H,U,e){H.exports=e(94456)},29352:function(H,U,e){H.exports=e(67244)},96144:function(H,U,e){H.exports=e(97776)},53219:function(H,U,e){H.exports=e(61712)},4624:function(H,U,e){H.exports=e(95856)},54543:function(H,U,e){H.exports=e(54272)},45e3:function(H,U,e){H.exports=e(85404)},62300:function(H,U,e){H.exports=e(26048)},6920:function(H,U,e){H.exports=e(66240)},10264:function(H,U,e){H.exports=e(40448)},32016:function(H,U,e){H.exports=e(64884)},27528:function(H,U,e){H.exports=e(15088)},75556:function(H,U,e){H.exports=e(76744)},39204:function(H,U,e){H.exports=e(94704)},73996:function(H,U,e){H.exports=e(62396)},16489:function(H,U,e){H.exports=e(32028)},5e3:function(H,U,e){H.exports=e(81932)},77280:function(H,U,e){H.exports=e(45536)},33992:function(H,U,e){H.exports=e(42600)},17600:function(H,U,e){H.exports=e(21536)},49116:function(H,U,e){H.exports=e(65664)},46808:function(H,U,e){H.exports=e(29044)},36168:function(H,U,e){H.exports=e(48928)},13792:function(H,U,e){var g=e(32016);g.register([e(37240),e(29352),e(5e3),e(33992),e(17600),e(49116),e(6920),e(67484),e(79440),e(39204),e(83096),e(36168),e(20260),e(63560),e(65832),e(46808),e(73996),e(48824),e(89904),e(25120),e(13752),e(4340),e(62300),e(29800),e(8363),e(54543),e(86636),e(42192),e(32140),e(77280),e(89296),e(56816),e(70192),e(45e3),e(27528),e(84764),e(3920),e(50248),e(4624),e(69967),e(10264),e(86152),e(53219),e(81604),e(63796),e(29744),e(89336),e(86712),e(75556),e(16489),e(97312),e(96144)]),H.exports=g},3920:function(H,U,e){H.exports=e(43480)},25120:function(H,U,e){H.exports=e(6296)},4340:function(H,U,e){H.exports=e(7404)},86152:function(H,U,e){H.exports=e(65456)},56816:function(H,U,e){H.exports=e(22020)},89296:function(H,U,e){H.exports=e(29928)},20260:function(H,U,e){H.exports=e(75792)},32140:function(H,U,e){H.exports=e(156)},84764:function(H,U,e){H.exports=e(45499)},48824:function(H,U,e){H.exports=e(3296)},69967:function(H,U,e){H.exports=e(4184)},8363:function(H,U,e){H.exports=e(36952)},86636:function(H,U,e){H.exports=e(38983)},70192:function(H,U,e){H.exports=e(11572)},81604:function(H,U,e){H.exports=e(76924)},63796:function(H,U,e){H.exports=e(62944)},89336:function(H,U,e){H.exports=e(95443)},67484:function(H,U,e){H.exports=e(34864)},97312:function(H,U,e){H.exports=e(76272)},42192:function(H,U,e){H.exports=e(97924)},29800:function(H,U,e){H.exports=e(15436)},63560:function(H,U,e){H.exports=e(5621)},89904:function(H,U,e){H.exports=e(91304)},50248:function(H,U,e){H.exports=e(41724)},65832:function(H,U,e){H.exports=e(31991)},79440:function(H,U,e){H.exports=e(22869)},13752:function(H,U,e){H.exports=e(67776)},83096:function(H,U,e){H.exports=e(95952)},72196:function(H){H.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},13916:function(H,U,e){var g=e(72196),C=e(25376),i=e(33816),S=e(31780).templatedArray;e(36208),H.exports=S("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:C({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:g.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:g.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:C({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},90272:function(H,U,e){var g=e(3400),C=e(54460),i=e(23816).draw;H.exports=function(p){var r=p._fullLayout,t=g.filterVisible(r.annotations);if(t.length&&p._fullData.length)return g.syncOrAsync([i,S],p)};function S(v){var p=v._fullLayout;g.filterVisible(p.annotations).forEach(function(r){var t=C.getFromId(v,r.xref),a=C.getFromId(v,r.yref),n=C.getRefType(r.xref),f=C.getRefType(r.yref);r._extremes={},n==="range"&&x(r,t),f==="range"&&x(r,a)})}function x(v,p){var r=p._id,t=r.charAt(0),a=v[t],n=v["a"+t],f=v[t+"ref"],c=v["a"+t+"ref"],l=v["_"+t+"padplus"],m=v["_"+t+"padminus"],h={x:1,y:-1}[t]*v[t+"shift"],b=3*v.arrowsize*v.arrowwidth||0,u=b+h,o=b-h,d=3*v.startarrowsize*v.arrowwidth||0,w=d+h,A=d-h,_;if(c===f){var y=C.findExtremes(p,[p.r2c(a)],{ppadplus:u,ppadminus:o}),E=C.findExtremes(p,[p.r2c(n)],{ppadplus:Math.max(l,w),ppadminus:Math.max(m,A)});_={min:[y.min[0],E.min[0]],max:[y.max[0],E.max[0]]}}else w=n?w+n:w,A=n?A-n:A,_=C.findExtremes(p,[p.r2c(a)],{ppadplus:Math.max(l,u,w),ppadminus:Math.max(m,o,A)});v._extremes[r]=_}},42300:function(H,U,e){var g=e(3400),C=e(24040),i=e(31780).arrayEditor;H.exports={hasClickToShow:S,onClick:x};function S(r,t){var a=v(r,t);return a.on.length>0||a.explicitOff.length>0}function x(r,t){var a=v(r,t),n=a.on,f=a.off.concat(a.explicitOff),c={},l=r._fullLayout.annotations,m,h;if(n.length||f.length){for(m=0;m.6666666666666666?$t="right":$t="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[$t]}for(var Ie=!1,rt=["x","y"],Ke=0;Ke1)&&(ht===lt?(je=dt.r2fraction(d["a"+$e]),(je<0||je>1)&&(Ie=!0)):Ie=!0),Fe=dt._offset+dt.r2p(d[$e]),Ee=.5}else{var it=Ne==="domain";$e==="x"?(ye=d[$e],Fe=it?dt._offset+dt._length*ye:Fe=T.l+T.w*ye):(ye=1-d[$e],Fe=it?dt._offset+dt._length*ye:Fe=T.t+T.h*ye),Ee=d.showarrow?.5:ye}if(d.showarrow){We.head=Fe;var mt=d["a"+$e];if(Me=St*He(.5,d.xanchor)-nt*He(.5,d.yanchor),ht===lt){var bt=v.getRefType(ht);bt==="domain"?($e==="y"&&(mt=1-mt),We.tail=dt._offset+dt._length*mt):bt==="paper"?$e==="y"?(mt=1-mt,We.tail=T.t+T.h*mt):We.tail=T.l+T.w*mt:We.tail=dt._offset+dt.r2p(mt),xe=Me}else We.tail=Fe+mt,xe=Me+mt;We.text=We.tail+Me;var vt=E[$e==="x"?"width":"height"];if(lt==="paper"&&(We.head=S.constrain(We.head,1,vt-1)),ht==="pixel"){var Lt=-Math.max(We.tail-3,We.text),ct=Math.min(We.tail+3,We.text)-vt;Lt>0?(We.tail+=Lt,We.text+=Lt):ct>0&&(We.tail-=ct,We.text-=ct)}We.tail+=Je,We.head+=Je}else Me=ze*He(Ee,Ze),xe=Me,We.text=Fe+Me;We.text+=Je,Me+=Je,xe+=Je,d["_"+$e+"padplus"]=ze/2+xe,d["_"+$e+"padminus"]=ze/2-xe,d["_"+$e+"size"]=ze,d["_"+$e+"shift"]=Me}if(Ie){ue.remove();return}var Tt=0,Bt=0;if(d.align!=="left"&&(Tt=(Le-Ae)*(d.align==="center"?.5:1)),d.valign!=="top"&&(Bt=(Ve-me)*(d.valign==="middle"?.5:1)),Re)we.select("svg").attr({x:ee+Tt-1,y:ee+Bt}).call(r.setClipUrl,Q?k:null,o);else{var ir=ee+Bt-be.top,pt=ee+Tt-be.left;se.call(a.positionText,pt,ir).call(r.setClipUrl,Q?k:null,o)}oe.select("rect").call(r.setRect,ee,ee,Le,Ve),G.call(r.setRect,J/2,J/2,Ue-J,ke-J),ue.call(r.setTranslate,Math.round(B.x.text-Ue/2),Math.round(B.y.text-ke/2)),Y.attr({transform:"rotate("+O+","+B.x.text+","+B.y.text+")"});var Xt=function(or,$t){V.selectAll(".annotation-arrow-g").remove();var gt=B.x.head,st=B.y.head,At=B.x.tail+or,Ct=B.y.tail+$t,It=B.x.text+or,Pt=B.y.text+$t,kt=S.rotationXYMatrix(O,It,Pt),Ht=S.apply2DTransform(kt),Jt=S.apply2DTransform2(kt),ur=+G.attr("width"),hr=+G.attr("height"),vr=It-.5*ur,Ye=vr+ur,Ge=Pt-.5*hr,Nt=Ge+hr,Ot=[[vr,Ge,vr,Nt],[vr,Nt,Ye,Nt],[Ye,Nt,Ye,Ge],[Ye,Ge,vr,Ge]].map(Jt);if(!Ot.reduce(function(Dr,cn){return Dr^!!S.segmentsIntersect(gt,st,gt+1e6,st+1e6,cn[0],cn[1],cn[2],cn[3])},!1)){Ot.forEach(function(Dr){var cn=S.segmentsIntersect(At,Ct,gt,st,Dr[0],Dr[1],Dr[2],Dr[3]);cn&&(At=cn.x,Ct=cn.y)});var Qt=d.arrowwidth,tr=d.arrowcolor,fr=d.arrowside,rr=V.append("g").style({opacity:p.opacity(tr)}).classed("annotation-arrow-g",!0),Vt=rr.append("path").attr("d","M"+At+","+Ct+"L"+gt+","+st).style("stroke-width",Qt+"px").call(p.stroke,p.rgb(tr));if(l(Vt,fr,d),s.annotationPosition&&Vt.node().parentNode&&!A){var dr=gt,mr=st;if(d.standoff){var xr=Math.sqrt(Math.pow(gt-At,2)+Math.pow(st-Ct,2));dr+=d.standoff*(At-gt)/xr,mr+=d.standoff*(Ct-st)/xr}var pr=rr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(At-dr)+","+(Ct-mr),transform:x(dr,mr)}).style("stroke-width",Qt+6+"px").call(p.stroke,"rgba(0,0,0,0)").call(p.fill,"rgba(0,0,0,0)"),Gr,Pr;f.init({element:pr.node(),gd:o,prepFn:function(){var Dr=r.getTranslate(ue);Gr=Dr.x,Pr=Dr.y,_&&_.autorange&&D(_._name+".autorange",!0),y&&y.autorange&&D(y._name+".autorange",!0)},moveFn:function(Dr,cn){var rn=Ht(Gr,Pr),Cn=rn[0]+Dr,En=rn[1]+cn;ue.call(r.setTranslate,Cn,En),N("x",b(_,Dr,"x",T,d)),N("y",b(y,cn,"y",T,d)),d.axref===d.xref&&N("ax",b(_,Dr,"ax",T,d)),d.ayref===d.yref&&N("ay",b(y,cn,"ay",T,d)),rr.attr("transform",x(Dr,cn)),Y.attr({transform:"rotate("+O+","+Cn+","+En+")"})},doneFn:function(){C.call("_guiRelayout",o,I());var Dr=document.querySelector(".js-notes-box-panel");Dr&&Dr.redraw(Dr.selectedObj)}})}}};if(d.showarrow&&Xt(0,0),j){var Kt;f.init({element:ue.node(),gd:o,prepFn:function(){Kt=Y.attr("transform")},moveFn:function(or,$t){var gt="pointer";if(d.showarrow)d.axref===d.xref?N("ax",b(_,or,"ax",T,d)):N("ax",d.ax+or),d.ayref===d.yref?N("ay",b(y,$t,"ay",T.w,d)):N("ay",d.ay+$t),Xt(or,$t);else{if(A)return;var st,At;if(_)st=b(_,or,"x",T,d);else{var Ct=d._xsize/T.w,It=d.x+(d._xshift-d.xshift)/T.w-Ct/2;st=f.align(It+or/T.w,Ct,0,1,d.xanchor)}if(y)At=b(y,$t,"y",T,d);else{var Pt=d._ysize/T.h,kt=d.y-(d._yshift+d.yshift)/T.h-Pt/2;At=f.align(kt-$t/T.h,Pt,0,1,d.yanchor)}N("x",st),N("y",At),(!_||!y)&&(gt=f.getCursor(_?.5:st,y?.5:At,d.xanchor,d.yanchor))}Y.attr({transform:x(or,$t)+Kt}),n(ue,gt)},clickFn:function(or,$t){d.captureevents&&o.emit("plotly_clickannotation",ie($t))},doneFn:function(){n(ue),C.call("_guiRelayout",o,I());var or=document.querySelector(".js-notes-box-panel");or&&or.redraw(or.selectedObj)}})}}s.annotationText?se.call(a.makeEditable,{delegate:ue,gd:o}).call(ne).on("edit",function(ge){d.text=ge,this.call(ne),N("text",ge),_&&_.autorange&&D(_._name+".autorange",!0),y&&y.autorange&&D(y._name+".autorange",!0),C.call("_guiRelayout",o,I())}):se.call(ne)}},33652:function(H,U,e){var g=e(33428),C=e(76308),i=e(72196),S=e(3400),x=S.strScale,v=S.strRotate,p=S.strTranslate;H.exports=function(t,a,n){var f=t.node(),c=i[n.arrowhead||0],l=i[n.startarrowhead||0],m=(n.arrowwidth||1)*(n.arrowsize||1),h=(n.arrowwidth||1)*(n.startarrowsize||1),b=a.indexOf("start")>=0,u=a.indexOf("end")>=0,o=c.backoff*m+n.standoff,d=l.backoff*h+n.startstandoff,w,A,_,y;if(f.nodeName==="line"){w={x:+t.attr("x1"),y:+t.attr("y1")},A={x:+t.attr("x2"),y:+t.attr("y2")};var E=w.x-A.x,T=w.y-A.y;if(_=Math.atan2(T,E),y=_+Math.PI,o&&d&&o+d>Math.sqrt(E*E+T*T)){Y();return}if(o){if(o*o>E*E+T*T){Y();return}var s=o*Math.cos(_),L=o*Math.sin(_);A.x+=s,A.y+=L,t.attr({x2:A.x,y2:A.y})}if(d){if(d*d>E*E+T*T){Y();return}var M=d*Math.cos(_),z=d*Math.sin(_);w.x-=M,w.y-=z,t.attr({x1:w.x,y1:w.y})}}else if(f.nodeName==="path"){var D=f.getTotalLength(),N="";if(D1){n=!0;break}}n?x.fullLayout._infolayer.select(".annotation-"+x.id+'[data-index="'+t+'"]').remove():(a._pdata=C(x.glplot.cameraParams,[v.xaxis.r2l(a.x)*p[0],v.yaxis.r2l(a.y)*p[1],v.zaxis.r2l(a.z)*p[2]]),g(x.graphDiv,a,t,x.id,a._xa,a._ya))}}},56864:function(H,U,e){var g=e(24040),C=e(3400);H.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(45899)}}},layoutAttributes:e(45899),handleDefaults:e(52808),includeBasePlot:i,convert:e(42456),draw:e(71836)};function i(S,x){var v=g.subplotsRegistry.gl3d;if(v)for(var p=v.attrRegex,r=Object.keys(S),t=0;t=0)))return t;if(l===3)f[l]>1&&(f[l]=1);else if(f[l]>=1)return t}var m=Math.round(f[0]*255)+", "+Math.round(f[1]*255)+", "+Math.round(f[2]*255);return c?"rgba("+m+", "+f[3]+")":"rgb("+m+")"}},42996:function(H,U,e){var g=e(94724),C=e(25376),i=e(92880).extendFlat,S=e(67824).overrideAll;H.exports=S({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:g.linecolor,outlinewidth:g.linewidth,bordercolor:g.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:i({},g.ticks,{dflt:""}),ticklabeloverflow:i({},g.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:C({}),tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,separatethousands:g.separatethousands,exponentformat:g.exponentformat,minexponent:g.minexponent,showexponent:g.showexponent,title:{text:{valType:"string"},font:C({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:C({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},63964:function(H){H.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},64013:function(H,U,e){var g=e(3400),C=e(31780),i=e(26332),S=e(25404),x=e(95936),v=e(42568),p=e(42996);H.exports=function(t,a,n){var f=C.newContainer(a,"colorbar"),c=t.colorbar||{};function l(B,O){return g.coerce(c,f,p,B,O)}var m=n.margin||{t:0,b:0,l:0,r:0},h=n.width-m.l-m.r,b=n.height-m.t-m.b,u=l("orientation"),o=u==="v",d=l("thicknessmode");l("thickness",d==="fraction"?30/(o?h:b):30);var w=l("lenmode");l("len",w==="fraction"?1:o?b:h);var A=l("yref"),_=l("xref"),y=A==="paper",E=_==="paper",T,s,L,M="left";o?(L="middle",M=E?"left":"right",T=E?1.02:1,s=.5):(L=y?"bottom":"top",M="center",T=.5,s=y?1.02:1),g.coerce(c,f,{x:{valType:"number",min:E?-2:0,max:E?3:1,dflt:T}},"x"),g.coerce(c,f,{y:{valType:"number",min:y?-2:0,max:y?3:1,dflt:s}},"y"),l("xanchor",M),l("xpad"),l("yanchor",L),l("ypad"),g.noneOrAll(c,f,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var z=g.coerce(c,f,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:o?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",z.indexOf("inside")!==-1?"hide past domain":"hide past div"),i(c,f,l,"linear");var D=n.font,N={noAutotickangles:!0,outerTicks:!1,font:D};z.indexOf("inside")!==-1&&(N.bgColor="black"),v(c,f,l,"linear",N),x(c,f,l,"linear",N),S(c,f,l,"linear",N),l("title.text",n._dfltTitle.colorbar);var I=f.showticklabels?f.tickfont:D,k=g.extendFlat({},I,{color:D.color,size:g.bigFont(I.size)});g.coerceFont(l,"title.font",k),l("title.side",o?"top":"right")}},37848:function(H,U,e){var g=e(33428),C=e(49760),i=e(7316),S=e(24040),x=e(54460),v=e(86476),p=e(3400),r=p.strTranslate,t=e(92880).extendFlat,a=e(93972),n=e(43616),f=e(76308),c=e(81668),l=e(72736),m=e(94288).flipScale,h=e(28336),b=e(37668),u=e(94724),o=e(84284),d=o.LINE_SPACING,w=o.FROM_TL,A=o.FROM_BR,_=e(63964).cn;function y(z){var D=z._fullLayout,N=D._infolayer.selectAll("g."+_.colorbar).data(E(z),function(I){return I._id});N.enter().append("g").attr("class",function(I){return I._id}).classed(_.colorbar,!0),N.each(function(I){var k=g.select(this);p.ensureSingle(k,"rect",_.cbbg),p.ensureSingle(k,"g",_.cbfills),p.ensureSingle(k,"g",_.cblines),p.ensureSingle(k,"g",_.cbaxis,function(O){O.classed(_.crisp,!0)}),p.ensureSingle(k,"g",_.cbtitleunshift,function(O){O.append("g").classed(_.cbtitle,!0)}),p.ensureSingle(k,"rect",_.cboutline);var B=T(k,I,z);B&&B.then&&(z._promises||[]).push(B),z._context.edits.colorbarPosition&&s(k,I,z)}),N.exit().each(function(I){i.autoMargin(z,I._id)}).remove(),N.order()}function E(z){var D=z._fullLayout,N=z.calcdata,I=[],k,B,O,V;function Y($){return t($,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function j(){typeof V.calc=="function"?V.calc(z,O,k):(k._fillgradient=B.reversescale?m(B.colorscale):B.colorscale,k._zrange=[B[V.min],B[V.max]])}for(var te=0;te1){var We=Math.pow(10,Math.floor(Math.log(Je)/Math.LN10));ze*=We*p.roundUp(Je/We,[2,5,10]),(Math.abs(be.start)/be.size+1e-6)%1<2e-6&&(St.tick0=0)}St.dtick=ze}St.domain=I?[dt+X/Z.h,dt+He-X/Z.h]:[dt+J/Z.w,dt+He-J/Z.w],St.setScale(),z.attr("transform",r(Math.round(Z.l),Math.round(Z.t)));var Fe=z.select("."+_.cbtitleunshift).attr("transform",r(-Math.round(Z.l),-Math.round(Z.t))),xe=St.ticklabelposition,ye=St.title.font.size,Ee=z.select("."+_.cbaxis),Me,Ne=0,je=0;function it(ct,Tt){var Bt={propContainer:St,propName:D._propPrefix+"title",traceIndex:D._traceIndex,_meta:D._meta,placeholder:$._dfltTitle.colorbar,containerGroup:z.select("."+_.cbtitle)},ir=ct.charAt(0)==="h"?ct.substr(1):"h"+ct;z.selectAll("."+ir+",."+ir+"-math-group").remove(),c.draw(N,ct,t(Bt,Tt||{}))}function mt(){if(I&&nt||!I&&!nt){var ct,Tt;ge==="top"&&(ct=J+Z.l+Ie*ee,Tt=X+Z.t+rt*(1-dt-He)+3+ye*.75),ge==="bottom"&&(ct=J+Z.l+Ie*ee,Tt=X+Z.t+rt*(1-dt)-3-ye*.25),ge==="right"&&(Tt=X+Z.t+rt*G+3+ye*.75,ct=J+Z.l+Ie*dt),it(St._id+"title",{attributes:{x:ct,y:Tt,"text-anchor":I?"start":"middle"}})}}function bt(){if(I&&!nt||!I&&nt){var ct=St.position||0,Tt=St._offset+St._length/2,Bt,ir;if(ge==="right")ir=Tt,Bt=Z.l+Ie*ct+10+ye*(St.showticklabels?1:.5);else if(Bt=Tt,ge==="bottom"&&(ir=Z.t+rt*ct+10+(xe.indexOf("inside")===-1?St.tickfont.size:0)+(St.ticks!=="intside"&&D.ticklen||0)),ge==="top"){var pt=ce.text.split("
    ").length;ir=Z.t+rt*ct+10-Ve-d*ye*pt}it((I?"h":"v")+St._id+"title",{avoid:{selection:g.select(N).selectAll("g."+St._id+"tick"),side:ge,offsetTop:I?0:Z.t,offsetLeft:I?Z.l:0,maxShift:I?$.width:$.height},attributes:{x:Bt,y:ir,"text-anchor":"middle"},transform:{rotate:I?-90:0,offset:0}})}}function vt(){if(!I&&!nt||I&&nt){var ct=z.select("."+_.cbtitle),Tt=ct.select("text"),Bt=[-Y/2,Y/2],ir=ct.select(".h"+St._id+"title-math-group").node(),pt=15.6;Tt.node()&&(pt=parseInt(Tt.node().style.fontSize,10)*d);var Xt;if(ir?(Xt=n.bBox(ir),je=Xt.width,Ne=Xt.height,Ne>pt&&(Bt[1]-=(Ne-pt)/2)):Tt.node()&&!Tt.classed(_.jsPlaceholder)&&(Xt=n.bBox(Tt.node()),je=Xt.width,Ne=Xt.height),I){if(Ne){if(Ne+=5,ge==="top")St.domain[1]-=Ne/Z.h,Bt[1]*=-1;else{St.domain[0]+=Ne/Z.h;var Kt=l.lineCount(Tt);Bt[1]+=(1-Kt)*pt}ct.attr("transform",r(Bt[0],Bt[1])),St.setScale()}}else je&&(ge==="right"&&(St.domain[0]+=(je+ye/2)/Z.w),ct.attr("transform",r(Bt[0],Bt[1])),St.setScale())}z.selectAll("."+_.cbfills+",."+_.cblines).attr("transform",I?r(0,Math.round(Z.h*(1-St.domain[1]))):r(Math.round(Z.w*St.domain[0]),0)),Ee.attr("transform",I?r(0,Math.round(-Z.t)):r(Math.round(-Z.l),0));var or=z.select("."+_.cbfills).selectAll("rect."+_.cbfill).attr("style","").data(me);or.enter().append("rect").classed(_.cbfill,!0).attr("style",""),or.exit().remove();var $t=Te.map(St.c2p).map(Math.round).sort(function(It,Pt){return It-Pt});or.each(function(It,Pt){var kt=[Pt===0?Te[0]:(me[Pt]+me[Pt-1])/2,Pt===me.length-1?Te[1]:(me[Pt]+me[Pt+1])/2].map(St.c2p).map(Math.round);I&&(kt[1]=p.constrain(kt[1]+(kt[1]>kt[0])?1:-1,$t[0],$t[1]));var Ht=g.select(this).attr(I?"x":"y",Ke).attr(I?"y":"x",g.min(kt)).attr(I?"width":"height",Math.max(Ve,2)).attr(I?"height":"width",Math.max(g.max(kt)-g.min(kt),2));if(D._fillgradient)n.gradient(Ht,N,D._id,I?"vertical":"horizontalreversed",D._fillgradient,"fill");else{var Jt=Re(It).replace("e-","");Ht.attr("fill",C(Jt).toHexString())}});var gt=z.select("."+_.cblines).selectAll("path."+_.cbline).data(ne.color&&ne.width?Le:[]);gt.enter().append("path").classed(_.cbline,!0),gt.exit().remove(),gt.each(function(It){var Pt=Ke,kt=Math.round(St.c2p(It))+ne.width/2%1;g.select(this).attr("d","M"+(I?Pt+","+kt:kt+","+Pt)+(I?"h":"v")+Ve).call(n.lineGroupStyle,ne.width,we(It),ne.dash)}),Ee.selectAll("g."+St._id+"tick,path").remove();var st=Ke+Ve+(Y||0)/2-(D.ticks==="outside"?1:0),At=x.calcTicks(St),Ct=x.getTickSigns(St)[2];return x.drawTicks(N,St,{vals:St.ticks==="inside"?x.clipEnds(St,At):At,layer:Ee,path:x.makeTickPath(St,st,Ct),transFn:x.makeTransTickFn(St)}),x.drawLabels(N,St,{vals:At,layer:Ee,transFn:x.makeTransTickLabelFn(St),labelFns:x.makeLabelFns(St,st)})}function Lt(){var ct,Tt=Ve+Y/2;xe.indexOf("inside")===-1&&(ct=n.bBox(Ee.node()),Tt+=I?ct.width:ct.height),Me=Fe.select("text");var Bt=0,ir=I&&ge==="top",pt=!I&&ge==="right",Xt=0;if(Me.node()&&!Me.classed(_.jsPlaceholder)){var Kt,or=Fe.select(".h"+St._id+"title-math-group").node();or&&(I&&nt||!I&&!nt)?(ct=n.bBox(or),Bt=ct.width,Kt=ct.height):(ct=n.bBox(Fe.node()),Bt=ct.right-Z.l-(I?Ke:xt),Kt=ct.bottom-Z.t-(I?xt:Ke),!I&&ge==="top"&&(Tt+=ct.height,Xt=ct.height)),pt&&(Me.attr("transform",r(Bt/2+ye/2,0)),Bt*=2),Tt=Math.max(Tt,I?Bt:Kt)}var $t=(I?J:X)*2+Tt+j+Y/2,gt=0;!I&&ce.text&&ue==="bottom"&&G<=0&&(gt=$t/2,$t+=gt,Xt+=gt),$._hColorbarMoveTitle=gt,$._hColorbarMoveCBTitle=Xt;var st=j+Y,At=(I?Ke:xt)-st/2-(I?J:0),Ct=(I?xt:Ke)-(I?ke:X+Xt-gt);z.select("."+_.cbbg).attr("x",At).attr("y",Ct).attr(I?"width":"height",Math.max($t-gt,2)).attr(I?"height":"width",Math.max(ke+st,2)).call(f.fill,te).call(f.stroke,D.bordercolor).style("stroke-width",j);var It=pt?Math.max(Bt-10,0):0;z.selectAll("."+_.cboutline).attr("x",(I?Ke:xt+J)+It).attr("y",(I?xt+X-ke:Ke)+(ir?Ne:0)).attr(I?"width":"height",Math.max(Ve,2)).attr(I?"height":"width",Math.max(ke-(I?2*X+Ne:2*J+It),2)).call(f.stroke,D.outlinecolor).style({fill:"none","stroke-width":Y});var Pt=I?$e*$t:0,kt=I?0:(1-lt)*$t-Xt;if(Pt=oe?Z.l-Pt:-Pt,kt=Q?Z.t-kt:-kt,z.attr("transform",r(Pt,kt)),!I&&(j||C(te).getAlpha()&&!C.equals($.paper_bgcolor,te))){var Ht=Ee.selectAll("text"),Jt=Ht[0].length,ur=z.select("."+_.cbbg).node(),hr=n.bBox(ur),vr=n.getTranslate(z),Ye=2;Ht.each(function(mr,xr){var pr=0,Gr=Jt-1;if(xr===pr||xr===Gr){var Pr=n.bBox(this),Dr=n.getTranslate(this),cn;if(xr===Gr){var rn=Pr.right+Dr.x,Cn=hr.right+vr.x+xt-j-Ye+ee;cn=Cn-rn,cn>0&&(cn=0)}else if(xr===pr){var En=Pr.left+Dr.x,Tr=hr.left+vr.x+xt+j+Ye;cn=Tr-En,cn<0&&(cn=0)}cn&&(Jt<3?this.setAttribute("transform","translate("+cn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Ge={},Nt=w[ie],Ot=A[ie],Qt=w[ue],tr=A[ue],fr=$t-Ve;I?(B==="pixels"?(Ge.y=G,Ge.t=ke*Qt,Ge.b=ke*tr):(Ge.t=Ge.b=0,Ge.yt=G+k*Qt,Ge.yb=G-k*tr),V==="pixels"?(Ge.x=ee,Ge.l=$t*Nt,Ge.r=$t*Ot):(Ge.l=fr*Nt,Ge.r=fr*Ot,Ge.xl=ee-O*Nt,Ge.xr=ee+O*Ot)):(B==="pixels"?(Ge.x=ee,Ge.l=ke*Nt,Ge.r=ke*Ot):(Ge.l=Ge.r=0,Ge.xl=ee+k*Nt,Ge.xr=ee-k*Ot),V==="pixels"?(Ge.y=1-G,Ge.t=$t*Qt,Ge.b=$t*tr):(Ge.t=fr*Qt,Ge.b=fr*tr,Ge.yt=G-O*Qt,Ge.yb=G+O*tr));var rr=D.y<.5?"b":"t",Vt=D.x<.5?"l":"r";N._fullLayout._reservedMargin[D._id]={};var dr={r:$.width-At-Pt,l:At+Ge.r,b:$.height-Ct-kt,t:Ct+Ge.b};oe&&Q?i.autoMargin(N,D._id,Ge):oe?N._fullLayout._reservedMargin[D._id][rr]=dr[rr]:Q||I?N._fullLayout._reservedMargin[D._id][Vt]=dr[Vt]:N._fullLayout._reservedMargin[D._id][rr]=dr[rr]}return p.syncOrAsync([i.previousPromises,mt,vt,bt,i.previousPromises,Lt],N)}function s(z,D,N){var I=D.orientation==="v",k=N._fullLayout,B=k._size,O,V,Y;v.init({element:z.node(),gd:N,prepFn:function(){O=z.attr("transform"),a(z)},moveFn:function(j,te){z.attr("transform",O+r(j,te)),V=v.align((I?D._uFrac:D._vFrac)+j/B.w,I?D._thickFrac:D._lenFrac,0,1,D.xanchor),Y=v.align((I?D._vFrac:1-D._uFrac)-te/B.h,I?D._lenFrac:D._thickFrac,0,1,D.yanchor);var ie=v.getCursor(V,Y,D.xanchor,D.yanchor);a(z,ie)},doneFn:function(){if(a(z),V!==void 0&&Y!==void 0){var j={};j[D._propPrefix+"x"]=V,j[D._propPrefix+"y"]=Y,D._traceIndex!==void 0?S.call("_guiRestyle",N,j,D._traceIndex):S.call("_guiRelayout",N,j)}}})}function L(z,D,N){var I=D._levels,k=[],B=[],O,V,Y=I.end+I.size/100,j=I.size,te=1.001*N[0]-.001*N[1],ie=1.001*N[1]-.001*N[0];for(V=0;V<1e5&&(O=I.start+V*j,!(j>0?O>=Y:O<=Y));V++)O>te&&O0?O>=Y:O<=Y));V++)O>N[0]&&Oh-l?l=h-(m-h):m-h=0?o=r.colorscale.sequential:o=r.colorscale.sequentialminus,f._sync("colorscale",o)}}},95504:function(H,U,e){var g=e(3400),C=e(94288).hasColorscale,i=e(94288).extractOpts;H.exports=function(x,v){function p(l,m){var h=l["_"+m];h!==void 0&&(l[m]=h)}function r(l,m){var h=m.container?g.nestedProperty(l,m.container).get():l;if(h)if(h.coloraxis)h._colorAx=v[h.coloraxis];else{var b=i(h),u=b.auto;(u||b.min===void 0)&&p(h,m.min),(u||b.max===void 0)&&p(h,m.max),b.autocolorscale&&p(h,"colorscale")}}for(var t=0;t=0;o--,d++){var w=h[o];u[d]=[1-w[0],w[1]]}return u}function c(h,b){b=b||{};for(var u=h.domain,o=h.range,d=o.length,w=new Array(d),A=0;A1.3333333333333333-p?v:p}},67416:function(H,U,e){var g=e(3400),C=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];H.exports=function(S,x,v,p){return v==="left"?S=0:v==="center"?S=1:v==="right"?S=2:S=g.constrain(Math.floor(S*3),0,2),p==="bottom"?x=0:p==="middle"?x=1:p==="top"?x=2:x=g.constrain(Math.floor(x*3),0,2),C[x][S]}},72760:function(H,U){U.selectMode=function(e){return e==="lasso"||e==="select"},U.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},U.openMode=function(e){return e==="drawline"||e==="drawopenpath"},U.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},U.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},U.selectingOrDrawing=function(e){return U.freeMode(e)||U.rectMode(e)}},86476:function(H,U,e){var g=e(29128),C=e(52264),i=e(89184),S=e(3400).removeElement,x=e(33816),v=H.exports={};v.align=e(78316),v.getCursor=e(67416);var p=e(2616);v.unhover=p.wrapped,v.unhoverRaw=p.raw,v.init=function(n){var f=n.gd,c=1,l=f._context.doubleClickDelay,m=n.element,h,b,u,o,d,w,A,_;f._mouseDownTime||(f._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=T,i?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=T,m.addEventListener("touchstart",T,{passive:!1})):m.ontouchstart=T;function y(M,z,D){return Math.abs(M)"u"&&typeof M.clientY>"u"&&(M.clientX=h,M.clientY=b),u=new Date().getTime(),u-f._mouseDownTimel&&(c=Math.max(c-1,1)),f._dragged)n.doneFn&&n.doneFn();else if(n.clickFn&&n.clickFn(c,w),!_){var z;try{z=new MouseEvent("click",M)}catch{var D=t(M);z=document.createEvent("MouseEvents"),z.initMouseEvent("click",M.bubbles,M.cancelable,M.view,M.detail,M.screenX,M.screenY,D[0],D[1],M.ctrlKey,M.altKey,M.shiftKey,M.metaKey,M.button,M.relatedTarget)}A.dispatchEvent(z)}f._dragging=!1,f._dragged=!1}};function r(){var a=document.createElement("div");a.className="dragcover";var n=a.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(a),a}v.coverSlip=r;function t(a){return g(a.changedTouches?a.changedTouches[0]:a,document.body)}},2616:function(H,U,e){var g=e(95924),C=e(91200),i=e(52200).getGraphDiv,S=e(92456),x=H.exports={};x.wrapped=function(v,p,r){v=i(v),v._fullLayout&&C.clear(v._fullLayout._uid+S.HOVERID),x.raw(v,p,r)},x.raw=function(p,r){var t=p._fullLayout,a=p._hoverdata;r||(r={}),!(r.target&&!p._dragged&&g.triggerHandler(p,"plotly_beforehover",r)===!1)&&(t._hoverlayer.selectAll("g").remove(),t._hoverlayer.selectAll("line").remove(),t._hoverlayer.selectAll("circle").remove(),p._hoverdata=void 0,r.target&&a&&p.emit("plotly_unhover",{event:r,points:a}))}},98192:function(H,U){U.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},U.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},43616:function(H,U,e){var g=e(33428),C=e(3400),i=C.numberFormat,S=e(38248),x=e(49760),v=e(24040),p=e(76308),r=e(8932),t=C.strTranslate,a=e(72736),n=e(9616),f=e(84284),c=f.LINE_SPACING,l=e(13448).DESELECTDIM,m=e(43028),h=e(7152),b=e(10624).appendArrayPointValue,u=H.exports={};u.font=function(be,Ae,me,Le){C.isPlainObject(Ae)&&(Le=Ae.color,me=Ae.size,Ae=Ae.family),Ae&&be.style("font-family",Ae),me+1&&be.style("font-size",me+"px"),Le&&be.call(p.fill,Le)},u.setPosition=function(be,Ae,me){be.attr("x",Ae).attr("y",me)},u.setSize=function(be,Ae,me){be.attr("width",Ae).attr("height",me)},u.setRect=function(be,Ae,me,Le,Ve){be.call(u.setPosition,Ae,me).call(u.setSize,Le,Ve)},u.translatePoint=function(be,Ae,me,Le){var Ve=me.c2p(be.x),Ue=Le.c2p(be.y);if(S(Ve)&&S(Ue)&&Ae.node())Ae.node().nodeName==="text"?Ae.attr("x",Ve).attr("y",Ue):Ae.attr("transform",t(Ve,Ue));else return!1;return!0},u.translatePoints=function(be,Ae,me){be.each(function(Le){var Ve=g.select(this);u.translatePoint(Le,Ve,Ae,me)})},u.hideOutsideRangePoint=function(be,Ae,me,Le,Ve,Ue){Ae.attr("display",me.isPtWithinRange(be,Ve)&&Le.isPtWithinRange(be,Ue)?null:"none")},u.hideOutsideRangePoints=function(be,Ae){if(Ae._hasClipOnAxisFalse){var me=Ae.xaxis,Le=Ae.yaxis;be.each(function(Ve){var Ue=Ve[0].trace,ke=Ue.xcalendar,He=Ue.ycalendar,Ie=v.traceIs(Ue,"bar-like")?".bartext":".point,.textpoint";be.selectAll(Ie).each(function(rt){u.hideOutsideRangePoint(rt,g.select(this),me,Le,ke,He)})})}},u.crispRound=function(be,Ae,me){return!Ae||!S(Ae)?me||0:be._context.staticPlot?Ae:Ae<1?1:Math.round(Ae)},u.singleLineStyle=function(be,Ae,me,Le,Ve){Ae.style("fill","none");var Ue=(((be||[])[0]||{}).trace||{}).line||{},ke=me||Ue.width||0,He=Ve||Ue.dash||"";p.stroke(Ae,Le||Ue.color),u.dashLine(Ae,He,ke)},u.lineGroupStyle=function(be,Ae,me,Le){be.style("fill","none").each(function(Ve){var Ue=(((Ve||[])[0]||{}).trace||{}).line||{},ke=Ae||Ue.width||0,He=Le||Ue.dash||"";g.select(this).call(p.stroke,me||Ue.color).call(u.dashLine,He,ke)})},u.dashLine=function(be,Ae,me){me=+me||0,Ae=u.dashStyle(Ae,me),be.style({"stroke-dasharray":Ae,"stroke-width":me+"px"})},u.dashStyle=function(be,Ae){Ae=+Ae||1;var me=Math.max(Ae,3);return be==="solid"?be="":be==="dot"?be=me+"px,"+me+"px":be==="dash"?be=3*me+"px,"+3*me+"px":be==="longdash"?be=5*me+"px,"+5*me+"px":be==="dashdot"?be=3*me+"px,"+me+"px,"+me+"px,"+me+"px":be==="longdashdot"&&(be=5*me+"px,"+2*me+"px,"+me+"px,"+2*me+"px"),be};function o(be,Ae,me,Le){var Ve=Ae.fillpattern,Ue=Ae.fillgradient,ke=Ve&&u.getPatternAttr(Ve.shape,0,"");if(ke){var He=u.getPatternAttr(Ve.bgcolor,0,null),Ie=u.getPatternAttr(Ve.fgcolor,0,null),rt=Ve.fgopacity,Ke=u.getPatternAttr(Ve.size,0,8),$e=u.getPatternAttr(Ve.solidity,0,.3),lt=Ae.uid;u.pattern(be,"point",me,lt,ke,Ke,$e,void 0,Ve.fillmode,He,Ie,rt)}else if(Ue&&Ue.type!=="none"){var ht=Ue.type,dt="scatterfill-"+Ae.uid;if(Le&&(dt="legendfill-"+Ae.uid),!Le&&(Ue.start!==void 0||Ue.stop!==void 0)){var xt,St;ht==="horizontal"?(xt={x:Ue.start,y:0},St={x:Ue.stop,y:0}):ht==="vertical"&&(xt={x:0,y:Ue.start},St={x:0,y:Ue.stop}),xt.x=Ae._xA.c2p(xt.x===void 0?Ae._extremes.x.min[0].val:xt.x,!0),xt.y=Ae._yA.c2p(xt.y===void 0?Ae._extremes.y.min[0].val:xt.y,!0),St.x=Ae._xA.c2p(St.x===void 0?Ae._extremes.x.max[0].val:St.x,!0),St.y=Ae._yA.c2p(St.y===void 0?Ae._extremes.y.max[0].val:St.y,!0),be.call(T,me,dt,"linear",Ue.colorscale,"fill",xt,St,!0,!1)}else ht==="horizontal"&&(ht=ht+"reversed"),be.call(u.gradient,me,dt,ht,Ue.colorscale,"fill")}else Ae.fillcolor&&be.call(p.fill,Ae.fillcolor)}u.singleFillStyle=function(be,Ae){var me=g.select(be.node()),Le=me.data(),Ve=((Le[0]||[])[0]||{}).trace||{};o(be,Ve,Ae,!1)},u.fillGroupStyle=function(be,Ae,me){be.style("stroke-width",0).each(function(Le){var Ve=g.select(this);Le[0].trace&&o(Ve,Le[0].trace,Ae,me)})};var d=e(71984);u.symbolNames=[],u.symbolFuncs=[],u.symbolBackOffs=[],u.symbolNeedLines={},u.symbolNoDot={},u.symbolNoFill={},u.symbolList=[],Object.keys(d).forEach(function(be){var Ae=d[be],me=Ae.n;u.symbolList.push(me,String(me),be,me+100,String(me+100),be+"-open"),u.symbolNames[me]=be,u.symbolFuncs[me]=Ae.f,u.symbolBackOffs[me]=Ae.backoff||0,Ae.needLine&&(u.symbolNeedLines[me]=!0),Ae.noDot?u.symbolNoDot[me]=!0:u.symbolList.push(me+200,String(me+200),be+"-dot",me+300,String(me+300),be+"-open-dot"),Ae.noFill&&(u.symbolNoFill[me]=!0)});var w=u.symbolNames.length,A="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";u.symbolNumber=function(be){if(S(be))be=+be;else if(typeof be=="string"){var Ae=0;be.indexOf("-open")>0&&(Ae=100,be=be.replace("-open","")),be.indexOf("-dot")>0&&(Ae+=200,be=be.replace("-dot","")),be=u.symbolNames.indexOf(be),be>=0&&(be+=Ae)}return be%100>=w||be>=400?0:Math.floor(Math.max(be,0))};function _(be,Ae,me,Le){var Ve=be%100;return u.symbolFuncs[Ve](Ae,me,Le)+(be>=200?A:"")}var y=i("~f"),E={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};u.gradient=function(be,Ae,me,Le,Ve,Ue){var ke=E[Le];return T(be,Ae,me,ke.type,Ve,Ue,ke.start,ke.stop,!1,ke.reversed)};function T(be,Ae,me,Le,Ve,Ue,ke,He,Ie,rt){var Ke=Ve.length,$e;Le==="linear"?$e={node:"linearGradient",attrs:{x1:ke.x,y1:ke.y,x2:He.x,y2:He.y,gradientUnits:Ie?"userSpaceOnUse":"objectBoundingBox"},reversed:rt}:Le==="radial"&&($e={node:"radialGradient",reversed:rt});for(var lt=new Array(Ke),ht=0;ht=0&&be.i===void 0&&(be.i=Ue.i),Ae.style("opacity",Le.selectedOpacityFn?Le.selectedOpacityFn(be):be.mo===void 0?ke.opacity:be.mo),Le.ms2mrc){var Ie;be.ms==="various"||ke.size==="various"?Ie=3:Ie=Le.ms2mrc(be.ms),be.mrc=Ie,Le.selectedSizeFn&&(Ie=be.mrc=Le.selectedSizeFn(be));var rt=u.symbolNumber(be.mx||ke.symbol)||0;be.om=rt%200>=100;var Ke=Re(be,me),$e=G(be,me);Ae.attr("d",_(rt,Ie,Ke,$e))}var lt=!1,ht,dt,xt;if(be.so)xt=He.outlierwidth,dt=He.outliercolor,ht=ke.outliercolor;else{var St=(He||{}).width;xt=(be.mlw+1||St+1||(be.trace?(be.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in be?dt=be.mlcc=Le.lineScale(be.mlc):C.isArrayOrTypedArray(He.color)?dt=p.defaultLine:dt=He.color,C.isArrayOrTypedArray(ke.color)&&(ht=p.defaultLine,lt=!0),"mc"in be?ht=be.mcc=Le.markerScale(be.mc):ht=ke.color||ke.colors||"rgba(0,0,0,0)",Le.selectedColorFn&&(ht=Le.selectedColorFn(be))}if(be.om)Ae.call(p.stroke,ht).style({"stroke-width":(xt||1)+"px",fill:"none"});else{Ae.style("stroke-width",(be.isBlank?0:xt)+"px");var nt=ke.gradient,ze=be.mgt;ze?lt=!0:ze=nt&&nt.type,C.isArrayOrTypedArray(ze)&&(ze=ze[0],E[ze]||(ze=0));var Ze=ke.pattern,Je=Ze&&u.getPatternAttr(Ze.shape,be.i,"");if(ze&&ze!=="none"){var We=be.mgc;We?lt=!0:We=nt.color;var Fe=me.uid;lt&&(Fe+="-"+be.i),u.gradient(Ae,Ve,Fe,ze,[[0,We],[1,ht]],"fill")}else if(Je){var xe=!1,ye=Ze.fgcolor;!ye&&Ue&&Ue.color&&(ye=Ue.color,xe=!0);var Ee=u.getPatternAttr(ye,be.i,Ue&&Ue.color||null),Me=u.getPatternAttr(Ze.bgcolor,be.i,null),Ne=Ze.fgopacity,je=u.getPatternAttr(Ze.size,be.i,8),it=u.getPatternAttr(Ze.solidity,be.i,.3);xe=xe||be.mcc||C.isArrayOrTypedArray(Ze.shape)||C.isArrayOrTypedArray(Ze.bgcolor)||C.isArrayOrTypedArray(Ze.fgcolor)||C.isArrayOrTypedArray(Ze.size)||C.isArrayOrTypedArray(Ze.solidity);var mt=me.uid;xe&&(mt+="-"+be.i),u.pattern(Ae,"point",Ve,mt,Je,je,it,be.mcc,Ze.fillmode,Me,Ee,Ne)}else C.isArrayOrTypedArray(ht)?p.fill(Ae,ht[be.i]):p.fill(Ae,ht);xt&&p.stroke(Ae,dt)}},u.makePointStyleFns=function(be){var Ae={},me=be.marker;return Ae.markerScale=u.tryColorscale(me,""),Ae.lineScale=u.tryColorscale(me,"line"),v.traceIs(be,"symbols")&&(Ae.ms2mrc=m.isBubble(be)?h(be):function(){return(me.size||6)/2}),be.selectedpoints&&C.extendFlat(Ae,u.makeSelectedPointStyleFns(be)),Ae},u.makeSelectedPointStyleFns=function(be){var Ae={},me=be.selected||{},Le=be.unselected||{},Ve=be.marker||{},Ue=me.marker||{},ke=Le.marker||{},He=Ve.opacity,Ie=Ue.opacity,rt=ke.opacity,Ke=Ie!==void 0,$e=rt!==void 0;(C.isArrayOrTypedArray(He)||Ke||$e)&&(Ae.selectedOpacityFn=function(Je){var We=Je.mo===void 0?Ve.opacity:Je.mo;return Je.selected?Ke?Ie:We:$e?rt:l*We});var lt=Ve.color,ht=Ue.color,dt=ke.color;(ht||dt)&&(Ae.selectedColorFn=function(Je){var We=Je.mcc||lt;return Je.selected?ht||We:dt||We});var xt=Ve.size,St=Ue.size,nt=ke.size,ze=St!==void 0,Ze=nt!==void 0;return v.traceIs(be,"symbols")&&(ze||Ze)&&(Ae.selectedSizeFn=function(Je){var We=Je.mrc||xt/2;return Je.selected?ze?St/2:We:Ze?nt/2:We}),Ae},u.makeSelectedTextStyleFns=function(be){var Ae={},me=be.selected||{},Le=be.unselected||{},Ve=be.textfont||{},Ue=me.textfont||{},ke=Le.textfont||{},He=Ve.color,Ie=Ue.color,rt=ke.color;return Ae.selectedTextColorFn=function(Ke){var $e=Ke.tc||He;return Ke.selected?Ie||$e:rt||(Ie?$e:p.addOpacity($e,l))},Ae},u.selectedPointStyle=function(be,Ae){if(!(!be.size()||!Ae.selectedpoints)){var me=u.makeSelectedPointStyleFns(Ae),Le=Ae.marker||{},Ve=[];me.selectedOpacityFn&&Ve.push(function(Ue,ke){Ue.style("opacity",me.selectedOpacityFn(ke))}),me.selectedColorFn&&Ve.push(function(Ue,ke){p.fill(Ue,me.selectedColorFn(ke))}),me.selectedSizeFn&&Ve.push(function(Ue,ke){var He=ke.mx||Le.symbol||0,Ie=me.selectedSizeFn(ke);Ue.attr("d",_(u.symbolNumber(He),Ie,Re(ke,Ae),G(ke,Ae))),ke.mrc2=Ie}),Ve.length&&be.each(function(Ue){for(var ke=g.select(this),He=0;He0?me:0}u.textPointStyle=function(be,Ae,me){if(be.size()){var Le;if(Ae.selectedpoints){var Ve=u.makeSelectedTextStyleFns(Ae);Le=Ve.selectedTextColorFn}var Ue=Ae.texttemplate,ke=me._fullLayout;be.each(function(He){var Ie=g.select(this),rt=Ue?C.extractOption(He,Ae,"txt","texttemplate"):C.extractOption(He,Ae,"tx","text");if(!rt&&rt!==0){Ie.remove();return}if(Ue){var Ke=Ae._module.formatLabels,$e=Ke?Ke(He,Ae,ke):{},lt={};b(lt,Ae,He.i);var ht=Ae._meta||{};rt=C.texttemplateString(rt,$e,ke._d3locale,lt,He,ht)}var dt=He.tp||Ae.textposition,xt=M(He,Ae),St=Le?Le(He):He.tc||Ae.textfont.color;Ie.call(u.font,He.tf||Ae.textfont.family,xt,St).text(rt).call(a.convertToTspans,me).call(L,dt,xt,He.mrc)})}},u.selectedTextStyle=function(be,Ae){if(!(!be.size()||!Ae.selectedpoints)){var me=u.makeSelectedTextStyleFns(Ae);be.each(function(Le){var Ve=g.select(this),Ue=me.selectedTextColorFn(Le),ke=Le.tp||Ae.textposition,He=M(Le,Ae);p.fill(Ve,Ue);var Ie=v.traceIs(Ae,"bar-like");L(Ve,ke,He,Le.mrc2||Le.mrc,Ie)})}};var z=.5;u.smoothopen=function(be,Ae){if(be.length<3)return"M"+be.join("L");var me="M"+be[0],Le=[],Ve;for(Ve=1;Ve=Ie||Je>=Ke&&Je<=Ie)&&(We<=$e&&We>=rt||We>=$e&&We<=rt)&&(be=[Je,We])}return be}u.applyBackoff=j,u.makeTester=function(){var be=C.ensureSingleById(g.select("body"),"svg","js-plotly-tester",function(me){me.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Ae=C.ensureSingle(be,"path","js-reference-point",function(me){me.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});u.tester=be,u.testref=Ae},u.savedBBoxes={};var te=0,ie=1e4;u.bBox=function(be,Ae,me){me||(me=ue(be));var Le;if(me){if(Le=u.savedBBoxes[me],Le)return C.extendFlat({},Le)}else if(be.childNodes.length===1){var Ve=be.childNodes[0];if(me=ue(Ve),me){var Ue=+Ve.getAttribute("x")||0,ke=+Ve.getAttribute("y")||0,He=Ve.getAttribute("transform");if(!He){var Ie=u.bBox(Ve,!1,me);return Ue&&(Ie.left+=Ue,Ie.right+=Ue),ke&&(Ie.top+=ke,Ie.bottom+=ke),Ie}if(me+="~"+Ue+"~"+ke+"~"+He,Le=u.savedBBoxes[me],Le)return C.extendFlat({},Le)}}var rt,Ke;Ae?rt=be:(Ke=u.tester.node(),rt=be.cloneNode(!0),Ke.appendChild(rt)),g.select(rt).attr("transform",null).call(a.positionText,0,0);var $e=rt.getBoundingClientRect(),lt=u.testref.node().getBoundingClientRect();Ae||Ke.removeChild(rt);var ht={height:$e.height,width:$e.width,left:$e.left-lt.left,top:$e.top-lt.top,right:$e.right-lt.left,bottom:$e.bottom-lt.top};return te>=ie&&(u.savedBBoxes={},te=0),me&&(u.savedBBoxes[me]=ht),te++,C.extendFlat({},ht)};function ue(be){var Ae=be.getAttribute("data-unformatted");if(Ae!==null)return Ae+be.getAttribute("data-math")+be.getAttribute("text-anchor")+be.getAttribute("style")}u.setClipUrl=function(be,Ae,me){be.attr("clip-path",J(Ae,me))};function J(be,Ae){if(!be)return null;var me=Ae._context,Le=me._exportedPlot?"":me._baseUrl||"";return Le?"url('"+Le+"#"+be+"')":"url(#"+be+")"}u.getTranslate=function(be){var Ae=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,me=be.attr?"attr":"getAttribute",Le=be[me]("transform")||"",Ve=Le.replace(Ae,function(Ue,ke,He){return[ke,He].join(" ")}).split(" ");return{x:+Ve[0]||0,y:+Ve[1]||0}},u.setTranslate=function(be,Ae,me){var Le=/(\btranslate\(.*?\);?)/,Ve=be.attr?"attr":"getAttribute",Ue=be.attr?"attr":"setAttribute",ke=be[Ve]("transform")||"";return Ae=Ae||0,me=me||0,ke=ke.replace(Le,"").trim(),ke+=t(Ae,me),ke=ke.trim(),be[Ue]("transform",ke),ke},u.getScale=function(be){var Ae=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,me=be.attr?"attr":"getAttribute",Le=be[me]("transform")||"",Ve=Le.replace(Ae,function(Ue,ke,He){return[ke,He].join(" ")}).split(" ");return{x:+Ve[0]||1,y:+Ve[1]||1}},u.setScale=function(be,Ae,me){var Le=/(\bscale\(.*?\);?)/,Ve=be.attr?"attr":"getAttribute",Ue=be.attr?"attr":"setAttribute",ke=be[Ve]("transform")||"";return Ae=Ae||1,me=me||1,ke=ke.replace(Le,"").trim(),ke+="scale("+Ae+","+me+")",ke=ke.trim(),be[Ue]("transform",ke),ke};var X=/\s*sc.*/;u.setPointGroupScale=function(be,Ae,me){if(Ae=Ae||1,me=me||1,!!be){var Le=Ae===1&&me===1?"":"scale("+Ae+","+me+")";be.each(function(){var Ve=(this.getAttribute("transform")||"").replace(X,"");Ve+=Le,Ve=Ve.trim(),this.setAttribute("transform",Ve)})}};var ee=/translate\([^)]*\)\s*$/;u.setTextPointsScale=function(be,Ae,me){be&&be.each(function(){var Le,Ve=g.select(this),Ue=Ve.select("text");if(Ue.node()){var ke=parseFloat(Ue.attr("x")||0),He=parseFloat(Ue.attr("y")||0),Ie=(Ve.attr("transform")||"").match(ee);Ae===1&&me===1?Le=[]:Le=[t(ke,He),"scale("+Ae+","+me+")",t(-ke,-He)],Ie&&Le.push(Ie),Ve.attr("transform",Le.join(""))}})};function G(be,Ae){var me;return be&&(me=be.mf),me===void 0&&(me=Ae.marker&&Ae.marker.standoff||0),!Ae._geo&&!Ae._xA?-me:me}u.getMarkerStandoff=G;var Q=Math.atan2,oe=Math.cos,$=Math.sin;function Z(be,Ae){var me=Ae[0],Le=Ae[1];return[me*oe(be)-Le*$(be),me*$(be)+Le*oe(be)]}var se,ne,ce,ge,Te,we;function Re(be,Ae){var me=be.ma;me===void 0&&(me=Ae.marker.angle,(!me||C.isArrayOrTypedArray(me))&&(me=0));var Le,Ve,Ue=Ae.marker.angleref;if(Ue==="previous"||Ue==="north"){if(Ae._geo){var ke=Ae._geo.project(be.lonlat);Le=ke[0],Ve=ke[1]}else{var He=Ae._xA,Ie=Ae._yA;if(He&&Ie)Le=He.c2p(be.x),Ve=Ie.c2p(be.y);else return 90}if(Ae._geo){var rt=be.lonlat[0],Ke=be.lonlat[1],$e=Ae._geo.project([rt,Ke+1e-5]),lt=Ae._geo.project([rt+1e-5,Ke]),ht=Q(lt[1]-Ve,lt[0]-Le),dt=Q($e[1]-Ve,$e[0]-Le),xt;if(Ue==="north")xt=me/180*Math.PI;else if(Ue==="previous"){var St=rt/180*Math.PI,nt=Ke/180*Math.PI,ze=se/180*Math.PI,Ze=ne/180*Math.PI,Je=ze-St,We=oe(Ze)*$(Je),Fe=$(Ze)*oe(nt)-oe(Ze)*$(nt)*oe(Je);xt=-Q(We,Fe)-Math.PI,se=rt,ne=Ke}var xe=Z(ht,[oe(xt),0]),ye=Z(dt,[$(xt),0]);me=Q(xe[1]+ye[1],xe[0]+ye[0])/Math.PI*180,Ue==="previous"&&!(we===Ae.uid&&be.i===Te+1)&&(me=null)}if(Ue==="previous"&&!Ae._geo)if(we===Ae.uid&&be.i===Te+1&&S(Le)&&S(Ve)){var Ee=Le-ce,Me=Ve-ge,Ne=Ae.line&&Ae.line.shape||"",je=Ne.slice(Ne.length-1);je==="h"&&(Me=0),je==="v"&&(Ee=0),me+=Q(Me,Ee)/Math.PI*180+90}else me=null}return ce=Le,ge=Ve,Te=be.i,we=Ae.uid,me}u.getMarkerAngle=Re},71984:function(H,U,e){var g=e(21984),C=e(33428).round,i="M0,0Z",S=Math.sqrt(2),x=Math.sqrt(3),v=Math.PI,p=Math.cos,r=Math.sin;H.exports={circle:{n:0,f:function(m,h,b){if(t(h))return i;var u=C(m,2),o="M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z";return b?l(h,b,o):o}},square:{n:1,f:function(m,h,b){if(t(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")}},diamond:{n:2,f:function(m,h,b){if(t(h))return i;var u=C(m*1.3,2);return l(h,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"Z")}},cross:{n:3,f:function(m,h,b){if(t(h))return i;var u=C(m*.4,2),o=C(m*1.2,2);return l(h,b,"M"+o+","+u+"H"+u+"V"+o+"H-"+u+"V"+u+"H-"+o+"V-"+u+"H-"+u+"V-"+o+"H"+u+"V-"+u+"H"+o+"Z")}},x:{n:4,f:function(m,h,b){if(t(h))return i;var u=C(m*.8/S,2),o="l"+u+","+u,d="l"+u+",-"+u,w="l-"+u+",-"+u,A="l-"+u+","+u;return l(h,b,"M0,"+u+o+d+w+d+w+A+w+A+o+A+o+"Z")}},"triangle-up":{n:5,f:function(m,h,b){if(t(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M-"+u+","+o+"H"+u+"L0,-"+d+"Z")}},"triangle-down":{n:6,f:function(m,h,b){if(t(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M-"+u+",-"+o+"H"+u+"L0,"+d+"Z")}},"triangle-left":{n:7,f:function(m,h,b){if(t(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M"+o+",-"+u+"V"+u+"L-"+d+",0Z")}},"triangle-right":{n:8,f:function(m,h,b){if(t(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M-"+o+",-"+u+"V"+u+"L"+d+",0Z")}},"triangle-ne":{n:9,f:function(m,h,b){if(t(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M-"+o+",-"+u+"H"+u+"V"+o+"Z")}},"triangle-se":{n:10,f:function(m,h,b){if(t(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M"+u+",-"+o+"V"+u+"H-"+o+"Z")}},"triangle-sw":{n:11,f:function(m,h,b){if(t(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M"+o+","+u+"H-"+u+"V-"+o+"Z")}},"triangle-nw":{n:12,f:function(m,h,b){if(t(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M-"+u+","+o+"V-"+u+"H"+o+"Z")}},pentagon:{n:13,f:function(m,h,b){if(t(h))return i;var u=C(m*.951,2),o=C(m*.588,2),d=C(-m,2),w=C(m*-.309,2),A=C(m*.809,2);return l(h,b,"M"+u+","+w+"L"+o+","+A+"H-"+o+"L-"+u+","+w+"L0,"+d+"Z")}},hexagon:{n:14,f:function(m,h,b){if(t(h))return i;var u=C(m,2),o=C(m/2,2),d=C(m*x/2,2);return l(h,b,"M"+d+",-"+o+"V"+o+"L0,"+u+"L-"+d+","+o+"V-"+o+"L0,-"+u+"Z")}},hexagon2:{n:15,f:function(m,h,b){if(t(h))return i;var u=C(m,2),o=C(m/2,2),d=C(m*x/2,2);return l(h,b,"M-"+o+","+d+"H"+o+"L"+u+",0L"+o+",-"+d+"H-"+o+"L-"+u+",0Z")}},octagon:{n:16,f:function(m,h,b){if(t(h))return i;var u=C(m*.924,2),o=C(m*.383,2);return l(h,b,"M-"+o+",-"+u+"H"+o+"L"+u+",-"+o+"V"+o+"L"+o+","+u+"H-"+o+"L-"+u+","+o+"V-"+o+"Z")}},star:{n:17,f:function(m,h,b){if(t(h))return i;var u=m*1.4,o=C(u*.225,2),d=C(u*.951,2),w=C(u*.363,2),A=C(u*.588,2),_=C(-u,2),y=C(u*-.309,2),E=C(u*.118,2),T=C(u*.809,2),s=C(u*.382,2);return l(h,b,"M"+o+","+y+"H"+d+"L"+w+","+E+"L"+A+","+T+"L0,"+s+"L-"+A+","+T+"L-"+w+","+E+"L-"+d+","+y+"H-"+o+"L0,"+_+"Z")}},hexagram:{n:18,f:function(m,h,b){if(t(h))return i;var u=C(m*.66,2),o=C(m*.38,2),d=C(m*.76,2);return l(h,b,"M-"+d+",0l-"+o+",-"+u+"h"+d+"l"+o+",-"+u+"l"+o+","+u+"h"+d+"l-"+o+","+u+"l"+o+","+u+"h-"+d+"l-"+o+","+u+"l-"+o+",-"+u+"h-"+d+"Z")}},"star-triangle-up":{n:19,f:function(m,h,b){if(t(h))return i;var u=C(m*x*.8,2),o=C(m*.8,2),d=C(m*1.6,2),w=C(m*4,2),A="A "+w+","+w+" 0 0 1 ";return l(h,b,"M-"+u+","+o+A+u+","+o+A+"0,-"+d+A+"-"+u+","+o+"Z")}},"star-triangle-down":{n:20,f:function(m,h,b){if(t(h))return i;var u=C(m*x*.8,2),o=C(m*.8,2),d=C(m*1.6,2),w=C(m*4,2),A="A "+w+","+w+" 0 0 1 ";return l(h,b,"M"+u+",-"+o+A+"-"+u+",-"+o+A+"0,"+d+A+u+",-"+o+"Z")}},"star-square":{n:21,f:function(m,h,b){if(t(h))return i;var u=C(m*1.1,2),o=C(m*2,2),d="A "+o+","+o+" 0 0 1 ";return l(h,b,"M-"+u+",-"+u+d+"-"+u+","+u+d+u+","+u+d+u+",-"+u+d+"-"+u+",-"+u+"Z")}},"star-diamond":{n:22,f:function(m,h,b){if(t(h))return i;var u=C(m*1.4,2),o=C(m*1.9,2),d="A "+o+","+o+" 0 0 1 ";return l(h,b,"M-"+u+",0"+d+"0,"+u+d+u+",0"+d+"0,-"+u+d+"-"+u+",0Z")}},"diamond-tall":{n:23,f:function(m,h,b){if(t(h))return i;var u=C(m*.7,2),o=C(m*1.4,2);return l(h,b,"M0,"+o+"L"+u+",0L0,-"+o+"L-"+u+",0Z")}},"diamond-wide":{n:24,f:function(m,h,b){if(t(h))return i;var u=C(m*1.4,2),o=C(m*.7,2);return l(h,b,"M0,"+o+"L"+u+",0L0,-"+o+"L-"+u+",0Z")}},hourglass:{n:25,f:function(m,h,b){if(t(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"H-"+u+"L"+u+",-"+u+"H-"+u+"Z")},noDot:!0},bowtie:{n:26,f:function(m,h,b){if(t(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"V-"+u+"L-"+u+","+u+"V-"+u+"Z")},noDot:!0},"circle-cross":{n:27,f:function(m,h,b){if(t(h))return i;var u=C(m,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(m,h,b){if(t(h))return i;var u=C(m,2),o=C(m/S,2);return l(h,b,"M"+o+","+o+"L-"+o+",-"+o+"M"+o+",-"+o+"L-"+o+","+o+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(m,h,b){if(t(h))return i;var u=C(m,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(m,h,b){if(t(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(m,h,b){if(t(h))return i;var u=C(m*1.3,2);return l(h,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM0,-"+u+"V"+u+"M-"+u+",0H"+u)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(m,h,b){if(t(h))return i;var u=C(m*1.3,2),o=C(m*.65,2);return l(h,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM-"+o+",-"+o+"L"+o+","+o+"M-"+o+","+o+"L"+o+",-"+o)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(m,h,b){if(t(h))return i;var u=C(m*1.4,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(m,h,b){if(t(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(m,h,b){if(t(h))return i;var u=C(m*1.2,2),o=C(m*.85,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+o+","+o+"L-"+o+",-"+o+"M"+o+",-"+o+"L-"+o+","+o)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(m,h,b){if(t(h))return i;var u=C(m/2,2),o=C(m,2);return l(h,b,"M"+u+","+o+"V-"+o+"M"+(u-o)+",-"+o+"V"+o+"M"+o+","+u+"H-"+o+"M-"+o+","+(u-o)+"H"+o)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(m,h,b){if(t(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M-"+u+","+d+"L0,0M"+u+","+d+"L0,0M0,-"+o+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(m,h,b){if(t(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M-"+u+",-"+d+"L0,0M"+u+",-"+d+"L0,0M0,"+o+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(m,h,b){if(t(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M"+d+","+u+"L0,0M"+d+",-"+u+"L0,0M-"+o+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(m,h,b){if(t(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M-"+d+","+u+"L0,0M-"+d+",-"+u+"L0,0M"+o+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(m,h,b){if(t(h))return i;var u=C(m*1.4,2);return l(h,b,"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(m,h,b){if(t(h))return i;var u=C(m*1.4,2);return l(h,b,"M0,"+u+"V-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(m,h,b){if(t(h))return i;var u=C(m,2);return l(h,b,"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(m,h,b){if(t(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"L-"+u+",-"+u)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(m,h,b){if(t(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M0,0L-"+u+","+o+"H"+u+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(m,h,b){if(t(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M0,0L-"+u+",-"+o+"H"+u+"Z")},noDot:!0},"arrow-left":{n:47,f:function(m,h,b){if(t(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,0L"+u+",-"+o+"V"+o+"Z")},noDot:!0},"arrow-right":{n:48,f:function(m,h,b){if(t(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,0L-"+u+",-"+o+"V"+o+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(m,h,b){if(t(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M-"+u+",0H"+u+"M0,0L-"+u+","+o+"H"+u+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(m,h,b){if(t(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M-"+u+",0H"+u+"M0,0L-"+u+",-"+o+"H"+u+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(m,h,b){if(t(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,-"+o+"V"+o+"M0,0L"+u+",-"+o+"V"+o+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(m,h,b){if(t(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,-"+o+"V"+o+"M0,0L-"+u+",-"+o+"V"+o+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(m,h,b){if(t(h))return i;var u=v/2.5,o=2*m*p(u),d=2*m*r(u);return l(h,b,"M0,0L"+-o+","+d+"L"+o+","+d+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(m,h,b){if(t(h))return i;var u=v/4,o=2*m*p(u),d=2*m*r(u);return l(h,b,"M0,0L"+-o+","+d+"A "+2*m+","+2*m+" 0 0 1 "+o+","+d+"Z")},backoff:.4,noDot:!0}};function t(m){return m===null}var a,n,f,c;function l(m,h,b){if((!m||m%360===0)&&!h)return b;if(f===m&&c===h&&a===b)return n;f=m,c=h,a=b;function u(D,N){var I=p(D),k=r(D),B=N[0],O=N[1]+(h||0);return[B*I-O*k,B*k+O*I]}for(var o=m/180*v,d=0,w=0,A=g(b),_="",y=0;y0,m=p._context.staticPlot;r.each(function(h){var b=h[0].trace,u=b.error_x||{},o=b.error_y||{},d;b.ids&&(d=function(y){return y.id});var w=S.hasMarkers(b)&&b.marker.maxdisplayed>0;!o.visible&&!u.visible&&(h=[]);var A=g.select(this).selectAll("g.errorbar").data(h,d);if(A.exit().remove(),!!h.length){u.visible||A.selectAll("path.xerror").remove(),o.visible||A.selectAll("path.yerror").remove(),A.style("opacity",1);var _=A.enter().append("g").classed("errorbar",!0);l&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),i.setClipUrl(A,t.layerClipId,p),A.each(function(y){var E=g.select(this),T=x(y,f,c);if(!(w&&!y.vis)){var s,L=E.select("path.yerror");if(o.visible&&C(T.x)&&C(T.yh)&&C(T.ys)){var M=o.width;s="M"+(T.x-M)+","+T.yh+"h"+2*M+"m-"+M+",0V"+T.ys,T.noYS||(s+="m-"+M+",0h"+2*M),n=!L.size(),n?L=E.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):l&&(L=L.transition().duration(a.duration).ease(a.easing)),L.attr("d",s)}else L.remove();var z=E.select("path.xerror");if(u.visible&&C(T.y)&&C(T.xh)&&C(T.xs)){var D=(u.copy_ystyle?o:u).width;s="M"+T.xh+","+(T.y-D)+"v"+2*D+"m0,-"+D+"H"+T.xs,T.noXS||(s+="m0,-"+D+"v"+2*D),n=!z.size(),n?z=E.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):l&&(z=z.transition().duration(a.duration).ease(a.easing)),z.attr("d",s)}else z.remove()}})}})};function x(v,p,r){var t={x:p.c2p(v.x),y:r.c2p(v.y)};return v.yh!==void 0&&(t.yh=r.c2p(v.yh),t.ys=r.c2p(v.ys),C(t.ys)||(t.noYS=!0,t.ys=r.c2p(v.ys,!0))),v.xh!==void 0&&(t.xh=p.c2p(v.xh),t.xs=p.c2p(v.xs),C(t.xs)||(t.noXS=!0,t.xs=p.c2p(v.xs,!0))),t}},92036:function(H,U,e){var g=e(33428),C=e(76308);H.exports=function(S){S.each(function(x){var v=x[0].trace,p=v.error_y||{},r=v.error_x||{},t=g.select(this);t.selectAll("path.yerror").style("stroke-width",p.thickness+"px").call(C.stroke,p.color),r.copy_ystyle&&(r=p),t.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(C.stroke,r.color)})}},55756:function(H,U,e){var g=e(25376),C=e(65460).hoverlabel,i=e(92880).extendFlat;H.exports={hoverlabel:{bgcolor:i({},C.bgcolor,{arrayOk:!0}),bordercolor:i({},C.bordercolor,{arrayOk:!0}),font:g({arrayOk:!0,editType:"none"}),align:i({},C.align,{arrayOk:!0}),namelength:i({},C.namelength,{arrayOk:!0}),editType:"none"}}},55056:function(H,U,e){var g=e(3400),C=e(24040);H.exports=function(x){var v=x.calcdata,p=x._fullLayout;function r(c){return function(l){return g.coerceHoverinfo({hoverinfo:l},{_module:c._module},p)}}for(var t=0;t=0&&t.indexAe[0]._length||it<0||it>me[0]._length)return f.unhoverRaw(Q,oe)}if(oe.pointerX=je+Ae[0]._offset,oe.pointerY=it+me[0]._offset,"xval"in oe?lt=m.flat(ne,oe.xval):lt=m.p2c(Ae,je),"yval"in oe?ht=m.flat(ne,oe.yval):ht=m.p2c(me,it),!C(lt[0])||!C(ht[0]))return S.warn("Fx.hover failed",oe,Q),f.unhoverRaw(Q,oe)}var vt=1/0;function Lt(Cr,Wr){for(xt=0;xt<$e.length;xt++)if(St=$e[xt],!(!St||!St[0]||!St[0].trace)&&(nt=St[0].trace,!(nt.visible!==!0||nt._length===0)&&["carpet","contourcarpet"].indexOf(nt._module.name)===-1)){if(nt.type==="splom"?(Ze=0,ze=ne[Ze]):(ze=m.getSubplot(nt),Ze=ne.indexOf(ze)),Je=He,m.isUnifiedHover(Je)&&(Je=Je.charAt(0)),xe={cd:St,trace:nt,xa:Ae[Ze],ya:me[Ze],maxHoverDistance:Ie,maxSpikeDistance:rt,index:!1,distance:Math.min(vt,Ie),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:n.defaultLine,name:nt.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},ce[ze]&&(xe.subplot=ce[ze]._subplot),ce._splomScenes&&ce._splomScenes[nt.uid]&&(xe.scene=ce._splomScenes[nt.uid]),ye=Ke.length,Je==="array"){var Ur=oe[xt];"pointNumber"in Ur?(xe.index=Ur.pointNumber,Je="closest"):(Je="","xval"in Ur&&(We=Ur.xval,Je="x"),"yval"in Ur&&(Fe=Ur.yval,Je=Je?"closest":"y"))}else Cr!==void 0&&Wr!==void 0?(We=Cr,Fe=Wr):(We=lt[Ze],Fe=ht[Ze]);if(Ie!==0)if(nt._module&&nt._module.hoverPoints){var an=nt._module.hoverPoints(xe,We,Fe,Je,{finiteRange:!0,hoverLayer:ce._hoverlayer});if(an)for(var pn,gn=0;gnye&&(Ke.splice(0,ye),vt=Ke[0].distance),we&&rt!==0&&Ke.length===0){xe.distance=rt,xe.index=!1;var _n=nt._module.hoverPoints(xe,We,Fe,"closest",{hoverLayer:ce._hoverlayer});if(_n&&(_n=_n.filter(function(ri){return ri.spikeDistance<=rt})),_n&&_n.length){var kn,ni=_n.filter(function(ri){return ri.xa.showspikes&&ri.xa.spikesnap!=="hovered data"});if(ni.length){var ci=ni[0];C(ci.x0)&&C(ci.y0)&&(kn=Tt(ci),(!Ee.vLinePoint||Ee.vLinePoint.spikeDistance>kn.spikeDistance)&&(Ee.vLinePoint=kn))}var di=_n.filter(function(ri){return ri.ya.showspikes&&ri.ya.spikesnap!=="hovered data"});if(di.length){var li=di[0];C(li.x0)&&C(li.y0)&&(kn=Tt(li),(!Ee.hLinePoint||Ee.hLinePoint.spikeDistance>kn.spikeDistance)&&(Ee.hLinePoint=kn))}}}}}Lt();function ct(Cr,Wr,Ur){for(var an=null,pn=1/0,gn,_n=0;_n0&&Math.abs(Cr.distance)Pt-1;Ye--)vr(Ke[Ye]);Ke=Jt,Xt()}var Ge=Q._hoverdata,Nt=[],Ot=X(Q),Qt=ee(Q);for(dt=0;dt1||Ke.length>1)||He==="closest"&&Me&&Ke.length>1,rn=n.combine(ce.plot_bgcolor||n.background,ce.paper_bgcolor),Cn=D(Ke,{gd:Q,hovermode:He,rotateLabels:cn,bgColor:rn,container:ce._hoverlayer,outerContainer:ce._paper.node(),commonLabelOpts:ce.hoverlabel,hoverdistance:ce.hoverdistance}),En=Cn.hoverLabels;if(m.isUnifiedHover(He)||(I(En,cn,ce,Cn.commonLabelBoundingBox),O(En,cn,ce._invScaleX,ce._invScaleY)),se&&se.tagName){var Tr=l.getComponentMethod("annotations","hasClickToShow")(Q,Nt);t(g.select(se),Tr?"pointer":"")}!se||Z||!j(Q,oe,Ge)||(Ge&&Q.emit("plotly_unhover",{event:oe,points:Ge}),Q.emit("plotly_hover",{event:oe,points:Q._hoverdata,xaxes:Ae,yaxes:me,xvals:lt,yvals:ht}))}function M(Q){return[Q.trace.index,Q.index,Q.x0,Q.y0,Q.name,Q.attr,Q.xa?Q.xa._id:"",Q.ya?Q.ya._id:""].join(",")}var z=/([\s\S]*)<\/extra>/;function D(Q,oe){var $=oe.gd,Z=$._fullLayout,se=oe.hovermode,ne=oe.rotateLabels,ce=oe.bgColor,ge=oe.container,Te=oe.outerContainer,we=oe.commonLabelOpts||{};if(Q.length===0)return[[]];var Re=oe.fontFamily||h.HOVERFONT,be=oe.fontSize||h.HOVERFONTSIZE,Ae=Q[0],me=Ae.xa,Le=Ae.ya,Ve=se.charAt(0),Ue=Ve+"Label",ke=Ae[Ue];if(ke===void 0&&me.type==="multicategory")for(var He=0;HeZ.width-Qt&&(tr=Z.width-Qt),kt.attr("d","M"+(Ge-tr)+",0L"+(Ge-tr+y)+","+Ot+y+"H"+Qt+"v"+Ot+(E*2+Ye.height)+"H"+-Qt+"V"+Ot+y+"H"+(Ge-tr-y)+"Z"),Ge=tr,ze.minX=Ge-Qt,ze.maxX=Ge+Qt,me.side==="top"?(ze.minY=Nt-(E*2+Ye.height),ze.maxY=Nt-E):(ze.minY=Nt+E,ze.maxY=Nt+(E*2+Ye.height))}else{var fr,rr,Vt;Le.side==="right"?(fr="start",rr=1,Vt="",Ge=me._offset+me._length):(fr="end",rr=-1,Vt="-",Ge=me._offset),Nt=Le._offset+(Ae.y0+Ae.y1)/2,Ht.attr("text-anchor",fr),kt.attr("d","M0,0L"+Vt+y+","+y+"V"+(E+Ye.height/2)+"h"+Vt+(E*2+Ye.width)+"V-"+(E+Ye.height/2)+"H"+Vt+y+"V-"+y+"Z"),ze.minY=Nt-(E+Ye.height/2),ze.maxY=Nt+(E+Ye.height/2),Le.side==="right"?(ze.minX=Ge+y,ze.maxX=Ge+y+(E*2+Ye.width)):(ze.minX=Ge-y-(E*2+Ye.width),ze.maxX=Ge-y);var dr=Ye.height/2,mr=rt-Ye.top-dr,xr="clip"+Z._uid+"commonlabel"+Le._id,pr;if(Ge=0?At=or:$t+Lt=0?At=$t:gt+Lt=0?Ct=Xt:Kt+ct<$e&&Kt>=0?Ct=Kt:st+ct<$e?Ct=st:Xt-ir=0,(Pt.idealAlign==="top"||!cn)&&rn?(dr-=xr/2,Pt.anchor="end"):cn?(dr+=xr/2,Pt.anchor="start"):Pt.anchor="middle",Pt.crossPos=dr;else{if(Pt.pos=dr,cn=Vt+mr/2+Dr<=Ke,rn=Vt-mr/2-Dr>=0,(Pt.idealAlign==="left"||!cn)&&rn)Vt-=mr/2,Pt.anchor="end";else if(cn)Vt+=mr/2,Pt.anchor="start";else{Pt.anchor="middle";var Cn=Dr/2,En=Vt+Cn-Ke,Tr=Vt-Cn;En>0&&(Vt-=En),Tr<0&&(Vt+=-Tr)}Pt.crossPos=Vt}Ot.attr("text-anchor",Pt.anchor),tr&&Qt.attr("text-anchor",Pt.anchor),kt.attr("transform",x(Vt,dr)+(ne?v(o):""))}),{hoverLabels:It,commonLabelBoundingBox:ze}}function N(Q,oe,$,Z,se,ne){var ce="",ge="";Q.nameOverride!==void 0&&(Q.name=Q.nameOverride),Q.name&&(Q.trace._meta&&(Q.name=S.templateString(Q.name,Q.trace._meta)),ce=ie(Q.name,Q.nameLength));var Te=$.charAt(0),we=Te==="x"?"y":"x";Q.zLabel!==void 0?(Q.xLabel!==void 0&&(ge+="x: "+Q.xLabel+"
    "),Q.yLabel!==void 0&&(ge+="y: "+Q.yLabel+"
    "),Q.trace.type!=="choropleth"&&Q.trace.type!=="choroplethmapbox"&&(ge+=(ge?"z: ":"")+Q.zLabel)):oe&&Q[Te+"Label"]===se?ge=Q[we+"Label"]||"":Q.xLabel===void 0?Q.yLabel!==void 0&&Q.trace.type!=="scattercarpet"&&(ge=Q.yLabel):Q.yLabel===void 0?ge=Q.xLabel:ge="("+Q.xLabel+", "+Q.yLabel+")",(Q.text||Q.text===0)&&!Array.isArray(Q.text)&&(ge+=(ge?"
    ":"")+Q.text),Q.extraText!==void 0&&(ge+=(ge?"
    ":"")+Q.extraText),ne&&ge===""&&!Q.hovertemplate&&(ce===""&&ne.remove(),ge=ce);var Re=Q.hovertemplate||!1;if(Re){var be=Q.hovertemplateLabels||Q;Q[Te+"Label"]!==se&&(be[Te+"other"]=be[Te+"Val"],be[Te+"otherLabel"]=be[Te+"Label"]),ge=S.hovertemplateString(Re,be,Z._d3locale,Q.eventData[0]||{},Q.trace._meta),ge=ge.replace(z,function(Ae,me){return ce=ie(me,Q.nameLength),""})}return[ge,ce]}function I(Q,oe,$,Z){var se=oe?"xa":"ya",ne=oe?"ya":"xa",ce=0,ge=1,Te=Q.size(),we=new Array(Te),Re=0,be=Z.minX,Ae=Z.maxX,me=Z.minY,Le=Z.maxY,Ve=function(We){return We*$._invScaleX},Ue=function(We){return We*$._invScaleY};Q.each(function(We){var Fe=We[se],xe=We[ne],ye=Fe._id.charAt(0)==="x",Ee=Fe.range;Re===0&&Ee&&Ee[0]>Ee[1]!==ye&&(ge=-1);var Me=0,Ne=ye?$.width:$.height;if($.hovermode==="x"||$.hovermode==="y"){var je=k(We,oe),it=We.anchor,mt=it==="end"?-1:1,bt,vt;if(it==="middle")bt=We.crossPos+(ye?Ue(je.y-We.by/2):Ve(We.bx/2+We.tx2width/2)),vt=bt+(ye?Ue(We.by):Ve(We.bx));else if(ye)bt=We.crossPos+Ue(y+je.y)-Ue(We.by/2-y),vt=bt+Ue(We.by);else{var Lt=Ve(mt*y+je.x),ct=Lt+Ve(mt*We.bx);bt=We.crossPos+Math.min(Lt,ct),vt=We.crossPos+Math.max(Lt,ct)}ye?me!==void 0&&Le!==void 0&&Math.min(vt,Le)-Math.max(bt,me)>1&&(xe.side==="left"?(Me=xe._mainLinePosition,Ne=$.width):Ne=xe._mainLinePosition):be!==void 0&&Ae!==void 0&&Math.min(vt,Ae)-Math.max(bt,be)>1&&(xe.side==="top"?(Me=xe._mainLinePosition,Ne=$.height):Ne=xe._mainLinePosition)}we[Re++]=[{datum:We,traceIndex:We.trace.index,dp:0,pos:We.pos,posref:We.posref,size:We.by*(ye?w:1)/2,pmin:Me,pmax:Ne}]}),we.sort(function(We,Fe){return We[0].posref-Fe[0].posref||ge*(Fe[0].traceIndex-We[0].traceIndex)});var ke,He,Ie,rt,Ke,$e,lt;function ht(We){var Fe=We[0],xe=We[We.length-1];if(He=Fe.pmin-Fe.pos-Fe.dp+Fe.size,Ie=xe.pos+xe.dp+xe.size-Fe.pmax,He>.01){for(Ke=We.length-1;Ke>=0;Ke--)We[Ke].dp+=He;ke=!1}if(!(Ie<.01)){if(He<-.01){for(Ke=We.length-1;Ke>=0;Ke--)We[Ke].dp-=Ie;ke=!1}if(ke){var ye=0;for(rt=0;rtFe.pmax&&ye++;for(rt=We.length-1;rt>=0&&!(ye<=0);rt--)$e=We[rt],$e.pos>Fe.pmax-1&&($e.del=!0,ye--);for(rt=0;rt=0;Ke--)We[Ke].dp-=Ie;for(rt=We.length-1;rt>=0&&!(ye<=0);rt--)$e=We[rt],$e.pos+$e.dp+$e.size>Fe.pmax&&($e.del=!0,ye--)}}}for(;!ke&&ce<=Te;){for(ce++,ke=!0,rt=0;rt.01&&St.pmin===nt.pmin&&St.pmax===nt.pmax){for(Ke=xt.length-1;Ke>=0;Ke--)xt[Ke].dp+=He;for(dt.push.apply(dt,xt),we.splice(rt+1,1),lt=0,Ke=dt.length-1;Ke>=0;Ke--)lt+=dt[Ke].dp;for(Ie=lt/dt.length,Ke=dt.length-1;Ke>=0;Ke--)dt[Ke].dp-=Ie;ke=!1}else rt++}we.forEach(ht)}for(rt=we.length-1;rt>=0;rt--){var ze=we[rt];for(Ke=ze.length-1;Ke>=0;Ke--){var Ze=ze[Ke],Je=Ze.datum;Je.offset=Ze.dp,Je.del=Ze.del}}}function k(Q,oe){var $=0,Z=Q.offset;return oe&&(Z*=-_,$=Q.offset*A),{x:$,y:Z}}function B(Q){var oe={start:1,end:-1,middle:0}[Q.anchor],$=oe*(y+E),Z=$+oe*(Q.txwidth+E),se=Q.anchor==="middle";return se&&($-=Q.tx2width/2,Z+=Q.txwidth/2+E),{alignShift:oe,textShiftX:$,text2ShiftX:Z}}function O(Q,oe,$,Z){var se=function(ce){return ce*$},ne=function(ce){return ce*Z};Q.each(function(ce){var ge=g.select(this);if(ce.del)return ge.remove();var Te=ge.select("text.nums"),we=ce.anchor,Re=we==="end"?-1:1,be=B(ce),Ae=k(ce,oe),me=Ae.x,Le=Ae.y,Ve=we==="middle";ge.select("path").attr("d",Ve?"M-"+se(ce.bx/2+ce.tx2width/2)+","+ne(Le-ce.by/2)+"h"+se(ce.bx)+"v"+ne(ce.by)+"h-"+se(ce.bx)+"Z":"M0,0L"+se(Re*y+me)+","+ne(y+Le)+"v"+ne(ce.by/2-y)+"h"+se(Re*ce.bx)+"v-"+ne(ce.by)+"H"+se(Re*y+me)+"V"+ne(Le-y)+"Z");var Ue=me+be.textShiftX,ke=Le+ce.ty0-ce.by/2+E,He=ce.textAlign||"auto";He!=="auto"&&(He==="left"&&we!=="start"?(Te.attr("text-anchor","start"),Ue=Ve?-ce.bx/2-ce.tx2width/2+E:-ce.bx-E):He==="right"&&we!=="end"&&(Te.attr("text-anchor","end"),Ue=Ve?ce.bx/2-ce.tx2width/2-E:ce.bx+E)),Te.call(r.positionText,se(Ue),ne(ke)),ce.tx2width&&(ge.select("text.name").call(r.positionText,se(be.text2ShiftX+be.alignShift*E+me),ne(Le+ce.ty0-ce.by/2+E)),ge.select("rect").call(a.setRect,se(be.text2ShiftX+(be.alignShift-1)*ce.tx2width/2+me),ne(Le-ce.by/2-1),se(ce.tx2width),ne(ce.by+2)))})}function V(Q,oe){var $=Q.index,Z=Q.trace||{},se=Q.cd[0],ne=Q.cd[$]||{};function ce(Ae){return Ae||C(Ae)&&Ae===0}var ge=Array.isArray($)?function(Ae,me){var Le=S.castOption(se,$,Ae);return ce(Le)?Le:S.extractOption({},Z,"",me)}:function(Ae,me){return S.extractOption(ne,Z,Ae,me)};function Te(Ae,me,Le){var Ve=ge(me,Le);ce(Ve)&&(Q[Ae]=Ve)}if(Te("hoverinfo","hi","hoverinfo"),Te("bgcolor","hbg","hoverlabel.bgcolor"),Te("borderColor","hbc","hoverlabel.bordercolor"),Te("fontFamily","htf","hoverlabel.font.family"),Te("fontSize","hts","hoverlabel.font.size"),Te("fontColor","htc","hoverlabel.font.color"),Te("nameLength","hnl","hoverlabel.namelength"),Te("textAlign","hta","hoverlabel.align"),Q.posref=oe==="y"||oe==="closest"&&Z.orientation==="h"?Q.xa._offset+(Q.x0+Q.x1)/2:Q.ya._offset+(Q.y0+Q.y1)/2,Q.x0=S.constrain(Q.x0,0,Q.xa._length),Q.x1=S.constrain(Q.x1,0,Q.xa._length),Q.y0=S.constrain(Q.y0,0,Q.ya._length),Q.y1=S.constrain(Q.y1,0,Q.ya._length),Q.xLabelVal!==void 0&&(Q.xLabel="xLabel"in Q?Q.xLabel:c.hoverLabelText(Q.xa,Q.xLabelVal,Z.xhoverformat),Q.xVal=Q.xa.c2d(Q.xLabelVal)),Q.yLabelVal!==void 0&&(Q.yLabel="yLabel"in Q?Q.yLabel:c.hoverLabelText(Q.ya,Q.yLabelVal,Z.yhoverformat),Q.yVal=Q.ya.c2d(Q.yLabelVal)),Q.zLabelVal!==void 0&&Q.zLabel===void 0&&(Q.zLabel=String(Q.zLabelVal)),!isNaN(Q.xerr)&&!(Q.xa.type==="log"&&Q.xerr<=0)){var we=c.tickText(Q.xa,Q.xa.c2l(Q.xerr),"hover").text;Q.xerrneg!==void 0?Q.xLabel+=" +"+we+" / -"+c.tickText(Q.xa,Q.xa.c2l(Q.xerrneg),"hover").text:Q.xLabel+=" ± "+we,oe==="x"&&(Q.distance+=1)}if(!isNaN(Q.yerr)&&!(Q.ya.type==="log"&&Q.yerr<=0)){var Re=c.tickText(Q.ya,Q.ya.c2l(Q.yerr),"hover").text;Q.yerrneg!==void 0?Q.yLabel+=" +"+Re+" / -"+c.tickText(Q.ya,Q.ya.c2l(Q.yerrneg),"hover").text:Q.yLabel+=" ± "+Re,oe==="y"&&(Q.distance+=1)}var be=Q.hoverinfo||Q.trace.hoverinfo;return be&&be!=="all"&&(be=Array.isArray(be)?be:be.split("+"),be.indexOf("x")===-1&&(Q.xLabel=void 0),be.indexOf("y")===-1&&(Q.yLabel=void 0),be.indexOf("z")===-1&&(Q.zLabel=void 0),be.indexOf("text")===-1&&(Q.text=void 0),be.indexOf("name")===-1&&(Q.name=void 0)),Q}function Y(Q,oe,$){var Z=$.container,se=$.fullLayout,ne=se._size,ce=$.event,ge=!!oe.hLinePoint,Te=!!oe.vLinePoint,we,Re;if(Z.selectAll(".spikeline").remove(),!!(Te||ge)){var be=n.combine(se.plot_bgcolor,se.paper_bgcolor);if(ge){var Ae=oe.hLinePoint,me,Le;we=Ae&&Ae.xa,Re=Ae&&Ae.ya;var Ve=Re.spikesnap;Ve==="cursor"?(me=ce.pointerX,Le=ce.pointerY):(me=we._offset+Ae.x,Le=Re._offset+Ae.y);var Ue=i.readability(Ae.color,be)<1.5?n.contrast(be):Ae.color,ke=Re.spikemode,He=Re.spikethickness,Ie=Re.spikecolor||Ue,rt=c.getPxPosition(Q,Re),Ke,$e;if(ke.indexOf("toaxis")!==-1||ke.indexOf("across")!==-1){if(ke.indexOf("toaxis")!==-1&&(Ke=rt,$e=me),ke.indexOf("across")!==-1){var lt=Re._counterDomainMin,ht=Re._counterDomainMax;Re.anchor==="free"&&(lt=Math.min(lt,Re.position),ht=Math.max(ht,Re.position)),Ke=ne.l+lt*ne.w,$e=ne.l+ht*ne.w}Z.insert("line",":first-child").attr({x1:Ke,x2:$e,y1:Le,y2:Le,"stroke-width":He,stroke:Ie,"stroke-dasharray":a.dashStyle(Re.spikedash,He)}).classed("spikeline",!0).classed("crisp",!0),Z.insert("line",":first-child").attr({x1:Ke,x2:$e,y1:Le,y2:Le,"stroke-width":He+2,stroke:be}).classed("spikeline",!0).classed("crisp",!0)}ke.indexOf("marker")!==-1&&Z.insert("circle",":first-child").attr({cx:rt+(Re.side!=="right"?He:-He),cy:Le,r:He,fill:Ie}).classed("spikeline",!0)}if(Te){var dt=oe.vLinePoint,xt,St;we=dt&&dt.xa,Re=dt&&dt.ya;var nt=we.spikesnap;nt==="cursor"?(xt=ce.pointerX,St=ce.pointerY):(xt=we._offset+dt.x,St=Re._offset+dt.y);var ze=i.readability(dt.color,be)<1.5?n.contrast(be):dt.color,Ze=we.spikemode,Je=we.spikethickness,We=we.spikecolor||ze,Fe=c.getPxPosition(Q,we),xe,ye;if(Ze.indexOf("toaxis")!==-1||Ze.indexOf("across")!==-1){if(Ze.indexOf("toaxis")!==-1&&(xe=Fe,ye=St),Ze.indexOf("across")!==-1){var Ee=we._counterDomainMin,Me=we._counterDomainMax;we.anchor==="free"&&(Ee=Math.min(Ee,we.position),Me=Math.max(Me,we.position)),xe=ne.t+(1-Me)*ne.h,ye=ne.t+(1-Ee)*ne.h}Z.insert("line",":first-child").attr({x1:xt,x2:xt,y1:xe,y2:ye,"stroke-width":Je,stroke:We,"stroke-dasharray":a.dashStyle(we.spikedash,Je)}).classed("spikeline",!0).classed("crisp",!0),Z.insert("line",":first-child").attr({x1:xt,x2:xt,y1:xe,y2:ye,"stroke-width":Je+2,stroke:be}).classed("spikeline",!0).classed("crisp",!0)}Ze.indexOf("marker")!==-1&&Z.insert("circle",":first-child").attr({cx:xt,cy:Fe-(we.side!=="top"?Je:-Je),r:Je,fill:We}).classed("spikeline",!0)}}}function j(Q,oe,$){if(!$||$.length!==Q._hoverdata.length)return!0;for(var Z=$.length-1;Z>=0;Z--){var se=$[Z],ne=Q._hoverdata[Z];if(se.curveNumber!==ne.curveNumber||String(se.pointNumber)!==String(ne.pointNumber)||String(se.pointNumbers)!==String(ne.pointNumbers))return!0}return!1}function te(Q,oe){return!oe||oe.vLinePoint!==Q._spikepoints.vLinePoint||oe.hLinePoint!==Q._spikepoints.hLinePoint}function ie(Q,oe){return r.plainText(Q||"",{len:oe,allowedTags:["br","sub","sup","b","i","em"]})}function ue(Q,oe){for(var $=oe.charAt(0),Z=[],se=[],ne=[],ce=0;ce1)){delete c.grid;return}if(!b&&!u&&!o){var s=y("pattern")==="independent";s&&(b=!0)}_._hasSubplotGrid=b;var L=y("roworder"),M=L==="top to bottom",z=b?.2:.1,D=b?.3:.1,N,I;d&&c._splomGridDflt&&(N=c._splomGridDflt.xside,I=c._splomGridDflt.yside),_._domains={x:t("x",y,z,N,T),y:t("y",y,D,I,E,M)}}function t(f,c,l,m,h,b){var u=c(f+"gap",l),o=c("domain."+f);c(f+"side",m);for(var d=new Array(h),w=o[0],A=(o[1]-w)/(h-u),_=A*(1-u),y=0;y(t==="legend"?1:0));if(M===!1&&(n[t]=void 0),!(M===!1&&!c.uirevision)&&(m("uirevision",n.uirevision),M!==!1)){m("borderwidth");var z=m("orientation"),D=m("yref"),N=m("xref"),I=z==="h",k=D==="paper",B=N==="paper",O,V,Y,j="left";I?(O=0,g.getComponentMethod("rangeslider","isVisible")(a.xaxis)?k?(V=1.1,Y="bottom"):(V=1,Y="top"):k?(V=-.1,Y="top"):(V=0,Y="bottom")):(V=1,Y="auto",B?O=1.02:(O=1,j="right")),C.coerce(c,l,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:O}},"x"),C.coerce(c,l,{y:{valType:"number",editType:"legend",min:k?-2:0,max:k?3:1,dflt:V}},"y"),m("traceorder",y),p.isGrouped(n[t])&&m("tracegroupgap"),m("entrywidth"),m("entrywidthmode"),m("indentation"),m("itemsizing"),m("itemwidth"),m("itemclick"),m("itemdoubleclick"),m("groupclick"),m("xanchor",j),m("yanchor",Y),m("valign"),C.noneOrAll(c,l,["x","y"]);var te=m("title.text");if(te){m("title.side",I?"left":"top");var ie=C.extendFlat({},h,{size:C.bigFont(h.size)});C.coerceFont(m,"title.font",ie)}}}}H.exports=function(a,n,f){var c,l=f.slice(),m=n.shapes;if(m)for(c=0;c1)}var Z=j.hiddenlabels||[];if(!J&&(!j.showlegend||!X.length))return ue.selectAll("."+te).remove(),j._topdefs.select("#"+ie).remove(),i.autoMargin(O,te);var se=C.ensureSingle(ue,"g",te,function(me){J||me.attr("pointer-events","all")}),ne=C.ensureSingleById(j._topdefs,"clipPath",ie,function(me){me.append("rect")}),ce=C.ensureSingle(se,"rect","bg",function(me){me.attr("shape-rendering","crispEdges")});ce.call(r.stroke,Y.bordercolor).call(r.fill,Y.bgcolor).style("stroke-width",Y.borderwidth+"px");var ge=C.ensureSingle(se,"g","scrollbox"),Te=Y.title;Y._titleWidth=0,Y._titleHeight=0;var we;Te.text?(we=C.ensureSingle(ge,"text",te+"titletext"),we.attr("text-anchor","start").call(p.font,Te.font).text(Te.text),L(we,ge,O,Y,o)):ge.selectAll("."+te+"titletext").remove();var Re=C.ensureSingle(se,"rect","scrollbar",function(me){me.attr(n.scrollBarEnterAttrs).call(r.fill,n.scrollBarColor)}),be=ge.selectAll("g.groups").data(X);be.enter().append("g").attr("class","groups"),be.exit().remove();var Ae=be.selectAll("g.traces").data(C.identity);Ae.enter().append("g").attr("class","traces"),Ae.exit().remove(),Ae.style("opacity",function(me){var Le=me[0].trace;return S.traceIs(Le,"pie-like")?Z.indexOf(me[0].label)!==-1?.5:1:Le.visible==="legendonly"?.5:1}).each(function(){g.select(this).call(E,O,Y)}).call(b,O,Y).each(function(){J||g.select(this).call(s,O,te)}),C.syncOrAsync([i.previousPromises,function(){return D(O,be,Ae,Y)},function(){var me=j._size,Le=Y.borderwidth,Ve=Y.xref==="paper",Ue=Y.yref==="paper";if(Te.text&&w(we,Y,Le),!J){var ke,He;Ve?ke=me.l+me.w*Y.x-l[I(Y)]*Y._width:ke=j.width*Y.x-l[I(Y)]*Y._width,Ue?He=me.t+me.h*(1-Y.y)-l[k(Y)]*Y._effHeight:He=j.height*(1-Y.y)-l[k(Y)]*Y._effHeight;var Ie=N(O,te,ke,He);if(Ie)return;if(j.margin.autoexpand){var rt=ke,Ke=He;ke=Ve?C.constrain(ke,0,j.width-Y._width):rt,He=Ue?C.constrain(He,0,j.height-Y._effHeight):Ke,ke!==rt&&C.log("Constrain "+te+".x to make legend fit inside graph"),He!==Ke&&C.log("Constrain "+te+".y to make legend fit inside graph")}p.setTranslate(se,ke,He)}if(Re.on(".drag",null),se.on("wheel",null),J||Y._height<=Y._maxHeight||O._context.staticPlot){var $e=Y._effHeight;J&&($e=Y._height),ce.attr({width:Y._width-Le,height:$e-Le,x:Le/2,y:Le/2}),p.setTranslate(ge,0,0),ne.select("rect").attr({width:Y._width-2*Le,height:$e-2*Le,x:Le,y:Le}),p.setClipUrl(ge,ie,O),p.setRect(Re,0,0,0,0),delete Y._scrollY}else{var lt=Math.max(n.scrollBarMinHeight,Y._effHeight*Y._effHeight/Y._height),ht=Y._effHeight-lt-2*n.scrollBarMargin,dt=Y._height-Y._effHeight,xt=ht/dt,St=Math.min(Y._scrollY||0,dt);ce.attr({width:Y._width-2*Le+n.scrollBarWidth+n.scrollBarMargin,height:Y._effHeight-Le,x:Le/2,y:Le/2}),ne.select("rect").attr({width:Y._width-2*Le+n.scrollBarWidth+n.scrollBarMargin,height:Y._effHeight-2*Le,x:Le,y:Le+St}),p.setClipUrl(ge,ie,O),ye(St,lt,xt),se.on("wheel",function(){St=C.constrain(Y._scrollY+g.event.deltaY/ht*dt,0,dt),ye(St,lt,xt),St!==0&&St!==dt&&g.event.preventDefault()});var nt,ze,Ze,Je=function(it,mt,bt){var vt=(bt-mt)/xt+it;return C.constrain(vt,0,dt)},We=function(it,mt,bt){var vt=(mt-bt)/xt+it;return C.constrain(vt,0,dt)},Fe=g.behavior.drag().on("dragstart",function(){var it=g.event.sourceEvent;it.type==="touchstart"?nt=it.changedTouches[0].clientY:nt=it.clientY,Ze=St}).on("drag",function(){var it=g.event.sourceEvent;it.buttons===2||it.ctrlKey||(it.type==="touchmove"?ze=it.changedTouches[0].clientY:ze=it.clientY,St=Je(Ze,nt,ze),ye(St,lt,xt))});Re.call(Fe);var xe=g.behavior.drag().on("dragstart",function(){var it=g.event.sourceEvent;it.type==="touchstart"&&(nt=it.changedTouches[0].clientY,Ze=St)}).on("drag",function(){var it=g.event.sourceEvent;it.type==="touchmove"&&(ze=it.changedTouches[0].clientY,St=We(Ze,nt,ze),ye(St,lt,xt))});ge.call(xe)}function ye(it,mt,bt){Y._scrollY=O._fullLayout[te]._scrollY=it,p.setTranslate(ge,0,-it),p.setRect(Re,Y._width,n.scrollBarMargin+it*bt,n.scrollBarWidth,mt),ne.select("rect").attr("y",Le+it)}if(O._context.edits.legendPosition){var Ee,Me,Ne,je;se.classed("cursor-move",!0),v.init({element:se.node(),gd:O,prepFn:function(){var it=p.getTranslate(se);Ne=it.x,je=it.y},moveFn:function(it,mt){var bt=Ne+it,vt=je+mt;p.setTranslate(se,bt,vt),Ee=v.align(bt,Y._width,me.l,me.l+me.w,Y.xanchor),Me=v.align(vt+Y._height,-Y._height,me.t+me.h,me.t,Y.yanchor)},doneFn:function(){if(Ee!==void 0&&Me!==void 0){var it={};it[te+".x"]=Ee,it[te+".y"]=Me,S.call("_guiRelayout",O,it)}},clickFn:function(it,mt){var bt=ue.selectAll("g.traces").filter(function(){var vt=this.getBoundingClientRect();return mt.clientX>=vt.left&&mt.clientX<=vt.right&&mt.clientY>=vt.top&&mt.clientY<=vt.bottom});bt.size()>0&&y(O,se,bt,it,mt)}})}}],O)}}function _(O,V,Y){var j=O[0],te=j.width,ie=V.entrywidthmode,ue=j.trace.legendwidth||V.entrywidth;return ie==="fraction"?V._maxWidth*ue:Y+(ue||te)}function y(O,V,Y,j,te){var ie=Y.data()[0][0].trace,ue={event:te,node:Y.node(),curveNumber:ie.index,expandedIndex:ie._expandedIndex,data:O.data,layout:O.layout,frames:O._transitionData._frames,config:O._context,fullData:O._fullData,fullLayout:O._fullLayout};ie._group&&(ue.group=ie._group),S.traceIs(ie,"pie-like")&&(ue.label=Y.datum()[0].label);var J=x.triggerHandler(O,"plotly_legendclick",ue);if(j===1){if(J===!1)return;V._clickTimeout=setTimeout(function(){O._fullLayout&&a(Y,O,j)},O._context.doubleClickDelay)}else if(j===2){V._clickTimeout&&clearTimeout(V._clickTimeout),O._legendMouseDownTime=0;var X=x.triggerHandler(O,"plotly_legenddoubleclick",ue);X!==!1&&J!==!1&&a(Y,O,j)}}function E(O,V,Y){var j=B(Y),te=O.data()[0][0],ie=te.trace,ue=S.traceIs(ie,"pie-like"),J=!Y._inHover&&V._context.edits.legendText&&!ue,X=Y._maxNameLength,ee,G;te.groupTitle?(ee=te.groupTitle.text,G=te.groupTitle.font):(G=Y.font,Y.entries?ee=te.text:(ee=ue?te.label:ie.name,ie._meta&&(ee=C.templateString(ee,ie._meta))));var Q=C.ensureSingle(O,"text",j+"text");Q.attr("text-anchor","start").call(p.font,G).text(J?T(ee,X):ee);var oe=Y.indentation+Y.itemwidth+n.itemGap*2;t.positionText(Q,oe,0),J?Q.call(t.makeEditable,{gd:V,text:ee}).call(L,O,V,Y).on("edit",function($){this.text(T($,X)).call(L,O,V,Y);var Z=te.trace._fullInput||{},se={};if(S.hasTransform(Z,"groupby")){var ne=S.getTransformIndices(Z,"groupby"),ce=ne[ne.length-1],ge=C.keyedContainer(Z,"transforms["+ce+"].styles","target","value.name");ge.set(te.trace._group,$),se=ge.constructUpdate()}else se.name=$;return Z._isShape?S.call("_guiRelayout",V,"shapes["+ie.index+"].name",se.name):S.call("_guiRestyle",V,se,ie.index)}):L(Q,O,V,Y)}function T(O,V){var Y=Math.max(4,V);if(O&&O.trim().length>=Y/2)return O;O=O||"";for(var j=Y-O.length;j>0;j--)O+=" ";return O}function s(O,V,Y){var j=V._context.doubleClickDelay,te,ie=1,ue=C.ensureSingle(O,"rect",Y+"toggle",function(J){V._context.staticPlot||J.style("cursor","pointer").attr("pointer-events","all"),J.call(r.fill,"rgba(0,0,0,0)")});V._context.staticPlot||(ue.on("mousedown",function(){te=new Date().getTime(),te-V._legendMouseDownTimej&&(ie=Math.max(ie-1,1)),y(V,J,O,ie,g.event)}}))}function L(O,V,Y,j,te){j._inHover&&O.attr("data-notex",!0),t.convertToTspans(O,Y,function(){M(V,Y,j,te)})}function M(O,V,Y,j){var te=O.data()[0][0];if(!Y._inHover&&te&&!te.trace.showlegend){O.remove();return}var ie=O.select("g[class*=math-group]"),ue=ie.node(),J=B(Y);Y||(Y=V._fullLayout[J]);var X=Y.borderwidth,ee;j===o?ee=Y.title.font:te.groupTitle?ee=te.groupTitle.font:ee=Y.font;var G=ee.size*c,Q,oe;if(ue){var $=p.bBox(ue);Q=$.height,oe=$.width,j===o?p.setTranslate(ie,X,X+Q*.75):p.setTranslate(ie,0,Q*.25)}else{var Z="."+J+(j===o?"title":"")+"text",se=O.select(Z),ne=t.lineCount(se),ce=se.node();if(Q=G*ne,oe=ce?p.bBox(ce).width:0,j===o)Y.title.side==="left"&&(oe+=n.itemGap*2),t.positionText(se,X+n.titlePad,X+G);else{var ge=n.itemGap*2+Y.indentation+Y.itemwidth;te.groupTitle&&(ge=n.itemGap,oe-=Y.indentation+Y.itemwidth),t.positionText(se,ge,-G*((ne-1)/2-.3))}}j===o?(Y._titleWidth=oe,Y._titleHeight=Q):(te.lineHeight=G,te.height=Math.max(Q,16)+3,te.width=oe)}function z(O){var V=0,Y=0,j=O.title.side;return j&&(j.indexOf("left")!==-1&&(V=O._titleWidth),j.indexOf("top")!==-1&&(Y=O._titleHeight)),[V,Y]}function D(O,V,Y,j){var te=O._fullLayout,ie=B(j);j||(j=te[ie]);var ue=te._size,J=u.isVertical(j),X=u.isGrouped(j),ee=j.entrywidthmode==="fraction",G=j.borderwidth,Q=2*G,oe=n.itemGap,$=j.indentation+j.itemwidth+oe*2,Z=2*(G+oe),se=k(j),ne=j.y<0||j.y===0&&se==="top",ce=j.y>1||j.y===1&&se==="bottom",ge=j.tracegroupgap,Te={};j._maxHeight=Math.max(ne||ce?te.height/2:ue.h,30);var we=0;j._width=0,j._height=0;var Re=z(j);if(J)Y.each(function(Ze){var Je=Ze[0].height;p.setTranslate(this,G+Re[0],G+Re[1]+j._height+Je/2+oe),j._height+=Je,j._width=Math.max(j._width,Ze[0].width)}),we=$+j._width,j._width+=oe+$+Q,j._height+=Z,X&&(V.each(function(Ze,Je){p.setTranslate(this,0,Je*j.tracegroupgap)}),j._height+=(j._lgroupsLength-1)*j.tracegroupgap);else{var be=I(j),Ae=j.x<0||j.x===0&&be==="right",me=j.x>1||j.x===1&&be==="left",Le=ce||ne,Ve=te.width/2;j._maxWidth=Math.max(Ae?Le&&be==="left"?ue.l+ue.w:Ve:me?Le&&be==="right"?ue.r+ue.w:Ve:ue.w,2*$);var Ue=0,ke=0;Y.each(function(Ze){var Je=_(Ze,j,$);Ue=Math.max(Ue,Je),ke+=Je}),we=null;var He=0;if(X){var Ie=0,rt=0,Ke=0;V.each(function(){var Ze=0,Je=0;g.select(this).selectAll("g.traces").each(function(Fe){var xe=_(Fe,j,$),ye=Fe[0].height;p.setTranslate(this,Re[0],Re[1]+G+oe+ye/2+Je),Je+=ye,Ze=Math.max(Ze,xe),Te[Fe[0].trace.legendgroup]=Ze});var We=Ze+oe;rt>0&&We+G+rt>j._maxWidth?(He=Math.max(He,rt),rt=0,Ke+=Ie+ge,Ie=Je):Ie=Math.max(Ie,Je),p.setTranslate(this,rt,Ke),rt+=We}),j._width=Math.max(He,rt)+G,j._height=Ke+Ie+Z}else{var $e=Y.size(),lt=ke+Q+($e-1)*oe=j._maxWidth&&(He=Math.max(He,St),dt=0,xt+=ht,j._height+=ht,ht=0),p.setTranslate(this,Re[0]+G+dt,Re[1]+G+xt+Je/2+oe),St=dt+We+oe,dt+=Fe,ht=Math.max(ht,Je)}),lt?(j._width=dt+Q,j._height=ht+Z):(j._width=Math.max(He,St)+Q,j._height+=ht+Z)}}j._width=Math.ceil(Math.max(j._width+Re[0],j._titleWidth+2*(G+n.titlePad))),j._height=Math.ceil(Math.max(j._height+Re[1],j._titleHeight+2*(G+n.itemGap))),j._effHeight=Math.min(j._height,j._maxHeight);var nt=O._context.edits,ze=nt.legendText||nt.legendPosition;Y.each(function(Ze){var Je=g.select(this).select("."+ie+"toggle"),We=Ze[0].height,Fe=Ze[0].trace.legendgroup,xe=_(Ze,j,$);X&&Fe!==""&&(xe=Te[Fe]);var ye=ze?$:we||xe;!J&&!ee&&(ye+=oe/2),p.setRect(Je,0,-We/2,ye,We)})}function N(O,V,Y,j){var te=O._fullLayout,ie=te[V],ue=I(ie),J=k(ie),X=ie.xref==="paper",ee=ie.yref==="paper";O._fullLayout._reservedMargin[V]={};var G=ie.y<.5?"b":"t",Q=ie.x<.5?"l":"r",oe={r:te.width-Y,l:Y+ie._width,b:te.height-j,t:j+ie._effHeight};if(X&&ee)return i.autoMargin(O,V,{x:ie.x,y:ie.y,l:ie._width*l[ue],r:ie._width*m[ue],b:ie._effHeight*m[J],t:ie._effHeight*l[J]});X?O._fullLayout._reservedMargin[V][G]=oe[G]:ee||ie.orientation==="v"?O._fullLayout._reservedMargin[V][Q]=oe[Q]:O._fullLayout._reservedMargin[V][G]=oe[G]}function I(O){return C.isRightAnchor(O)?"right":C.isCenterAnchor(O)?"center":"left"}function k(O){return C.isBottomAnchor(O)?"bottom":C.isMiddleAnchor(O)?"middle":"top"}function B(O){return O._id||"legend"}},35456:function(H,U,e){var g=e(24040),C=e(42451);H.exports=function(S,x,v){var p=x._inHover,r=C.isGrouped(x),t=C.isReversed(x),a={},n=[],f=!1,c={},l=0,m=0,h,b;function u(O,V,Y){if(x.visible!==!1&&!(v&&O!==x._id))if(V===""||!C.isGrouped(x)){var j="~~i"+l;n.push(j),a[j]=[Y],l++}else n.indexOf(V)===-1?(n.push(V),f=!0,a[V]=[Y]):a[V].push(Y)}for(h=0;hM&&(L=M)}T[h][0]._groupMinRank=L,T[h][0]._preGroupSort=h}var z=function(O,V){return O[0]._groupMinRank-V[0]._groupMinRank||O[0]._preGroupSort-V[0]._preGroupSort},D=function(O,V){return O.trace.legendrank-V.trace.legendrank||O._preSort-V._preSort};for(T.forEach(function(O,V){O[0]._preGroupSort=V}),T.sort(z),h=0;h0)Q=X.width;else return 0;return E?G:Math.min(Q,ee)};w.each(function(J){var X=g.select(this),ee=i.ensureSingle(X,"g","layers");ee.style("opacity",J[0].trace.opacity);var G=_.indentation,Q=_.valign,oe=J[0].lineHeight,$=J[0].height;if(Q==="middle"&&G===0||!oe||!$)ee.attr("transform",null);else{var Z={top:1,bottom:-1}[Q],se=Z*(.5*(oe-$+3))||0,ne=_.indentation;ee.attr("transform",S(ne,se))}var ce=ee.selectAll("g.legendfill").data([J]);ce.enter().append("g").classed("legendfill",!0);var ge=ee.selectAll("g.legendlines").data([J]);ge.enter().append("g").classed("legendlines",!0);var Te=ee.selectAll("g.legendsymbols").data([J]);Te.enter().append("g").classed("legendsymbols",!0),Te.selectAll("g.legendpoints").data([J]).enter().append("g").classed("legendpoints",!0)}).each(ue).each(N).each(k).each(I).each(O).each(te).each(j).each(z).each(D).each(V).each(Y);function z(J){var X=u(J),ee=X.showFill,G=X.showLine,Q=X.showGradientLine,oe=X.showGradientFill,$=X.anyFill,Z=X.anyLine,se=J[0],ne=se.trace,ce,ge,Te=p(ne),we=Te.colorscale,Re=Te.reversescale,be=function(He){if(He.size())if(ee)x.fillGroupStyle(He,A,!0);else{var Ie="legendfill-"+ne.uid;x.gradient(He,A,Ie,b(Re),we,"fill")}},Ae=function(He){if(He.size()){var Ie="legendline-"+ne.uid;x.lineGroupStyle(He),x.gradient(He,A,Ie,b(Re),we,"stroke")}},me=r.hasMarkers(ne)||!$?"M5,0":Z?"M5,-2":"M5,-3",Le=g.select(this),Ve=Le.select(".legendfill").selectAll("path").data(ee||oe?[J]:[]);if(Ve.enter().append("path").classed("js-fill",!0),Ve.exit().remove(),Ve.attr("d",me+"h"+T+"v6h-"+T+"z").call(be),G||Q){var Ue=M(void 0,ne.line,m,c);ge=i.minExtend(ne,{line:{width:Ue}}),ce=[i.minExtend(se,{trace:ge})]}var ke=Le.select(".legendlines").selectAll("path").data(G||Q?[ce]:[]);ke.enter().append("path").classed("js-line",!0),ke.exit().remove(),ke.attr("d",me+(Q?"l"+T+",0.0001":"h"+T)).call(G?x.lineGroupStyle:Ae)}function D(J){var X=u(J),ee=X.anyFill,G=X.anyLine,Q=X.showLine,oe=X.showMarker,$=J[0],Z=$.trace,se=!oe&&!G&&!ee&&r.hasText(Z),ne,ce;function ge(Ve,Ue,ke,He){var Ie=i.nestedProperty(Z,Ve).get(),rt=i.isArrayOrTypedArray(Ie)&&Ue?Ue(Ie):Ie;if(E&&rt&&He!==void 0&&(rt=He),ke){if(rtke[1])return ke[1]}return rt}function Te(Ve){return $._distinct&&$.index&&Ve[$.index]?Ve[$.index]:Ve[0]}if(oe||se||Q){var we={},Re={};if(oe){we.mc=ge("marker.color",Te),we.mx=ge("marker.symbol",Te),we.mo=ge("marker.opacity",i.mean,[.2,1]),we.mlc=ge("marker.line.color",Te),we.mlw=ge("marker.line.width",i.mean,[0,5],l),Re.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var be=ge("marker.size",i.mean,[2,16],f);we.ms=be,Re.marker.size=be}Q&&(Re.line={width:ge("line.width",Te,[0,10],c)}),se&&(we.tx="Aa",we.tp=ge("textposition",Te),we.ts=10,we.tc=ge("textfont.color",Te),we.tf=ge("textfont.family",Te)),ne=[i.minExtend($,we)],ce=i.minExtend(Z,Re),ce.selectedpoints=null,ce.texttemplate=null}var Ae=g.select(this).select("g.legendpoints"),me=Ae.selectAll("path.scatterpts").data(oe?ne:[]);me.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",L),me.exit().remove(),me.call(x.pointStyle,ce,A),oe&&(ne[0].mrc=3);var Le=Ae.selectAll("g.pointtext").data(se?ne:[]);Le.enter().append("g").classed("pointtext",!0).append("text").attr("transform",L),Le.exit().remove(),Le.selectAll("text").call(x.textPointStyle,ce,A)}function N(J){var X=J[0].trace,ee=X.type==="waterfall";if(J[0]._distinct&&ee){var G=J[0].trace[J[0].dir].marker;return J[0].mc=G.color,J[0].mlw=G.line.width,J[0].mlc=G.line.color,B(J,this,"waterfall")}var Q=[];X.visible&&ee&&(Q=J[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var oe=g.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Q);oe.enter().append("path").classed("legendwaterfall",!0).attr("transform",L).style("stroke-miterlimit",1),oe.exit().remove(),oe.each(function($){var Z=g.select(this),se=X[$[0]].marker,ne=M(void 0,se.line,h,l);Z.attr("d",$[1]).style("stroke-width",ne+"px").call(v.fill,se.color),ne&&Z.call(v.stroke,se.line.color)})}function I(J){B(J,this)}function k(J){B(J,this,"funnel")}function B(J,X,ee){var G=J[0].trace,Q=G.marker||{},oe=Q.line||{},$=Q.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Z=ee?G.visible&&G.type===ee:C.traceIs(G,"bar"),se=g.select(X).select("g.legendpoints").selectAll("path.legend"+ee).data(Z?[J]:[]);se.enter().append("path").classed("legend"+ee,!0).attr("d",$).attr("transform",L),se.exit().remove(),se.each(function(ne){var ce=g.select(this),ge=ne[0],Te=M(ge.mlw,Q.line,h,l);ce.style("stroke-width",Te+"px");var we=ge.mcc;if(!_._inHover&&"mc"in ge){var Re=p(Q),be=Re.mid;be===void 0&&(be=(Re.max+Re.min)/2),we=x.tryColorscale(Q,"")(be)}var Ae=we||ge.mc||Q.color,me=Q.pattern,Le=me&&x.getPatternAttr(me.shape,0,"");if(Le){var Ve=x.getPatternAttr(me.bgcolor,0,null),Ue=x.getPatternAttr(me.fgcolor,0,null),ke=me.fgopacity,He=o(me.size,8,10),Ie=o(me.solidity,.5,1),rt="legend-"+G.uid;ce.call(x.pattern,"legend",A,rt,Le,He,Ie,we,me.fillmode,Ve,Ue,ke)}else ce.call(v.fill,Ae);Te&&v.stroke(ce,ge.mlc||oe.color)})}function O(J){var X=J[0].trace,ee=g.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&C.traceIs(X,"box-violin")?[J]:[]);ee.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",L),ee.exit().remove(),ee.each(function(){var G=g.select(this);if((X.boxpoints==="all"||X.points==="all")&&v.opacity(X.fillcolor)===0&&v.opacity((X.line||{}).color)===0){var Q=i.minExtend(X,{marker:{size:E?f:i.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});ee.call(x.pointStyle,Q,A)}else{var oe=M(void 0,X.line,h,l);G.style("stroke-width",oe+"px").call(v.fill,X.fillcolor),oe&&v.stroke(G,X.line.color)}})}function V(J){var X=J[0].trace,ee=g.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[J,J]:[]);ee.enter().append("path").classed("legendcandle",!0).attr("d",function(G,Q){return Q?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",L).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(G,Q){var oe=g.select(this),$=X[Q?"increasing":"decreasing"],Z=M(void 0,$.line,h,l);oe.style("stroke-width",Z+"px").call(v.fill,$.fillcolor),Z&&v.stroke(oe,$.line.color)})}function Y(J){var X=J[0].trace,ee=g.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[J,J]:[]);ee.enter().append("path").classed("legendohlc",!0).attr("d",function(G,Q){return Q?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",L).style("stroke-miterlimit",1),ee.exit().remove(),ee.each(function(G,Q){var oe=g.select(this),$=X[Q?"increasing":"decreasing"],Z=M(void 0,$.line,h,l);oe.style("fill","none").call(x.dashLine,$.line.dash,Z),Z&&v.stroke(oe,$.line.color)})}function j(J){ie(J,this,"pie")}function te(J){ie(J,this,"funnelarea")}function ie(J,X,ee){var G=J[0],Q=G.trace,oe=ee?Q.visible&&Q.type===ee:C.traceIs(Q,ee),$=g.select(X).select("g.legendpoints").selectAll("path.legend"+ee).data(oe?[J]:[]);if($.enter().append("path").classed("legend"+ee,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",L),$.exit().remove(),$.size()){var Z=Q.marker||{},se=M(a(Z.line.width,G.pts),Z.line,h,l),ne="pieLike",ce=i.minExtend(Q,{marker:{line:{width:se}}},ne),ge=i.minExtend(G,{trace:ce},ne);t($,ge,ce,A)}}function ue(J){var X=J[0].trace,ee,G=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":G=[["M-15,-2V4H15V-2Z"]],ee=!0;break;case"choropleth":case"choroplethmapbox":G=[["M-6,-6V6H6V-6Z"]],ee=!0;break;case"densitymapbox":G=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],ee="radial";break;case"cone":G=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],ee=!1;break;case"streamtube":G=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],ee=!1;break;case"surface":G=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],ee=!0;break;case"mesh3d":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],ee=!1;break;case"volume":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],ee=!0;break;case"isosurface":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],ee=!1;break}var Q=g.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(G);Q.enter().append("path").classed("legend3dandfriends",!0).attr("transform",L).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(oe,$){var Z=g.select(this),se=p(X),ne=se.colorscale,ce=se.reversescale,ge=function(be){if(be.size()){var Ae="legendfill-"+X.uid;x.gradient(be,A,Ae,b(ce,ee==="radial"),ne,"fill")}},Te;if(ne){if(!ee){var Re=ne.length;Te=$===0?ne[ce?Re-1:0][1]:$===1?ne[ce?0:Re-1][1]:ne[Math.floor((Re-1)/2)][1]}}else{var we=X.vertexcolor||X.facecolor||X.color;Te=i.isArrayOrTypedArray(we)?we[$]||we[0]:we}Z.attr("d",oe[0]),Te?Z.call(v.fill,Te):Z.call(ge)})}};function b(d,w){var A=w?"radial":"horizontal";return A+(d?"":"reversed")}function u(d){var w=d[0].trace,A=w.contours,_=r.hasLines(w),y=r.hasMarkers(w),E=w.visible&&w.fill&&w.fill!=="none",T=!1,s=!1;if(A){var L=A.coloring;L==="lines"?T=!0:_=L==="none"||L==="heatmap"||A.showlines,A.type==="constraint"?E=A._operation!=="=":(L==="fill"||L==="heatmap")&&(s=!0)}return{showMarker:y,showLine:_,showFill:E,showGradientLine:T,showGradientFill:s,anyLine:_||T,anyFill:E||s}}function o(d,w,A){return d&&i.isArrayOrTypedArray(d)?w:d>A?A:d}},66540:function(H,U,e){e(76052),H.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},44248:function(H,U,e){var g=e(24040),C=e(7316),i=e(79811),S=e(9224),x=e(4016).eraseActiveShape,v=e(3400),p=v._,r=H.exports={};r.toImage={name:"toImage",title:function(d){var w=d._context.toImageButtonOptions||{},A=w.format||"png";return A==="png"?p(d,"Download plot as a png"):p(d,"Download plot")},icon:S.camera,click:function(d){var w=d._context.toImageButtonOptions,A={format:w.format||"png"};v.notifier(p(d,"Taking snapshot - this may take a few seconds"),"long"),A.format!=="svg"&&v.isIE()&&(v.notifier(p(d,"IE only supports svg. Changing format to svg."),"long"),A.format="svg"),["filename","width","height","scale"].forEach(function(_){_ in w&&(A[_]=w[_])}),g.call("downloadImage",d,A).then(function(_){v.notifier(p(d,"Snapshot succeeded")+" - "+_,"long")}).catch(function(){v.notifier(p(d,"Sorry, there was a problem downloading your snapshot!"),"long")})}},r.sendDataToCloud={name:"sendDataToCloud",title:function(d){return p(d,"Edit in Chart Studio")},icon:S.disk,click:function(d){C.sendDataToCloud(d)}},r.editInChartStudio={name:"editInChartStudio",title:function(d){return p(d,"Edit in Chart Studio")},icon:S.pencil,click:function(d){C.sendDataToCloud(d)}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(d){return p(d,"Zoom")},attr:"dragmode",val:"zoom",icon:S.zoombox,click:t},r.pan2d={name:"pan2d",_cat:"pan",title:function(d){return p(d,"Pan")},attr:"dragmode",val:"pan",icon:S.pan,click:t},r.select2d={name:"select2d",_cat:"select",title:function(d){return p(d,"Box Select")},attr:"dragmode",val:"select",icon:S.selectbox,click:t},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(d){return p(d,"Lasso Select")},attr:"dragmode",val:"lasso",icon:S.lasso,click:t},r.drawclosedpath={name:"drawclosedpath",title:function(d){return p(d,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:S.drawclosedpath,click:t},r.drawopenpath={name:"drawopenpath",title:function(d){return p(d,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:S.drawopenpath,click:t},r.drawline={name:"drawline",title:function(d){return p(d,"Draw line")},attr:"dragmode",val:"drawline",icon:S.drawline,click:t},r.drawrect={name:"drawrect",title:function(d){return p(d,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:S.drawrect,click:t},r.drawcircle={name:"drawcircle",title:function(d){return p(d,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:S.drawcircle,click:t},r.eraseshape={name:"eraseshape",title:function(d){return p(d,"Erase active shape")},icon:S.eraseshape,click:x},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(d){return p(d,"Zoom in")},attr:"zoom",val:"in",icon:S.zoom_plus,click:t},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(d){return p(d,"Zoom out")},attr:"zoom",val:"out",icon:S.zoom_minus,click:t},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(d){return p(d,"Autoscale")},attr:"zoom",val:"auto",icon:S.autoscale,click:t},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(d){return p(d,"Reset axes")},attr:"zoom",val:"reset",icon:S.home,click:t},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(d){return p(d,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:S.tooltip_basic,gravity:"ne",click:t},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(d){return p(d,"Compare data on hover")},attr:"hovermode",val:function(d){return d._fullLayout._isHoriz?"y":"x"},icon:S.tooltip_compare,gravity:"ne",click:t};function t(d,w){var A=w.currentTarget,_=A.getAttribute("data-attr"),y=A.getAttribute("data-val")||!0,E=d._fullLayout,T={},s=i.list(d,null,!0),L=E._cartesianSpikesEnabled,M,z;if(_==="zoom"){var D=y==="in"?.5:2,N=(1+D)/2,I=(1-D)/2,k;for(z=0;z1?(ie=["toggleHover"],ue=["resetViews"]):T?(te=["zoomInGeo","zoomOutGeo"],ie=["hoverClosestGeo"],ue=["resetGeo"]):E?(ie=["hoverClosest3d"],ue=["resetCameraDefault3d","resetCameraLastSave3d"]):D?(te=["zoomInMapbox","zoomOutMapbox"],ie=["toggleHover"],ue=["resetViewMapbox"]):M?ie=["hoverClosestGl2d"]:s?ie=["hoverClosestPie"]:k?(ie=["hoverClosestCartesian","hoverCompareCartesian"],ue=["resetViewSankey"]):ie=["toggleHover"],y&&(ie=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(f(b)||O)&&(ie=[]),(y||M)&&!B&&(te=["zoomIn2d","zoomOut2d","autoScale2d"],ue[0]!=="resetViews"&&(ue=["resetScale2d"])),E?J=["zoom3d","pan3d","orbitRotation","tableRotation"]:(y||M)&&!B||z?J=["zoom2d","pan2d"]:D||T?J=["pan2d"]:N&&(J=["zoom2d"]),n(b)&&J.push("select2d","lasso2d");var X=[],ee=function($){X.indexOf($)===-1&&ie.indexOf($)!==-1&&X.push($)};if(Array.isArray(A)){for(var G=[],Q=0;Q0);if(o){var d=r(n,f,c);b("x",d[0]),b("y",d[1]),g.noneOrAll(a,n,["x","y"]),b("xanchor"),b("yanchor"),g.coerceFont(b,"font",f.font);var w=b("bgcolor");b("activecolor",C.contrast(w,v.lightAmount,v.darkAmount)),b("bordercolor"),b("borderwidth")}};function p(t,a,n,f){var c=f.calendar;function l(b,u){return g.coerce(t,a,x.buttons,b,u)}var m=l("visible");if(m){var h=l("step");h!=="all"&&(c&&c!=="gregorian"&&(h==="month"||h==="year")?a.stepmode="backward":l("stepmode"),l("count")),l("label")}}function r(t,a,n){for(var f=n.filter(function(h){return a[h].anchor===t._id}),c=0,l=0;l=Ae.max)Re=ne[be+1];else if(we=Ae.pmax)Re=ne[be+1];else if(we0?E.touches[0].clientX:0}function m(E,T,s,L){if(T._context.staticPlot)return;var M=E.select("rect."+c.slideBoxClassName).node(),z=E.select("rect."+c.grabAreaMinClassName).node(),D=E.select("rect."+c.grabAreaMaxClassName).node();function N(){var I=g.event,k=I.target,B=l(I),O=B-E.node().getBoundingClientRect().left,V=L.d2p(s._rl[0]),Y=L.d2p(s._rl[1]),j=n.coverSlip();this.addEventListener("touchmove",te),this.addEventListener("touchend",ie),j.addEventListener("mousemove",te),j.addEventListener("mouseup",ie);function te(ue){var J=l(ue),X=+J-B,ee,G,Q;switch(k){case M:if(Q="ew-resize",V+X>s._length||Y+X<0)return;ee=V+X,G=Y+X;break;case z:if(Q="col-resize",V+X>s._length)return;ee=V+X,G=Y;break;case D:if(Q="col-resize",Y+X<0)return;ee=V,G=Y+X;break;default:Q="ew-resize",ee=O,G=O+X;break}if(G=0;N--){var I=A.append("path").attr(y).style("opacity",N?.1:E).call(S.stroke,s).call(S.fill,T).call(x.dashLine,N?"solid":M,N?4+L:L);if(f(I,h,o),z){var k=v(h.layout,"selections",o);I.style({cursor:"move"});var B={element:I.node(),plotinfo:d,gd:h,editHelpers:k,isActiveSelection:!0},O=g(_,h);C(O,I,B)}else I.style("pointer-events",N?"all":"none");D[N]=I}var V=D[0],Y=D[1];Y.node().addEventListener("click",function(){return c(h,V)})}}function f(h,b,u){var o=u.xref+u.yref;x.setClipUrl(h,"clip"+b._fullLayout._uid+o,b)}function c(h,b){if(a(h)){var u=b.node(),o=+u.getAttribute("data-index");if(o>=0){if(o===h._fullLayout._activeSelectionIndex){m(h);return}h._fullLayout._activeSelectionIndex=o,h._fullLayout._deactivateSelection=m,t(h)}}}function l(h){if(a(h)){var b=h._fullLayout.selections.length-1;h._fullLayout._activeSelectionIndex=b,h._fullLayout._deactivateSelection=m,t(h)}}function m(h){if(a(h)){var b=h._fullLayout._activeSelectionIndex;b>=0&&(i(h),delete h._fullLayout._activeSelectionIndex,t(h))}}},34200:function(H,U,e){var g=e(98192).u,C=e(92880).extendFlat;H.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:C({},g,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},81004:function(H){H.exports=function(e,g,C){C("newselection.mode");var i=C("newselection.line.width");i&&(C("newselection.line.color"),C("newselection.line.dash")),C("activeselection.fillcolor"),C("activeselection.opacity")}},5968:function(H,U,e){var g=e(72760),C=g.selectMode,i=e(1936),S=i.clearOutline,x=e(9856),v=x.readPaths,p=x.writePaths,r=x.fixDatesForPaths;H.exports=function(a,n){if(a.length){var f=a[0][0];if(f){var c=f.getAttribute("d"),l=n.gd,m=l._fullLayout.newselection,h=n.plotinfo,b=h.xaxis,u=h.yaxis,o=n.isActiveSelection,d=n.dragmode,w=(l.layout||{}).selections||[];if(!C(d)&&o!==void 0){var A=l._fullLayout._activeSelectionIndex;if(A=0){Tt._fullLayout._deactivateShape(Tt);return}if(!mt){var En=Bt.clickmode;s.done(Gr).then(function(){if(s.clear(Gr),rn===2){for(rr.remove(),Qt=0;Qt-1&&ie(Cn,Tt,ye.xaxes,ye.yaxes,ye.subplot,ye,rr),En==="event"&&Ze(Tt,void 0);v.click(Tt,Cn,Kt.id)}).catch(y.error)}},ye.doneFn=function(){xr.remove(),s.done(Gr).then(function(){s.clear(Gr),!ir&&Ot&&ye.selectionDefs&&(Ot.subtract=vr,ye.selectionDefs.push(Ot),ye.mergedPolygons.length=0,[].push.apply(ye.mergedPolygons,Nt)),(ir||mt)&&$(ye,ir),ye.doneFnCompleted&&ye.doneFnCompleted(Pr),bt&&Ze(Tt,fr)}).catch(y.error)}}function ie(We,Fe,xe,ye,Ee,Me,Ne){var je=Fe._hoverdata,it=Fe._fullLayout,mt=it.clickmode,bt=mt.indexOf("event")>-1,vt=[],Lt,ct,Tt,Bt,ir,pt,Xt,Kt,or,$t;if(ce(je)){G(We,Fe,Me),Lt=se(Fe,xe,ye,Ee);var gt=ge(je,Lt),st=gt.pointNumbers.length>0;if(st?we(Lt,gt):Re(Lt)&&(Xt=Te(gt))){for(Ne&&Ne.remove(),$t=0;$t=0}function oe(We){return We._fullLayout._activeSelectionIndex>=0}function $(We,Fe){var xe=We.dragmode,ye=We.plotinfo,Ee=We.gd;Q(Ee)&&Ee._fullLayout._deactivateShape(Ee),oe(Ee)&&Ee._fullLayout._deactivateSelection(Ee);var Me=Ee._fullLayout,Ne=Me._zoomlayer,je=n(xe),it=c(xe);if(je||it){var mt=Ne.selectAll(".select-outline-"+ye.id);if(mt&&Ee._fullLayout._outlining){var bt;je&&(bt=w(mt,We)),bt&&i.call("_guiRelayout",Ee,{shapes:bt});var vt;it&&!j(We)&&(vt=A(mt,We)),vt&&(Ee._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",Ee,{selections:vt}).then(function(){Fe&&_(Ee)})),Ee._fullLayout._outlining=!1}}ye.selection={},ye.selection.selectionDefs=We.selectionDefs=[],ye.selection.mergedPolygons=We.mergedPolygons=[]}function Z(We){return We._id}function se(We,Fe,xe,ye){if(!We.calcdata)return[];var Ee=[],Me=Fe.map(Z),Ne=xe.map(Z),je,it,mt;for(mt=0;mt0,Me=Ee?ye[0]:xe;return Fe.selectedpoints?Fe.selectedpoints.indexOf(Me)>-1:!1}function we(We,Fe){var xe=[],ye,Ee,Me,Ne;for(Ne=0;Ne0&&xe.push(ye);if(xe.length===1&&(Me=xe[0]===Fe.searchInfo,Me&&(Ee=Fe.searchInfo.cd[0].trace,Ee.selectedpoints.length===Fe.pointNumbers.length))){for(Ne=0;Ne1||(Fe+=ye.selectedpoints.length,Fe>1)))return!1;return Fe===1}function be(We,Fe,xe){var ye;for(ye=0;ye-1&&Fe;if(!Ne&&Fe){var rn=$e(We,!0);if(rn.length){var Cn=rn[0].xref,En=rn[0].yref;if(Cn&&En){var Tr=dt(rn),Cr=St([L(We,Cn,"x"),L(We,En,"y")]);Cr(Pr,Tr)}}We._fullLayout._noEmitSelectedAtStart?We._fullLayout._noEmitSelectedAtStart=!1:cn&&Ze(We,Pr),Lt._reselect=!1}if(!Ne&&Lt._deselect){var Wr=Lt._deselect;je=Wr.xref,it=Wr.yref,Ie(je,it,bt)||rt(We,je,it,ye),cn&&(Pr.points.length?Ze(We,Pr):Je(We)),Lt._deselect=!1}return{eventData:Pr,selectionTesters:xe}}function He(We){var Fe=We.calcdata;if(Fe)for(var xe=0;xe0?u+m:m;return{ppad:m,ppadplus:h?d:w,ppadminus:h?w:d}}else return{ppad:m}}function r(t,a,n,f,c){var l=t.type==="category"||t.type==="multicategory"?t.r2c:t.d2c;if(a!==void 0)return[l(a),l(n)];if(f){var m=1/0,h=-1/0,b=f.match(i.segmentRE),u,o,d,w,A;for(t.type==="date"&&(l=S.decodeDate(l)),u=0;uh&&(h=A)));if(h>=m)return[m,h]}}},85448:function(H){H.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},43712:function(H,U,e){var g=e(3400),C=e(54460),i=e(51272),S=e(46056),x=e(65152);H.exports=function(t,a){i(t,a,{name:"shapes",handleItemDefaults:p})};function v(r,t){return r?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function p(r,t,a){function n(J,X){return g.coerce(r,t,S,J,X)}t._isShape=!0;var f=n("visible");if(f){var c=n("showlegend");c&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),g.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var l=n("path"),m=l?"path":"rect",h=n("type",m),b=h!=="path";b&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var u=n("line.width");u&&(n("line.color"),n("line.dash"));for(var o=n("xsizemode"),d=n("ysizemode"),w=["x","y"],A=0;A<2;A++){var _=w[A],y=_+"anchor",E=_==="x"?o:d,T={_fullLayout:a},s,L,M,z=C.coerceRef(r,t,T,_,void 0,"paper"),D=C.getRefType(z);if(D==="range"?(s=C.getFromId(T,z),s._shapeIndices.push(t._index),M=x.rangeToShapePosition(s),L=x.shapePositionToRange(s)):L=M=g.identity,b){var N=.25,I=.75,k=_+"0",B=_+"1",O=r[k],V=r[B];r[k]=L(r[k],!0),r[B]=L(r[B],!0),E==="pixel"?(n(k,0),n(B,10)):(C.coercePosition(t,T,n,z,k,N),C.coercePosition(t,T,n,z,B,I)),t[k]=M(t[k]),t[B]=M(t[B]),r[k]=O,r[B]=V}if(E==="pixel"){var Y=r[y];r[y]=L(r[y],!0),C.coercePosition(t,T,n,z,y,.25),t[y]=M(t[y]),r[y]=Y}}b&&g.noneOrAll(r,t,["x0","x1","y0","y1"]);var j=h==="line",te,ie;if(b&&(te=n("label.texttemplate")),te||(ie=n("label.text")),ie||te){n("label.textangle");var ue=n("label.textposition",j?"middle":"middle center");n("label.xanchor"),n("label.yanchor",v(j,ue)),n("label.padding"),g.coerceFont(n,"label.font",a.font)}}}},60728:function(H,U,e){var g=e(3400),C=e(54460),i=e(72736),S=e(43616),x=e(9856).readPaths,v=e(65152),p=v.getPathString,r=e(97728),t=e(84284).FROM_TL;H.exports=function(c,l,m,h){if(h.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var b;if(m.label.texttemplate){var u={};if(m.type!=="path"){var o=C.getFromId(c,m.xref),d=C.getFromId(c,m.yref);for(var w in r){var A=r[w](m,o,d);A!==void 0&&(u[w]=A)}}b=g.texttemplateStringForShapes(m.label.texttemplate,{},c._fullLayout._d3locale,u)}else b=m.label.text;var _={"data-index":l},y=m.label.font,E={"data-notex":1},T=h.append("g").attr(_).classed("shape-label",!0),s=T.append("text").attr(E).classed("shape-label-text",!0).text(b),L,M,z,D;if(m.path){var N=p(c,m),I=x(N,c);L=1/0,z=1/0,M=-1/0,D=-1/0;for(var k=0;k=f?h=c-m:h=m-c,-180/Math.PI*Math.atan2(h,b)}function n(f,c,l,m,h,b,u){var o=h.label.textposition,d=h.label.textangle,w=h.label.padding,A=h.type,_=Math.PI/180*b,y=Math.sin(_),E=Math.cos(_),T=h.label.xanchor,s=h.label.yanchor,L,M,z,D;if(A==="line"){o==="start"?(L=f,M=c):o==="end"?(L=l,M=m):(L=(f+l)/2,M=(c+m)/2),T==="auto"&&(o==="start"?d==="auto"?l>f?T="left":lf?T="right":lf?T="right":lf?T="left":l1&&!(me.length===2&&me[1][0]==="Z")&&(J===0&&(me[0][0]="M"),L[ue]=me,I(),k())}}function ne(me,Le){if(me===2){ue=+Le.srcElement.getAttribute("data-i"),J=+Le.srcElement.getAttribute("data-j");var Ve=L[ue];!b(Ve)&&!u(Ve)&&se()}}function ce(me){te=[];for(var Le=0;LeI&&xe>k&&!Je.shiftKey?f.getCursor(ye/Fe,1-Ee/xe):"move";c(L,Me),Ie=Me.split("-")[0]}}function lt(Je){u(s)||(B&&(X=me(M.xanchor)),O&&(ee=Le(M.yanchor)),M.type==="path"?ge=M.path:(te=B?M.x0:me(M.x0),ie=O?M.y0:Le(M.y0),ue=B?M.x1:me(M.x1),J=O?M.y1:Le(M.y1)),teJ?(G=ie,Z="y0",Q=J,se="y1"):(G=J,Z="y1",Q=ie,se="y0"),$e(Je),nt(D,M),Ze(L,M,s),He.moveFn=Ie==="move"?xt:St,He.altKey=Je.altKey)}function ht(){u(s)||(c(L),ze(D),w(L,s,M),C.call("_guiRelayout",s,N.getUpdateObj()))}function dt(){u(s)||ze(D)}function xt(Je,We){if(M.type==="path"){var Fe=function(Ee){return Ee},xe=Fe,ye=Fe;B?j("xanchor",M.xanchor=Ve(X+Je)):(xe=function(Me){return Ve(me(Me)+Je)},we&&we.type==="date"&&(xe=m.encodeDate(xe))),O?j("yanchor",M.yanchor=Ue(ee+We)):(ye=function(Me){return Ue(Le(Me)+We)},be&&be.type==="date"&&(ye=m.encodeDate(ye))),j("path",M.path=_(ge,xe,ye))}else B?j("xanchor",M.xanchor=Ve(X+Je)):(j("x0",M.x0=Ve(te+Je)),j("x1",M.x1=Ve(ue+Je))),O?j("yanchor",M.yanchor=Ue(ee+We)):(j("y0",M.y0=Ue(ie+We)),j("y1",M.y1=Ue(J+We)));L.attr("d",h(s,M)),nt(D,M),p(s,z,M,Te)}function St(Je,We){if(Y){var Fe=function(pt){return pt},xe=Fe,ye=Fe;B?j("xanchor",M.xanchor=Ve(X+Je)):(xe=function(Xt){return Ve(me(Xt)+Je)},we&&we.type==="date"&&(xe=m.encodeDate(xe))),O?j("yanchor",M.yanchor=Ue(ee+We)):(ye=function(Xt){return Ue(Le(Xt)+We)},be&&be.type==="date"&&(ye=m.encodeDate(ye))),j("path",M.path=_(ge,xe,ye))}else if(V){if(Ie==="resize-over-start-point"){var Ee=te+Je,Me=O?ie-We:ie+We;j("x0",M.x0=B?Ee:Ve(Ee)),j("y0",M.y0=O?Me:Ue(Me))}else if(Ie==="resize-over-end-point"){var Ne=ue+Je,je=O?J-We:J+We;j("x1",M.x1=B?Ne:Ve(Ne)),j("y1",M.y1=O?je:Ue(je))}}else{var it=function(pt){return Ie.indexOf(pt)!==-1},mt=it("n"),bt=it("s"),vt=it("w"),Lt=it("e"),ct=mt?G+We:G,Tt=bt?Q+We:Q,Bt=vt?oe+Je:oe,ir=Lt?$+Je:$;O&&(mt&&(ct=G-We),bt&&(Tt=Q-We)),(!O&&Tt-ct>k||O&&ct-Tt>k)&&(j(Z,M[Z]=O?ct:Ue(ct)),j(se,M[se]=O?Tt:Ue(Tt))),ir-Bt>I&&(j(ne,M[ne]=B?Bt:Ve(Bt)),j(ce,M[ce]=B?ir:Ve(ir)))}L.attr("d",h(s,M)),nt(D,M),p(s,z,M,Te)}function nt(Je,We){(B||O)&&Fe();function Fe(){var xe=We.type!=="path",ye=Je.selectAll(".visual-cue").data([0]),Ee=1;ye.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ee}).classed("visual-cue",!0);var Me=me(B?We.xanchor:i.midRange(xe?[We.x0,We.x1]:m.extractPathCoords(We.path,l.paramIsX))),Ne=Le(O?We.yanchor:i.midRange(xe?[We.y0,We.y1]:m.extractPathCoords(We.path,l.paramIsY)));if(Me=m.roundPositionForSharpStrokeRendering(Me,Ee),Ne=m.roundPositionForSharpStrokeRendering(Ne,Ee),B&&O){var je="M"+(Me-1-Ee)+","+(Ne-1-Ee)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ye.attr("d",je)}else if(B){var it="M"+(Me-1-Ee)+","+(Ne-9-Ee)+"v18 h2 v-18 Z";ye.attr("d",it)}else{var mt="M"+(Me-9-Ee)+","+(Ne-1-Ee)+"h18 v2 h-18 Z";ye.attr("d",mt)}}}function ze(Je){Je.selectAll(".visual-cue").remove()}function Ze(Je,We,Fe){var xe=We.xref,ye=We.yref,Ee=S.getFromId(Fe,xe),Me=S.getFromId(Fe,ye),Ne="";xe!=="paper"&&!Ee.autorange&&(Ne+=xe),ye!=="paper"&&!Me.autorange&&(Ne+=ye),a.setClipUrl(Je,Ne?"clip"+Fe._fullLayout._uid+Ne:null,Fe)}}function _(s,L,M){return s.replace(l.segmentRE,function(z){var D=0,N=z.charAt(0),I=l.paramIsX[N],k=l.paramIsY[N],B=l.numParams[N],O=z.substr(1).replace(l.paramRE,function(V){return D>=B||(I[D]?V=L(V):k[D]&&(V=M(V)),D++),V});return N+O})}function y(s,L){if(o(s)){var M=L.node(),z=+M.getAttribute("data-index");if(z>=0){if(z===s._fullLayout._activeShapeIndex){E(s);return}s._fullLayout._activeShapeIndex=z,s._fullLayout._deactivateShape=E,b(s)}}}function E(s){if(o(s)){var L=s._fullLayout._activeShapeIndex;L>=0&&(r(s),delete s._fullLayout._activeShapeIndex,b(s))}}function T(s){if(o(s)){r(s);var L=s._fullLayout._activeShapeIndex,M=(s.layout||{}).shapes||[];if(L0&&du&&(d="X"),d});return l>u&&(o=o.replace(/[\s,]*X.*/,""),C.log("Ignoring extra params in segment "+c)),m+o})}},41592:function(H,U,e){var g=e(4016);H.exports={moduleType:"component",name:"shapes",layoutAttributes:e(46056),supplyLayoutDefaults:e(43712),supplyDrawNewShapeDefaults:e(65144),includeBasePlot:e(36632)("shapes"),calcAutorange:e(96084),draw:g.draw,drawOne:g.drawOne}},97728:function(H){function U(c,l){return l?l.d2l(c):c}function e(c,l){return l?l.l2d(c):c}function g(c){return c.x0}function C(c){return c.x1}function i(c){return c.y0}function S(c){return c.y1}function x(c,l){return U(c.x1,l)-U(c.x0,l)}function v(c,l,m){return U(c.y1,m)-U(c.y0,m)}function p(c,l){return Math.abs(x(c,l))}function r(c,l,m){return Math.abs(v(c,l,m))}function t(c,l,m){return c.type!=="line"?void 0:Math.sqrt(Math.pow(x(c,l),2)+Math.pow(v(c,l,m),2))}function a(c,l){return e((U(c.x1,l)+U(c.x0,l))/2,l)}function n(c,l,m){return e((U(c.y1,m)+U(c.y0,m))/2,m)}function f(c,l,m){return c.type!=="line"?void 0:v(c,l,m)/x(c,l)}H.exports={x0:g,x1:C,y0:i,y1:S,slope:f,dx:x,dy:v,width:p,height:r,length:t,xcenter:a,ycenter:n}},89861:function(H,U,e){var g=e(25376),C=e(66741),i=e(92880).extendDeepAll,S=e(67824).overrideAll,x=e(85656),v=e(31780).templatedArray,p=e(60876),r=v("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});H.exports=S(v("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:r,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(C({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:x.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:g({})},font:g({}),activebgcolor:{valType:"color",dflt:p.gripBgActiveColor},bgcolor:{valType:"color",dflt:p.railBgColor},bordercolor:{valType:"color",dflt:p.railBorderColor},borderwidth:{valType:"number",min:0,dflt:p.railBorderWidth},ticklen:{valType:"number",min:0,dflt:p.tickLength},tickcolor:{valType:"color",dflt:p.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:p.minorTickLength}}),"arraydraw","from-root")},60876:function(H){H.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(H,U,e){var g=e(3400),C=e(51272),i=e(89861),S=e(60876),x=S.name,v=i.steps;H.exports=function(a,n){C(a,n,{name:x,handleItemDefaults:p})};function p(t,a,n){function f(d,w){return g.coerce(t,a,i,d,w)}for(var c=C(t,a,{name:"steps",handleItemDefaults:r}),l=0,m=0;m0?[0]:[]);Y.enter().append("g").classed(t.containerClassName,!0).style("cursor",B?null:"ew-resize");function j(J){J._commandObserver&&(J._commandObserver.remove(),delete J._commandObserver),C.autoMargin(k,l(J))}if(Y.exit().each(function(){g.select(this).selectAll("g."+t.groupClassName).each(j)}).remove(),V.length!==0){var te=Y.selectAll("g."+t.groupClassName).data(V,h);te.enter().append("g").classed(t.groupClassName,!0),te.exit().each(j).remove();for(var ie=0;ie0&&(te=te.transition().duration(k.transition.duration).ease(k.transition.easing)),te.attr("transform",v(j-t.gripWidth*.5,k._dims.currentValueTotalHeight))}}function M(I,k){var B=I._dims;return B.inputAreaStart+t.stepInset+(B.inputAreaLength-2*t.stepInset)*Math.min(1,Math.max(0,k))}function z(I,k){var B=I._dims;return Math.min(1,Math.max(0,(k-t.stepInset-B.inputAreaStart)/(B.inputAreaLength-2*t.stepInset-2*B.inputAreaStart)))}function D(I,k,B){var O=B._dims,V=x.ensureSingle(I,"rect",t.railTouchRectClass,function(Y){Y.call(E,k,I,B).style("pointer-events","all")});V.attr({width:O.inputAreaLength,height:Math.max(O.inputAreaWidth,t.tickOffset+B.ticklen+O.labelHeight)}).call(i.fill,B.bgcolor).attr("opacity",0),S.setTranslate(V,0,O.currentValueTotalHeight)}function N(I,k){var B=k._dims,O=B.inputAreaLength-t.railInset*2,V=x.ensureSingle(I,"rect",t.railRectClass);V.attr({width:O,height:t.railWidth,rx:t.railRadius,ry:t.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,k.bordercolor).call(i.fill,k.bgcolor).style("stroke-width",k.borderwidth+"px"),S.setTranslate(V,t.railInset,(B.inputAreaWidth-t.railWidth)*.5+B.currentValueTotalHeight)}},97544:function(H,U,e){var g=e(60876);H.exports={moduleType:"component",name:g.name,layoutAttributes:e(89861),supplyLayoutDefaults:e(8132),draw:e(79664)}},81668:function(H,U,e){var g=e(33428),C=e(38248),i=e(7316),S=e(24040),x=e(3400),v=x.strTranslate,p=e(43616),r=e(76308),t=e(72736),a=e(13448),n=e(84284).OPPOSITE_SIDE,f=/ [XY][0-9]* /;function c(l,m,h){var b=h.propContainer,u=h.propName,o=h.placeholder,d=h.traceIndex,w=h.avoid||{},A=h.attributes,_=h.transform,y=h.containerGroup,E=l._fullLayout,T=1,s=!1,L=b.title,M=(L&&L.text?L.text:"").trim(),z=L&&L.font?L.font:{},D=z.family,N=z.size,I=z.color,k;u==="title.text"?k="titleText":u.indexOf("axis")!==-1?k="axisTitleText":u.indexOf("colorbar"!==-1)&&(k="colorbarTitleText");var B=l._context.edits[k];M===""?T=0:M.replace(f," % ")===o.replace(f," % ")&&(T=.2,s=!0,B||(M="")),h._meta?M=x.templateString(M,h._meta):E._meta&&(M=x.templateString(M,E._meta));var O=M||B,V;y||(y=x.ensureSingle(E._infolayer,"g","g-"+m),V=E._hColorbarMoveTitle);var Y=y.selectAll("text").data(O?[0]:[]);if(Y.enter().append("text"),Y.text(M).attr("class",m),Y.exit().remove(),!O)return y;function j(J){x.syncOrAsync([te,ie],J)}function te(J){var X;return!_&&V&&(_={}),_?(X="",_.rotate&&(X+="rotate("+[_.rotate,A.x,A.y]+")"),(_.offset||V)&&(X+=v(0,(_.offset||0)-(V||0)))):X=null,J.attr("transform",X),J.style({"font-family":D,"font-size":g.round(N,2)+"px",fill:r.rgb(I),opacity:T*r.opacity(I),"font-weight":i.fontWeight}).attr(A).call(t.convertToTspans,l),i.previousPromises(l)}function ie(J){var X=g.select(J.node().parentNode);if(w&&w.selection&&w.side&&M){X.attr("transform",null);var ee=n[w.side],G=w.side==="left"||w.side==="top"?-1:1,Q=C(w.pad)?w.pad:2,oe=p.bBox(X.node()),$={t:0,b:0,l:0,r:0},Z=l._fullLayout._reservedMargin;for(var se in Z)for(var ne in Z[se]){var ce=Z[se][ne];$[ne]=Math.max($[ne],ce)}var ge={left:$.l,top:$.t,right:E.width-$.r,bottom:E.height-$.b},Te=w.maxShift||G*(ge[w.side]-oe[w.side]),we=0;if(Te<0)we=Te;else{var Re=w.offsetLeft||0,be=w.offsetTop||0;oe.left-=Re,oe.right-=Re,oe.top-=be,oe.bottom-=be,w.selection.each(function(){var me=p.bBox(this);x.bBoxIntersect(oe,me,Q)&&(we=Math.max(we,G*(me[w.side]-oe[ee])+Q))}),we=Math.min(Te,we),b._titleScoot=Math.abs(we)}if(we>0||Te<0){var Ae={left:[-we,0],right:[we,0],top:[0,-we],bottom:[0,we]}[w.side];X.attr("transform",v(Ae[0],Ae[1]))}}}Y.call(j);function ue(){T=0,s=!0,Y.text(o).on("mouseover.opacity",function(){g.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){g.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}return B&&(M?Y.on(".opacity",null):ue(),Y.call(t.makeEditable,{gd:l}).on("edit",function(J){d!==void 0?S.call("_guiRestyle",l,u,J,d):S.call("_guiRelayout",l,u,J)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(j)}).on("input",function(J){this.text(J||" ").call(t.positionText,A.x,A.y)})),Y.classed("js-placeholder",s),y}H.exports={draw:c}},88444:function(H,U,e){var g=e(25376),C=e(22548),i=e(92880).extendFlat,S=e(67824).overrideAll,x=e(66741),v=e(31780).templatedArray,p=v("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});H.exports=S(v("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:p,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(x({editType:"arraydraw"}),{}),font:g({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:C.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},73712:function(H){H.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},91384:function(H,U,e){var g=e(3400),C=e(51272),i=e(88444),S=e(73712),x=S.name,v=i.buttons;H.exports=function(a,n){var f={name:x,handleItemDefaults:p};C(a,n,f)};function p(t,a,n){function f(m,h){return g.coerce(t,a,i,m,h)}var c=C(t,a,{name:"buttons",handleItemDefaults:r}),l=f("visible",c.length>0);l&&(f("active"),f("direction"),f("type"),f("showactive"),f("x"),f("y"),g.noneOrAll(t,a,["x","y"]),f("xanchor"),f("yanchor"),f("pad.t"),f("pad.r"),f("pad.b"),f("pad.l"),g.coerceFont(f,"font",n.font),f("bgcolor",n.paper_bgcolor),f("bordercolor"),f("borderwidth"))}function r(t,a){function n(c,l){return g.coerce(t,a,v,c,l)}var f=n("visible",t.method==="skip"||Array.isArray(t.args));f&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}},14420:function(H,U,e){var g=e(33428),C=e(7316),i=e(76308),S=e(43616),x=e(3400),v=e(72736),p=e(31780).arrayEditor,r=e(84284).LINE_SPACING,t=e(73712),a=e(37400);H.exports=function(z){var D=z._fullLayout,N=x.filterVisible(D[t.name]);function I(ie){C.autoMargin(z,T(ie))}var k=D._menulayer.selectAll("g."+t.containerClassName).data(N.length>0?[0]:[]);if(k.enter().append("g").classed(t.containerClassName,!0).style("cursor","pointer"),k.exit().each(function(){g.select(this).selectAll("g."+t.headerGroupClassName).each(I)}).remove(),N.length!==0){var B=k.selectAll("g."+t.headerGroupClassName).data(N,n);B.enter().append("g").classed(t.headerGroupClassName,!0);for(var O=x.ensureSingle(k,"g",t.dropdownButtonGroupClassName,function(ie){ie.style("pointer-events","all")}),V=0;VA,z=x.barLength+2*x.barPad,D=x.barWidth+2*x.barPad,N=c,I=m+h;I+D>f&&(I=f-D);var k=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);k.exit().on(".drag",null).remove(),k.enter().append("rect").classed("scrollbar-horizontal",!0).call(C.fill,x.barColor),M?(this.hbar=k.attr({rx:x.barRadius,ry:x.barRadius,x:N,y:I,width:z,height:D}),this._hbarXMin=N+z/2,this._hbarTranslateMax=A-z):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var B=h>_,O=x.barWidth+2*x.barPad,V=x.barLength+2*x.barPad,Y=c+l,j=m;Y+O>n&&(Y=n-O);var te=this.container.selectAll("rect.scrollbar-vertical").data(B?[0]:[]);te.exit().on(".drag",null).remove(),te.enter().append("rect").classed("scrollbar-vertical",!0).call(C.fill,x.barColor),B?(this.vbar=te.attr({rx:x.barRadius,ry:x.barRadius,x:Y,y:j,width:O,height:V}),this._vbarYMin=j+V/2,this._vbarTranslateMax=_-V):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ie=this.id,ue=y-.5,J=B?E+O+.5:E+.5,X=T-.5,ee=M?s+D+.5:s+.5,G=a._topdefs.selectAll("#"+ie).data(M||B?[0]:[]);if(G.exit().remove(),G.enter().append("clipPath").attr("id",ie).append("rect"),M||B?(this._clipRect=G.select("rect").attr({x:Math.floor(ue),y:Math.floor(X),width:Math.ceil(J)-Math.floor(ue),height:Math.ceil(ee)-Math.floor(X)}),this.container.call(i.setClipUrl,ie,this.gd),this.bg.attr({x:c,y:m,width:l,height:h})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||B){var Q=g.behavior.drag().on("dragstart",function(){g.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Q);var oe=g.behavior.drag().on("dragstart",function(){g.event.sourceEvent.preventDefault(),g.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(oe),B&&this.vbar.on(".drag",null).call(oe)}this.setTranslate(r,t)},x.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},x.prototype._onBoxDrag=function(){var p=this.translateX,r=this.translateY;this.hbar&&(p-=g.event.dx),this.vbar&&(r-=g.event.dy),this.setTranslate(p,r)},x.prototype._onBoxWheel=function(){var p=this.translateX,r=this.translateY;this.hbar&&(p+=g.event.deltaY),this.vbar&&(r+=g.event.deltaY),this.setTranslate(p,r)},x.prototype._onBarDrag=function(){var p=this.translateX,r=this.translateY;if(this.hbar){var t=p+this._hbarXMin,a=t+this._hbarTranslateMax,n=S.constrain(g.event.x,t,a),f=(n-t)/(a-t),c=this.position.w-this._box.w;p=f*c}if(this.vbar){var l=r+this._vbarYMin,m=l+this._vbarTranslateMax,h=S.constrain(g.event.y,l,m),b=(h-l)/(m-l),u=this.position.h-this._box.h;r=b*u}this.setTranslate(p,r)},x.prototype.setTranslate=function(p,r){var t=this.position.w-this._box.w,a=this.position.h-this._box.h;if(p=S.constrain(p||0,0,t),r=S.constrain(r||0,0,a),this.translateX=p,this.translateY=r,this.container.call(i.setTranslate,this._box.l-this.position.l-p,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+p-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var n=p/t;this.hbar.call(i.setTranslate,p+n*this._hbarTranslateMax,r)}if(this.vbar){var f=r/a;this.vbar.call(i.setTranslate,p,r+f*this._vbarTranslateMax)}}},84284:function(H){H.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},36208:function(H){H.exports={axisRefDescription:function(U,e,g){return["If set to a",U,"axis id (e.g. *"+U+"* or","*"+U+"2*), the `"+U+"` position refers to a",U,"coordinate. If set to *paper*, the `"+U+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+g+"). If set to a",U,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+U+"2 domain* refers to the domain of the second",U," axis and a",U,"position of 0.5 refers to the","point between the",e,"and the",g,"of the domain of the","second",U,"axis."].join(" ")}}},48164:function(H){H.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},26880:function(H){H.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},69104:function(H){H.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},99168:function(H){H.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87792:function(H){H.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},13448:function(H){H.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032:function(H){H.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},2264:function(H,U){U.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],U.STYLE=U.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")},9616:function(H,U){U.xmlns="http://www.w3.org/2000/xmlns/",U.svg="http://www.w3.org/2000/svg",U.xlink="http://www.w3.org/1999/xlink",U.svgAttrs={xmlns:U.svg,"xmlns:xlink":U.xlink}},64884:function(H,U,e){U.version=e(25788).version,e(88324),e(79288);for(var g=e(24040),C=U.register=g.register,i=e(22448),S=Object.keys(i),x=0;x",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},98308:function(H,U){U.isLeftAnchor=function(g){return g.xanchor==="left"||g.xanchor==="auto"&&g.x<=.3333333333333333},U.isCenterAnchor=function(g){return g.xanchor==="center"||g.xanchor==="auto"&&g.x>.3333333333333333&&g.x<.6666666666666666},U.isRightAnchor=function(g){return g.xanchor==="right"||g.xanchor==="auto"&&g.x>=.6666666666666666},U.isTopAnchor=function(g){return g.yanchor==="top"||g.yanchor==="auto"&&g.y>=.6666666666666666},U.isMiddleAnchor=function(g){return g.yanchor==="middle"||g.yanchor==="auto"&&g.y>.3333333333333333&&g.y<.6666666666666666},U.isBottomAnchor=function(g){return g.yanchor==="bottom"||g.yanchor==="auto"&&g.y<=.3333333333333333}},11864:function(H,U,e){var g=e(20435),C=g.mod,i=g.modHalf,S=Math.PI,x=2*S;function v(b){return b/180*S}function p(b){return b/S*180}function r(b){return Math.abs(b[1]-b[0])>x-1e-14}function t(b,u){return i(u-b,x)}function a(b,u){return Math.abs(t(b,u))}function n(b,u){if(r(u))return!0;var o,d;u[0]d&&(d+=x);var w=C(b,x),A=w+x;return w>=o&&w<=d||A>=o&&A<=d}function f(b,u,o,d){if(!n(u,d))return!1;var w,A;return o[0]=w&&b<=A}function c(b,u,o,d,w,A,_){w=w||0,A=A||0;var y=r([o,d]),E,T,s,L,M;y?(E=0,T=S,s=x):o"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};t.uint8c=t.u1c,t.uint8=t.u1,t.int8=t.i1,t.uint16=t.u2,t.int16=t.i2,t.uint32=t.u4,t.int32=t.i4,t.float32=t.f4,t.float64=t.f8;function a(c){return c.constructor===ArrayBuffer}U.isArrayBuffer=a,U.decodeTypedArraySpec=function(c){var l=[],m=n(c),h=m.dtype,b=t[h];if(!b)throw new Error('Error in dtype: "'+h+'"');var u=b.BYTES_PER_ELEMENT,o=m.bdata;a(o)||(o=g(o));var d=m.shape===void 0?[o.byteLength/u]:(""+m.shape).split(",");d.reverse();var w=d.length,A,_,y=+d[0],E=u*y,T=0;if(w===1)l=new b(o);else if(w===2)for(A=+d[1],_=0;_b.max?m.set(h):m.set(+l)}},integer:{coerceFunction:function(l,m,h,b){l%1||!g(l)||b.min!==void 0&&lb.max?m.set(h):m.set(+l)}},string:{coerceFunction:function(l,m,h,b){if(typeof l!="string"){var u=typeof l=="number";b.strict===!0||!u?m.set(h):m.set(String(l))}else b.noBlank&&!l?m.set(h):m.set(l)}},color:{coerceFunction:function(l,m,h){C(l).isValid()?m.set(l):m.set(h)}},colorlist:{coerceFunction:function(l,m,h){function b(u){return C(u).isValid()}!Array.isArray(l)||!l.length?m.set(h):l.every(b)?m.set(l):m.set(h)}},colorscale:{coerceFunction:function(l,m,h){m.set(S.get(l,h))}},angle:{coerceFunction:function(l,m,h){l==="auto"?m.set("auto"):g(l)?m.set(t(+l,360)):m.set(h)}},subplotid:{coerceFunction:function(l,m,h,b){var u=b.regex||r(h);if(typeof l=="string"&&u.test(l)){m.set(l);return}m.set(h)},validateFunction:function(l,m){var h=m.dflt;return l===h?!0:typeof l!="string"?!1:!!r(h).test(l)}},flaglist:{coerceFunction:function(l,m,h,b){if((b.extras||[]).indexOf(l)!==-1){m.set(l);return}if(typeof l!="string"){m.set(h);return}for(var u=l.split("+"),o=0;o=o&&I<=d?I:v}if(typeof I!="string"&&typeof I!="number")return v;I=String(I);var Y=b(k),j=I.charAt(0);Y&&(j==="G"||j==="g")&&(I=I.substr(1),k="");var te=Y&&k.substr(0,7)==="chinese",ie=I.match(te?m:l);if(!ie)return v;var ue=ie[1],J=ie[3]||"1",X=Number(ie[5]||1),ee=Number(ie[7]||0),G=Number(ie[9]||0),Q=Number(ie[11]||0);if(Y){if(ue.length===2)return v;ue=Number(ue);var oe;try{var $=f.getComponentMethod("calendars","getCal")(k);if(te){var Z=J.charAt(J.length-1)==="i";J=parseInt(J,10),oe=$.newDate(ue,$.toMonthIndex(ue,J,Z),X)}else oe=$.newDate(ue,Number(J),X)}catch{return v}return oe?(oe.toJD()-n)*p+ee*r+G*t+Q*a:v}ue.length===2?ue=(Number(ue)+2e3-h)%100+h:ue=Number(ue),J-=1;var se=new Date(Date.UTC(2e3,J,X,ee,G));return se.setUTCFullYear(ue),se.getUTCMonth()!==J||se.getUTCDate()!==X?v:se.getTime()+Q*a},o=U.MIN_MS=U.dateTime2ms("-9999"),d=U.MAX_MS=U.dateTime2ms("9999-12-31 23:59:59.9999"),U.isDateTime=function(I,k){return U.dateTime2ms(I,k)!==v};function w(I,k){return String(I+Math.pow(10,k)).substr(1)}var A=90*p,_=3*r,y=5*t;U.ms2DateTime=function(I,k,B){if(typeof I!="number"||!(I>=o&&I<=d))return v;k||(k=0);var O=Math.floor(S(I+.05,1)*10),V=Math.round(I-O/10),Y,j,te,ie,ue,J;if(b(B)){var X=Math.floor(V/p)+n,ee=Math.floor(S(I,p));try{Y=f.getComponentMethod("calendars","getCal")(B).fromJD(X).formatDate("yyyy-mm-dd")}catch{Y=c("G%Y-%m-%d")(new Date(V))}if(Y.charAt(0)==="-")for(;Y.length<11;)Y="-0"+Y.substr(1);else for(;Y.length<10;)Y="0"+Y;j=k=o+p&&I<=d-p))return v;var k=Math.floor(S(I+.05,1)*10),B=new Date(Math.round(I-k/10)),O=g("%Y-%m-%d")(B),V=B.getHours(),Y=B.getMinutes(),j=B.getSeconds(),te=B.getUTCMilliseconds()*10+k;return E(O,V,Y,j,te)};function E(I,k,B,O,V){if((k||B||O||V)&&(I+=" "+w(k,2)+":"+w(B,2),(O||V)&&(I+=":"+w(O,2),V))){for(var Y=4;V%10===0;)Y-=1,V/=10;I+="."+w(V,Y)}return I}U.cleanDate=function(I,k,B){if(I===v)return k;if(U.isJSDate(I)||typeof I=="number"&&isFinite(I)){if(b(B))return i.error("JS Dates and milliseconds are incompatible with world calendars",I),k;if(I=U.ms2DateTimeLocal(+I),!I&&k!==void 0)return k}else if(!U.isDateTime(I,B))return i.error("unrecognized date",I),k;return I};var T=/%\d?f/g,s=/%h/g,L={1:"1",2:"1",3:"2",4:"2"};function M(I,k,B,O){I=I.replace(T,function(Y){var j=Math.min(+Y.charAt(1)||6,6),te=(k/1e3%1+2).toFixed(j).substr(2).replace(/0+$/,"")||"0";return te});var V=new Date(Math.floor(k+.05));if(I=I.replace(s,function(){return L[B("%q")(V)]}),b(O))try{I=f.getComponentMethod("calendars","worldCalFmt")(I,k,O)}catch{return"Invalid"}return B(I)(V)}var z=[59,59.9,59.99,59.999,59.9999];function D(I,k){var B=S(I+.05,p),O=w(Math.floor(B/r),2)+":"+w(S(Math.floor(B/t),60),2);if(k!=="M"){C(k)||(k=0);var V=Math.min(S(I/a,60),z[k]),Y=(100+V).toFixed(k).substr(1);k>0&&(Y=Y.replace(/0+$/,"").replace(/[\.]$/,"")),O+=":"+Y}return O}U.formatDate=function(I,k,B,O,V,Y){if(V=b(V)&&V,!k)if(B==="y")k=Y.year;else if(B==="m")k=Y.month;else if(B==="d")k=Y.dayMonth+` + value:`,G)}addColor(F,q,lt=1){return new xS(this,F,q,lt)}addFolder(F){const q=new dv({parent:this,title:F});return this.root._closeFolders&&q.close(),q}load(F,q=!0){return F.controllers&&this.controllers.forEach(lt=>{lt instanceof R0||lt._name in F.controllers&<.load(F.controllers[lt._name])}),q&&F.folders&&this.folders.forEach(lt=>{lt._title in F.folders&<.load(F.folders[lt._title])}),this}save(F=!0){const q={controllers:{},folders:{}};return this.controllers.forEach(lt=>{if(!(lt instanceof R0)){if(lt._name in q.controllers)throw new Error(`Cannot save GUI with duplicate property "${lt._name}"`);q.controllers[lt._name]=lt.save()}}),F&&this.folders.forEach(lt=>{if(lt._title in q.folders)throw new Error(`Cannot save GUI with duplicate folder "${lt._title}"`);q.folders[lt._title]=lt.save()}),q}open(F=!0){return this._setClosed(!F),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(F){this._closed!==F&&(this._closed=F,this._callOnOpenClose(this))}show(F=!0){return this._hidden=!F,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(F=!0){return this._setClosed(!F),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{const q=this.$children.clientHeight;this.$children.style.height=q+"px",this.domElement.classList.add("transition");const lt=Zt=>{Zt.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",lt))};this.$children.addEventListener("transitionend",lt);const Dt=F?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!F),requestAnimationFrame(()=>{this.$children.style.height=Dt+"px"})}),this}title(F){return this._title=F,this.$title.textContent=F,this}reset(F=!0){return(F?this.controllersRecursive():this.controllers).forEach(lt=>lt.reset()),this}onChange(F){return this._onChange=F,this}_callOnChange(F){this.parent&&this.parent._callOnChange(F),this._onChange!==void 0&&this._onChange.call(this,{object:F.object,property:F.property,value:F.getValue(),controller:F})}onFinishChange(F){return this._onFinishChange=F,this}_callOnFinishChange(F){this.parent&&this.parent._callOnFinishChange(F),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:F.object,property:F.property,value:F.getValue(),controller:F})}onOpenClose(F){return this._onOpenClose=F,this}_callOnOpenClose(F){this.parent&&this.parent._callOnOpenClose(F),this._onOpenClose!==void 0&&this._onOpenClose.call(this,F)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(F=>F.destroy())}controllersRecursive(){let F=Array.from(this.controllers);return this.folders.forEach(q=>{F=F.concat(q.controllersRecursive())}),F}foldersRecursive(){let F=Array.from(this.folders);return this.folders.forEach(q=>{F=F.concat(q.foldersRecursive())}),F}}var E1={exports:{}};(function(_t,F){(function(lt,Dt){_t.exports=Dt()})(self,function(){return function(){var q={79288:function(G,U,t){var g=t(3400),C={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var i in C){var S=i.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");g.addStyleRule(S,C[i])}},86712:function(G,U,t){G.exports=t(84224)},37240:function(G,U,t){G.exports=t(51132)},29744:function(G,U,t){G.exports=t(94456)},29352:function(G,U,t){G.exports=t(67244)},96144:function(G,U,t){G.exports=t(97776)},53219:function(G,U,t){G.exports=t(61712)},4624:function(G,U,t){G.exports=t(95856)},54543:function(G,U,t){G.exports=t(54272)},45e3:function(G,U,t){G.exports=t(85404)},62300:function(G,U,t){G.exports=t(26048)},6920:function(G,U,t){G.exports=t(66240)},10264:function(G,U,t){G.exports=t(40448)},32016:function(G,U,t){G.exports=t(64884)},27528:function(G,U,t){G.exports=t(15088)},75556:function(G,U,t){G.exports=t(76744)},39204:function(G,U,t){G.exports=t(94704)},73996:function(G,U,t){G.exports=t(62396)},16489:function(G,U,t){G.exports=t(32028)},5e3:function(G,U,t){G.exports=t(81932)},77280:function(G,U,t){G.exports=t(45536)},33992:function(G,U,t){G.exports=t(42600)},17600:function(G,U,t){G.exports=t(21536)},49116:function(G,U,t){G.exports=t(65664)},46808:function(G,U,t){G.exports=t(29044)},36168:function(G,U,t){G.exports=t(48928)},13792:function(G,U,t){var g=t(32016);g.register([t(37240),t(29352),t(5e3),t(33992),t(17600),t(49116),t(6920),t(67484),t(79440),t(39204),t(83096),t(36168),t(20260),t(63560),t(65832),t(46808),t(73996),t(48824),t(89904),t(25120),t(13752),t(4340),t(62300),t(29800),t(8363),t(54543),t(86636),t(42192),t(32140),t(77280),t(89296),t(56816),t(70192),t(45e3),t(27528),t(84764),t(3920),t(50248),t(4624),t(69967),t(10264),t(86152),t(53219),t(81604),t(63796),t(29744),t(89336),t(86712),t(75556),t(16489),t(97312),t(96144)]),G.exports=g},3920:function(G,U,t){G.exports=t(43480)},25120:function(G,U,t){G.exports=t(6296)},4340:function(G,U,t){G.exports=t(7404)},86152:function(G,U,t){G.exports=t(65456)},56816:function(G,U,t){G.exports=t(22020)},89296:function(G,U,t){G.exports=t(29928)},20260:function(G,U,t){G.exports=t(75792)},32140:function(G,U,t){G.exports=t(156)},84764:function(G,U,t){G.exports=t(45499)},48824:function(G,U,t){G.exports=t(3296)},69967:function(G,U,t){G.exports=t(4184)},8363:function(G,U,t){G.exports=t(36952)},86636:function(G,U,t){G.exports=t(38983)},70192:function(G,U,t){G.exports=t(11572)},81604:function(G,U,t){G.exports=t(76924)},63796:function(G,U,t){G.exports=t(62944)},89336:function(G,U,t){G.exports=t(95443)},67484:function(G,U,t){G.exports=t(34864)},97312:function(G,U,t){G.exports=t(76272)},42192:function(G,U,t){G.exports=t(97924)},29800:function(G,U,t){G.exports=t(15436)},63560:function(G,U,t){G.exports=t(5621)},89904:function(G,U,t){G.exports=t(91304)},50248:function(G,U,t){G.exports=t(41724)},65832:function(G,U,t){G.exports=t(31991)},79440:function(G,U,t){G.exports=t(22869)},13752:function(G,U,t){G.exports=t(67776)},83096:function(G,U,t){G.exports=t(95952)},72196:function(G){G.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},13916:function(G,U,t){var g=t(72196),C=t(25376),i=t(33816),S=t(31780).templatedArray;t(36208),G.exports=S("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:C({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:g.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:g.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",i.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",i.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",i.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:C({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},90272:function(G,U,t){var g=t(3400),C=t(54460),i=t(23816).draw;G.exports=function(p){var r=p._fullLayout,e=g.filterVisible(r.annotations);if(e.length&&p._fullData.length)return g.syncOrAsync([i,S],p)};function S(v){var p=v._fullLayout;g.filterVisible(p.annotations).forEach(function(r){var e=C.getFromId(v,r.xref),a=C.getFromId(v,r.yref),n=C.getRefType(r.xref),f=C.getRefType(r.yref);r._extremes={},n==="range"&&x(r,e),f==="range"&&x(r,a)})}function x(v,p){var r=p._id,e=r.charAt(0),a=v[e],n=v["a"+e],f=v[e+"ref"],c=v["a"+e+"ref"],l=v["_"+e+"padplus"],m=v["_"+e+"padminus"],h={x:1,y:-1}[e]*v[e+"shift"],b=3*v.arrowsize*v.arrowwidth||0,u=b+h,o=b-h,d=3*v.startarrowsize*v.arrowwidth||0,w=d+h,A=d-h,_;if(c===f){var y=C.findExtremes(p,[p.r2c(a)],{ppadplus:u,ppadminus:o}),E=C.findExtremes(p,[p.r2c(n)],{ppadplus:Math.max(l,w),ppadminus:Math.max(m,A)});_={min:[y.min[0],E.min[0]],max:[y.max[0],E.max[0]]}}else w=n?w+n:w,A=n?A-n:A,_=C.findExtremes(p,[p.r2c(a)],{ppadplus:Math.max(l,u,w),ppadminus:Math.max(m,o,A)});v._extremes[r]=_}},42300:function(G,U,t){var g=t(3400),C=t(24040),i=t(31780).arrayEditor;G.exports={hasClickToShow:S,onClick:x};function S(r,e){var a=v(r,e);return a.on.length>0||a.explicitOff.length>0}function x(r,e){var a=v(r,e),n=a.on,f=a.off.concat(a.explicitOff),c={},l=r._fullLayout.annotations,m,h;if(n.length||f.length){for(m=0;m.6666666666666666?$e="right":$e="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[$e]}for(var It=!1,re=["x","y"],Kt=0;Kt1)&&(he===le?(jt=de.r2fraction(d["a"+$t]),(jt<0||jt>1)&&(It=!0)):It=!0),Ft=de._offset+de.r2p(d[$t]),Et=.5}else{var ie=Nt==="domain";$t==="x"?(yt=d[$t],Ft=ie?de._offset+de._length*yt:Ft=T.l+T.w*yt):(yt=1-d[$t],Ft=ie?de._offset+de._length*yt:Ft=T.t+T.h*yt),Et=d.showarrow?.5:yt}if(d.showarrow){Wt.head=Ft;var me=d["a"+$t];if(Mt=Se*Vt(.5,d.xanchor)-ne*Vt(.5,d.yanchor),he===le){var be=v.getRefType(he);be==="domain"?($t==="y"&&(me=1-me),Wt.tail=de._offset+de._length*me):be==="paper"?$t==="y"?(me=1-me,Wt.tail=T.t+T.h*me):Wt.tail=T.l+T.w*me:Wt.tail=de._offset+de.r2p(me),xt=Mt}else Wt.tail=Ft+me,xt=Mt+me;Wt.text=Wt.tail+Mt;var ve=E[$t==="x"?"width":"height"];if(le==="paper"&&(Wt.head=S.constrain(Wt.head,1,ve-1)),he==="pixel"){var Le=-Math.max(Wt.tail-3,Wt.text),ce=Math.min(Wt.tail+3,Wt.text)-ve;Le>0?(Wt.tail+=Le,Wt.text+=Le):ce>0&&(Wt.tail-=ce,Wt.text-=ce)}Wt.tail+=Jt,Wt.head+=Jt}else Mt=zt*Vt(Et,Xt),xt=Mt,Wt.text=Ft+Mt;Wt.text+=Jt,Mt+=Jt,xt+=Jt,d["_"+$t+"padplus"]=zt/2+xt,d["_"+$t+"padminus"]=zt/2-xt,d["_"+$t+"size"]=zt,d["_"+$t+"shift"]=Mt}if(It){ut.remove();return}var Te=0,Be=0;if(d.align!=="left"&&(Te=(Lt-At)*(d.align==="center"?.5:1)),d.valign!=="top"&&(Be=(Ht-mt)*(d.valign==="middle"?.5:1)),Rt)wt.select("svg").attr({x:tt+Te-1,y:tt+Be}).call(r.setClipUrl,Q?k:null,o);else{var ir=tt+Be-bt.top,pe=tt+Te-bt.left;st.call(a.positionText,pe,ir).call(r.setClipUrl,Q?k:null,o)}ot.select("rect").call(r.setRect,tt,tt,Lt,Ht),V.call(r.setRect,J/2,J/2,Ut-J,kt-J),ut.call(r.setTranslate,Math.round(B.x.text-Ut/2),Math.round(B.y.text-kt/2)),Y.attr({transform:"rotate("+O+","+B.x.text+","+B.y.text+")"});var Xe=function(or,$e){H.selectAll(".annotation-arrow-g").remove();var ge=B.x.head,se=B.y.head,Ae=B.x.tail+or,Ce=B.y.tail+$e,Ie=B.x.text+or,Pe=B.y.text+$e,ke=S.rotationXYMatrix(O,Ie,Pe),Ve=S.apply2DTransform(ke),Je=S.apply2DTransform2(ke),ur=+V.attr("width"),hr=+V.attr("height"),vr=Ie-.5*ur,Yt=vr+ur,Gt=Pe-.5*hr,Ne=Gt+hr,Oe=[[vr,Gt,vr,Ne],[vr,Ne,Yt,Ne],[Yt,Ne,Yt,Gt],[Yt,Gt,vr,Gt]].map(Je);if(!Oe.reduce(function(Dr,cn){return Dr^!!S.segmentsIntersect(ge,se,ge+1e6,se+1e6,cn[0],cn[1],cn[2],cn[3])},!1)){Oe.forEach(function(Dr){var cn=S.segmentsIntersect(Ae,Ce,ge,se,Dr[0],Dr[1],Dr[2],Dr[3]);cn&&(Ae=cn.x,Ce=cn.y)});var Qe=d.arrowwidth,er=d.arrowcolor,fr=d.arrowside,rr=H.append("g").style({opacity:p.opacity(er)}).classed("annotation-arrow-g",!0),He=rr.append("path").attr("d","M"+Ae+","+Ce+"L"+ge+","+se).style("stroke-width",Qe+"px").call(p.stroke,p.rgb(er));if(l(He,fr,d),s.annotationPosition&&He.node().parentNode&&!A){var dr=ge,mr=se;if(d.standoff){var xr=Math.sqrt(Math.pow(ge-Ae,2)+Math.pow(se-Ce,2));dr+=d.standoff*(Ae-ge)/xr,mr+=d.standoff*(Ce-se)/xr}var pr=rr.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Ae-dr)+","+(Ce-mr),transform:x(dr,mr)}).style("stroke-width",Qe+6+"px").call(p.stroke,"rgba(0,0,0,0)").call(p.fill,"rgba(0,0,0,0)"),Gr,Pr;f.init({element:pr.node(),gd:o,prepFn:function(){var Dr=r.getTranslate(ut);Gr=Dr.x,Pr=Dr.y,_&&_.autorange&&D(_._name+".autorange",!0),y&&y.autorange&&D(y._name+".autorange",!0)},moveFn:function(Dr,cn){var rn=Ve(Gr,Pr),Cn=rn[0]+Dr,En=rn[1]+cn;ut.call(r.setTranslate,Cn,En),N("x",b(_,Dr,"x",T,d)),N("y",b(y,cn,"y",T,d)),d.axref===d.xref&&N("ax",b(_,Dr,"ax",T,d)),d.ayref===d.yref&&N("ay",b(y,cn,"ay",T,d)),rr.attr("transform",x(Dr,cn)),Y.attr({transform:"rotate("+O+","+Cn+","+En+")"})},doneFn:function(){C.call("_guiRelayout",o,I());var Dr=document.querySelector(".js-notes-box-panel");Dr&&Dr.redraw(Dr.selectedObj)}})}}};if(d.showarrow&&Xe(0,0),j){var Ke;f.init({element:ut.node(),gd:o,prepFn:function(){Ke=Y.attr("transform")},moveFn:function(or,$e){var ge="pointer";if(d.showarrow)d.axref===d.xref?N("ax",b(_,or,"ax",T,d)):N("ax",d.ax+or),d.ayref===d.yref?N("ay",b(y,$e,"ay",T.w,d)):N("ay",d.ay+$e),Xe(or,$e);else{if(A)return;var se,Ae;if(_)se=b(_,or,"x",T,d);else{var Ce=d._xsize/T.w,Ie=d.x+(d._xshift-d.xshift)/T.w-Ce/2;se=f.align(Ie+or/T.w,Ce,0,1,d.xanchor)}if(y)Ae=b(y,$e,"y",T,d);else{var Pe=d._ysize/T.h,ke=d.y-(d._yshift+d.yshift)/T.h-Pe/2;Ae=f.align(ke-$e/T.h,Pe,0,1,d.yanchor)}N("x",se),N("y",Ae),(!_||!y)&&(ge=f.getCursor(_?.5:se,y?.5:Ae,d.xanchor,d.yanchor))}Y.attr({transform:x(or,$e)+Ke}),n(ut,ge)},clickFn:function(or,$e){d.captureevents&&o.emit("plotly_clickannotation",it($e))},doneFn:function(){n(ut),C.call("_guiRelayout",o,I());var or=document.querySelector(".js-notes-box-panel");or&&or.redraw(or.selectedObj)}})}}s.annotationText?st.call(a.makeEditable,{delegate:ut,gd:o}).call(nt).on("edit",function(gt){d.text=gt,this.call(nt),N("text",gt),_&&_.autorange&&D(_._name+".autorange",!0),y&&y.autorange&&D(y._name+".autorange",!0),C.call("_guiRelayout",o,I())}):st.call(nt)}},33652:function(G,U,t){var g=t(33428),C=t(76308),i=t(72196),S=t(3400),x=S.strScale,v=S.strRotate,p=S.strTranslate;G.exports=function(e,a,n){var f=e.node(),c=i[n.arrowhead||0],l=i[n.startarrowhead||0],m=(n.arrowwidth||1)*(n.arrowsize||1),h=(n.arrowwidth||1)*(n.startarrowsize||1),b=a.indexOf("start")>=0,u=a.indexOf("end")>=0,o=c.backoff*m+n.standoff,d=l.backoff*h+n.startstandoff,w,A,_,y;if(f.nodeName==="line"){w={x:+e.attr("x1"),y:+e.attr("y1")},A={x:+e.attr("x2"),y:+e.attr("y2")};var E=w.x-A.x,T=w.y-A.y;if(_=Math.atan2(T,E),y=_+Math.PI,o&&d&&o+d>Math.sqrt(E*E+T*T)){Y();return}if(o){if(o*o>E*E+T*T){Y();return}var s=o*Math.cos(_),L=o*Math.sin(_);A.x+=s,A.y+=L,e.attr({x2:A.x,y2:A.y})}if(d){if(d*d>E*E+T*T){Y();return}var M=d*Math.cos(_),z=d*Math.sin(_);w.x-=M,w.y-=z,e.attr({x1:w.x,y1:w.y})}}else if(f.nodeName==="path"){var D=f.getTotalLength(),N="";if(D1){n=!0;break}}n?x.fullLayout._infolayer.select(".annotation-"+x.id+'[data-index="'+e+'"]').remove():(a._pdata=C(x.glplot.cameraParams,[v.xaxis.r2l(a.x)*p[0],v.yaxis.r2l(a.y)*p[1],v.zaxis.r2l(a.z)*p[2]]),g(x.graphDiv,a,e,x.id,a._xa,a._ya))}}},56864:function(G,U,t){var g=t(24040),C=t(3400);G.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:t(45899)}}},layoutAttributes:t(45899),handleDefaults:t(52808),includeBasePlot:i,convert:t(42456),draw:t(71836)};function i(S,x){var v=g.subplotsRegistry.gl3d;if(v)for(var p=v.attrRegex,r=Object.keys(S),e=0;e=0)))return e;if(l===3)f[l]>1&&(f[l]=1);else if(f[l]>=1)return e}var m=Math.round(f[0]*255)+", "+Math.round(f[1]*255)+", "+Math.round(f[2]*255);return c?"rgba("+m+", "+f[3]+")":"rgb("+m+")"}},42996:function(G,U,t){var g=t(94724),C=t(25376),i=t(92880).extendFlat,S=t(67824).overrideAll;G.exports=S({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:g.linecolor,outlinewidth:g.linewidth,bordercolor:g.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:i({},g.ticks,{dflt:""}),ticklabeloverflow:i({},g.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:C({}),tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,separatethousands:g.separatethousands,exponentformat:g.exponentformat,minexponent:g.minexponent,showexponent:g.showexponent,title:{text:{valType:"string"},font:C({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:C({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},63964:function(G){G.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},64013:function(G,U,t){var g=t(3400),C=t(31780),i=t(26332),S=t(25404),x=t(95936),v=t(42568),p=t(42996);G.exports=function(e,a,n){var f=C.newContainer(a,"colorbar"),c=e.colorbar||{};function l(B,O){return g.coerce(c,f,p,B,O)}var m=n.margin||{t:0,b:0,l:0,r:0},h=n.width-m.l-m.r,b=n.height-m.t-m.b,u=l("orientation"),o=u==="v",d=l("thicknessmode");l("thickness",d==="fraction"?30/(o?h:b):30);var w=l("lenmode");l("len",w==="fraction"?1:o?b:h);var A=l("yref"),_=l("xref"),y=A==="paper",E=_==="paper",T,s,L,M="left";o?(L="middle",M=E?"left":"right",T=E?1.02:1,s=.5):(L=y?"bottom":"top",M="center",T=.5,s=y?1.02:1),g.coerce(c,f,{x:{valType:"number",min:E?-2:0,max:E?3:1,dflt:T}},"x"),g.coerce(c,f,{y:{valType:"number",min:y?-2:0,max:y?3:1,dflt:s}},"y"),l("xanchor",M),l("xpad"),l("yanchor",L),l("ypad"),g.noneOrAll(c,f,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var z=g.coerce(c,f,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:o?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",z.indexOf("inside")!==-1?"hide past domain":"hide past div"),i(c,f,l,"linear");var D=n.font,N={noAutotickangles:!0,outerTicks:!1,font:D};z.indexOf("inside")!==-1&&(N.bgColor="black"),v(c,f,l,"linear",N),x(c,f,l,"linear",N),S(c,f,l,"linear",N),l("title.text",n._dfltTitle.colorbar);var I=f.showticklabels?f.tickfont:D,k=g.extendFlat({},I,{color:D.color,size:g.bigFont(I.size)});g.coerceFont(l,"title.font",k),l("title.side",o?"top":"right")}},37848:function(G,U,t){var g=t(33428),C=t(49760),i=t(7316),S=t(24040),x=t(54460),v=t(86476),p=t(3400),r=p.strTranslate,e=t(92880).extendFlat,a=t(93972),n=t(43616),f=t(76308),c=t(81668),l=t(72736),m=t(94288).flipScale,h=t(28336),b=t(37668),u=t(94724),o=t(84284),d=o.LINE_SPACING,w=o.FROM_TL,A=o.FROM_BR,_=t(63964).cn;function y(z){var D=z._fullLayout,N=D._infolayer.selectAll("g."+_.colorbar).data(E(z),function(I){return I._id});N.enter().append("g").attr("class",function(I){return I._id}).classed(_.colorbar,!0),N.each(function(I){var k=g.select(this);p.ensureSingle(k,"rect",_.cbbg),p.ensureSingle(k,"g",_.cbfills),p.ensureSingle(k,"g",_.cblines),p.ensureSingle(k,"g",_.cbaxis,function(O){O.classed(_.crisp,!0)}),p.ensureSingle(k,"g",_.cbtitleunshift,function(O){O.append("g").classed(_.cbtitle,!0)}),p.ensureSingle(k,"rect",_.cboutline);var B=T(k,I,z);B&&B.then&&(z._promises||[]).push(B),z._context.edits.colorbarPosition&&s(k,I,z)}),N.exit().each(function(I){i.autoMargin(z,I._id)}).remove(),N.order()}function E(z){var D=z._fullLayout,N=z.calcdata,I=[],k,B,O,H;function Y($){return e($,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function j(){typeof H.calc=="function"?H.calc(z,O,k):(k._fillgradient=B.reversescale?m(B.colorscale):B.colorscale,k._zrange=[B[H.min],B[H.max]])}for(var et=0;et1){var Wt=Math.pow(10,Math.floor(Math.log(Jt)/Math.LN10));zt*=Wt*p.roundUp(Jt/Wt,[2,5,10]),(Math.abs(bt.start)/bt.size+1e-6)%1<2e-6&&(Se.tick0=0)}Se.dtick=zt}Se.domain=I?[de+X/Z.h,de+Vt-X/Z.h]:[de+J/Z.w,de+Vt-J/Z.w],Se.setScale(),z.attr("transform",r(Math.round(Z.l),Math.round(Z.t)));var Ft=z.select("."+_.cbtitleunshift).attr("transform",r(-Math.round(Z.l),-Math.round(Z.t))),xt=Se.ticklabelposition,yt=Se.title.font.size,Et=z.select("."+_.cbaxis),Mt,Nt=0,jt=0;function ie(ce,Te){var Be={propContainer:Se,propName:D._propPrefix+"title",traceIndex:D._traceIndex,_meta:D._meta,placeholder:$._dfltTitle.colorbar,containerGroup:z.select("."+_.cbtitle)},ir=ce.charAt(0)==="h"?ce.substr(1):"h"+ce;z.selectAll("."+ir+",."+ir+"-math-group").remove(),c.draw(N,ce,e(Be,Te||{}))}function me(){if(I&&ne||!I&&!ne){var ce,Te;gt==="top"&&(ce=J+Z.l+It*tt,Te=X+Z.t+re*(1-de-Vt)+3+yt*.75),gt==="bottom"&&(ce=J+Z.l+It*tt,Te=X+Z.t+re*(1-de)-3-yt*.25),gt==="right"&&(Te=X+Z.t+re*V+3+yt*.75,ce=J+Z.l+It*de),ie(Se._id+"title",{attributes:{x:ce,y:Te,"text-anchor":I?"start":"middle"}})}}function be(){if(I&&!ne||!I&&ne){var ce=Se.position||0,Te=Se._offset+Se._length/2,Be,ir;if(gt==="right")ir=Te,Be=Z.l+It*ce+10+yt*(Se.showticklabels?1:.5);else if(Be=Te,gt==="bottom"&&(ir=Z.t+re*ce+10+(xt.indexOf("inside")===-1?Se.tickfont.size:0)+(Se.ticks!=="intside"&&D.ticklen||0)),gt==="top"){var pe=ct.text.split("
    ").length;ir=Z.t+re*ce+10-Ht-d*yt*pe}ie((I?"h":"v")+Se._id+"title",{avoid:{selection:g.select(N).selectAll("g."+Se._id+"tick"),side:gt,offsetTop:I?0:Z.t,offsetLeft:I?Z.l:0,maxShift:I?$.width:$.height},attributes:{x:Be,y:ir,"text-anchor":"middle"},transform:{rotate:I?-90:0,offset:0}})}}function ve(){if(!I&&!ne||I&&ne){var ce=z.select("."+_.cbtitle),Te=ce.select("text"),Be=[-Y/2,Y/2],ir=ce.select(".h"+Se._id+"title-math-group").node(),pe=15.6;Te.node()&&(pe=parseInt(Te.node().style.fontSize,10)*d);var Xe;if(ir?(Xe=n.bBox(ir),jt=Xe.width,Nt=Xe.height,Nt>pe&&(Be[1]-=(Nt-pe)/2)):Te.node()&&!Te.classed(_.jsPlaceholder)&&(Xe=n.bBox(Te.node()),jt=Xe.width,Nt=Xe.height),I){if(Nt){if(Nt+=5,gt==="top")Se.domain[1]-=Nt/Z.h,Be[1]*=-1;else{Se.domain[0]+=Nt/Z.h;var Ke=l.lineCount(Te);Be[1]+=(1-Ke)*pe}ce.attr("transform",r(Be[0],Be[1])),Se.setScale()}}else jt&&(gt==="right"&&(Se.domain[0]+=(jt+yt/2)/Z.w),ce.attr("transform",r(Be[0],Be[1])),Se.setScale())}z.selectAll("."+_.cbfills+",."+_.cblines).attr("transform",I?r(0,Math.round(Z.h*(1-Se.domain[1]))):r(Math.round(Z.w*Se.domain[0]),0)),Et.attr("transform",I?r(0,Math.round(-Z.t)):r(Math.round(-Z.l),0));var or=z.select("."+_.cbfills).selectAll("rect."+_.cbfill).attr("style","").data(mt);or.enter().append("rect").classed(_.cbfill,!0).attr("style",""),or.exit().remove();var $e=Tt.map(Se.c2p).map(Math.round).sort(function(Ie,Pe){return Ie-Pe});or.each(function(Ie,Pe){var ke=[Pe===0?Tt[0]:(mt[Pe]+mt[Pe-1])/2,Pe===mt.length-1?Tt[1]:(mt[Pe]+mt[Pe+1])/2].map(Se.c2p).map(Math.round);I&&(ke[1]=p.constrain(ke[1]+(ke[1]>ke[0])?1:-1,$e[0],$e[1]));var Ve=g.select(this).attr(I?"x":"y",Kt).attr(I?"y":"x",g.min(ke)).attr(I?"width":"height",Math.max(Ht,2)).attr(I?"height":"width",Math.max(g.max(ke)-g.min(ke),2));if(D._fillgradient)n.gradient(Ve,N,D._id,I?"vertical":"horizontalreversed",D._fillgradient,"fill");else{var Je=Rt(Ie).replace("e-","");Ve.attr("fill",C(Je).toHexString())}});var ge=z.select("."+_.cblines).selectAll("path."+_.cbline).data(nt.color&&nt.width?Lt:[]);ge.enter().append("path").classed(_.cbline,!0),ge.exit().remove(),ge.each(function(Ie){var Pe=Kt,ke=Math.round(Se.c2p(Ie))+nt.width/2%1;g.select(this).attr("d","M"+(I?Pe+","+ke:ke+","+Pe)+(I?"h":"v")+Ht).call(n.lineGroupStyle,nt.width,wt(Ie),nt.dash)}),Et.selectAll("g."+Se._id+"tick,path").remove();var se=Kt+Ht+(Y||0)/2-(D.ticks==="outside"?1:0),Ae=x.calcTicks(Se),Ce=x.getTickSigns(Se)[2];return x.drawTicks(N,Se,{vals:Se.ticks==="inside"?x.clipEnds(Se,Ae):Ae,layer:Et,path:x.makeTickPath(Se,se,Ce),transFn:x.makeTransTickFn(Se)}),x.drawLabels(N,Se,{vals:Ae,layer:Et,transFn:x.makeTransTickLabelFn(Se),labelFns:x.makeLabelFns(Se,se)})}function Le(){var ce,Te=Ht+Y/2;xt.indexOf("inside")===-1&&(ce=n.bBox(Et.node()),Te+=I?ce.width:ce.height),Mt=Ft.select("text");var Be=0,ir=I&>==="top",pe=!I&>==="right",Xe=0;if(Mt.node()&&!Mt.classed(_.jsPlaceholder)){var Ke,or=Ft.select(".h"+Se._id+"title-math-group").node();or&&(I&&ne||!I&&!ne)?(ce=n.bBox(or),Be=ce.width,Ke=ce.height):(ce=n.bBox(Ft.node()),Be=ce.right-Z.l-(I?Kt:xe),Ke=ce.bottom-Z.t-(I?xe:Kt),!I&>==="top"&&(Te+=ce.height,Xe=ce.height)),pe&&(Mt.attr("transform",r(Be/2+yt/2,0)),Be*=2),Te=Math.max(Te,I?Be:Ke)}var $e=(I?J:X)*2+Te+j+Y/2,ge=0;!I&&ct.text&&ut==="bottom"&&V<=0&&(ge=$e/2,$e+=ge,Xe+=ge),$._hColorbarMoveTitle=ge,$._hColorbarMoveCBTitle=Xe;var se=j+Y,Ae=(I?Kt:xe)-se/2-(I?J:0),Ce=(I?xe:Kt)-(I?kt:X+Xe-ge);z.select("."+_.cbbg).attr("x",Ae).attr("y",Ce).attr(I?"width":"height",Math.max($e-ge,2)).attr(I?"height":"width",Math.max(kt+se,2)).call(f.fill,et).call(f.stroke,D.bordercolor).style("stroke-width",j);var Ie=pe?Math.max(Be-10,0):0;z.selectAll("."+_.cboutline).attr("x",(I?Kt:xe+J)+Ie).attr("y",(I?xe+X-kt:Kt)+(ir?Nt:0)).attr(I?"width":"height",Math.max(Ht,2)).attr(I?"height":"width",Math.max(kt-(I?2*X+Nt:2*J+Ie),2)).call(f.stroke,D.outlinecolor).style({fill:"none","stroke-width":Y});var Pe=I?$t*$e:0,ke=I?0:(1-le)*$e-Xe;if(Pe=ot?Z.l-Pe:-Pe,ke=Q?Z.t-ke:-ke,z.attr("transform",r(Pe,ke)),!I&&(j||C(et).getAlpha()&&!C.equals($.paper_bgcolor,et))){var Ve=Et.selectAll("text"),Je=Ve[0].length,ur=z.select("."+_.cbbg).node(),hr=n.bBox(ur),vr=n.getTranslate(z),Yt=2;Ve.each(function(mr,xr){var pr=0,Gr=Je-1;if(xr===pr||xr===Gr){var Pr=n.bBox(this),Dr=n.getTranslate(this),cn;if(xr===Gr){var rn=Pr.right+Dr.x,Cn=hr.right+vr.x+xe-j-Yt+tt;cn=Cn-rn,cn>0&&(cn=0)}else if(xr===pr){var En=Pr.left+Dr.x,Tr=hr.left+vr.x+xe+j+Yt;cn=Tr-En,cn<0&&(cn=0)}cn&&(Je<3?this.setAttribute("transform","translate("+cn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Gt={},Ne=w[it],Oe=A[it],Qe=w[ut],er=A[ut],fr=$e-Ht;I?(B==="pixels"?(Gt.y=V,Gt.t=kt*Qe,Gt.b=kt*er):(Gt.t=Gt.b=0,Gt.yt=V+k*Qe,Gt.yb=V-k*er),H==="pixels"?(Gt.x=tt,Gt.l=$e*Ne,Gt.r=$e*Oe):(Gt.l=fr*Ne,Gt.r=fr*Oe,Gt.xl=tt-O*Ne,Gt.xr=tt+O*Oe)):(B==="pixels"?(Gt.x=tt,Gt.l=kt*Ne,Gt.r=kt*Oe):(Gt.l=Gt.r=0,Gt.xl=tt+k*Ne,Gt.xr=tt-k*Oe),H==="pixels"?(Gt.y=1-V,Gt.t=$e*Qe,Gt.b=$e*er):(Gt.t=fr*Qe,Gt.b=fr*er,Gt.yt=V-O*Qe,Gt.yb=V+O*er));var rr=D.y<.5?"b":"t",He=D.x<.5?"l":"r";N._fullLayout._reservedMargin[D._id]={};var dr={r:$.width-Ae-Pe,l:Ae+Gt.r,b:$.height-Ce-ke,t:Ce+Gt.b};ot&&Q?i.autoMargin(N,D._id,Gt):ot?N._fullLayout._reservedMargin[D._id][rr]=dr[rr]:Q||I?N._fullLayout._reservedMargin[D._id][He]=dr[He]:N._fullLayout._reservedMargin[D._id][rr]=dr[rr]}return p.syncOrAsync([i.previousPromises,me,ve,be,i.previousPromises,Le],N)}function s(z,D,N){var I=D.orientation==="v",k=N._fullLayout,B=k._size,O,H,Y;v.init({element:z.node(),gd:N,prepFn:function(){O=z.attr("transform"),a(z)},moveFn:function(j,et){z.attr("transform",O+r(j,et)),H=v.align((I?D._uFrac:D._vFrac)+j/B.w,I?D._thickFrac:D._lenFrac,0,1,D.xanchor),Y=v.align((I?D._vFrac:1-D._uFrac)-et/B.h,I?D._lenFrac:D._thickFrac,0,1,D.yanchor);var it=v.getCursor(H,Y,D.xanchor,D.yanchor);a(z,it)},doneFn:function(){if(a(z),H!==void 0&&Y!==void 0){var j={};j[D._propPrefix+"x"]=H,j[D._propPrefix+"y"]=Y,D._traceIndex!==void 0?S.call("_guiRestyle",N,j,D._traceIndex):S.call("_guiRelayout",N,j)}}})}function L(z,D,N){var I=D._levels,k=[],B=[],O,H,Y=I.end+I.size/100,j=I.size,et=1.001*N[0]-.001*N[1],it=1.001*N[1]-.001*N[0];for(H=0;H<1e5&&(O=I.start+H*j,!(j>0?O>=Y:O<=Y));H++)O>et&&O0?O>=Y:O<=Y));H++)O>N[0]&&Oh-l?l=h-(m-h):m-h=0?o=r.colorscale.sequential:o=r.colorscale.sequentialminus,f._sync("colorscale",o)}}},95504:function(G,U,t){var g=t(3400),C=t(94288).hasColorscale,i=t(94288).extractOpts;G.exports=function(x,v){function p(l,m){var h=l["_"+m];h!==void 0&&(l[m]=h)}function r(l,m){var h=m.container?g.nestedProperty(l,m.container).get():l;if(h)if(h.coloraxis)h._colorAx=v[h.coloraxis];else{var b=i(h),u=b.auto;(u||b.min===void 0)&&p(h,m.min),(u||b.max===void 0)&&p(h,m.max),b.autocolorscale&&p(h,"colorscale")}}for(var e=0;e=0;o--,d++){var w=h[o];u[d]=[1-w[0],w[1]]}return u}function c(h,b){b=b||{};for(var u=h.domain,o=h.range,d=o.length,w=new Array(d),A=0;A1.3333333333333333-p?v:p}},67416:function(G,U,t){var g=t(3400),C=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];G.exports=function(S,x,v,p){return v==="left"?S=0:v==="center"?S=1:v==="right"?S=2:S=g.constrain(Math.floor(S*3),0,2),p==="bottom"?x=0:p==="middle"?x=1:p==="top"?x=2:x=g.constrain(Math.floor(x*3),0,2),C[x][S]}},72760:function(G,U){U.selectMode=function(t){return t==="lasso"||t==="select"},U.drawMode=function(t){return t==="drawclosedpath"||t==="drawopenpath"||t==="drawline"||t==="drawrect"||t==="drawcircle"},U.openMode=function(t){return t==="drawline"||t==="drawopenpath"},U.rectMode=function(t){return t==="select"||t==="drawline"||t==="drawrect"||t==="drawcircle"},U.freeMode=function(t){return t==="lasso"||t==="drawclosedpath"||t==="drawopenpath"},U.selectingOrDrawing=function(t){return U.freeMode(t)||U.rectMode(t)}},86476:function(G,U,t){var g=t(29128),C=t(52264),i=t(89184),S=t(3400).removeElement,x=t(33816),v=G.exports={};v.align=t(78316),v.getCursor=t(67416);var p=t(2616);v.unhover=p.wrapped,v.unhoverRaw=p.raw,v.init=function(n){var f=n.gd,c=1,l=f._context.doubleClickDelay,m=n.element,h,b,u,o,d,w,A,_;f._mouseDownTime||(f._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=T,i?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=T,m.addEventListener("touchstart",T,{passive:!1})):m.ontouchstart=T;function y(M,z,D){return Math.abs(M)"u"&&typeof M.clientY>"u"&&(M.clientX=h,M.clientY=b),u=new Date().getTime(),u-f._mouseDownTimel&&(c=Math.max(c-1,1)),f._dragged)n.doneFn&&n.doneFn();else if(n.clickFn&&n.clickFn(c,w),!_){var z;try{z=new MouseEvent("click",M)}catch{var D=e(M);z=document.createEvent("MouseEvents"),z.initMouseEvent("click",M.bubbles,M.cancelable,M.view,M.detail,M.screenX,M.screenY,D[0],D[1],M.ctrlKey,M.altKey,M.shiftKey,M.metaKey,M.button,M.relatedTarget)}A.dispatchEvent(z)}f._dragging=!1,f._dragged=!1}};function r(){var a=document.createElement("div");a.className="dragcover";var n=a.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(a),a}v.coverSlip=r;function e(a){return g(a.changedTouches?a.changedTouches[0]:a,document.body)}},2616:function(G,U,t){var g=t(95924),C=t(91200),i=t(52200).getGraphDiv,S=t(92456),x=G.exports={};x.wrapped=function(v,p,r){v=i(v),v._fullLayout&&C.clear(v._fullLayout._uid+S.HOVERID),x.raw(v,p,r)},x.raw=function(p,r){var e=p._fullLayout,a=p._hoverdata;r||(r={}),!(r.target&&!p._dragged&&g.triggerHandler(p,"plotly_beforehover",r)===!1)&&(e._hoverlayer.selectAll("g").remove(),e._hoverlayer.selectAll("line").remove(),e._hoverlayer.selectAll("circle").remove(),p._hoverdata=void 0,r.target&&a&&p.emit("plotly_unhover",{event:r,points:a}))}},98192:function(G,U){U.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},U.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},43616:function(G,U,t){var g=t(33428),C=t(3400),i=C.numberFormat,S=t(38248),x=t(49760),v=t(24040),p=t(76308),r=t(8932),e=C.strTranslate,a=t(72736),n=t(9616),f=t(84284),c=f.LINE_SPACING,l=t(13448).DESELECTDIM,m=t(43028),h=t(7152),b=t(10624).appendArrayPointValue,u=G.exports={};u.font=function(bt,At,mt,Lt){C.isPlainObject(At)&&(Lt=At.color,mt=At.size,At=At.family),At&&bt.style("font-family",At),mt+1&&bt.style("font-size",mt+"px"),Lt&&bt.call(p.fill,Lt)},u.setPosition=function(bt,At,mt){bt.attr("x",At).attr("y",mt)},u.setSize=function(bt,At,mt){bt.attr("width",At).attr("height",mt)},u.setRect=function(bt,At,mt,Lt,Ht){bt.call(u.setPosition,At,mt).call(u.setSize,Lt,Ht)},u.translatePoint=function(bt,At,mt,Lt){var Ht=mt.c2p(bt.x),Ut=Lt.c2p(bt.y);if(S(Ht)&&S(Ut)&&At.node())At.node().nodeName==="text"?At.attr("x",Ht).attr("y",Ut):At.attr("transform",e(Ht,Ut));else return!1;return!0},u.translatePoints=function(bt,At,mt){bt.each(function(Lt){var Ht=g.select(this);u.translatePoint(Lt,Ht,At,mt)})},u.hideOutsideRangePoint=function(bt,At,mt,Lt,Ht,Ut){At.attr("display",mt.isPtWithinRange(bt,Ht)&&Lt.isPtWithinRange(bt,Ut)?null:"none")},u.hideOutsideRangePoints=function(bt,At){if(At._hasClipOnAxisFalse){var mt=At.xaxis,Lt=At.yaxis;bt.each(function(Ht){var Ut=Ht[0].trace,kt=Ut.xcalendar,Vt=Ut.ycalendar,It=v.traceIs(Ut,"bar-like")?".bartext":".point,.textpoint";bt.selectAll(It).each(function(re){u.hideOutsideRangePoint(re,g.select(this),mt,Lt,kt,Vt)})})}},u.crispRound=function(bt,At,mt){return!At||!S(At)?mt||0:bt._context.staticPlot?At:At<1?1:Math.round(At)},u.singleLineStyle=function(bt,At,mt,Lt,Ht){At.style("fill","none");var Ut=(((bt||[])[0]||{}).trace||{}).line||{},kt=mt||Ut.width||0,Vt=Ht||Ut.dash||"";p.stroke(At,Lt||Ut.color),u.dashLine(At,Vt,kt)},u.lineGroupStyle=function(bt,At,mt,Lt){bt.style("fill","none").each(function(Ht){var Ut=(((Ht||[])[0]||{}).trace||{}).line||{},kt=At||Ut.width||0,Vt=Lt||Ut.dash||"";g.select(this).call(p.stroke,mt||Ut.color).call(u.dashLine,Vt,kt)})},u.dashLine=function(bt,At,mt){mt=+mt||0,At=u.dashStyle(At,mt),bt.style({"stroke-dasharray":At,"stroke-width":mt+"px"})},u.dashStyle=function(bt,At){At=+At||1;var mt=Math.max(At,3);return bt==="solid"?bt="":bt==="dot"?bt=mt+"px,"+mt+"px":bt==="dash"?bt=3*mt+"px,"+3*mt+"px":bt==="longdash"?bt=5*mt+"px,"+5*mt+"px":bt==="dashdot"?bt=3*mt+"px,"+mt+"px,"+mt+"px,"+mt+"px":bt==="longdashdot"&&(bt=5*mt+"px,"+2*mt+"px,"+mt+"px,"+2*mt+"px"),bt};function o(bt,At,mt,Lt){var Ht=At.fillpattern,Ut=At.fillgradient,kt=Ht&&u.getPatternAttr(Ht.shape,0,"");if(kt){var Vt=u.getPatternAttr(Ht.bgcolor,0,null),It=u.getPatternAttr(Ht.fgcolor,0,null),re=Ht.fgopacity,Kt=u.getPatternAttr(Ht.size,0,8),$t=u.getPatternAttr(Ht.solidity,0,.3),le=At.uid;u.pattern(bt,"point",mt,le,kt,Kt,$t,void 0,Ht.fillmode,Vt,It,re)}else if(Ut&&Ut.type!=="none"){var he=Ut.type,de="scatterfill-"+At.uid;if(Lt&&(de="legendfill-"+At.uid),!Lt&&(Ut.start!==void 0||Ut.stop!==void 0)){var xe,Se;he==="horizontal"?(xe={x:Ut.start,y:0},Se={x:Ut.stop,y:0}):he==="vertical"&&(xe={x:0,y:Ut.start},Se={x:0,y:Ut.stop}),xe.x=At._xA.c2p(xe.x===void 0?At._extremes.x.min[0].val:xe.x,!0),xe.y=At._yA.c2p(xe.y===void 0?At._extremes.y.min[0].val:xe.y,!0),Se.x=At._xA.c2p(Se.x===void 0?At._extremes.x.max[0].val:Se.x,!0),Se.y=At._yA.c2p(Se.y===void 0?At._extremes.y.max[0].val:Se.y,!0),bt.call(T,mt,de,"linear",Ut.colorscale,"fill",xe,Se,!0,!1)}else he==="horizontal"&&(he=he+"reversed"),bt.call(u.gradient,mt,de,he,Ut.colorscale,"fill")}else At.fillcolor&&bt.call(p.fill,At.fillcolor)}u.singleFillStyle=function(bt,At){var mt=g.select(bt.node()),Lt=mt.data(),Ht=((Lt[0]||[])[0]||{}).trace||{};o(bt,Ht,At,!1)},u.fillGroupStyle=function(bt,At,mt){bt.style("stroke-width",0).each(function(Lt){var Ht=g.select(this);Lt[0].trace&&o(Ht,Lt[0].trace,At,mt)})};var d=t(71984);u.symbolNames=[],u.symbolFuncs=[],u.symbolBackOffs=[],u.symbolNeedLines={},u.symbolNoDot={},u.symbolNoFill={},u.symbolList=[],Object.keys(d).forEach(function(bt){var At=d[bt],mt=At.n;u.symbolList.push(mt,String(mt),bt,mt+100,String(mt+100),bt+"-open"),u.symbolNames[mt]=bt,u.symbolFuncs[mt]=At.f,u.symbolBackOffs[mt]=At.backoff||0,At.needLine&&(u.symbolNeedLines[mt]=!0),At.noDot?u.symbolNoDot[mt]=!0:u.symbolList.push(mt+200,String(mt+200),bt+"-dot",mt+300,String(mt+300),bt+"-open-dot"),At.noFill&&(u.symbolNoFill[mt]=!0)});var w=u.symbolNames.length,A="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";u.symbolNumber=function(bt){if(S(bt))bt=+bt;else if(typeof bt=="string"){var At=0;bt.indexOf("-open")>0&&(At=100,bt=bt.replace("-open","")),bt.indexOf("-dot")>0&&(At+=200,bt=bt.replace("-dot","")),bt=u.symbolNames.indexOf(bt),bt>=0&&(bt+=At)}return bt%100>=w||bt>=400?0:Math.floor(Math.max(bt,0))};function _(bt,At,mt,Lt){var Ht=bt%100;return u.symbolFuncs[Ht](At,mt,Lt)+(bt>=200?A:"")}var y=i("~f"),E={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};u.gradient=function(bt,At,mt,Lt,Ht,Ut){var kt=E[Lt];return T(bt,At,mt,kt.type,Ht,Ut,kt.start,kt.stop,!1,kt.reversed)};function T(bt,At,mt,Lt,Ht,Ut,kt,Vt,It,re){var Kt=Ht.length,$t;Lt==="linear"?$t={node:"linearGradient",attrs:{x1:kt.x,y1:kt.y,x2:Vt.x,y2:Vt.y,gradientUnits:It?"userSpaceOnUse":"objectBoundingBox"},reversed:re}:Lt==="radial"&&($t={node:"radialGradient",reversed:re});for(var le=new Array(Kt),he=0;he=0&&bt.i===void 0&&(bt.i=Ut.i),At.style("opacity",Lt.selectedOpacityFn?Lt.selectedOpacityFn(bt):bt.mo===void 0?kt.opacity:bt.mo),Lt.ms2mrc){var It;bt.ms==="various"||kt.size==="various"?It=3:It=Lt.ms2mrc(bt.ms),bt.mrc=It,Lt.selectedSizeFn&&(It=bt.mrc=Lt.selectedSizeFn(bt));var re=u.symbolNumber(bt.mx||kt.symbol)||0;bt.om=re%200>=100;var Kt=Rt(bt,mt),$t=V(bt,mt);At.attr("d",_(re,It,Kt,$t))}var le=!1,he,de,xe;if(bt.so)xe=Vt.outlierwidth,de=Vt.outliercolor,he=kt.outliercolor;else{var Se=(Vt||{}).width;xe=(bt.mlw+1||Se+1||(bt.trace?(bt.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in bt?de=bt.mlcc=Lt.lineScale(bt.mlc):C.isArrayOrTypedArray(Vt.color)?de=p.defaultLine:de=Vt.color,C.isArrayOrTypedArray(kt.color)&&(he=p.defaultLine,le=!0),"mc"in bt?he=bt.mcc=Lt.markerScale(bt.mc):he=kt.color||kt.colors||"rgba(0,0,0,0)",Lt.selectedColorFn&&(he=Lt.selectedColorFn(bt))}if(bt.om)At.call(p.stroke,he).style({"stroke-width":(xe||1)+"px",fill:"none"});else{At.style("stroke-width",(bt.isBlank?0:xe)+"px");var ne=kt.gradient,zt=bt.mgt;zt?le=!0:zt=ne&&ne.type,C.isArrayOrTypedArray(zt)&&(zt=zt[0],E[zt]||(zt=0));var Xt=kt.pattern,Jt=Xt&&u.getPatternAttr(Xt.shape,bt.i,"");if(zt&&zt!=="none"){var Wt=bt.mgc;Wt?le=!0:Wt=ne.color;var Ft=mt.uid;le&&(Ft+="-"+bt.i),u.gradient(At,Ht,Ft,zt,[[0,Wt],[1,he]],"fill")}else if(Jt){var xt=!1,yt=Xt.fgcolor;!yt&&Ut&&Ut.color&&(yt=Ut.color,xt=!0);var Et=u.getPatternAttr(yt,bt.i,Ut&&Ut.color||null),Mt=u.getPatternAttr(Xt.bgcolor,bt.i,null),Nt=Xt.fgopacity,jt=u.getPatternAttr(Xt.size,bt.i,8),ie=u.getPatternAttr(Xt.solidity,bt.i,.3);xt=xt||bt.mcc||C.isArrayOrTypedArray(Xt.shape)||C.isArrayOrTypedArray(Xt.bgcolor)||C.isArrayOrTypedArray(Xt.fgcolor)||C.isArrayOrTypedArray(Xt.size)||C.isArrayOrTypedArray(Xt.solidity);var me=mt.uid;xt&&(me+="-"+bt.i),u.pattern(At,"point",Ht,me,Jt,jt,ie,bt.mcc,Xt.fillmode,Mt,Et,Nt)}else C.isArrayOrTypedArray(he)?p.fill(At,he[bt.i]):p.fill(At,he);xe&&p.stroke(At,de)}},u.makePointStyleFns=function(bt){var At={},mt=bt.marker;return At.markerScale=u.tryColorscale(mt,""),At.lineScale=u.tryColorscale(mt,"line"),v.traceIs(bt,"symbols")&&(At.ms2mrc=m.isBubble(bt)?h(bt):function(){return(mt.size||6)/2}),bt.selectedpoints&&C.extendFlat(At,u.makeSelectedPointStyleFns(bt)),At},u.makeSelectedPointStyleFns=function(bt){var At={},mt=bt.selected||{},Lt=bt.unselected||{},Ht=bt.marker||{},Ut=mt.marker||{},kt=Lt.marker||{},Vt=Ht.opacity,It=Ut.opacity,re=kt.opacity,Kt=It!==void 0,$t=re!==void 0;(C.isArrayOrTypedArray(Vt)||Kt||$t)&&(At.selectedOpacityFn=function(Jt){var Wt=Jt.mo===void 0?Ht.opacity:Jt.mo;return Jt.selected?Kt?It:Wt:$t?re:l*Wt});var le=Ht.color,he=Ut.color,de=kt.color;(he||de)&&(At.selectedColorFn=function(Jt){var Wt=Jt.mcc||le;return Jt.selected?he||Wt:de||Wt});var xe=Ht.size,Se=Ut.size,ne=kt.size,zt=Se!==void 0,Xt=ne!==void 0;return v.traceIs(bt,"symbols")&&(zt||Xt)&&(At.selectedSizeFn=function(Jt){var Wt=Jt.mrc||xe/2;return Jt.selected?zt?Se/2:Wt:Xt?ne/2:Wt}),At},u.makeSelectedTextStyleFns=function(bt){var At={},mt=bt.selected||{},Lt=bt.unselected||{},Ht=bt.textfont||{},Ut=mt.textfont||{},kt=Lt.textfont||{},Vt=Ht.color,It=Ut.color,re=kt.color;return At.selectedTextColorFn=function(Kt){var $t=Kt.tc||Vt;return Kt.selected?It||$t:re||(It?$t:p.addOpacity($t,l))},At},u.selectedPointStyle=function(bt,At){if(!(!bt.size()||!At.selectedpoints)){var mt=u.makeSelectedPointStyleFns(At),Lt=At.marker||{},Ht=[];mt.selectedOpacityFn&&Ht.push(function(Ut,kt){Ut.style("opacity",mt.selectedOpacityFn(kt))}),mt.selectedColorFn&&Ht.push(function(Ut,kt){p.fill(Ut,mt.selectedColorFn(kt))}),mt.selectedSizeFn&&Ht.push(function(Ut,kt){var Vt=kt.mx||Lt.symbol||0,It=mt.selectedSizeFn(kt);Ut.attr("d",_(u.symbolNumber(Vt),It,Rt(kt,At),V(kt,At))),kt.mrc2=It}),Ht.length&&bt.each(function(Ut){for(var kt=g.select(this),Vt=0;Vt0?mt:0}u.textPointStyle=function(bt,At,mt){if(bt.size()){var Lt;if(At.selectedpoints){var Ht=u.makeSelectedTextStyleFns(At);Lt=Ht.selectedTextColorFn}var Ut=At.texttemplate,kt=mt._fullLayout;bt.each(function(Vt){var It=g.select(this),re=Ut?C.extractOption(Vt,At,"txt","texttemplate"):C.extractOption(Vt,At,"tx","text");if(!re&&re!==0){It.remove();return}if(Ut){var Kt=At._module.formatLabels,$t=Kt?Kt(Vt,At,kt):{},le={};b(le,At,Vt.i);var he=At._meta||{};re=C.texttemplateString(re,$t,kt._d3locale,le,Vt,he)}var de=Vt.tp||At.textposition,xe=M(Vt,At),Se=Lt?Lt(Vt):Vt.tc||At.textfont.color;It.call(u.font,Vt.tf||At.textfont.family,xe,Se).text(re).call(a.convertToTspans,mt).call(L,de,xe,Vt.mrc)})}},u.selectedTextStyle=function(bt,At){if(!(!bt.size()||!At.selectedpoints)){var mt=u.makeSelectedTextStyleFns(At);bt.each(function(Lt){var Ht=g.select(this),Ut=mt.selectedTextColorFn(Lt),kt=Lt.tp||At.textposition,Vt=M(Lt,At);p.fill(Ht,Ut);var It=v.traceIs(At,"bar-like");L(Ht,kt,Vt,Lt.mrc2||Lt.mrc,It)})}};var z=.5;u.smoothopen=function(bt,At){if(bt.length<3)return"M"+bt.join("L");var mt="M"+bt[0],Lt=[],Ht;for(Ht=1;Ht=It||Jt>=Kt&&Jt<=It)&&(Wt<=$t&&Wt>=re||Wt>=$t&&Wt<=re)&&(bt=[Jt,Wt])}return bt}u.applyBackoff=j,u.makeTester=function(){var bt=C.ensureSingleById(g.select("body"),"svg","js-plotly-tester",function(mt){mt.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),At=C.ensureSingle(bt,"path","js-reference-point",function(mt){mt.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});u.tester=bt,u.testref=At},u.savedBBoxes={};var et=0,it=1e4;u.bBox=function(bt,At,mt){mt||(mt=ut(bt));var Lt;if(mt){if(Lt=u.savedBBoxes[mt],Lt)return C.extendFlat({},Lt)}else if(bt.childNodes.length===1){var Ht=bt.childNodes[0];if(mt=ut(Ht),mt){var Ut=+Ht.getAttribute("x")||0,kt=+Ht.getAttribute("y")||0,Vt=Ht.getAttribute("transform");if(!Vt){var It=u.bBox(Ht,!1,mt);return Ut&&(It.left+=Ut,It.right+=Ut),kt&&(It.top+=kt,It.bottom+=kt),It}if(mt+="~"+Ut+"~"+kt+"~"+Vt,Lt=u.savedBBoxes[mt],Lt)return C.extendFlat({},Lt)}}var re,Kt;At?re=bt:(Kt=u.tester.node(),re=bt.cloneNode(!0),Kt.appendChild(re)),g.select(re).attr("transform",null).call(a.positionText,0,0);var $t=re.getBoundingClientRect(),le=u.testref.node().getBoundingClientRect();At||Kt.removeChild(re);var he={height:$t.height,width:$t.width,left:$t.left-le.left,top:$t.top-le.top,right:$t.right-le.left,bottom:$t.bottom-le.top};return et>=it&&(u.savedBBoxes={},et=0),mt&&(u.savedBBoxes[mt]=he),et++,C.extendFlat({},he)};function ut(bt){var At=bt.getAttribute("data-unformatted");if(At!==null)return At+bt.getAttribute("data-math")+bt.getAttribute("text-anchor")+bt.getAttribute("style")}u.setClipUrl=function(bt,At,mt){bt.attr("clip-path",J(At,mt))};function J(bt,At){if(!bt)return null;var mt=At._context,Lt=mt._exportedPlot?"":mt._baseUrl||"";return Lt?"url('"+Lt+"#"+bt+"')":"url(#"+bt+")"}u.getTranslate=function(bt){var At=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,mt=bt.attr?"attr":"getAttribute",Lt=bt[mt]("transform")||"",Ht=Lt.replace(At,function(Ut,kt,Vt){return[kt,Vt].join(" ")}).split(" ");return{x:+Ht[0]||0,y:+Ht[1]||0}},u.setTranslate=function(bt,At,mt){var Lt=/(\btranslate\(.*?\);?)/,Ht=bt.attr?"attr":"getAttribute",Ut=bt.attr?"attr":"setAttribute",kt=bt[Ht]("transform")||"";return At=At||0,mt=mt||0,kt=kt.replace(Lt,"").trim(),kt+=e(At,mt),kt=kt.trim(),bt[Ut]("transform",kt),kt},u.getScale=function(bt){var At=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,mt=bt.attr?"attr":"getAttribute",Lt=bt[mt]("transform")||"",Ht=Lt.replace(At,function(Ut,kt,Vt){return[kt,Vt].join(" ")}).split(" ");return{x:+Ht[0]||1,y:+Ht[1]||1}},u.setScale=function(bt,At,mt){var Lt=/(\bscale\(.*?\);?)/,Ht=bt.attr?"attr":"getAttribute",Ut=bt.attr?"attr":"setAttribute",kt=bt[Ht]("transform")||"";return At=At||1,mt=mt||1,kt=kt.replace(Lt,"").trim(),kt+="scale("+At+","+mt+")",kt=kt.trim(),bt[Ut]("transform",kt),kt};var X=/\s*sc.*/;u.setPointGroupScale=function(bt,At,mt){if(At=At||1,mt=mt||1,!!bt){var Lt=At===1&&mt===1?"":"scale("+At+","+mt+")";bt.each(function(){var Ht=(this.getAttribute("transform")||"").replace(X,"");Ht+=Lt,Ht=Ht.trim(),this.setAttribute("transform",Ht)})}};var tt=/translate\([^)]*\)\s*$/;u.setTextPointsScale=function(bt,At,mt){bt&&bt.each(function(){var Lt,Ht=g.select(this),Ut=Ht.select("text");if(Ut.node()){var kt=parseFloat(Ut.attr("x")||0),Vt=parseFloat(Ut.attr("y")||0),It=(Ht.attr("transform")||"").match(tt);At===1&&mt===1?Lt=[]:Lt=[e(kt,Vt),"scale("+At+","+mt+")",e(-kt,-Vt)],It&&Lt.push(It),Ht.attr("transform",Lt.join(""))}})};function V(bt,At){var mt;return bt&&(mt=bt.mf),mt===void 0&&(mt=At.marker&&At.marker.standoff||0),!At._geo&&!At._xA?-mt:mt}u.getMarkerStandoff=V;var Q=Math.atan2,ot=Math.cos,$=Math.sin;function Z(bt,At){var mt=At[0],Lt=At[1];return[mt*ot(bt)-Lt*$(bt),mt*$(bt)+Lt*ot(bt)]}var st,nt,ct,gt,Tt,wt;function Rt(bt,At){var mt=bt.ma;mt===void 0&&(mt=At.marker.angle,(!mt||C.isArrayOrTypedArray(mt))&&(mt=0));var Lt,Ht,Ut=At.marker.angleref;if(Ut==="previous"||Ut==="north"){if(At._geo){var kt=At._geo.project(bt.lonlat);Lt=kt[0],Ht=kt[1]}else{var Vt=At._xA,It=At._yA;if(Vt&&It)Lt=Vt.c2p(bt.x),Ht=It.c2p(bt.y);else return 90}if(At._geo){var re=bt.lonlat[0],Kt=bt.lonlat[1],$t=At._geo.project([re,Kt+1e-5]),le=At._geo.project([re+1e-5,Kt]),he=Q(le[1]-Ht,le[0]-Lt),de=Q($t[1]-Ht,$t[0]-Lt),xe;if(Ut==="north")xe=mt/180*Math.PI;else if(Ut==="previous"){var Se=re/180*Math.PI,ne=Kt/180*Math.PI,zt=st/180*Math.PI,Xt=nt/180*Math.PI,Jt=zt-Se,Wt=ot(Xt)*$(Jt),Ft=$(Xt)*ot(ne)-ot(Xt)*$(ne)*ot(Jt);xe=-Q(Wt,Ft)-Math.PI,st=re,nt=Kt}var xt=Z(he,[ot(xe),0]),yt=Z(de,[$(xe),0]);mt=Q(xt[1]+yt[1],xt[0]+yt[0])/Math.PI*180,Ut==="previous"&&!(wt===At.uid&&bt.i===Tt+1)&&(mt=null)}if(Ut==="previous"&&!At._geo)if(wt===At.uid&&bt.i===Tt+1&&S(Lt)&&S(Ht)){var Et=Lt-ct,Mt=Ht-gt,Nt=At.line&&At.line.shape||"",jt=Nt.slice(Nt.length-1);jt==="h"&&(Mt=0),jt==="v"&&(Et=0),mt+=Q(Mt,Et)/Math.PI*180+90}else mt=null}return ct=Lt,gt=Ht,Tt=bt.i,wt=At.uid,mt}u.getMarkerAngle=Rt},71984:function(G,U,t){var g=t(21984),C=t(33428).round,i="M0,0Z",S=Math.sqrt(2),x=Math.sqrt(3),v=Math.PI,p=Math.cos,r=Math.sin;G.exports={circle:{n:0,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o="M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z";return b?l(h,b,o):o}},square:{n:1,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")}},diamond:{n:2,f:function(m,h,b){if(e(h))return i;var u=C(m*1.3,2);return l(h,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"Z")}},cross:{n:3,f:function(m,h,b){if(e(h))return i;var u=C(m*.4,2),o=C(m*1.2,2);return l(h,b,"M"+o+","+u+"H"+u+"V"+o+"H-"+u+"V"+u+"H-"+o+"V-"+u+"H-"+u+"V-"+o+"H"+u+"V-"+u+"H"+o+"Z")}},x:{n:4,f:function(m,h,b){if(e(h))return i;var u=C(m*.8/S,2),o="l"+u+","+u,d="l"+u+",-"+u,w="l-"+u+",-"+u,A="l-"+u+","+u;return l(h,b,"M0,"+u+o+d+w+d+w+A+w+A+o+A+o+"Z")}},"triangle-up":{n:5,f:function(m,h,b){if(e(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M-"+u+","+o+"H"+u+"L0,-"+d+"Z")}},"triangle-down":{n:6,f:function(m,h,b){if(e(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M-"+u+",-"+o+"H"+u+"L0,"+d+"Z")}},"triangle-left":{n:7,f:function(m,h,b){if(e(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M"+o+",-"+u+"V"+u+"L-"+d+",0Z")}},"triangle-right":{n:8,f:function(m,h,b){if(e(h))return i;var u=C(m*2/x,2),o=C(m/2,2),d=C(m,2);return l(h,b,"M-"+o+",-"+u+"V"+u+"L"+d+",0Z")}},"triangle-ne":{n:9,f:function(m,h,b){if(e(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M-"+o+",-"+u+"H"+u+"V"+o+"Z")}},"triangle-se":{n:10,f:function(m,h,b){if(e(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M"+u+",-"+o+"V"+u+"H-"+o+"Z")}},"triangle-sw":{n:11,f:function(m,h,b){if(e(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M"+o+","+u+"H-"+u+"V-"+o+"Z")}},"triangle-nw":{n:12,f:function(m,h,b){if(e(h))return i;var u=C(m*.6,2),o=C(m*1.2,2);return l(h,b,"M-"+u+","+o+"V-"+u+"H"+o+"Z")}},pentagon:{n:13,f:function(m,h,b){if(e(h))return i;var u=C(m*.951,2),o=C(m*.588,2),d=C(-m,2),w=C(m*-.309,2),A=C(m*.809,2);return l(h,b,"M"+u+","+w+"L"+o+","+A+"H-"+o+"L-"+u+","+w+"L0,"+d+"Z")}},hexagon:{n:14,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m/2,2),d=C(m*x/2,2);return l(h,b,"M"+d+",-"+o+"V"+o+"L0,"+u+"L-"+d+","+o+"V-"+o+"L0,-"+u+"Z")}},hexagon2:{n:15,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m/2,2),d=C(m*x/2,2);return l(h,b,"M-"+o+","+d+"H"+o+"L"+u+",0L"+o+",-"+d+"H-"+o+"L-"+u+",0Z")}},octagon:{n:16,f:function(m,h,b){if(e(h))return i;var u=C(m*.924,2),o=C(m*.383,2);return l(h,b,"M-"+o+",-"+u+"H"+o+"L"+u+",-"+o+"V"+o+"L"+o+","+u+"H-"+o+"L-"+u+","+o+"V-"+o+"Z")}},star:{n:17,f:function(m,h,b){if(e(h))return i;var u=m*1.4,o=C(u*.225,2),d=C(u*.951,2),w=C(u*.363,2),A=C(u*.588,2),_=C(-u,2),y=C(u*-.309,2),E=C(u*.118,2),T=C(u*.809,2),s=C(u*.382,2);return l(h,b,"M"+o+","+y+"H"+d+"L"+w+","+E+"L"+A+","+T+"L0,"+s+"L-"+A+","+T+"L-"+w+","+E+"L-"+d+","+y+"H-"+o+"L0,"+_+"Z")}},hexagram:{n:18,f:function(m,h,b){if(e(h))return i;var u=C(m*.66,2),o=C(m*.38,2),d=C(m*.76,2);return l(h,b,"M-"+d+",0l-"+o+",-"+u+"h"+d+"l"+o+",-"+u+"l"+o+","+u+"h"+d+"l-"+o+","+u+"l"+o+","+u+"h-"+d+"l-"+o+","+u+"l-"+o+",-"+u+"h-"+d+"Z")}},"star-triangle-up":{n:19,f:function(m,h,b){if(e(h))return i;var u=C(m*x*.8,2),o=C(m*.8,2),d=C(m*1.6,2),w=C(m*4,2),A="A "+w+","+w+" 0 0 1 ";return l(h,b,"M-"+u+","+o+A+u+","+o+A+"0,-"+d+A+"-"+u+","+o+"Z")}},"star-triangle-down":{n:20,f:function(m,h,b){if(e(h))return i;var u=C(m*x*.8,2),o=C(m*.8,2),d=C(m*1.6,2),w=C(m*4,2),A="A "+w+","+w+" 0 0 1 ";return l(h,b,"M"+u+",-"+o+A+"-"+u+",-"+o+A+"0,"+d+A+u+",-"+o+"Z")}},"star-square":{n:21,f:function(m,h,b){if(e(h))return i;var u=C(m*1.1,2),o=C(m*2,2),d="A "+o+","+o+" 0 0 1 ";return l(h,b,"M-"+u+",-"+u+d+"-"+u+","+u+d+u+","+u+d+u+",-"+u+d+"-"+u+",-"+u+"Z")}},"star-diamond":{n:22,f:function(m,h,b){if(e(h))return i;var u=C(m*1.4,2),o=C(m*1.9,2),d="A "+o+","+o+" 0 0 1 ";return l(h,b,"M-"+u+",0"+d+"0,"+u+d+u+",0"+d+"0,-"+u+d+"-"+u+",0Z")}},"diamond-tall":{n:23,f:function(m,h,b){if(e(h))return i;var u=C(m*.7,2),o=C(m*1.4,2);return l(h,b,"M0,"+o+"L"+u+",0L0,-"+o+"L-"+u+",0Z")}},"diamond-wide":{n:24,f:function(m,h,b){if(e(h))return i;var u=C(m*1.4,2),o=C(m*.7,2);return l(h,b,"M0,"+o+"L"+u+",0L0,-"+o+"L-"+u+",0Z")}},hourglass:{n:25,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"H-"+u+"L"+u+",-"+u+"H-"+u+"Z")},noDot:!0},bowtie:{n:26,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"V-"+u+"L-"+u+","+u+"V-"+u+"Z")},noDot:!0},"circle-cross":{n:27,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m/S,2);return l(h,b,"M"+o+","+o+"L-"+o+",-"+o+"M"+o+",-"+o+"L-"+o+","+o+"M"+u+",0A"+u+","+u+" 0 1,1 0,-"+u+"A"+u+","+u+" 0 0,1 "+u+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u+"M"+u+","+u+"H-"+u+"V-"+u+"H"+u+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(m,h,b){if(e(h))return i;var u=C(m*1.3,2);return l(h,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM0,-"+u+"V"+u+"M-"+u+",0H"+u)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(m,h,b){if(e(h))return i;var u=C(m*1.3,2),o=C(m*.65,2);return l(h,b,"M"+u+",0L0,"+u+"L-"+u+",0L0,-"+u+"ZM-"+o+",-"+o+"L"+o+","+o+"M-"+o+","+o+"L"+o+",-"+o)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(m,h,b){if(e(h))return i;var u=C(m*1.4,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"L-"+u+",-"+u+"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(m,h,b){if(e(h))return i;var u=C(m*1.2,2),o=C(m*.85,2);return l(h,b,"M0,"+u+"V-"+u+"M"+u+",0H-"+u+"M"+o+","+o+"L-"+o+",-"+o+"M"+o+",-"+o+"L-"+o+","+o)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(m,h,b){if(e(h))return i;var u=C(m/2,2),o=C(m,2);return l(h,b,"M"+u+","+o+"V-"+o+"M"+(u-o)+",-"+o+"V"+o+"M"+o+","+u+"H-"+o+"M-"+o+","+(u-o)+"H"+o)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(m,h,b){if(e(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M-"+u+","+d+"L0,0M"+u+","+d+"L0,0M0,-"+o+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(m,h,b){if(e(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M-"+u+",-"+d+"L0,0M"+u+",-"+d+"L0,0M0,"+o+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(m,h,b){if(e(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M"+d+","+u+"L0,0M"+d+",-"+u+"L0,0M-"+o+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(m,h,b){if(e(h))return i;var u=C(m*1.2,2),o=C(m*1.6,2),d=C(m*.8,2);return l(h,b,"M-"+d+","+u+"L0,0M-"+d+",-"+u+"L0,0M"+o+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(m,h,b){if(e(h))return i;var u=C(m*1.4,2);return l(h,b,"M"+u+",0H-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(m,h,b){if(e(h))return i;var u=C(m*1.4,2);return l(h,b,"M0,"+u+"V-"+u)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+",-"+u+"L-"+u+","+u)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(m,h,b){if(e(h))return i;var u=C(m,2);return l(h,b,"M"+u+","+u+"L-"+u+",-"+u)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M0,0L-"+u+","+o+"H"+u+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M0,0L-"+u+",-"+o+"H"+u+"Z")},noDot:!0},"arrow-left":{n:47,f:function(m,h,b){if(e(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,0L"+u+",-"+o+"V"+o+"Z")},noDot:!0},"arrow-right":{n:48,f:function(m,h,b){if(e(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,0L-"+u+",-"+o+"V"+o+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M-"+u+",0H"+u+"M0,0L-"+u+","+o+"H"+u+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(m,h,b){if(e(h))return i;var u=C(m,2),o=C(m*2,2);return l(h,b,"M-"+u+",0H"+u+"M0,0L-"+u+",-"+o+"H"+u+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(m,h,b){if(e(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,-"+o+"V"+o+"M0,0L"+u+",-"+o+"V"+o+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(m,h,b){if(e(h))return i;var u=C(m*2,2),o=C(m,2);return l(h,b,"M0,-"+o+"V"+o+"M0,0L-"+u+",-"+o+"V"+o+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(m,h,b){if(e(h))return i;var u=v/2.5,o=2*m*p(u),d=2*m*r(u);return l(h,b,"M0,0L"+-o+","+d+"L"+o+","+d+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(m,h,b){if(e(h))return i;var u=v/4,o=2*m*p(u),d=2*m*r(u);return l(h,b,"M0,0L"+-o+","+d+"A "+2*m+","+2*m+" 0 0 1 "+o+","+d+"Z")},backoff:.4,noDot:!0}};function e(m){return m===null}var a,n,f,c;function l(m,h,b){if((!m||m%360===0)&&!h)return b;if(f===m&&c===h&&a===b)return n;f=m,c=h,a=b;function u(D,N){var I=p(D),k=r(D),B=N[0],O=N[1]+(h||0);return[B*I-O*k,B*k+O*I]}for(var o=m/180*v,d=0,w=0,A=g(b),_="",y=0;y0,m=p._context.staticPlot;r.each(function(h){var b=h[0].trace,u=b.error_x||{},o=b.error_y||{},d;b.ids&&(d=function(y){return y.id});var w=S.hasMarkers(b)&&b.marker.maxdisplayed>0;!o.visible&&!u.visible&&(h=[]);var A=g.select(this).selectAll("g.errorbar").data(h,d);if(A.exit().remove(),!!h.length){u.visible||A.selectAll("path.xerror").remove(),o.visible||A.selectAll("path.yerror").remove(),A.style("opacity",1);var _=A.enter().append("g").classed("errorbar",!0);l&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),i.setClipUrl(A,e.layerClipId,p),A.each(function(y){var E=g.select(this),T=x(y,f,c);if(!(w&&!y.vis)){var s,L=E.select("path.yerror");if(o.visible&&C(T.x)&&C(T.yh)&&C(T.ys)){var M=o.width;s="M"+(T.x-M)+","+T.yh+"h"+2*M+"m-"+M+",0V"+T.ys,T.noYS||(s+="m-"+M+",0h"+2*M),n=!L.size(),n?L=E.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("yerror",!0):l&&(L=L.transition().duration(a.duration).ease(a.easing)),L.attr("d",s)}else L.remove();var z=E.select("path.xerror");if(u.visible&&C(T.y)&&C(T.xh)&&C(T.xs)){var D=(u.copy_ystyle?o:u).width;s="M"+T.xh+","+(T.y-D)+"v"+2*D+"m0,-"+D+"H"+T.xs,T.noXS||(s+="m0,-"+D+"v"+2*D),n=!z.size(),n?z=E.append("path").style("vector-effect",m?"none":"non-scaling-stroke").classed("xerror",!0):l&&(z=z.transition().duration(a.duration).ease(a.easing)),z.attr("d",s)}else z.remove()}})}})};function x(v,p,r){var e={x:p.c2p(v.x),y:r.c2p(v.y)};return v.yh!==void 0&&(e.yh=r.c2p(v.yh),e.ys=r.c2p(v.ys),C(e.ys)||(e.noYS=!0,e.ys=r.c2p(v.ys,!0))),v.xh!==void 0&&(e.xh=p.c2p(v.xh),e.xs=p.c2p(v.xs),C(e.xs)||(e.noXS=!0,e.xs=p.c2p(v.xs,!0))),e}},92036:function(G,U,t){var g=t(33428),C=t(76308);G.exports=function(S){S.each(function(x){var v=x[0].trace,p=v.error_y||{},r=v.error_x||{},e=g.select(this);e.selectAll("path.yerror").style("stroke-width",p.thickness+"px").call(C.stroke,p.color),r.copy_ystyle&&(r=p),e.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(C.stroke,r.color)})}},55756:function(G,U,t){var g=t(25376),C=t(65460).hoverlabel,i=t(92880).extendFlat;G.exports={hoverlabel:{bgcolor:i({},C.bgcolor,{arrayOk:!0}),bordercolor:i({},C.bordercolor,{arrayOk:!0}),font:g({arrayOk:!0,editType:"none"}),align:i({},C.align,{arrayOk:!0}),namelength:i({},C.namelength,{arrayOk:!0}),editType:"none"}}},55056:function(G,U,t){var g=t(3400),C=t(24040);G.exports=function(x){var v=x.calcdata,p=x._fullLayout;function r(c){return function(l){return g.coerceHoverinfo({hoverinfo:l},{_module:c._module},p)}}for(var e=0;e=0&&e.indexAt[0]._length||ie<0||ie>mt[0]._length)return f.unhoverRaw(Q,ot)}if(ot.pointerX=jt+At[0]._offset,ot.pointerY=ie+mt[0]._offset,"xval"in ot?le=m.flat(nt,ot.xval):le=m.p2c(At,jt),"yval"in ot?he=m.flat(nt,ot.yval):he=m.p2c(mt,ie),!C(le[0])||!C(he[0]))return S.warn("Fx.hover failed",ot,Q),f.unhoverRaw(Q,ot)}var ve=1/0;function Le(Cr,Wr){for(xe=0;xe<$t.length;xe++)if(Se=$t[xe],!(!Se||!Se[0]||!Se[0].trace)&&(ne=Se[0].trace,!(ne.visible!==!0||ne._length===0)&&["carpet","contourcarpet"].indexOf(ne._module.name)===-1)){if(ne.type==="splom"?(Xt=0,zt=nt[Xt]):(zt=m.getSubplot(ne),Xt=nt.indexOf(zt)),Jt=Vt,m.isUnifiedHover(Jt)&&(Jt=Jt.charAt(0)),xt={cd:Se,trace:ne,xa:At[Xt],ya:mt[Xt],maxHoverDistance:It,maxSpikeDistance:re,index:!1,distance:Math.min(ve,It),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:n.defaultLine,name:ne.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},ct[zt]&&(xt.subplot=ct[zt]._subplot),ct._splomScenes&&ct._splomScenes[ne.uid]&&(xt.scene=ct._splomScenes[ne.uid]),yt=Kt.length,Jt==="array"){var Ur=ot[xe];"pointNumber"in Ur?(xt.index=Ur.pointNumber,Jt="closest"):(Jt="","xval"in Ur&&(Wt=Ur.xval,Jt="x"),"yval"in Ur&&(Ft=Ur.yval,Jt=Jt?"closest":"y"))}else Cr!==void 0&&Wr!==void 0?(Wt=Cr,Ft=Wr):(Wt=le[Xt],Ft=he[Xt]);if(It!==0)if(ne._module&&ne._module.hoverPoints){var an=ne._module.hoverPoints(xt,Wt,Ft,Jt,{finiteRange:!0,hoverLayer:ct._hoverlayer});if(an)for(var pn,gn=0;gnyt&&(Kt.splice(0,yt),ve=Kt[0].distance),wt&&re!==0&&Kt.length===0){xt.distance=re,xt.index=!1;var _n=ne._module.hoverPoints(xt,Wt,Ft,"closest",{hoverLayer:ct._hoverlayer});if(_n&&(_n=_n.filter(function(ri){return ri.spikeDistance<=re})),_n&&_n.length){var kn,ni=_n.filter(function(ri){return ri.xa.showspikes&&ri.xa.spikesnap!=="hovered data"});if(ni.length){var ci=ni[0];C(ci.x0)&&C(ci.y0)&&(kn=Te(ci),(!Et.vLinePoint||Et.vLinePoint.spikeDistance>kn.spikeDistance)&&(Et.vLinePoint=kn))}var di=_n.filter(function(ri){return ri.ya.showspikes&&ri.ya.spikesnap!=="hovered data"});if(di.length){var li=di[0];C(li.x0)&&C(li.y0)&&(kn=Te(li),(!Et.hLinePoint||Et.hLinePoint.spikeDistance>kn.spikeDistance)&&(Et.hLinePoint=kn))}}}}}Le();function ce(Cr,Wr,Ur){for(var an=null,pn=1/0,gn,_n=0;_n0&&Math.abs(Cr.distance)Pe-1;Yt--)vr(Kt[Yt]);Kt=Je,Xe()}var Gt=Q._hoverdata,Ne=[],Oe=X(Q),Qe=tt(Q);for(de=0;de1||Kt.length>1)||Vt==="closest"&&Mt&&Kt.length>1,rn=n.combine(ct.plot_bgcolor||n.background,ct.paper_bgcolor),Cn=D(Kt,{gd:Q,hovermode:Vt,rotateLabels:cn,bgColor:rn,container:ct._hoverlayer,outerContainer:ct._paper.node(),commonLabelOpts:ct.hoverlabel,hoverdistance:ct.hoverdistance}),En=Cn.hoverLabels;if(m.isUnifiedHover(Vt)||(I(En,cn,ct,Cn.commonLabelBoundingBox),O(En,cn,ct._invScaleX,ct._invScaleY)),st&&st.tagName){var Tr=l.getComponentMethod("annotations","hasClickToShow")(Q,Ne);e(g.select(st),Tr?"pointer":"")}!st||Z||!j(Q,ot,Gt)||(Gt&&Q.emit("plotly_unhover",{event:ot,points:Gt}),Q.emit("plotly_hover",{event:ot,points:Q._hoverdata,xaxes:At,yaxes:mt,xvals:le,yvals:he}))}function M(Q){return[Q.trace.index,Q.index,Q.x0,Q.y0,Q.name,Q.attr,Q.xa?Q.xa._id:"",Q.ya?Q.ya._id:""].join(",")}var z=/([\s\S]*)<\/extra>/;function D(Q,ot){var $=ot.gd,Z=$._fullLayout,st=ot.hovermode,nt=ot.rotateLabels,ct=ot.bgColor,gt=ot.container,Tt=ot.outerContainer,wt=ot.commonLabelOpts||{};if(Q.length===0)return[[]];var Rt=ot.fontFamily||h.HOVERFONT,bt=ot.fontSize||h.HOVERFONTSIZE,At=Q[0],mt=At.xa,Lt=At.ya,Ht=st.charAt(0),Ut=Ht+"Label",kt=At[Ut];if(kt===void 0&&mt.type==="multicategory")for(var Vt=0;VtZ.width-Qe&&(er=Z.width-Qe),ke.attr("d","M"+(Gt-er)+",0L"+(Gt-er+y)+","+Oe+y+"H"+Qe+"v"+Oe+(E*2+Yt.height)+"H"+-Qe+"V"+Oe+y+"H"+(Gt-er-y)+"Z"),Gt=er,zt.minX=Gt-Qe,zt.maxX=Gt+Qe,mt.side==="top"?(zt.minY=Ne-(E*2+Yt.height),zt.maxY=Ne-E):(zt.minY=Ne+E,zt.maxY=Ne+(E*2+Yt.height))}else{var fr,rr,He;Lt.side==="right"?(fr="start",rr=1,He="",Gt=mt._offset+mt._length):(fr="end",rr=-1,He="-",Gt=mt._offset),Ne=Lt._offset+(At.y0+At.y1)/2,Ve.attr("text-anchor",fr),ke.attr("d","M0,0L"+He+y+","+y+"V"+(E+Yt.height/2)+"h"+He+(E*2+Yt.width)+"V-"+(E+Yt.height/2)+"H"+He+y+"V-"+y+"Z"),zt.minY=Ne-(E+Yt.height/2),zt.maxY=Ne+(E+Yt.height/2),Lt.side==="right"?(zt.minX=Gt+y,zt.maxX=Gt+y+(E*2+Yt.width)):(zt.minX=Gt-y-(E*2+Yt.width),zt.maxX=Gt-y);var dr=Yt.height/2,mr=re-Yt.top-dr,xr="clip"+Z._uid+"commonlabel"+Lt._id,pr;if(Gt=0?Ae=or:$e+Le=0?Ae=$e:ge+Le=0?Ce=Xe:Ke+ce<$t&&Ke>=0?Ce=Ke:se+ce<$t?Ce=se:Xe-ir=0,(Pe.idealAlign==="top"||!cn)&&rn?(dr-=xr/2,Pe.anchor="end"):cn?(dr+=xr/2,Pe.anchor="start"):Pe.anchor="middle",Pe.crossPos=dr;else{if(Pe.pos=dr,cn=He+mr/2+Dr<=Kt,rn=He-mr/2-Dr>=0,(Pe.idealAlign==="left"||!cn)&&rn)He-=mr/2,Pe.anchor="end";else if(cn)He+=mr/2,Pe.anchor="start";else{Pe.anchor="middle";var Cn=Dr/2,En=He+Cn-Kt,Tr=He-Cn;En>0&&(He-=En),Tr<0&&(He+=-Tr)}Pe.crossPos=He}Oe.attr("text-anchor",Pe.anchor),er&&Qe.attr("text-anchor",Pe.anchor),ke.attr("transform",x(He,dr)+(nt?v(o):""))}),{hoverLabels:Ie,commonLabelBoundingBox:zt}}function N(Q,ot,$,Z,st,nt){var ct="",gt="";Q.nameOverride!==void 0&&(Q.name=Q.nameOverride),Q.name&&(Q.trace._meta&&(Q.name=S.templateString(Q.name,Q.trace._meta)),ct=it(Q.name,Q.nameLength));var Tt=$.charAt(0),wt=Tt==="x"?"y":"x";Q.zLabel!==void 0?(Q.xLabel!==void 0&&(gt+="x: "+Q.xLabel+"
    "),Q.yLabel!==void 0&&(gt+="y: "+Q.yLabel+"
    "),Q.trace.type!=="choropleth"&&Q.trace.type!=="choroplethmapbox"&&(gt+=(gt?"z: ":"")+Q.zLabel)):ot&&Q[Tt+"Label"]===st?gt=Q[wt+"Label"]||"":Q.xLabel===void 0?Q.yLabel!==void 0&&Q.trace.type!=="scattercarpet"&&(gt=Q.yLabel):Q.yLabel===void 0?gt=Q.xLabel:gt="("+Q.xLabel+", "+Q.yLabel+")",(Q.text||Q.text===0)&&!Array.isArray(Q.text)&&(gt+=(gt?"
    ":"")+Q.text),Q.extraText!==void 0&&(gt+=(gt?"
    ":"")+Q.extraText),nt&>===""&&!Q.hovertemplate&&(ct===""&&nt.remove(),gt=ct);var Rt=Q.hovertemplate||!1;if(Rt){var bt=Q.hovertemplateLabels||Q;Q[Tt+"Label"]!==st&&(bt[Tt+"other"]=bt[Tt+"Val"],bt[Tt+"otherLabel"]=bt[Tt+"Label"]),gt=S.hovertemplateString(Rt,bt,Z._d3locale,Q.eventData[0]||{},Q.trace._meta),gt=gt.replace(z,function(At,mt){return ct=it(mt,Q.nameLength),""})}return[gt,ct]}function I(Q,ot,$,Z){var st=ot?"xa":"ya",nt=ot?"ya":"xa",ct=0,gt=1,Tt=Q.size(),wt=new Array(Tt),Rt=0,bt=Z.minX,At=Z.maxX,mt=Z.minY,Lt=Z.maxY,Ht=function(Wt){return Wt*$._invScaleX},Ut=function(Wt){return Wt*$._invScaleY};Q.each(function(Wt){var Ft=Wt[st],xt=Wt[nt],yt=Ft._id.charAt(0)==="x",Et=Ft.range;Rt===0&&Et&&Et[0]>Et[1]!==yt&&(gt=-1);var Mt=0,Nt=yt?$.width:$.height;if($.hovermode==="x"||$.hovermode==="y"){var jt=k(Wt,ot),ie=Wt.anchor,me=ie==="end"?-1:1,be,ve;if(ie==="middle")be=Wt.crossPos+(yt?Ut(jt.y-Wt.by/2):Ht(Wt.bx/2+Wt.tx2width/2)),ve=be+(yt?Ut(Wt.by):Ht(Wt.bx));else if(yt)be=Wt.crossPos+Ut(y+jt.y)-Ut(Wt.by/2-y),ve=be+Ut(Wt.by);else{var Le=Ht(me*y+jt.x),ce=Le+Ht(me*Wt.bx);be=Wt.crossPos+Math.min(Le,ce),ve=Wt.crossPos+Math.max(Le,ce)}yt?mt!==void 0&&Lt!==void 0&&Math.min(ve,Lt)-Math.max(be,mt)>1&&(xt.side==="left"?(Mt=xt._mainLinePosition,Nt=$.width):Nt=xt._mainLinePosition):bt!==void 0&&At!==void 0&&Math.min(ve,At)-Math.max(be,bt)>1&&(xt.side==="top"?(Mt=xt._mainLinePosition,Nt=$.height):Nt=xt._mainLinePosition)}wt[Rt++]=[{datum:Wt,traceIndex:Wt.trace.index,dp:0,pos:Wt.pos,posref:Wt.posref,size:Wt.by*(yt?w:1)/2,pmin:Mt,pmax:Nt}]}),wt.sort(function(Wt,Ft){return Wt[0].posref-Ft[0].posref||gt*(Ft[0].traceIndex-Wt[0].traceIndex)});var kt,Vt,It,re,Kt,$t,le;function he(Wt){var Ft=Wt[0],xt=Wt[Wt.length-1];if(Vt=Ft.pmin-Ft.pos-Ft.dp+Ft.size,It=xt.pos+xt.dp+xt.size-Ft.pmax,Vt>.01){for(Kt=Wt.length-1;Kt>=0;Kt--)Wt[Kt].dp+=Vt;kt=!1}if(!(It<.01)){if(Vt<-.01){for(Kt=Wt.length-1;Kt>=0;Kt--)Wt[Kt].dp-=It;kt=!1}if(kt){var yt=0;for(re=0;reFt.pmax&&yt++;for(re=Wt.length-1;re>=0&&!(yt<=0);re--)$t=Wt[re],$t.pos>Ft.pmax-1&&($t.del=!0,yt--);for(re=0;re=0;Kt--)Wt[Kt].dp-=It;for(re=Wt.length-1;re>=0&&!(yt<=0);re--)$t=Wt[re],$t.pos+$t.dp+$t.size>Ft.pmax&&($t.del=!0,yt--)}}}for(;!kt&&ct<=Tt;){for(ct++,kt=!0,re=0;re.01&&Se.pmin===ne.pmin&&Se.pmax===ne.pmax){for(Kt=xe.length-1;Kt>=0;Kt--)xe[Kt].dp+=Vt;for(de.push.apply(de,xe),wt.splice(re+1,1),le=0,Kt=de.length-1;Kt>=0;Kt--)le+=de[Kt].dp;for(It=le/de.length,Kt=de.length-1;Kt>=0;Kt--)de[Kt].dp-=It;kt=!1}else re++}wt.forEach(he)}for(re=wt.length-1;re>=0;re--){var zt=wt[re];for(Kt=zt.length-1;Kt>=0;Kt--){var Xt=zt[Kt],Jt=Xt.datum;Jt.offset=Xt.dp,Jt.del=Xt.del}}}function k(Q,ot){var $=0,Z=Q.offset;return ot&&(Z*=-_,$=Q.offset*A),{x:$,y:Z}}function B(Q){var ot={start:1,end:-1,middle:0}[Q.anchor],$=ot*(y+E),Z=$+ot*(Q.txwidth+E),st=Q.anchor==="middle";return st&&($-=Q.tx2width/2,Z+=Q.txwidth/2+E),{alignShift:ot,textShiftX:$,text2ShiftX:Z}}function O(Q,ot,$,Z){var st=function(ct){return ct*$},nt=function(ct){return ct*Z};Q.each(function(ct){var gt=g.select(this);if(ct.del)return gt.remove();var Tt=gt.select("text.nums"),wt=ct.anchor,Rt=wt==="end"?-1:1,bt=B(ct),At=k(ct,ot),mt=At.x,Lt=At.y,Ht=wt==="middle";gt.select("path").attr("d",Ht?"M-"+st(ct.bx/2+ct.tx2width/2)+","+nt(Lt-ct.by/2)+"h"+st(ct.bx)+"v"+nt(ct.by)+"h-"+st(ct.bx)+"Z":"M0,0L"+st(Rt*y+mt)+","+nt(y+Lt)+"v"+nt(ct.by/2-y)+"h"+st(Rt*ct.bx)+"v-"+nt(ct.by)+"H"+st(Rt*y+mt)+"V"+nt(Lt-y)+"Z");var Ut=mt+bt.textShiftX,kt=Lt+ct.ty0-ct.by/2+E,Vt=ct.textAlign||"auto";Vt!=="auto"&&(Vt==="left"&&wt!=="start"?(Tt.attr("text-anchor","start"),Ut=Ht?-ct.bx/2-ct.tx2width/2+E:-ct.bx-E):Vt==="right"&&wt!=="end"&&(Tt.attr("text-anchor","end"),Ut=Ht?ct.bx/2-ct.tx2width/2-E:ct.bx+E)),Tt.call(r.positionText,st(Ut),nt(kt)),ct.tx2width&&(gt.select("text.name").call(r.positionText,st(bt.text2ShiftX+bt.alignShift*E+mt),nt(Lt+ct.ty0-ct.by/2+E)),gt.select("rect").call(a.setRect,st(bt.text2ShiftX+(bt.alignShift-1)*ct.tx2width/2+mt),nt(Lt-ct.by/2-1),st(ct.tx2width),nt(ct.by+2)))})}function H(Q,ot){var $=Q.index,Z=Q.trace||{},st=Q.cd[0],nt=Q.cd[$]||{};function ct(At){return At||C(At)&&At===0}var gt=Array.isArray($)?function(At,mt){var Lt=S.castOption(st,$,At);return ct(Lt)?Lt:S.extractOption({},Z,"",mt)}:function(At,mt){return S.extractOption(nt,Z,At,mt)};function Tt(At,mt,Lt){var Ht=gt(mt,Lt);ct(Ht)&&(Q[At]=Ht)}if(Tt("hoverinfo","hi","hoverinfo"),Tt("bgcolor","hbg","hoverlabel.bgcolor"),Tt("borderColor","hbc","hoverlabel.bordercolor"),Tt("fontFamily","htf","hoverlabel.font.family"),Tt("fontSize","hts","hoverlabel.font.size"),Tt("fontColor","htc","hoverlabel.font.color"),Tt("nameLength","hnl","hoverlabel.namelength"),Tt("textAlign","hta","hoverlabel.align"),Q.posref=ot==="y"||ot==="closest"&&Z.orientation==="h"?Q.xa._offset+(Q.x0+Q.x1)/2:Q.ya._offset+(Q.y0+Q.y1)/2,Q.x0=S.constrain(Q.x0,0,Q.xa._length),Q.x1=S.constrain(Q.x1,0,Q.xa._length),Q.y0=S.constrain(Q.y0,0,Q.ya._length),Q.y1=S.constrain(Q.y1,0,Q.ya._length),Q.xLabelVal!==void 0&&(Q.xLabel="xLabel"in Q?Q.xLabel:c.hoverLabelText(Q.xa,Q.xLabelVal,Z.xhoverformat),Q.xVal=Q.xa.c2d(Q.xLabelVal)),Q.yLabelVal!==void 0&&(Q.yLabel="yLabel"in Q?Q.yLabel:c.hoverLabelText(Q.ya,Q.yLabelVal,Z.yhoverformat),Q.yVal=Q.ya.c2d(Q.yLabelVal)),Q.zLabelVal!==void 0&&Q.zLabel===void 0&&(Q.zLabel=String(Q.zLabelVal)),!isNaN(Q.xerr)&&!(Q.xa.type==="log"&&Q.xerr<=0)){var wt=c.tickText(Q.xa,Q.xa.c2l(Q.xerr),"hover").text;Q.xerrneg!==void 0?Q.xLabel+=" +"+wt+" / -"+c.tickText(Q.xa,Q.xa.c2l(Q.xerrneg),"hover").text:Q.xLabel+=" ± "+wt,ot==="x"&&(Q.distance+=1)}if(!isNaN(Q.yerr)&&!(Q.ya.type==="log"&&Q.yerr<=0)){var Rt=c.tickText(Q.ya,Q.ya.c2l(Q.yerr),"hover").text;Q.yerrneg!==void 0?Q.yLabel+=" +"+Rt+" / -"+c.tickText(Q.ya,Q.ya.c2l(Q.yerrneg),"hover").text:Q.yLabel+=" ± "+Rt,ot==="y"&&(Q.distance+=1)}var bt=Q.hoverinfo||Q.trace.hoverinfo;return bt&&bt!=="all"&&(bt=Array.isArray(bt)?bt:bt.split("+"),bt.indexOf("x")===-1&&(Q.xLabel=void 0),bt.indexOf("y")===-1&&(Q.yLabel=void 0),bt.indexOf("z")===-1&&(Q.zLabel=void 0),bt.indexOf("text")===-1&&(Q.text=void 0),bt.indexOf("name")===-1&&(Q.name=void 0)),Q}function Y(Q,ot,$){var Z=$.container,st=$.fullLayout,nt=st._size,ct=$.event,gt=!!ot.hLinePoint,Tt=!!ot.vLinePoint,wt,Rt;if(Z.selectAll(".spikeline").remove(),!!(Tt||gt)){var bt=n.combine(st.plot_bgcolor,st.paper_bgcolor);if(gt){var At=ot.hLinePoint,mt,Lt;wt=At&&At.xa,Rt=At&&At.ya;var Ht=Rt.spikesnap;Ht==="cursor"?(mt=ct.pointerX,Lt=ct.pointerY):(mt=wt._offset+At.x,Lt=Rt._offset+At.y);var Ut=i.readability(At.color,bt)<1.5?n.contrast(bt):At.color,kt=Rt.spikemode,Vt=Rt.spikethickness,It=Rt.spikecolor||Ut,re=c.getPxPosition(Q,Rt),Kt,$t;if(kt.indexOf("toaxis")!==-1||kt.indexOf("across")!==-1){if(kt.indexOf("toaxis")!==-1&&(Kt=re,$t=mt),kt.indexOf("across")!==-1){var le=Rt._counterDomainMin,he=Rt._counterDomainMax;Rt.anchor==="free"&&(le=Math.min(le,Rt.position),he=Math.max(he,Rt.position)),Kt=nt.l+le*nt.w,$t=nt.l+he*nt.w}Z.insert("line",":first-child").attr({x1:Kt,x2:$t,y1:Lt,y2:Lt,"stroke-width":Vt,stroke:It,"stroke-dasharray":a.dashStyle(Rt.spikedash,Vt)}).classed("spikeline",!0).classed("crisp",!0),Z.insert("line",":first-child").attr({x1:Kt,x2:$t,y1:Lt,y2:Lt,"stroke-width":Vt+2,stroke:bt}).classed("spikeline",!0).classed("crisp",!0)}kt.indexOf("marker")!==-1&&Z.insert("circle",":first-child").attr({cx:re+(Rt.side!=="right"?Vt:-Vt),cy:Lt,r:Vt,fill:It}).classed("spikeline",!0)}if(Tt){var de=ot.vLinePoint,xe,Se;wt=de&&de.xa,Rt=de&&de.ya;var ne=wt.spikesnap;ne==="cursor"?(xe=ct.pointerX,Se=ct.pointerY):(xe=wt._offset+de.x,Se=Rt._offset+de.y);var zt=i.readability(de.color,bt)<1.5?n.contrast(bt):de.color,Xt=wt.spikemode,Jt=wt.spikethickness,Wt=wt.spikecolor||zt,Ft=c.getPxPosition(Q,wt),xt,yt;if(Xt.indexOf("toaxis")!==-1||Xt.indexOf("across")!==-1){if(Xt.indexOf("toaxis")!==-1&&(xt=Ft,yt=Se),Xt.indexOf("across")!==-1){var Et=wt._counterDomainMin,Mt=wt._counterDomainMax;wt.anchor==="free"&&(Et=Math.min(Et,wt.position),Mt=Math.max(Mt,wt.position)),xt=nt.t+(1-Mt)*nt.h,yt=nt.t+(1-Et)*nt.h}Z.insert("line",":first-child").attr({x1:xe,x2:xe,y1:xt,y2:yt,"stroke-width":Jt,stroke:Wt,"stroke-dasharray":a.dashStyle(wt.spikedash,Jt)}).classed("spikeline",!0).classed("crisp",!0),Z.insert("line",":first-child").attr({x1:xe,x2:xe,y1:xt,y2:yt,"stroke-width":Jt+2,stroke:bt}).classed("spikeline",!0).classed("crisp",!0)}Xt.indexOf("marker")!==-1&&Z.insert("circle",":first-child").attr({cx:xe,cy:Ft-(wt.side!=="top"?Jt:-Jt),r:Jt,fill:Wt}).classed("spikeline",!0)}}}function j(Q,ot,$){if(!$||$.length!==Q._hoverdata.length)return!0;for(var Z=$.length-1;Z>=0;Z--){var st=$[Z],nt=Q._hoverdata[Z];if(st.curveNumber!==nt.curveNumber||String(st.pointNumber)!==String(nt.pointNumber)||String(st.pointNumbers)!==String(nt.pointNumbers))return!0}return!1}function et(Q,ot){return!ot||ot.vLinePoint!==Q._spikepoints.vLinePoint||ot.hLinePoint!==Q._spikepoints.hLinePoint}function it(Q,ot){return r.plainText(Q||"",{len:ot,allowedTags:["br","sub","sup","b","i","em"]})}function ut(Q,ot){for(var $=ot.charAt(0),Z=[],st=[],nt=[],ct=0;ct1)){delete c.grid;return}if(!b&&!u&&!o){var s=y("pattern")==="independent";s&&(b=!0)}_._hasSubplotGrid=b;var L=y("roworder"),M=L==="top to bottom",z=b?.2:.1,D=b?.3:.1,N,I;d&&c._splomGridDflt&&(N=c._splomGridDflt.xside,I=c._splomGridDflt.yside),_._domains={x:e("x",y,z,N,T),y:e("y",y,D,I,E,M)}}function e(f,c,l,m,h,b){var u=c(f+"gap",l),o=c("domain."+f);c(f+"side",m);for(var d=new Array(h),w=o[0],A=(o[1]-w)/(h-u),_=A*(1-u),y=0;y(e==="legend"?1:0));if(M===!1&&(n[e]=void 0),!(M===!1&&!c.uirevision)&&(m("uirevision",n.uirevision),M!==!1)){m("borderwidth");var z=m("orientation"),D=m("yref"),N=m("xref"),I=z==="h",k=D==="paper",B=N==="paper",O,H,Y,j="left";I?(O=0,g.getComponentMethod("rangeslider","isVisible")(a.xaxis)?k?(H=1.1,Y="bottom"):(H=1,Y="top"):k?(H=-.1,Y="top"):(H=0,Y="bottom")):(H=1,Y="auto",B?O=1.02:(O=1,j="right")),C.coerce(c,l,{x:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:O}},"x"),C.coerce(c,l,{y:{valType:"number",editType:"legend",min:k?-2:0,max:k?3:1,dflt:H}},"y"),m("traceorder",y),p.isGrouped(n[e])&&m("tracegroupgap"),m("entrywidth"),m("entrywidthmode"),m("indentation"),m("itemsizing"),m("itemwidth"),m("itemclick"),m("itemdoubleclick"),m("groupclick"),m("xanchor",j),m("yanchor",Y),m("valign"),C.noneOrAll(c,l,["x","y"]);var et=m("title.text");if(et){m("title.side",I?"left":"top");var it=C.extendFlat({},h,{size:C.bigFont(h.size)});C.coerceFont(m,"title.font",it)}}}}G.exports=function(a,n,f){var c,l=f.slice(),m=n.shapes;if(m)for(c=0;c1)}var Z=j.hiddenlabels||[];if(!J&&(!j.showlegend||!X.length))return ut.selectAll("."+et).remove(),j._topdefs.select("#"+it).remove(),i.autoMargin(O,et);var st=C.ensureSingle(ut,"g",et,function(mt){J||mt.attr("pointer-events","all")}),nt=C.ensureSingleById(j._topdefs,"clipPath",it,function(mt){mt.append("rect")}),ct=C.ensureSingle(st,"rect","bg",function(mt){mt.attr("shape-rendering","crispEdges")});ct.call(r.stroke,Y.bordercolor).call(r.fill,Y.bgcolor).style("stroke-width",Y.borderwidth+"px");var gt=C.ensureSingle(st,"g","scrollbox"),Tt=Y.title;Y._titleWidth=0,Y._titleHeight=0;var wt;Tt.text?(wt=C.ensureSingle(gt,"text",et+"titletext"),wt.attr("text-anchor","start").call(p.font,Tt.font).text(Tt.text),L(wt,gt,O,Y,o)):gt.selectAll("."+et+"titletext").remove();var Rt=C.ensureSingle(st,"rect","scrollbar",function(mt){mt.attr(n.scrollBarEnterAttrs).call(r.fill,n.scrollBarColor)}),bt=gt.selectAll("g.groups").data(X);bt.enter().append("g").attr("class","groups"),bt.exit().remove();var At=bt.selectAll("g.traces").data(C.identity);At.enter().append("g").attr("class","traces"),At.exit().remove(),At.style("opacity",function(mt){var Lt=mt[0].trace;return S.traceIs(Lt,"pie-like")?Z.indexOf(mt[0].label)!==-1?.5:1:Lt.visible==="legendonly"?.5:1}).each(function(){g.select(this).call(E,O,Y)}).call(b,O,Y).each(function(){J||g.select(this).call(s,O,et)}),C.syncOrAsync([i.previousPromises,function(){return D(O,bt,At,Y)},function(){var mt=j._size,Lt=Y.borderwidth,Ht=Y.xref==="paper",Ut=Y.yref==="paper";if(Tt.text&&w(wt,Y,Lt),!J){var kt,Vt;Ht?kt=mt.l+mt.w*Y.x-l[I(Y)]*Y._width:kt=j.width*Y.x-l[I(Y)]*Y._width,Ut?Vt=mt.t+mt.h*(1-Y.y)-l[k(Y)]*Y._effHeight:Vt=j.height*(1-Y.y)-l[k(Y)]*Y._effHeight;var It=N(O,et,kt,Vt);if(It)return;if(j.margin.autoexpand){var re=kt,Kt=Vt;kt=Ht?C.constrain(kt,0,j.width-Y._width):re,Vt=Ut?C.constrain(Vt,0,j.height-Y._effHeight):Kt,kt!==re&&C.log("Constrain "+et+".x to make legend fit inside graph"),Vt!==Kt&&C.log("Constrain "+et+".y to make legend fit inside graph")}p.setTranslate(st,kt,Vt)}if(Rt.on(".drag",null),st.on("wheel",null),J||Y._height<=Y._maxHeight||O._context.staticPlot){var $t=Y._effHeight;J&&($t=Y._height),ct.attr({width:Y._width-Lt,height:$t-Lt,x:Lt/2,y:Lt/2}),p.setTranslate(gt,0,0),nt.select("rect").attr({width:Y._width-2*Lt,height:$t-2*Lt,x:Lt,y:Lt}),p.setClipUrl(gt,it,O),p.setRect(Rt,0,0,0,0),delete Y._scrollY}else{var le=Math.max(n.scrollBarMinHeight,Y._effHeight*Y._effHeight/Y._height),he=Y._effHeight-le-2*n.scrollBarMargin,de=Y._height-Y._effHeight,xe=he/de,Se=Math.min(Y._scrollY||0,de);ct.attr({width:Y._width-2*Lt+n.scrollBarWidth+n.scrollBarMargin,height:Y._effHeight-Lt,x:Lt/2,y:Lt/2}),nt.select("rect").attr({width:Y._width-2*Lt+n.scrollBarWidth+n.scrollBarMargin,height:Y._effHeight-2*Lt,x:Lt,y:Lt+Se}),p.setClipUrl(gt,it,O),yt(Se,le,xe),st.on("wheel",function(){Se=C.constrain(Y._scrollY+g.event.deltaY/he*de,0,de),yt(Se,le,xe),Se!==0&&Se!==de&&g.event.preventDefault()});var ne,zt,Xt,Jt=function(ie,me,be){var ve=(be-me)/xe+ie;return C.constrain(ve,0,de)},Wt=function(ie,me,be){var ve=(me-be)/xe+ie;return C.constrain(ve,0,de)},Ft=g.behavior.drag().on("dragstart",function(){var ie=g.event.sourceEvent;ie.type==="touchstart"?ne=ie.changedTouches[0].clientY:ne=ie.clientY,Xt=Se}).on("drag",function(){var ie=g.event.sourceEvent;ie.buttons===2||ie.ctrlKey||(ie.type==="touchmove"?zt=ie.changedTouches[0].clientY:zt=ie.clientY,Se=Jt(Xt,ne,zt),yt(Se,le,xe))});Rt.call(Ft);var xt=g.behavior.drag().on("dragstart",function(){var ie=g.event.sourceEvent;ie.type==="touchstart"&&(ne=ie.changedTouches[0].clientY,Xt=Se)}).on("drag",function(){var ie=g.event.sourceEvent;ie.type==="touchmove"&&(zt=ie.changedTouches[0].clientY,Se=Wt(Xt,ne,zt),yt(Se,le,xe))});gt.call(xt)}function yt(ie,me,be){Y._scrollY=O._fullLayout[et]._scrollY=ie,p.setTranslate(gt,0,-ie),p.setRect(Rt,Y._width,n.scrollBarMargin+ie*be,n.scrollBarWidth,me),nt.select("rect").attr("y",Lt+ie)}if(O._context.edits.legendPosition){var Et,Mt,Nt,jt;st.classed("cursor-move",!0),v.init({element:st.node(),gd:O,prepFn:function(){var ie=p.getTranslate(st);Nt=ie.x,jt=ie.y},moveFn:function(ie,me){var be=Nt+ie,ve=jt+me;p.setTranslate(st,be,ve),Et=v.align(be,Y._width,mt.l,mt.l+mt.w,Y.xanchor),Mt=v.align(ve+Y._height,-Y._height,mt.t+mt.h,mt.t,Y.yanchor)},doneFn:function(){if(Et!==void 0&&Mt!==void 0){var ie={};ie[et+".x"]=Et,ie[et+".y"]=Mt,S.call("_guiRelayout",O,ie)}},clickFn:function(ie,me){var be=ut.selectAll("g.traces").filter(function(){var ve=this.getBoundingClientRect();return me.clientX>=ve.left&&me.clientX<=ve.right&&me.clientY>=ve.top&&me.clientY<=ve.bottom});be.size()>0&&y(O,st,be,ie,me)}})}}],O)}}function _(O,H,Y){var j=O[0],et=j.width,it=H.entrywidthmode,ut=j.trace.legendwidth||H.entrywidth;return it==="fraction"?H._maxWidth*ut:Y+(ut||et)}function y(O,H,Y,j,et){var it=Y.data()[0][0].trace,ut={event:et,node:Y.node(),curveNumber:it.index,expandedIndex:it._expandedIndex,data:O.data,layout:O.layout,frames:O._transitionData._frames,config:O._context,fullData:O._fullData,fullLayout:O._fullLayout};it._group&&(ut.group=it._group),S.traceIs(it,"pie-like")&&(ut.label=Y.datum()[0].label);var J=x.triggerHandler(O,"plotly_legendclick",ut);if(j===1){if(J===!1)return;H._clickTimeout=setTimeout(function(){O._fullLayout&&a(Y,O,j)},O._context.doubleClickDelay)}else if(j===2){H._clickTimeout&&clearTimeout(H._clickTimeout),O._legendMouseDownTime=0;var X=x.triggerHandler(O,"plotly_legenddoubleclick",ut);X!==!1&&J!==!1&&a(Y,O,j)}}function E(O,H,Y){var j=B(Y),et=O.data()[0][0],it=et.trace,ut=S.traceIs(it,"pie-like"),J=!Y._inHover&&H._context.edits.legendText&&!ut,X=Y._maxNameLength,tt,V;et.groupTitle?(tt=et.groupTitle.text,V=et.groupTitle.font):(V=Y.font,Y.entries?tt=et.text:(tt=ut?et.label:it.name,it._meta&&(tt=C.templateString(tt,it._meta))));var Q=C.ensureSingle(O,"text",j+"text");Q.attr("text-anchor","start").call(p.font,V).text(J?T(tt,X):tt);var ot=Y.indentation+Y.itemwidth+n.itemGap*2;e.positionText(Q,ot,0),J?Q.call(e.makeEditable,{gd:H,text:tt}).call(L,O,H,Y).on("edit",function($){this.text(T($,X)).call(L,O,H,Y);var Z=et.trace._fullInput||{},st={};if(S.hasTransform(Z,"groupby")){var nt=S.getTransformIndices(Z,"groupby"),ct=nt[nt.length-1],gt=C.keyedContainer(Z,"transforms["+ct+"].styles","target","value.name");gt.set(et.trace._group,$),st=gt.constructUpdate()}else st.name=$;return Z._isShape?S.call("_guiRelayout",H,"shapes["+it.index+"].name",st.name):S.call("_guiRestyle",H,st,it.index)}):L(Q,O,H,Y)}function T(O,H){var Y=Math.max(4,H);if(O&&O.trim().length>=Y/2)return O;O=O||"";for(var j=Y-O.length;j>0;j--)O+=" ";return O}function s(O,H,Y){var j=H._context.doubleClickDelay,et,it=1,ut=C.ensureSingle(O,"rect",Y+"toggle",function(J){H._context.staticPlot||J.style("cursor","pointer").attr("pointer-events","all"),J.call(r.fill,"rgba(0,0,0,0)")});H._context.staticPlot||(ut.on("mousedown",function(){et=new Date().getTime(),et-H._legendMouseDownTimej&&(it=Math.max(it-1,1)),y(H,J,O,it,g.event)}}))}function L(O,H,Y,j,et){j._inHover&&O.attr("data-notex",!0),e.convertToTspans(O,Y,function(){M(H,Y,j,et)})}function M(O,H,Y,j){var et=O.data()[0][0];if(!Y._inHover&&et&&!et.trace.showlegend){O.remove();return}var it=O.select("g[class*=math-group]"),ut=it.node(),J=B(Y);Y||(Y=H._fullLayout[J]);var X=Y.borderwidth,tt;j===o?tt=Y.title.font:et.groupTitle?tt=et.groupTitle.font:tt=Y.font;var V=tt.size*c,Q,ot;if(ut){var $=p.bBox(ut);Q=$.height,ot=$.width,j===o?p.setTranslate(it,X,X+Q*.75):p.setTranslate(it,0,Q*.25)}else{var Z="."+J+(j===o?"title":"")+"text",st=O.select(Z),nt=e.lineCount(st),ct=st.node();if(Q=V*nt,ot=ct?p.bBox(ct).width:0,j===o)Y.title.side==="left"&&(ot+=n.itemGap*2),e.positionText(st,X+n.titlePad,X+V);else{var gt=n.itemGap*2+Y.indentation+Y.itemwidth;et.groupTitle&&(gt=n.itemGap,ot-=Y.indentation+Y.itemwidth),e.positionText(st,gt,-V*((nt-1)/2-.3))}}j===o?(Y._titleWidth=ot,Y._titleHeight=Q):(et.lineHeight=V,et.height=Math.max(Q,16)+3,et.width=ot)}function z(O){var H=0,Y=0,j=O.title.side;return j&&(j.indexOf("left")!==-1&&(H=O._titleWidth),j.indexOf("top")!==-1&&(Y=O._titleHeight)),[H,Y]}function D(O,H,Y,j){var et=O._fullLayout,it=B(j);j||(j=et[it]);var ut=et._size,J=u.isVertical(j),X=u.isGrouped(j),tt=j.entrywidthmode==="fraction",V=j.borderwidth,Q=2*V,ot=n.itemGap,$=j.indentation+j.itemwidth+ot*2,Z=2*(V+ot),st=k(j),nt=j.y<0||j.y===0&&st==="top",ct=j.y>1||j.y===1&&st==="bottom",gt=j.tracegroupgap,Tt={};j._maxHeight=Math.max(nt||ct?et.height/2:ut.h,30);var wt=0;j._width=0,j._height=0;var Rt=z(j);if(J)Y.each(function(Xt){var Jt=Xt[0].height;p.setTranslate(this,V+Rt[0],V+Rt[1]+j._height+Jt/2+ot),j._height+=Jt,j._width=Math.max(j._width,Xt[0].width)}),wt=$+j._width,j._width+=ot+$+Q,j._height+=Z,X&&(H.each(function(Xt,Jt){p.setTranslate(this,0,Jt*j.tracegroupgap)}),j._height+=(j._lgroupsLength-1)*j.tracegroupgap);else{var bt=I(j),At=j.x<0||j.x===0&&bt==="right",mt=j.x>1||j.x===1&&bt==="left",Lt=ct||nt,Ht=et.width/2;j._maxWidth=Math.max(At?Lt&&bt==="left"?ut.l+ut.w:Ht:mt?Lt&&bt==="right"?ut.r+ut.w:Ht:ut.w,2*$);var Ut=0,kt=0;Y.each(function(Xt){var Jt=_(Xt,j,$);Ut=Math.max(Ut,Jt),kt+=Jt}),wt=null;var Vt=0;if(X){var It=0,re=0,Kt=0;H.each(function(){var Xt=0,Jt=0;g.select(this).selectAll("g.traces").each(function(Ft){var xt=_(Ft,j,$),yt=Ft[0].height;p.setTranslate(this,Rt[0],Rt[1]+V+ot+yt/2+Jt),Jt+=yt,Xt=Math.max(Xt,xt),Tt[Ft[0].trace.legendgroup]=Xt});var Wt=Xt+ot;re>0&&Wt+V+re>j._maxWidth?(Vt=Math.max(Vt,re),re=0,Kt+=It+gt,It=Jt):It=Math.max(It,Jt),p.setTranslate(this,re,Kt),re+=Wt}),j._width=Math.max(Vt,re)+V,j._height=Kt+It+Z}else{var $t=Y.size(),le=kt+Q+($t-1)*ot=j._maxWidth&&(Vt=Math.max(Vt,Se),de=0,xe+=he,j._height+=he,he=0),p.setTranslate(this,Rt[0]+V+de,Rt[1]+V+xe+Jt/2+ot),Se=de+Wt+ot,de+=Ft,he=Math.max(he,Jt)}),le?(j._width=de+Q,j._height=he+Z):(j._width=Math.max(Vt,Se)+Q,j._height+=he+Z)}}j._width=Math.ceil(Math.max(j._width+Rt[0],j._titleWidth+2*(V+n.titlePad))),j._height=Math.ceil(Math.max(j._height+Rt[1],j._titleHeight+2*(V+n.itemGap))),j._effHeight=Math.min(j._height,j._maxHeight);var ne=O._context.edits,zt=ne.legendText||ne.legendPosition;Y.each(function(Xt){var Jt=g.select(this).select("."+it+"toggle"),Wt=Xt[0].height,Ft=Xt[0].trace.legendgroup,xt=_(Xt,j,$);X&&Ft!==""&&(xt=Tt[Ft]);var yt=zt?$:wt||xt;!J&&!tt&&(yt+=ot/2),p.setRect(Jt,0,-Wt/2,yt,Wt)})}function N(O,H,Y,j){var et=O._fullLayout,it=et[H],ut=I(it),J=k(it),X=it.xref==="paper",tt=it.yref==="paper";O._fullLayout._reservedMargin[H]={};var V=it.y<.5?"b":"t",Q=it.x<.5?"l":"r",ot={r:et.width-Y,l:Y+it._width,b:et.height-j,t:j+it._effHeight};if(X&&tt)return i.autoMargin(O,H,{x:it.x,y:it.y,l:it._width*l[ut],r:it._width*m[ut],b:it._effHeight*m[J],t:it._effHeight*l[J]});X?O._fullLayout._reservedMargin[H][V]=ot[V]:tt||it.orientation==="v"?O._fullLayout._reservedMargin[H][Q]=ot[Q]:O._fullLayout._reservedMargin[H][V]=ot[V]}function I(O){return C.isRightAnchor(O)?"right":C.isCenterAnchor(O)?"center":"left"}function k(O){return C.isBottomAnchor(O)?"bottom":C.isMiddleAnchor(O)?"middle":"top"}function B(O){return O._id||"legend"}},35456:function(G,U,t){var g=t(24040),C=t(42451);G.exports=function(S,x,v){var p=x._inHover,r=C.isGrouped(x),e=C.isReversed(x),a={},n=[],f=!1,c={},l=0,m=0,h,b;function u(O,H,Y){if(x.visible!==!1&&!(v&&O!==x._id))if(H===""||!C.isGrouped(x)){var j="~~i"+l;n.push(j),a[j]=[Y],l++}else n.indexOf(H)===-1?(n.push(H),f=!0,a[H]=[Y]):a[H].push(Y)}for(h=0;hM&&(L=M)}T[h][0]._groupMinRank=L,T[h][0]._preGroupSort=h}var z=function(O,H){return O[0]._groupMinRank-H[0]._groupMinRank||O[0]._preGroupSort-H[0]._preGroupSort},D=function(O,H){return O.trace.legendrank-H.trace.legendrank||O._preSort-H._preSort};for(T.forEach(function(O,H){O[0]._preGroupSort=H}),T.sort(z),h=0;h0)Q=X.width;else return 0;return E?V:Math.min(Q,tt)};w.each(function(J){var X=g.select(this),tt=i.ensureSingle(X,"g","layers");tt.style("opacity",J[0].trace.opacity);var V=_.indentation,Q=_.valign,ot=J[0].lineHeight,$=J[0].height;if(Q==="middle"&&V===0||!ot||!$)tt.attr("transform",null);else{var Z={top:1,bottom:-1}[Q],st=Z*(.5*(ot-$+3))||0,nt=_.indentation;tt.attr("transform",S(nt,st))}var ct=tt.selectAll("g.legendfill").data([J]);ct.enter().append("g").classed("legendfill",!0);var gt=tt.selectAll("g.legendlines").data([J]);gt.enter().append("g").classed("legendlines",!0);var Tt=tt.selectAll("g.legendsymbols").data([J]);Tt.enter().append("g").classed("legendsymbols",!0),Tt.selectAll("g.legendpoints").data([J]).enter().append("g").classed("legendpoints",!0)}).each(ut).each(N).each(k).each(I).each(O).each(et).each(j).each(z).each(D).each(H).each(Y);function z(J){var X=u(J),tt=X.showFill,V=X.showLine,Q=X.showGradientLine,ot=X.showGradientFill,$=X.anyFill,Z=X.anyLine,st=J[0],nt=st.trace,ct,gt,Tt=p(nt),wt=Tt.colorscale,Rt=Tt.reversescale,bt=function(Vt){if(Vt.size())if(tt)x.fillGroupStyle(Vt,A,!0);else{var It="legendfill-"+nt.uid;x.gradient(Vt,A,It,b(Rt),wt,"fill")}},At=function(Vt){if(Vt.size()){var It="legendline-"+nt.uid;x.lineGroupStyle(Vt),x.gradient(Vt,A,It,b(Rt),wt,"stroke")}},mt=r.hasMarkers(nt)||!$?"M5,0":Z?"M5,-2":"M5,-3",Lt=g.select(this),Ht=Lt.select(".legendfill").selectAll("path").data(tt||ot?[J]:[]);if(Ht.enter().append("path").classed("js-fill",!0),Ht.exit().remove(),Ht.attr("d",mt+"h"+T+"v6h-"+T+"z").call(bt),V||Q){var Ut=M(void 0,nt.line,m,c);gt=i.minExtend(nt,{line:{width:Ut}}),ct=[i.minExtend(st,{trace:gt})]}var kt=Lt.select(".legendlines").selectAll("path").data(V||Q?[ct]:[]);kt.enter().append("path").classed("js-line",!0),kt.exit().remove(),kt.attr("d",mt+(Q?"l"+T+",0.0001":"h"+T)).call(V?x.lineGroupStyle:At)}function D(J){var X=u(J),tt=X.anyFill,V=X.anyLine,Q=X.showLine,ot=X.showMarker,$=J[0],Z=$.trace,st=!ot&&!V&&!tt&&r.hasText(Z),nt,ct;function gt(Ht,Ut,kt,Vt){var It=i.nestedProperty(Z,Ht).get(),re=i.isArrayOrTypedArray(It)&&Ut?Ut(It):It;if(E&&re&&Vt!==void 0&&(re=Vt),kt){if(rekt[1])return kt[1]}return re}function Tt(Ht){return $._distinct&&$.index&&Ht[$.index]?Ht[$.index]:Ht[0]}if(ot||st||Q){var wt={},Rt={};if(ot){wt.mc=gt("marker.color",Tt),wt.mx=gt("marker.symbol",Tt),wt.mo=gt("marker.opacity",i.mean,[.2,1]),wt.mlc=gt("marker.line.color",Tt),wt.mlw=gt("marker.line.width",i.mean,[0,5],l),Rt.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var bt=gt("marker.size",i.mean,[2,16],f);wt.ms=bt,Rt.marker.size=bt}Q&&(Rt.line={width:gt("line.width",Tt,[0,10],c)}),st&&(wt.tx="Aa",wt.tp=gt("textposition",Tt),wt.ts=10,wt.tc=gt("textfont.color",Tt),wt.tf=gt("textfont.family",Tt)),nt=[i.minExtend($,wt)],ct=i.minExtend(Z,Rt),ct.selectedpoints=null,ct.texttemplate=null}var At=g.select(this).select("g.legendpoints"),mt=At.selectAll("path.scatterpts").data(ot?nt:[]);mt.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",L),mt.exit().remove(),mt.call(x.pointStyle,ct,A),ot&&(nt[0].mrc=3);var Lt=At.selectAll("g.pointtext").data(st?nt:[]);Lt.enter().append("g").classed("pointtext",!0).append("text").attr("transform",L),Lt.exit().remove(),Lt.selectAll("text").call(x.textPointStyle,ct,A)}function N(J){var X=J[0].trace,tt=X.type==="waterfall";if(J[0]._distinct&&tt){var V=J[0].trace[J[0].dir].marker;return J[0].mc=V.color,J[0].mlw=V.line.width,J[0].mlc=V.line.color,B(J,this,"waterfall")}var Q=[];X.visible&&tt&&(Q=J[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var ot=g.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Q);ot.enter().append("path").classed("legendwaterfall",!0).attr("transform",L).style("stroke-miterlimit",1),ot.exit().remove(),ot.each(function($){var Z=g.select(this),st=X[$[0]].marker,nt=M(void 0,st.line,h,l);Z.attr("d",$[1]).style("stroke-width",nt+"px").call(v.fill,st.color),nt&&Z.call(v.stroke,st.line.color)})}function I(J){B(J,this)}function k(J){B(J,this,"funnel")}function B(J,X,tt){var V=J[0].trace,Q=V.marker||{},ot=Q.line||{},$=Q.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Z=tt?V.visible&&V.type===tt:C.traceIs(V,"bar"),st=g.select(X).select("g.legendpoints").selectAll("path.legend"+tt).data(Z?[J]:[]);st.enter().append("path").classed("legend"+tt,!0).attr("d",$).attr("transform",L),st.exit().remove(),st.each(function(nt){var ct=g.select(this),gt=nt[0],Tt=M(gt.mlw,Q.line,h,l);ct.style("stroke-width",Tt+"px");var wt=gt.mcc;if(!_._inHover&&"mc"in gt){var Rt=p(Q),bt=Rt.mid;bt===void 0&&(bt=(Rt.max+Rt.min)/2),wt=x.tryColorscale(Q,"")(bt)}var At=wt||gt.mc||Q.color,mt=Q.pattern,Lt=mt&&x.getPatternAttr(mt.shape,0,"");if(Lt){var Ht=x.getPatternAttr(mt.bgcolor,0,null),Ut=x.getPatternAttr(mt.fgcolor,0,null),kt=mt.fgopacity,Vt=o(mt.size,8,10),It=o(mt.solidity,.5,1),re="legend-"+V.uid;ct.call(x.pattern,"legend",A,re,Lt,Vt,It,wt,mt.fillmode,Ht,Ut,kt)}else ct.call(v.fill,At);Tt&&v.stroke(ct,gt.mlc||ot.color)})}function O(J){var X=J[0].trace,tt=g.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&C.traceIs(X,"box-violin")?[J]:[]);tt.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",L),tt.exit().remove(),tt.each(function(){var V=g.select(this);if((X.boxpoints==="all"||X.points==="all")&&v.opacity(X.fillcolor)===0&&v.opacity((X.line||{}).color)===0){var Q=i.minExtend(X,{marker:{size:E?f:i.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});tt.call(x.pointStyle,Q,A)}else{var ot=M(void 0,X.line,h,l);V.style("stroke-width",ot+"px").call(v.fill,X.fillcolor),ot&&v.stroke(V,X.line.color)}})}function H(J){var X=J[0].trace,tt=g.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[J,J]:[]);tt.enter().append("path").classed("legendcandle",!0).attr("d",function(V,Q){return Q?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",L).style("stroke-miterlimit",1),tt.exit().remove(),tt.each(function(V,Q){var ot=g.select(this),$=X[Q?"increasing":"decreasing"],Z=M(void 0,$.line,h,l);ot.style("stroke-width",Z+"px").call(v.fill,$.fillcolor),Z&&v.stroke(ot,$.line.color)})}function Y(J){var X=J[0].trace,tt=g.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[J,J]:[]);tt.enter().append("path").classed("legendohlc",!0).attr("d",function(V,Q){return Q?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",L).style("stroke-miterlimit",1),tt.exit().remove(),tt.each(function(V,Q){var ot=g.select(this),$=X[Q?"increasing":"decreasing"],Z=M(void 0,$.line,h,l);ot.style("fill","none").call(x.dashLine,$.line.dash,Z),Z&&v.stroke(ot,$.line.color)})}function j(J){it(J,this,"pie")}function et(J){it(J,this,"funnelarea")}function it(J,X,tt){var V=J[0],Q=V.trace,ot=tt?Q.visible&&Q.type===tt:C.traceIs(Q,tt),$=g.select(X).select("g.legendpoints").selectAll("path.legend"+tt).data(ot?[J]:[]);if($.enter().append("path").classed("legend"+tt,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",L),$.exit().remove(),$.size()){var Z=Q.marker||{},st=M(a(Z.line.width,V.pts),Z.line,h,l),nt="pieLike",ct=i.minExtend(Q,{marker:{line:{width:st}}},nt),gt=i.minExtend(V,{trace:ct},nt);e($,gt,ct,A)}}function ut(J){var X=J[0].trace,tt,V=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":V=[["M-15,-2V4H15V-2Z"]],tt=!0;break;case"choropleth":case"choroplethmapbox":V=[["M-6,-6V6H6V-6Z"]],tt=!0;break;case"densitymapbox":V=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],tt="radial";break;case"cone":V=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],tt=!1;break;case"streamtube":V=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],tt=!1;break;case"surface":V=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],tt=!0;break;case"mesh3d":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],tt=!1;break;case"volume":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],tt=!0;break;case"isosurface":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],tt=!1;break}var Q=g.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(V);Q.enter().append("path").classed("legend3dandfriends",!0).attr("transform",L).style("stroke-miterlimit",1),Q.exit().remove(),Q.each(function(ot,$){var Z=g.select(this),st=p(X),nt=st.colorscale,ct=st.reversescale,gt=function(bt){if(bt.size()){var At="legendfill-"+X.uid;x.gradient(bt,A,At,b(ct,tt==="radial"),nt,"fill")}},Tt;if(nt){if(!tt){var Rt=nt.length;Tt=$===0?nt[ct?Rt-1:0][1]:$===1?nt[ct?0:Rt-1][1]:nt[Math.floor((Rt-1)/2)][1]}}else{var wt=X.vertexcolor||X.facecolor||X.color;Tt=i.isArrayOrTypedArray(wt)?wt[$]||wt[0]:wt}Z.attr("d",ot[0]),Tt?Z.call(v.fill,Tt):Z.call(gt)})}};function b(d,w){var A=w?"radial":"horizontal";return A+(d?"":"reversed")}function u(d){var w=d[0].trace,A=w.contours,_=r.hasLines(w),y=r.hasMarkers(w),E=w.visible&&w.fill&&w.fill!=="none",T=!1,s=!1;if(A){var L=A.coloring;L==="lines"?T=!0:_=L==="none"||L==="heatmap"||A.showlines,A.type==="constraint"?E=A._operation!=="=":(L==="fill"||L==="heatmap")&&(s=!0)}return{showMarker:y,showLine:_,showFill:E,showGradientLine:T,showGradientFill:s,anyLine:_||T,anyFill:E||s}}function o(d,w,A){return d&&i.isArrayOrTypedArray(d)?w:d>A?A:d}},66540:function(G,U,t){t(76052),G.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},44248:function(G,U,t){var g=t(24040),C=t(7316),i=t(79811),S=t(9224),x=t(4016).eraseActiveShape,v=t(3400),p=v._,r=G.exports={};r.toImage={name:"toImage",title:function(d){var w=d._context.toImageButtonOptions||{},A=w.format||"png";return A==="png"?p(d,"Download plot as a png"):p(d,"Download plot")},icon:S.camera,click:function(d){var w=d._context.toImageButtonOptions,A={format:w.format||"png"};v.notifier(p(d,"Taking snapshot - this may take a few seconds"),"long"),A.format!=="svg"&&v.isIE()&&(v.notifier(p(d,"IE only supports svg. Changing format to svg."),"long"),A.format="svg"),["filename","width","height","scale"].forEach(function(_){_ in w&&(A[_]=w[_])}),g.call("downloadImage",d,A).then(function(_){v.notifier(p(d,"Snapshot succeeded")+" - "+_,"long")}).catch(function(){v.notifier(p(d,"Sorry, there was a problem downloading your snapshot!"),"long")})}},r.sendDataToCloud={name:"sendDataToCloud",title:function(d){return p(d,"Edit in Chart Studio")},icon:S.disk,click:function(d){C.sendDataToCloud(d)}},r.editInChartStudio={name:"editInChartStudio",title:function(d){return p(d,"Edit in Chart Studio")},icon:S.pencil,click:function(d){C.sendDataToCloud(d)}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(d){return p(d,"Zoom")},attr:"dragmode",val:"zoom",icon:S.zoombox,click:e},r.pan2d={name:"pan2d",_cat:"pan",title:function(d){return p(d,"Pan")},attr:"dragmode",val:"pan",icon:S.pan,click:e},r.select2d={name:"select2d",_cat:"select",title:function(d){return p(d,"Box Select")},attr:"dragmode",val:"select",icon:S.selectbox,click:e},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(d){return p(d,"Lasso Select")},attr:"dragmode",val:"lasso",icon:S.lasso,click:e},r.drawclosedpath={name:"drawclosedpath",title:function(d){return p(d,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:S.drawclosedpath,click:e},r.drawopenpath={name:"drawopenpath",title:function(d){return p(d,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:S.drawopenpath,click:e},r.drawline={name:"drawline",title:function(d){return p(d,"Draw line")},attr:"dragmode",val:"drawline",icon:S.drawline,click:e},r.drawrect={name:"drawrect",title:function(d){return p(d,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:S.drawrect,click:e},r.drawcircle={name:"drawcircle",title:function(d){return p(d,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:S.drawcircle,click:e},r.eraseshape={name:"eraseshape",title:function(d){return p(d,"Erase active shape")},icon:S.eraseshape,click:x},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(d){return p(d,"Zoom in")},attr:"zoom",val:"in",icon:S.zoom_plus,click:e},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(d){return p(d,"Zoom out")},attr:"zoom",val:"out",icon:S.zoom_minus,click:e},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(d){return p(d,"Autoscale")},attr:"zoom",val:"auto",icon:S.autoscale,click:e},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(d){return p(d,"Reset axes")},attr:"zoom",val:"reset",icon:S.home,click:e},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(d){return p(d,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:S.tooltip_basic,gravity:"ne",click:e},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(d){return p(d,"Compare data on hover")},attr:"hovermode",val:function(d){return d._fullLayout._isHoriz?"y":"x"},icon:S.tooltip_compare,gravity:"ne",click:e};function e(d,w){var A=w.currentTarget,_=A.getAttribute("data-attr"),y=A.getAttribute("data-val")||!0,E=d._fullLayout,T={},s=i.list(d,null,!0),L=E._cartesianSpikesEnabled,M,z;if(_==="zoom"){var D=y==="in"?.5:2,N=(1+D)/2,I=(1-D)/2,k;for(z=0;z1?(it=["toggleHover"],ut=["resetViews"]):T?(et=["zoomInGeo","zoomOutGeo"],it=["hoverClosestGeo"],ut=["resetGeo"]):E?(it=["hoverClosest3d"],ut=["resetCameraDefault3d","resetCameraLastSave3d"]):D?(et=["zoomInMapbox","zoomOutMapbox"],it=["toggleHover"],ut=["resetViewMapbox"]):M?it=["hoverClosestGl2d"]:s?it=["hoverClosestPie"]:k?(it=["hoverClosestCartesian","hoverCompareCartesian"],ut=["resetViewSankey"]):it=["toggleHover"],y&&(it=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(f(b)||O)&&(it=[]),(y||M)&&!B&&(et=["zoomIn2d","zoomOut2d","autoScale2d"],ut[0]!=="resetViews"&&(ut=["resetScale2d"])),E?J=["zoom3d","pan3d","orbitRotation","tableRotation"]:(y||M)&&!B||z?J=["zoom2d","pan2d"]:D||T?J=["pan2d"]:N&&(J=["zoom2d"]),n(b)&&J.push("select2d","lasso2d");var X=[],tt=function($){X.indexOf($)===-1&&it.indexOf($)!==-1&&X.push($)};if(Array.isArray(A)){for(var V=[],Q=0;Q0);if(o){var d=r(n,f,c);b("x",d[0]),b("y",d[1]),g.noneOrAll(a,n,["x","y"]),b("xanchor"),b("yanchor"),g.coerceFont(b,"font",f.font);var w=b("bgcolor");b("activecolor",C.contrast(w,v.lightAmount,v.darkAmount)),b("bordercolor"),b("borderwidth")}};function p(e,a,n,f){var c=f.calendar;function l(b,u){return g.coerce(e,a,x.buttons,b,u)}var m=l("visible");if(m){var h=l("step");h!=="all"&&(c&&c!=="gregorian"&&(h==="month"||h==="year")?a.stepmode="backward":l("stepmode"),l("count")),l("label")}}function r(e,a,n){for(var f=n.filter(function(h){return a[h].anchor===e._id}),c=0,l=0;l=At.max)Rt=nt[bt+1];else if(wt=At.pmax)Rt=nt[bt+1];else if(wt0?E.touches[0].clientX:0}function m(E,T,s,L){if(T._context.staticPlot)return;var M=E.select("rect."+c.slideBoxClassName).node(),z=E.select("rect."+c.grabAreaMinClassName).node(),D=E.select("rect."+c.grabAreaMaxClassName).node();function N(){var I=g.event,k=I.target,B=l(I),O=B-E.node().getBoundingClientRect().left,H=L.d2p(s._rl[0]),Y=L.d2p(s._rl[1]),j=n.coverSlip();this.addEventListener("touchmove",et),this.addEventListener("touchend",it),j.addEventListener("mousemove",et),j.addEventListener("mouseup",it);function et(ut){var J=l(ut),X=+J-B,tt,V,Q;switch(k){case M:if(Q="ew-resize",H+X>s._length||Y+X<0)return;tt=H+X,V=Y+X;break;case z:if(Q="col-resize",H+X>s._length)return;tt=H+X,V=Y;break;case D:if(Q="col-resize",Y+X<0)return;tt=H,V=Y+X;break;default:Q="ew-resize",tt=O,V=O+X;break}if(V=0;N--){var I=A.append("path").attr(y).style("opacity",N?.1:E).call(S.stroke,s).call(S.fill,T).call(x.dashLine,N?"solid":M,N?4+L:L);if(f(I,h,o),z){var k=v(h.layout,"selections",o);I.style({cursor:"move"});var B={element:I.node(),plotinfo:d,gd:h,editHelpers:k,isActiveSelection:!0},O=g(_,h);C(O,I,B)}else I.style("pointer-events",N?"all":"none");D[N]=I}var H=D[0],Y=D[1];Y.node().addEventListener("click",function(){return c(h,H)})}}function f(h,b,u){var o=u.xref+u.yref;x.setClipUrl(h,"clip"+b._fullLayout._uid+o,b)}function c(h,b){if(a(h)){var u=b.node(),o=+u.getAttribute("data-index");if(o>=0){if(o===h._fullLayout._activeSelectionIndex){m(h);return}h._fullLayout._activeSelectionIndex=o,h._fullLayout._deactivateSelection=m,e(h)}}}function l(h){if(a(h)){var b=h._fullLayout.selections.length-1;h._fullLayout._activeSelectionIndex=b,h._fullLayout._deactivateSelection=m,e(h)}}function m(h){if(a(h)){var b=h._fullLayout._activeSelectionIndex;b>=0&&(i(h),delete h._fullLayout._activeSelectionIndex,e(h))}}},34200:function(G,U,t){var g=t(98192).u,C=t(92880).extendFlat;G.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:C({},g,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},81004:function(G){G.exports=function(t,g,C){C("newselection.mode");var i=C("newselection.line.width");i&&(C("newselection.line.color"),C("newselection.line.dash")),C("activeselection.fillcolor"),C("activeselection.opacity")}},5968:function(G,U,t){var g=t(72760),C=g.selectMode,i=t(1936),S=i.clearOutline,x=t(9856),v=x.readPaths,p=x.writePaths,r=x.fixDatesForPaths;G.exports=function(a,n){if(a.length){var f=a[0][0];if(f){var c=f.getAttribute("d"),l=n.gd,m=l._fullLayout.newselection,h=n.plotinfo,b=h.xaxis,u=h.yaxis,o=n.isActiveSelection,d=n.dragmode,w=(l.layout||{}).selections||[];if(!C(d)&&o!==void 0){var A=l._fullLayout._activeSelectionIndex;if(A=0){Te._fullLayout._deactivateShape(Te);return}if(!me){var En=Be.clickmode;s.done(Gr).then(function(){if(s.clear(Gr),rn===2){for(rr.remove(),Qe=0;Qe-1&&it(Cn,Te,yt.xaxes,yt.yaxes,yt.subplot,yt,rr),En==="event"&&Xt(Te,void 0);v.click(Te,Cn,Ke.id)}).catch(y.error)}},yt.doneFn=function(){xr.remove(),s.done(Gr).then(function(){s.clear(Gr),!ir&&Oe&&yt.selectionDefs&&(Oe.subtract=vr,yt.selectionDefs.push(Oe),yt.mergedPolygons.length=0,[].push.apply(yt.mergedPolygons,Ne)),(ir||me)&&$(yt,ir),yt.doneFnCompleted&&yt.doneFnCompleted(Pr),be&&Xt(Te,fr)}).catch(y.error)}}function it(Wt,Ft,xt,yt,Et,Mt,Nt){var jt=Ft._hoverdata,ie=Ft._fullLayout,me=ie.clickmode,be=me.indexOf("event")>-1,ve=[],Le,ce,Te,Be,ir,pe,Xe,Ke,or,$e;if(ct(jt)){V(Wt,Ft,Mt),Le=st(Ft,xt,yt,Et);var ge=gt(jt,Le),se=ge.pointNumbers.length>0;if(se?wt(Le,ge):Rt(Le)&&(Xe=Tt(ge))){for(Nt&&Nt.remove(),$e=0;$e=0}function ot(Wt){return Wt._fullLayout._activeSelectionIndex>=0}function $(Wt,Ft){var xt=Wt.dragmode,yt=Wt.plotinfo,Et=Wt.gd;Q(Et)&&Et._fullLayout._deactivateShape(Et),ot(Et)&&Et._fullLayout._deactivateSelection(Et);var Mt=Et._fullLayout,Nt=Mt._zoomlayer,jt=n(xt),ie=c(xt);if(jt||ie){var me=Nt.selectAll(".select-outline-"+yt.id);if(me&&Et._fullLayout._outlining){var be;jt&&(be=w(me,Wt)),be&&i.call("_guiRelayout",Et,{shapes:be});var ve;ie&&!j(Wt)&&(ve=A(me,Wt)),ve&&(Et._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",Et,{selections:ve}).then(function(){Ft&&_(Et)})),Et._fullLayout._outlining=!1}}yt.selection={},yt.selection.selectionDefs=Wt.selectionDefs=[],yt.selection.mergedPolygons=Wt.mergedPolygons=[]}function Z(Wt){return Wt._id}function st(Wt,Ft,xt,yt){if(!Wt.calcdata)return[];var Et=[],Mt=Ft.map(Z),Nt=xt.map(Z),jt,ie,me;for(me=0;me0,Mt=Et?yt[0]:xt;return Ft.selectedpoints?Ft.selectedpoints.indexOf(Mt)>-1:!1}function wt(Wt,Ft){var xt=[],yt,Et,Mt,Nt;for(Nt=0;Nt0&&xt.push(yt);if(xt.length===1&&(Mt=xt[0]===Ft.searchInfo,Mt&&(Et=Ft.searchInfo.cd[0].trace,Et.selectedpoints.length===Ft.pointNumbers.length))){for(Nt=0;Nt1||(Ft+=yt.selectedpoints.length,Ft>1)))return!1;return Ft===1}function bt(Wt,Ft,xt){var yt;for(yt=0;yt-1&&Ft;if(!Nt&&Ft){var rn=$t(Wt,!0);if(rn.length){var Cn=rn[0].xref,En=rn[0].yref;if(Cn&&En){var Tr=de(rn),Cr=Se([L(Wt,Cn,"x"),L(Wt,En,"y")]);Cr(Pr,Tr)}}Wt._fullLayout._noEmitSelectedAtStart?Wt._fullLayout._noEmitSelectedAtStart=!1:cn&&Xt(Wt,Pr),Le._reselect=!1}if(!Nt&&Le._deselect){var Wr=Le._deselect;jt=Wr.xref,ie=Wr.yref,It(jt,ie,be)||re(Wt,jt,ie,yt),cn&&(Pr.points.length?Xt(Wt,Pr):Jt(Wt)),Le._deselect=!1}return{eventData:Pr,selectionTesters:xt}}function Vt(Wt){var Ft=Wt.calcdata;if(Ft)for(var xt=0;xt0?u+m:m;return{ppad:m,ppadplus:h?d:w,ppadminus:h?w:d}}else return{ppad:m}}function r(e,a,n,f,c){var l=e.type==="category"||e.type==="multicategory"?e.r2c:e.d2c;if(a!==void 0)return[l(a),l(n)];if(f){var m=1/0,h=-1/0,b=f.match(i.segmentRE),u,o,d,w,A;for(e.type==="date"&&(l=S.decodeDate(l)),u=0;uh&&(h=A)));if(h>=m)return[m,h]}}},85448:function(G){G.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},43712:function(G,U,t){var g=t(3400),C=t(54460),i=t(51272),S=t(46056),x=t(65152);G.exports=function(e,a){i(e,a,{name:"shapes",handleItemDefaults:p})};function v(r,e){return r?"bottom":e.indexOf("top")!==-1?"top":e.indexOf("bottom")!==-1?"bottom":"middle"}function p(r,e,a){function n(J,X){return g.coerce(r,e,S,J,X)}e._isShape=!0;var f=n("visible");if(f){var c=n("showlegend");c&&(n("legend"),n("legendwidth"),n("legendgroup"),n("legendgrouptitle.text"),g.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var l=n("path"),m=l?"path":"rect",h=n("type",m),b=h!=="path";b&&delete e.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var u=n("line.width");u&&(n("line.color"),n("line.dash"));for(var o=n("xsizemode"),d=n("ysizemode"),w=["x","y"],A=0;A<2;A++){var _=w[A],y=_+"anchor",E=_==="x"?o:d,T={_fullLayout:a},s,L,M,z=C.coerceRef(r,e,T,_,void 0,"paper"),D=C.getRefType(z);if(D==="range"?(s=C.getFromId(T,z),s._shapeIndices.push(e._index),M=x.rangeToShapePosition(s),L=x.shapePositionToRange(s)):L=M=g.identity,b){var N=.25,I=.75,k=_+"0",B=_+"1",O=r[k],H=r[B];r[k]=L(r[k],!0),r[B]=L(r[B],!0),E==="pixel"?(n(k,0),n(B,10)):(C.coercePosition(e,T,n,z,k,N),C.coercePosition(e,T,n,z,B,I)),e[k]=M(e[k]),e[B]=M(e[B]),r[k]=O,r[B]=H}if(E==="pixel"){var Y=r[y];r[y]=L(r[y],!0),C.coercePosition(e,T,n,z,y,.25),e[y]=M(e[y]),r[y]=Y}}b&&g.noneOrAll(r,e,["x0","x1","y0","y1"]);var j=h==="line",et,it;if(b&&(et=n("label.texttemplate")),et||(it=n("label.text")),it||et){n("label.textangle");var ut=n("label.textposition",j?"middle":"middle center");n("label.xanchor"),n("label.yanchor",v(j,ut)),n("label.padding"),g.coerceFont(n,"label.font",a.font)}}}},60728:function(G,U,t){var g=t(3400),C=t(54460),i=t(72736),S=t(43616),x=t(9856).readPaths,v=t(65152),p=v.getPathString,r=t(97728),e=t(84284).FROM_TL;G.exports=function(c,l,m,h){if(h.selectAll(".shape-label").remove(),!!(m.label.text||m.label.texttemplate)){var b;if(m.label.texttemplate){var u={};if(m.type!=="path"){var o=C.getFromId(c,m.xref),d=C.getFromId(c,m.yref);for(var w in r){var A=r[w](m,o,d);A!==void 0&&(u[w]=A)}}b=g.texttemplateStringForShapes(m.label.texttemplate,{},c._fullLayout._d3locale,u)}else b=m.label.text;var _={"data-index":l},y=m.label.font,E={"data-notex":1},T=h.append("g").attr(_).classed("shape-label",!0),s=T.append("text").attr(E).classed("shape-label-text",!0).text(b),L,M,z,D;if(m.path){var N=p(c,m),I=x(N,c);L=1/0,z=1/0,M=-1/0,D=-1/0;for(var k=0;k=f?h=c-m:h=m-c,-180/Math.PI*Math.atan2(h,b)}function n(f,c,l,m,h,b,u){var o=h.label.textposition,d=h.label.textangle,w=h.label.padding,A=h.type,_=Math.PI/180*b,y=Math.sin(_),E=Math.cos(_),T=h.label.xanchor,s=h.label.yanchor,L,M,z,D;if(A==="line"){o==="start"?(L=f,M=c):o==="end"?(L=l,M=m):(L=(f+l)/2,M=(c+m)/2),T==="auto"&&(o==="start"?d==="auto"?l>f?T="left":lf?T="right":lf?T="right":lf?T="left":l1&&!(mt.length===2&&mt[1][0]==="Z")&&(J===0&&(mt[0][0]="M"),L[ut]=mt,I(),k())}}function nt(mt,Lt){if(mt===2){ut=+Lt.srcElement.getAttribute("data-i"),J=+Lt.srcElement.getAttribute("data-j");var Ht=L[ut];!b(Ht)&&!u(Ht)&&st()}}function ct(mt){et=[];for(var Lt=0;LtI&&xt>k&&!Jt.shiftKey?f.getCursor(yt/Ft,1-Et/xt):"move";c(L,Mt),It=Mt.split("-")[0]}}function le(Jt){u(s)||(B&&(X=mt(M.xanchor)),O&&(tt=Lt(M.yanchor)),M.type==="path"?gt=M.path:(et=B?M.x0:mt(M.x0),it=O?M.y0:Lt(M.y0),ut=B?M.x1:mt(M.x1),J=O?M.y1:Lt(M.y1)),etJ?(V=it,Z="y0",Q=J,st="y1"):(V=J,Z="y1",Q=it,st="y0"),$t(Jt),ne(D,M),Xt(L,M,s),Vt.moveFn=It==="move"?xe:Se,Vt.altKey=Jt.altKey)}function he(){u(s)||(c(L),zt(D),w(L,s,M),C.call("_guiRelayout",s,N.getUpdateObj()))}function de(){u(s)||zt(D)}function xe(Jt,Wt){if(M.type==="path"){var Ft=function(Et){return Et},xt=Ft,yt=Ft;B?j("xanchor",M.xanchor=Ht(X+Jt)):(xt=function(Mt){return Ht(mt(Mt)+Jt)},wt&&wt.type==="date"&&(xt=m.encodeDate(xt))),O?j("yanchor",M.yanchor=Ut(tt+Wt)):(yt=function(Mt){return Ut(Lt(Mt)+Wt)},bt&&bt.type==="date"&&(yt=m.encodeDate(yt))),j("path",M.path=_(gt,xt,yt))}else B?j("xanchor",M.xanchor=Ht(X+Jt)):(j("x0",M.x0=Ht(et+Jt)),j("x1",M.x1=Ht(ut+Jt))),O?j("yanchor",M.yanchor=Ut(tt+Wt)):(j("y0",M.y0=Ut(it+Wt)),j("y1",M.y1=Ut(J+Wt)));L.attr("d",h(s,M)),ne(D,M),p(s,z,M,Tt)}function Se(Jt,Wt){if(Y){var Ft=function(pe){return pe},xt=Ft,yt=Ft;B?j("xanchor",M.xanchor=Ht(X+Jt)):(xt=function(Xe){return Ht(mt(Xe)+Jt)},wt&&wt.type==="date"&&(xt=m.encodeDate(xt))),O?j("yanchor",M.yanchor=Ut(tt+Wt)):(yt=function(Xe){return Ut(Lt(Xe)+Wt)},bt&&bt.type==="date"&&(yt=m.encodeDate(yt))),j("path",M.path=_(gt,xt,yt))}else if(H){if(It==="resize-over-start-point"){var Et=et+Jt,Mt=O?it-Wt:it+Wt;j("x0",M.x0=B?Et:Ht(Et)),j("y0",M.y0=O?Mt:Ut(Mt))}else if(It==="resize-over-end-point"){var Nt=ut+Jt,jt=O?J-Wt:J+Wt;j("x1",M.x1=B?Nt:Ht(Nt)),j("y1",M.y1=O?jt:Ut(jt))}}else{var ie=function(pe){return It.indexOf(pe)!==-1},me=ie("n"),be=ie("s"),ve=ie("w"),Le=ie("e"),ce=me?V+Wt:V,Te=be?Q+Wt:Q,Be=ve?ot+Jt:ot,ir=Le?$+Jt:$;O&&(me&&(ce=V-Wt),be&&(Te=Q-Wt)),(!O&&Te-ce>k||O&&ce-Te>k)&&(j(Z,M[Z]=O?ce:Ut(ce)),j(st,M[st]=O?Te:Ut(Te))),ir-Be>I&&(j(nt,M[nt]=B?Be:Ht(Be)),j(ct,M[ct]=B?ir:Ht(ir)))}L.attr("d",h(s,M)),ne(D,M),p(s,z,M,Tt)}function ne(Jt,Wt){(B||O)&&Ft();function Ft(){var xt=Wt.type!=="path",yt=Jt.selectAll(".visual-cue").data([0]),Et=1;yt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Et}).classed("visual-cue",!0);var Mt=mt(B?Wt.xanchor:i.midRange(xt?[Wt.x0,Wt.x1]:m.extractPathCoords(Wt.path,l.paramIsX))),Nt=Lt(O?Wt.yanchor:i.midRange(xt?[Wt.y0,Wt.y1]:m.extractPathCoords(Wt.path,l.paramIsY)));if(Mt=m.roundPositionForSharpStrokeRendering(Mt,Et),Nt=m.roundPositionForSharpStrokeRendering(Nt,Et),B&&O){var jt="M"+(Mt-1-Et)+","+(Nt-1-Et)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";yt.attr("d",jt)}else if(B){var ie="M"+(Mt-1-Et)+","+(Nt-9-Et)+"v18 h2 v-18 Z";yt.attr("d",ie)}else{var me="M"+(Mt-9-Et)+","+(Nt-1-Et)+"h18 v2 h-18 Z";yt.attr("d",me)}}}function zt(Jt){Jt.selectAll(".visual-cue").remove()}function Xt(Jt,Wt,Ft){var xt=Wt.xref,yt=Wt.yref,Et=S.getFromId(Ft,xt),Mt=S.getFromId(Ft,yt),Nt="";xt!=="paper"&&!Et.autorange&&(Nt+=xt),yt!=="paper"&&!Mt.autorange&&(Nt+=yt),a.setClipUrl(Jt,Nt?"clip"+Ft._fullLayout._uid+Nt:null,Ft)}}function _(s,L,M){return s.replace(l.segmentRE,function(z){var D=0,N=z.charAt(0),I=l.paramIsX[N],k=l.paramIsY[N],B=l.numParams[N],O=z.substr(1).replace(l.paramRE,function(H){return D>=B||(I[D]?H=L(H):k[D]&&(H=M(H)),D++),H});return N+O})}function y(s,L){if(o(s)){var M=L.node(),z=+M.getAttribute("data-index");if(z>=0){if(z===s._fullLayout._activeShapeIndex){E(s);return}s._fullLayout._activeShapeIndex=z,s._fullLayout._deactivateShape=E,b(s)}}}function E(s){if(o(s)){var L=s._fullLayout._activeShapeIndex;L>=0&&(r(s),delete s._fullLayout._activeShapeIndex,b(s))}}function T(s){if(o(s)){r(s);var L=s._fullLayout._activeShapeIndex,M=(s.layout||{}).shapes||[];if(L0&&du&&(d="X"),d});return l>u&&(o=o.replace(/[\s,]*X.*/,""),C.log("Ignoring extra params in segment "+c)),m+o})}},41592:function(G,U,t){var g=t(4016);G.exports={moduleType:"component",name:"shapes",layoutAttributes:t(46056),supplyLayoutDefaults:t(43712),supplyDrawNewShapeDefaults:t(65144),includeBasePlot:t(36632)("shapes"),calcAutorange:t(96084),draw:g.draw,drawOne:g.drawOne}},97728:function(G){function U(c,l){return l?l.d2l(c):c}function t(c,l){return l?l.l2d(c):c}function g(c){return c.x0}function C(c){return c.x1}function i(c){return c.y0}function S(c){return c.y1}function x(c,l){return U(c.x1,l)-U(c.x0,l)}function v(c,l,m){return U(c.y1,m)-U(c.y0,m)}function p(c,l){return Math.abs(x(c,l))}function r(c,l,m){return Math.abs(v(c,l,m))}function e(c,l,m){return c.type!=="line"?void 0:Math.sqrt(Math.pow(x(c,l),2)+Math.pow(v(c,l,m),2))}function a(c,l){return t((U(c.x1,l)+U(c.x0,l))/2,l)}function n(c,l,m){return t((U(c.y1,m)+U(c.y0,m))/2,m)}function f(c,l,m){return c.type!=="line"?void 0:v(c,l,m)/x(c,l)}G.exports={x0:g,x1:C,y0:i,y1:S,slope:f,dx:x,dy:v,width:p,height:r,length:e,xcenter:a,ycenter:n}},89861:function(G,U,t){var g=t(25376),C=t(66741),i=t(92880).extendDeepAll,S=t(67824).overrideAll,x=t(85656),v=t(31780).templatedArray,p=t(60876),r=v("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});G.exports=S(v("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:r,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:i(C({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:x.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:g({})},font:g({}),activebgcolor:{valType:"color",dflt:p.gripBgActiveColor},bgcolor:{valType:"color",dflt:p.railBgColor},bordercolor:{valType:"color",dflt:p.railBorderColor},borderwidth:{valType:"number",min:0,dflt:p.railBorderWidth},ticklen:{valType:"number",min:0,dflt:p.tickLength},tickcolor:{valType:"color",dflt:p.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:p.minorTickLength}}),"arraydraw","from-root")},60876:function(G){G.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(G,U,t){var g=t(3400),C=t(51272),i=t(89861),S=t(60876),x=S.name,v=i.steps;G.exports=function(a,n){C(a,n,{name:x,handleItemDefaults:p})};function p(e,a,n){function f(d,w){return g.coerce(e,a,i,d,w)}for(var c=C(e,a,{name:"steps",handleItemDefaults:r}),l=0,m=0;m0?[0]:[]);Y.enter().append("g").classed(e.containerClassName,!0).style("cursor",B?null:"ew-resize");function j(J){J._commandObserver&&(J._commandObserver.remove(),delete J._commandObserver),C.autoMargin(k,l(J))}if(Y.exit().each(function(){g.select(this).selectAll("g."+e.groupClassName).each(j)}).remove(),H.length!==0){var et=Y.selectAll("g."+e.groupClassName).data(H,h);et.enter().append("g").classed(e.groupClassName,!0),et.exit().each(j).remove();for(var it=0;it0&&(et=et.transition().duration(k.transition.duration).ease(k.transition.easing)),et.attr("transform",v(j-e.gripWidth*.5,k._dims.currentValueTotalHeight))}}function M(I,k){var B=I._dims;return B.inputAreaStart+e.stepInset+(B.inputAreaLength-2*e.stepInset)*Math.min(1,Math.max(0,k))}function z(I,k){var B=I._dims;return Math.min(1,Math.max(0,(k-e.stepInset-B.inputAreaStart)/(B.inputAreaLength-2*e.stepInset-2*B.inputAreaStart)))}function D(I,k,B){var O=B._dims,H=x.ensureSingle(I,"rect",e.railTouchRectClass,function(Y){Y.call(E,k,I,B).style("pointer-events","all")});H.attr({width:O.inputAreaLength,height:Math.max(O.inputAreaWidth,e.tickOffset+B.ticklen+O.labelHeight)}).call(i.fill,B.bgcolor).attr("opacity",0),S.setTranslate(H,0,O.currentValueTotalHeight)}function N(I,k){var B=k._dims,O=B.inputAreaLength-e.railInset*2,H=x.ensureSingle(I,"rect",e.railRectClass);H.attr({width:O,height:e.railWidth,rx:e.railRadius,ry:e.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,k.bordercolor).call(i.fill,k.bgcolor).style("stroke-width",k.borderwidth+"px"),S.setTranslate(H,e.railInset,(B.inputAreaWidth-e.railWidth)*.5+B.currentValueTotalHeight)}},97544:function(G,U,t){var g=t(60876);G.exports={moduleType:"component",name:g.name,layoutAttributes:t(89861),supplyLayoutDefaults:t(8132),draw:t(79664)}},81668:function(G,U,t){var g=t(33428),C=t(38248),i=t(7316),S=t(24040),x=t(3400),v=x.strTranslate,p=t(43616),r=t(76308),e=t(72736),a=t(13448),n=t(84284).OPPOSITE_SIDE,f=/ [XY][0-9]* /;function c(l,m,h){var b=h.propContainer,u=h.propName,o=h.placeholder,d=h.traceIndex,w=h.avoid||{},A=h.attributes,_=h.transform,y=h.containerGroup,E=l._fullLayout,T=1,s=!1,L=b.title,M=(L&&L.text?L.text:"").trim(),z=L&&L.font?L.font:{},D=z.family,N=z.size,I=z.color,k;u==="title.text"?k="titleText":u.indexOf("axis")!==-1?k="axisTitleText":u.indexOf("colorbar"!==-1)&&(k="colorbarTitleText");var B=l._context.edits[k];M===""?T=0:M.replace(f," % ")===o.replace(f," % ")&&(T=.2,s=!0,B||(M="")),h._meta?M=x.templateString(M,h._meta):E._meta&&(M=x.templateString(M,E._meta));var O=M||B,H;y||(y=x.ensureSingle(E._infolayer,"g","g-"+m),H=E._hColorbarMoveTitle);var Y=y.selectAll("text").data(O?[0]:[]);if(Y.enter().append("text"),Y.text(M).attr("class",m),Y.exit().remove(),!O)return y;function j(J){x.syncOrAsync([et,it],J)}function et(J){var X;return!_&&H&&(_={}),_?(X="",_.rotate&&(X+="rotate("+[_.rotate,A.x,A.y]+")"),(_.offset||H)&&(X+=v(0,(_.offset||0)-(H||0)))):X=null,J.attr("transform",X),J.style({"font-family":D,"font-size":g.round(N,2)+"px",fill:r.rgb(I),opacity:T*r.opacity(I),"font-weight":i.fontWeight}).attr(A).call(e.convertToTspans,l),i.previousPromises(l)}function it(J){var X=g.select(J.node().parentNode);if(w&&w.selection&&w.side&&M){X.attr("transform",null);var tt=n[w.side],V=w.side==="left"||w.side==="top"?-1:1,Q=C(w.pad)?w.pad:2,ot=p.bBox(X.node()),$={t:0,b:0,l:0,r:0},Z=l._fullLayout._reservedMargin;for(var st in Z)for(var nt in Z[st]){var ct=Z[st][nt];$[nt]=Math.max($[nt],ct)}var gt={left:$.l,top:$.t,right:E.width-$.r,bottom:E.height-$.b},Tt=w.maxShift||V*(gt[w.side]-ot[w.side]),wt=0;if(Tt<0)wt=Tt;else{var Rt=w.offsetLeft||0,bt=w.offsetTop||0;ot.left-=Rt,ot.right-=Rt,ot.top-=bt,ot.bottom-=bt,w.selection.each(function(){var mt=p.bBox(this);x.bBoxIntersect(ot,mt,Q)&&(wt=Math.max(wt,V*(mt[w.side]-ot[tt])+Q))}),wt=Math.min(Tt,wt),b._titleScoot=Math.abs(wt)}if(wt>0||Tt<0){var At={left:[-wt,0],right:[wt,0],top:[0,-wt],bottom:[0,wt]}[w.side];X.attr("transform",v(At[0],At[1]))}}}Y.call(j);function ut(){T=0,s=!0,Y.text(o).on("mouseover.opacity",function(){g.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){g.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}return B&&(M?Y.on(".opacity",null):ut(),Y.call(e.makeEditable,{gd:l}).on("edit",function(J){d!==void 0?S.call("_guiRestyle",l,u,J,d):S.call("_guiRelayout",l,u,J)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(j)}).on("input",function(J){this.text(J||" ").call(e.positionText,A.x,A.y)})),Y.classed("js-placeholder",s),y}G.exports={draw:c}},88444:function(G,U,t){var g=t(25376),C=t(22548),i=t(92880).extendFlat,S=t(67824).overrideAll,x=t(66741),v=t(31780).templatedArray,p=v("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});G.exports=S(v("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:p,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:i(x({editType:"arraydraw"}),{}),font:g({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:C.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},73712:function(G){G.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},91384:function(G,U,t){var g=t(3400),C=t(51272),i=t(88444),S=t(73712),x=S.name,v=i.buttons;G.exports=function(a,n){var f={name:x,handleItemDefaults:p};C(a,n,f)};function p(e,a,n){function f(m,h){return g.coerce(e,a,i,m,h)}var c=C(e,a,{name:"buttons",handleItemDefaults:r}),l=f("visible",c.length>0);l&&(f("active"),f("direction"),f("type"),f("showactive"),f("x"),f("y"),g.noneOrAll(e,a,["x","y"]),f("xanchor"),f("yanchor"),f("pad.t"),f("pad.r"),f("pad.b"),f("pad.l"),g.coerceFont(f,"font",n.font),f("bgcolor",n.paper_bgcolor),f("bordercolor"),f("borderwidth"))}function r(e,a){function n(c,l){return g.coerce(e,a,v,c,l)}var f=n("visible",e.method==="skip"||Array.isArray(e.args));f&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}},14420:function(G,U,t){var g=t(33428),C=t(7316),i=t(76308),S=t(43616),x=t(3400),v=t(72736),p=t(31780).arrayEditor,r=t(84284).LINE_SPACING,e=t(73712),a=t(37400);G.exports=function(z){var D=z._fullLayout,N=x.filterVisible(D[e.name]);function I(it){C.autoMargin(z,T(it))}var k=D._menulayer.selectAll("g."+e.containerClassName).data(N.length>0?[0]:[]);if(k.enter().append("g").classed(e.containerClassName,!0).style("cursor","pointer"),k.exit().each(function(){g.select(this).selectAll("g."+e.headerGroupClassName).each(I)}).remove(),N.length!==0){var B=k.selectAll("g."+e.headerGroupClassName).data(N,n);B.enter().append("g").classed(e.headerGroupClassName,!0);for(var O=x.ensureSingle(k,"g",e.dropdownButtonGroupClassName,function(it){it.style("pointer-events","all")}),H=0;HA,z=x.barLength+2*x.barPad,D=x.barWidth+2*x.barPad,N=c,I=m+h;I+D>f&&(I=f-D);var k=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);k.exit().on(".drag",null).remove(),k.enter().append("rect").classed("scrollbar-horizontal",!0).call(C.fill,x.barColor),M?(this.hbar=k.attr({rx:x.barRadius,ry:x.barRadius,x:N,y:I,width:z,height:D}),this._hbarXMin=N+z/2,this._hbarTranslateMax=A-z):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var B=h>_,O=x.barWidth+2*x.barPad,H=x.barLength+2*x.barPad,Y=c+l,j=m;Y+O>n&&(Y=n-O);var et=this.container.selectAll("rect.scrollbar-vertical").data(B?[0]:[]);et.exit().on(".drag",null).remove(),et.enter().append("rect").classed("scrollbar-vertical",!0).call(C.fill,x.barColor),B?(this.vbar=et.attr({rx:x.barRadius,ry:x.barRadius,x:Y,y:j,width:O,height:H}),this._vbarYMin=j+H/2,this._vbarTranslateMax=_-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var it=this.id,ut=y-.5,J=B?E+O+.5:E+.5,X=T-.5,tt=M?s+D+.5:s+.5,V=a._topdefs.selectAll("#"+it).data(M||B?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",it).append("rect"),M||B?(this._clipRect=V.select("rect").attr({x:Math.floor(ut),y:Math.floor(X),width:Math.ceil(J)-Math.floor(ut),height:Math.ceil(tt)-Math.floor(X)}),this.container.call(i.setClipUrl,it,this.gd),this.bg.attr({x:c,y:m,width:l,height:h})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),M||B){var Q=g.behavior.drag().on("dragstart",function(){g.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Q);var ot=g.behavior.drag().on("dragstart",function(){g.event.sourceEvent.preventDefault(),g.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(ot),B&&this.vbar.on(".drag",null).call(ot)}this.setTranslate(r,e)},x.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},x.prototype._onBoxDrag=function(){var p=this.translateX,r=this.translateY;this.hbar&&(p-=g.event.dx),this.vbar&&(r-=g.event.dy),this.setTranslate(p,r)},x.prototype._onBoxWheel=function(){var p=this.translateX,r=this.translateY;this.hbar&&(p+=g.event.deltaY),this.vbar&&(r+=g.event.deltaY),this.setTranslate(p,r)},x.prototype._onBarDrag=function(){var p=this.translateX,r=this.translateY;if(this.hbar){var e=p+this._hbarXMin,a=e+this._hbarTranslateMax,n=S.constrain(g.event.x,e,a),f=(n-e)/(a-e),c=this.position.w-this._box.w;p=f*c}if(this.vbar){var l=r+this._vbarYMin,m=l+this._vbarTranslateMax,h=S.constrain(g.event.y,l,m),b=(h-l)/(m-l),u=this.position.h-this._box.h;r=b*u}this.setTranslate(p,r)},x.prototype.setTranslate=function(p,r){var e=this.position.w-this._box.w,a=this.position.h-this._box.h;if(p=S.constrain(p||0,0,e),r=S.constrain(r||0,0,a),this.translateX=p,this.translateY=r,this.container.call(i.setTranslate,this._box.l-this.position.l-p,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+p-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var n=p/e;this.hbar.call(i.setTranslate,p+n*this._hbarTranslateMax,r)}if(this.vbar){var f=r/a;this.vbar.call(i.setTranslate,p,r+f*this._vbarTranslateMax)}}},84284:function(G){G.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},36208:function(G){G.exports={axisRefDescription:function(U,t,g){return["If set to a",U,"axis id (e.g. *"+U+"* or","*"+U+"2*), the `"+U+"` position refers to a",U,"coordinate. If set to *paper*, the `"+U+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+g+"). If set to a",U,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+U+"2 domain* refers to the domain of the second",U," axis and a",U,"position of 0.5 refers to the","point between the",t,"and the",g,"of the domain of the","second",U,"axis."].join(" ")}}},48164:function(G){G.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},26880:function(G){G.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},69104:function(G){G.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},99168:function(G){G.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87792:function(G){G.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},13448:function(G){G.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032:function(G){G.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},2264:function(G,U){U.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],U.STYLE=U.CSS_DECLARATIONS.map(function(t){return t.join(": ")+"; "}).join("")},9616:function(G,U){U.xmlns="http://www.w3.org/2000/xmlns/",U.svg="http://www.w3.org/2000/svg",U.xlink="http://www.w3.org/1999/xlink",U.svgAttrs={xmlns:U.svg,"xmlns:xlink":U.xlink}},64884:function(G,U,t){U.version=t(25788).version,t(88324),t(79288);for(var g=t(24040),C=U.register=g.register,i=t(22448),S=Object.keys(i),x=0;x",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},98308:function(G,U){U.isLeftAnchor=function(g){return g.xanchor==="left"||g.xanchor==="auto"&&g.x<=.3333333333333333},U.isCenterAnchor=function(g){return g.xanchor==="center"||g.xanchor==="auto"&&g.x>.3333333333333333&&g.x<.6666666666666666},U.isRightAnchor=function(g){return g.xanchor==="right"||g.xanchor==="auto"&&g.x>=.6666666666666666},U.isTopAnchor=function(g){return g.yanchor==="top"||g.yanchor==="auto"&&g.y>=.6666666666666666},U.isMiddleAnchor=function(g){return g.yanchor==="middle"||g.yanchor==="auto"&&g.y>.3333333333333333&&g.y<.6666666666666666},U.isBottomAnchor=function(g){return g.yanchor==="bottom"||g.yanchor==="auto"&&g.y<=.3333333333333333}},11864:function(G,U,t){var g=t(20435),C=g.mod,i=g.modHalf,S=Math.PI,x=2*S;function v(b){return b/180*S}function p(b){return b/S*180}function r(b){return Math.abs(b[1]-b[0])>x-1e-14}function e(b,u){return i(u-b,x)}function a(b,u){return Math.abs(e(b,u))}function n(b,u){if(r(u))return!0;var o,d;u[0]d&&(d+=x);var w=C(b,x),A=w+x;return w>=o&&w<=d||A>=o&&A<=d}function f(b,u,o,d){if(!n(u,d))return!1;var w,A;return o[0]=w&&b<=A}function c(b,u,o,d,w,A,_){w=w||0,A=A||0;var y=r([o,d]),E,T,s,L,M;y?(E=0,T=S,s=x):o"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};e.uint8c=e.u1c,e.uint8=e.u1,e.int8=e.i1,e.uint16=e.u2,e.int16=e.i2,e.uint32=e.u4,e.int32=e.i4,e.float32=e.f4,e.float64=e.f8;function a(c){return c.constructor===ArrayBuffer}U.isArrayBuffer=a,U.decodeTypedArraySpec=function(c){var l=[],m=n(c),h=m.dtype,b=e[h];if(!b)throw new Error('Error in dtype: "'+h+'"');var u=b.BYTES_PER_ELEMENT,o=m.bdata;a(o)||(o=g(o));var d=m.shape===void 0?[o.byteLength/u]:(""+m.shape).split(",");d.reverse();var w=d.length,A,_,y=+d[0],E=u*y,T=0;if(w===1)l=new b(o);else if(w===2)for(A=+d[1],_=0;_b.max?m.set(h):m.set(+l)}},integer:{coerceFunction:function(l,m,h,b){l%1||!g(l)||b.min!==void 0&&lb.max?m.set(h):m.set(+l)}},string:{coerceFunction:function(l,m,h,b){if(typeof l!="string"){var u=typeof l=="number";b.strict===!0||!u?m.set(h):m.set(String(l))}else b.noBlank&&!l?m.set(h):m.set(l)}},color:{coerceFunction:function(l,m,h){C(l).isValid()?m.set(l):m.set(h)}},colorlist:{coerceFunction:function(l,m,h){function b(u){return C(u).isValid()}!Array.isArray(l)||!l.length?m.set(h):l.every(b)?m.set(l):m.set(h)}},colorscale:{coerceFunction:function(l,m,h){m.set(S.get(l,h))}},angle:{coerceFunction:function(l,m,h){l==="auto"?m.set("auto"):g(l)?m.set(e(+l,360)):m.set(h)}},subplotid:{coerceFunction:function(l,m,h,b){var u=b.regex||r(h);if(typeof l=="string"&&u.test(l)){m.set(l);return}m.set(h)},validateFunction:function(l,m){var h=m.dflt;return l===h?!0:typeof l!="string"?!1:!!r(h).test(l)}},flaglist:{coerceFunction:function(l,m,h,b){if((b.extras||[]).indexOf(l)!==-1){m.set(l);return}if(typeof l!="string"){m.set(h);return}for(var u=l.split("+"),o=0;o=o&&I<=d?I:v}if(typeof I!="string"&&typeof I!="number")return v;I=String(I);var Y=b(k),j=I.charAt(0);Y&&(j==="G"||j==="g")&&(I=I.substr(1),k="");var et=Y&&k.substr(0,7)==="chinese",it=I.match(et?m:l);if(!it)return v;var ut=it[1],J=it[3]||"1",X=Number(it[5]||1),tt=Number(it[7]||0),V=Number(it[9]||0),Q=Number(it[11]||0);if(Y){if(ut.length===2)return v;ut=Number(ut);var ot;try{var $=f.getComponentMethod("calendars","getCal")(k);if(et){var Z=J.charAt(J.length-1)==="i";J=parseInt(J,10),ot=$.newDate(ut,$.toMonthIndex(ut,J,Z),X)}else ot=$.newDate(ut,Number(J),X)}catch{return v}return ot?(ot.toJD()-n)*p+tt*r+V*e+Q*a:v}ut.length===2?ut=(Number(ut)+2e3-h)%100+h:ut=Number(ut),J-=1;var st=new Date(Date.UTC(2e3,J,X,tt,V));return st.setUTCFullYear(ut),st.getUTCMonth()!==J||st.getUTCDate()!==X?v:st.getTime()+Q*a},o=U.MIN_MS=U.dateTime2ms("-9999"),d=U.MAX_MS=U.dateTime2ms("9999-12-31 23:59:59.9999"),U.isDateTime=function(I,k){return U.dateTime2ms(I,k)!==v};function w(I,k){return String(I+Math.pow(10,k)).substr(1)}var A=90*p,_=3*r,y=5*e;U.ms2DateTime=function(I,k,B){if(typeof I!="number"||!(I>=o&&I<=d))return v;k||(k=0);var O=Math.floor(S(I+.05,1)*10),H=Math.round(I-O/10),Y,j,et,it,ut,J;if(b(B)){var X=Math.floor(H/p)+n,tt=Math.floor(S(I,p));try{Y=f.getComponentMethod("calendars","getCal")(B).fromJD(X).formatDate("yyyy-mm-dd")}catch{Y=c("G%Y-%m-%d")(new Date(H))}if(Y.charAt(0)==="-")for(;Y.length<11;)Y="-0"+Y.substr(1);else for(;Y.length<10;)Y="0"+Y;j=k=o+p&&I<=d-p))return v;var k=Math.floor(S(I+.05,1)*10),B=new Date(Math.round(I-k/10)),O=g("%Y-%m-%d")(B),H=B.getHours(),Y=B.getMinutes(),j=B.getSeconds(),et=B.getUTCMilliseconds()*10+k;return E(O,H,Y,j,et)};function E(I,k,B,O,H){if((k||B||O||H)&&(I+=" "+w(k,2)+":"+w(B,2),(O||H)&&(I+=":"+w(O,2),H))){for(var Y=4;H%10===0;)Y-=1,H/=10;I+="."+w(H,Y)}return I}U.cleanDate=function(I,k,B){if(I===v)return k;if(U.isJSDate(I)||typeof I=="number"&&isFinite(I)){if(b(B))return i.error("JS Dates and milliseconds are incompatible with world calendars",I),k;if(I=U.ms2DateTimeLocal(+I),!I&&k!==void 0)return k}else if(!U.isDateTime(I,B))return i.error("unrecognized date",I),k;return I};var T=/%\d?f/g,s=/%h/g,L={1:"1",2:"1",3:"2",4:"2"};function M(I,k,B,O){I=I.replace(T,function(Y){var j=Math.min(+Y.charAt(1)||6,6),et=(k/1e3%1+2).toFixed(j).substr(2).replace(/0+$/,"")||"0";return et});var H=new Date(Math.floor(k+.05));if(I=I.replace(s,function(){return L[B("%q")(H)]}),b(O))try{I=f.getComponentMethod("calendars","worldCalFmt")(I,k,O)}catch{return"Invalid"}return B(I)(H)}var z=[59,59.9,59.99,59.999,59.9999];function D(I,k){var B=S(I+.05,p),O=w(Math.floor(B/r),2)+":"+w(S(Math.floor(B/e),60),2);if(k!=="M"){C(k)||(k=0);var H=Math.min(S(I/a,60),z[k]),Y=(100+H).toFixed(k).substr(1);k>0&&(Y=Y.replace(/0+$/,"").replace(/[\.]$/,"")),O+=":"+Y}return O}U.formatDate=function(I,k,B,O,H,Y){if(H=b(H)&&H,!k)if(B==="y")k=Y.year;else if(B==="m")k=Y.month;else if(B==="d")k=Y.dayMonth+` `+Y.year;else return D(I,B)+` -`+M(Y.dayMonthYear,I,O,V);return M(k,I,O,V)};var N=3*p;U.incrementMonth=function(I,k,B){B=b(B)&&B;var O=S(I,p);if(I=Math.round(I-O),B)try{var V=Math.round(I/p)+n,Y=f.getComponentMethod("calendars","getCal")(B),j=Y.fromJD(V);return k%12?Y.add(j,k,"m"):Y.add(j,k/12,"y"),(j.toJD()-n)*p+O}catch{i.error("invalid ms "+I+" in calendar "+B)}var te=new Date(I+N);return te.setUTCMonth(te.getUTCMonth()+k)+O-N},U.findExactDates=function(I,k){for(var B=0,O=0,V=0,Y=0,j,te,ie=b(k)&&f.getComponentMethod("calendars","getCal")(k),ue=0;ue0&&D[N+1][0]<0)return N;return null}switch(y==="RUS"||y==="FJI"?T=function(D){var N;if(z(D)===null)N=D;else for(N=new Array(D.length),M=0;MN?I[k++]=[D[M][0]+360,D[M][1]]:M===N?(I[k++]=D[M],I[k++]=[D[M][0],-90]):I[k++]=D[M];var B=a.tester(I);B.pts.pop(),E.push(B)}:T=function(D){E.push(a.tester(D))},A.type){case"MultiPolygon":for(s=0;s<_.length;s++)for(L=0;L<_[s].length;L++)T(_[s][L]);break;case"Polygon":for(s=0;s<_.length;s++)T(_[s]);break}return E}function h(w){var A=w.geojson,_=window.PlotlyGeoAssets||{},y=typeof A=="string"?_[A]:A;return r(y)?y:(p.error("Oops ... something went wrong when fetching "+A),!1)}function b(w){var A=w[0].trace,_=h(A);if(!_)return!1;var y={},E=[],T;for(T=0;TE&&(E=L,_=s)}else _=A;return S.default(_).geometry.coordinates}function o(w){var A=window.PlotlyGeoAssets||{},_=[];function y(M){return new Promise(function(z,D){g.json(M,function(N,I){if(N){delete A[M];var k=N.status===404?'GeoJSON at URL "'+M+'" does not exist.':"Unexpected error while fetching from "+M;return D(new Error(k))}return A[M]=I,z(I)})})}function E(M){return new Promise(function(z,D){var N=0,I=setInterval(function(){if(A[M]&&A[M]!=="pending")return clearInterval(I),z(A[M]);if(N>100)return clearInterval(I),D("Unexpected error while fetching from "+M);N++},50)})}for(var T=0;T0&&(x.push(v),v=[])}return v.length>0&&x.push(v),x},U.makeLine=function(C){return C.length===1?{type:"LineString",coordinates:C[0]}:{type:"MultiLineString",coordinates:C}},U.makePolygon=function(C){if(C.length===1)return{type:"Polygon",coordinates:C};for(var i=new Array(C.length),S=0;S1||A<0||A>1?null:{x:p+m*A,y:r+u*A}}U.segmentDistance=function(r,t,a,n,f,c,l,m){if(C(r,t,a,n,f,c,l,m))return 0;var h=a-r,b=n-t,u=l-f,o=m-c,d=h*h+b*b,w=u*u+o*o,A=Math.min(i(h,b,d,f-r,c-t),i(h,b,d,l-r,m-t),i(u,o,w,r-f,t-c),i(u,o,w,a-f,n-c));return Math.sqrt(A)};function i(p,r,t,a,n){var f=a*p+n*r;if(f<0)return a*a+n*n;if(f>t){var c=a-p,l=n-r;return c*c+l*l}else{var m=a*r-n*p;return m*m/t}}var S,x,v;U.getTextLocation=function(r,t,a,n){if((r!==x||n!==v)&&(S={},x=r,v=n),S[a])return S[a];var f=r.getPointAtLength(g(a-n/2,t)),c=r.getPointAtLength(g(a+n/2,t)),l=Math.atan((c.y-f.y)/(c.x-f.x)),m=r.getPointAtLength(g(a,t)),h=(m.x*4+f.x+c.x)/6,b=(m.y*4+f.y+c.y)/6,u={x:h,y:b,theta:l};return S[a]=u,u},U.clearLocationCache=function(){x=null},U.getVisibleSegment=function(r,t,a){var n=t.left,f=t.right,c=t.top,l=t.bottom,m=0,h=r.getTotalLength(),b=h,u,o;function d(A){var _=r.getPointAtLength(A);A===0?u=_:A===h&&(o=_);var y=_.xf?_.x-f:0,E=_.yl?_.y-l:0;return Math.sqrt(y*y+E*E)}for(var w=d(m);w;){if(m+=w+a,m>b)return;w=d(m)}for(w=d(b);w;){if(b-=w+a,m>b)return;w=d(b)}return{min:m,max:b,len:b-m,total:h,isClosed:m===0&&b===h&&Math.abs(u.x-o.x)<.1&&Math.abs(u.y-o.y)<.1}},U.findPointOnPath=function(r,t,a,n){n=n||{};for(var f=n.pathLength||r.getTotalLength(),c=n.tolerance||.001,l=n.iterationLimit||30,m=r.getPointAtLength(0)[a]>r.getPointAtLength(f)[a]?-1:1,h=0,b=0,u=f,o,d,w;h0?u=o:b=o,h++}return d}},33040:function(H,U,e){var g=e(38248),C=e(49760),i=e(72160),S=e(8932),x=e(22548).defaultLine,v=e(38116).isArrayOrTypedArray,p=i(x),r=1;function t(l,m){var h=l;return h[3]*=m,h}function a(l){if(g(l))return p;var m=i(l);return m.length?m:p}function n(l){return g(l)?l:r}function f(l,m,h){var b=l.color;b&&b._inputArray&&(b=b._inputArray);var u=v(b),o=v(m),d=S.extractOpts(l),w=[],A,_,y,E,T;if(d.colorscale!==void 0?A=S.makeColorScaleFuncFromTrace(l):A=a,u?_=function(L,M){return L[M]===void 0?p:i(A(L[M]))}:_=a,o?y=function(L,M){return L[M]===void 0?r:n(L[M])}:y=n,u||o)for(var s=0;s1?(C*e+C*g)/C:e+g,S=String(i).length;if(S>16){var x=String(g).length,v=String(e).length;if(S>=v+x){var p=parseFloat(i).toPrecision(12);p.indexOf("e+")===-1&&(i=+p)}}return i}},3400:function(H,U,e){var g=e(33428),C=e(94336).E9,i=e(57624).E9,S=e(38248),x=e(39032),v=x.FP_SAFE,p=-v,r=x.BADNUM,t=H.exports={};t.adjustFormat=function(oe){return!oe||/^\d[.]\df/.test(oe)||/[.]\d%/.test(oe)?oe:oe==="0.f"?"~f":/^\d%/.test(oe)?"~%":/^\ds/.test(oe)?"~s":!/^[~,.0$]/.test(oe)&&/[&fps]/.test(oe)?"~"+oe:oe};var a={};t.warnBadFormat=function(Q){var oe=String(Q);a[oe]||(a[oe]=1,t.warn('encountered bad format: "'+oe+'"'))},t.noFormat=function(Q){return String(Q)},t.numberFormat=function(Q){var oe;try{oe=i(t.adjustFormat(Q))}catch{return t.warnBadFormat(Q),t.noFormat}return oe},t.nestedProperty=e(22296),t.keyedContainer=e(37804),t.relativeAttr=e(23193),t.isPlainObject=e(63620),t.toLogRange=e(36896),t.relinkPrivateKeys=e(51528);var n=e(38116);t.isArrayBuffer=n.isArrayBuffer,t.isTypedArray=n.isTypedArray,t.isArrayOrTypedArray=n.isArrayOrTypedArray,t.isArray1D=n.isArray1D,t.ensureArray=n.ensureArray,t.concat=n.concat,t.maxRowLength=n.maxRowLength,t.minRowLength=n.minRowLength;var f=e(20435);t.mod=f.mod,t.modHalf=f.modHalf;var c=e(63064);t.valObjectMeta=c.valObjectMeta,t.coerce=c.coerce,t.coerce2=c.coerce2,t.coerceFont=c.coerceFont,t.coercePattern=c.coercePattern,t.coerceHoverinfo=c.coerceHoverinfo,t.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,t.validate=c.validate;var l=e(67555);t.dateTime2ms=l.dateTime2ms,t.isDateTime=l.isDateTime,t.ms2DateTime=l.ms2DateTime,t.ms2DateTimeLocal=l.ms2DateTimeLocal,t.cleanDate=l.cleanDate,t.isJSDate=l.isJSDate,t.formatDate=l.formatDate,t.incrementMonth=l.incrementMonth,t.dateTick0=l.dateTick0,t.dfltRange=l.dfltRange,t.findExactDates=l.findExactDates,t.MIN_MS=l.MIN_MS,t.MAX_MS=l.MAX_MS;var m=e(14952);t.findBin=m.findBin,t.sorterAsc=m.sorterAsc,t.sorterDes=m.sorterDes,t.distinctVals=m.distinctVals,t.roundUp=m.roundUp,t.sort=m.sort,t.findIndexOfMin=m.findIndexOfMin,t.sortObjectKeys=e(95376);var h=e(63084);t.aggNums=h.aggNums,t.len=h.len,t.mean=h.mean,t.median=h.median,t.midRange=h.midRange,t.variance=h.variance,t.stdev=h.stdev,t.interp=h.interp;var b=e(52248);t.init2dArray=b.init2dArray,t.transposeRagged=b.transposeRagged,t.dot=b.dot,t.translationMatrix=b.translationMatrix,t.rotationMatrix=b.rotationMatrix,t.rotationXYMatrix=b.rotationXYMatrix,t.apply3DTransform=b.apply3DTransform,t.apply2DTransform=b.apply2DTransform,t.apply2DTransform2=b.apply2DTransform2,t.convertCssMatrix=b.convertCssMatrix,t.inverseTransformMatrix=b.inverseTransformMatrix;var u=e(11864);t.deg2rad=u.deg2rad,t.rad2deg=u.rad2deg,t.angleDelta=u.angleDelta,t.angleDist=u.angleDist,t.isFullCircle=u.isFullCircle,t.isAngleInsideSector=u.isAngleInsideSector,t.isPtInsideSector=u.isPtInsideSector,t.pathArc=u.pathArc,t.pathSector=u.pathSector,t.pathAnnulus=u.pathAnnulus;var o=e(98308);t.isLeftAnchor=o.isLeftAnchor,t.isCenterAnchor=o.isCenterAnchor,t.isRightAnchor=o.isRightAnchor,t.isTopAnchor=o.isTopAnchor,t.isMiddleAnchor=o.isMiddleAnchor,t.isBottomAnchor=o.isBottomAnchor;var d=e(92348);t.segmentsIntersect=d.segmentsIntersect,t.segmentDistance=d.segmentDistance,t.getTextLocation=d.getTextLocation,t.clearLocationCache=d.clearLocationCache,t.getVisibleSegment=d.getVisibleSegment,t.findPointOnPath=d.findPointOnPath;var w=e(92880);t.extendFlat=w.extendFlat,t.extendDeep=w.extendDeep,t.extendDeepAll=w.extendDeepAll,t.extendDeepNoArrays=w.extendDeepNoArrays;var A=e(24248);t.log=A.log,t.warn=A.warn,t.error=A.error;var _=e(53756);t.counterRegex=_.counter;var y=e(91200);t.throttle=y.throttle,t.throttleDone=y.done,t.clearThrottle=y.clear;var E=e(52200);t.getGraphDiv=E.getGraphDiv,t.isPlotDiv=E.isPlotDiv,t.removeElement=E.removeElement,t.addStyleRule=E.addStyleRule,t.addRelatedStyleRule=E.addRelatedStyleRule,t.deleteRelatedStyleRule=E.deleteRelatedStyleRule,t.getFullTransformMatrix=E.getFullTransformMatrix,t.getElementTransformMatrix=E.getElementTransformMatrix,t.getElementAndAncestors=E.getElementAndAncestors,t.equalDomRects=E.equalDomRects,t.clearResponsive=e(75352),t.preserveDrawingBuffer=e(34296),t.makeTraceGroups=e(30988),t._=e(98356),t.notifier=e(41792),t.filterUnique=e(68944),t.filterVisible=e(43880),t.pushUnique=e(52416),t.increment=e(1396),t.cleanNumber=e(54037),t.ensureNumber=function(oe){return S(oe)?(oe=Number(oe),oe>v||oe=oe?!1:S(Q)&&Q>=0&&Q%1===0},t.noop=e(16628),t.identity=e(35536),t.repeat=function(Q,oe){for(var $=new Array(oe),Z=0;Z$?Math.max($,Math.min(oe,Q)):Math.max(oe,Math.min($,Q))},t.bBoxIntersect=function(Q,oe,$){return $=$||0,Q.left<=oe.right+$&&oe.left<=Q.right+$&&Q.top<=oe.bottom+$&&oe.top<=Q.bottom+$},t.simpleMap=function(Q,oe,$,Z,se){for(var ne=Q.length,ce=new Array(ne),ge=0;ge=Math.pow(2,$)?se>10?(t.warn("randstr failed uniqueness"),ce):Q(oe,$,Z,(se||0)+1):ce},t.OptionControl=function(Q,oe){Q||(Q={}),oe||(oe="opt");var $={};return $.optionList=[],$._newoption=function(Z){Z[oe]=Q,$[Z.name]=Z,$.optionList.push(Z)},$["_"+oe]=Q,$},t.smooth=function(Q,oe){if(oe=Math.round(oe)||0,oe<2)return Q;var $=Q.length,Z=2*$,se=2*oe-1,ne=new Array(se),ce=new Array($),ge,Te,we,Re;for(ge=0;ge=Z&&(we-=Z*Math.floor(we/Z)),we<0?we=-1-we:we>=$&&(we=Z-1-we),Re+=Q[we]*ne[Te];ce[ge]=Re}return ce},t.syncOrAsync=function(Q,oe,$){var Z,se;function ne(){return t.syncOrAsync(Q,oe,$)}for(;Q.length;)if(se=Q.splice(0,1)[0],Z=se(oe),Z&&Z.then)return Z.then(ne);return $&&$(oe)},t.stripTrailingSlash=function(Q){return Q.substr(-1)==="/"?Q.substr(0,Q.length-1):Q},t.noneOrAll=function(Q,oe,$){if(Q){var Z=!1,se=!0,ne,ce;for(ne=0;ne<$.length;ne++)ce=Q[$[ne]],ce!=null?Z=!0:se=!1;if(Z&&!se)for(ne=0;ne<$.length;ne++)Q[$[ne]]=oe[$[ne]]}},t.mergeArray=function(Q,oe,$,Z){var se=typeof Z=="function";if(t.isArrayOrTypedArray(Q))for(var ne=Math.min(Q.length,oe.length),ce=0;ce0?se:0})},t.fillArray=function(Q,oe,$,Z){if(Z=Z||t.identity,t.isArrayOrTypedArray(Q))for(var se=0;se1?se+ce[1]:"";if(ne&&(ce.length>1||ge.length>4||$))for(;Z.test(ge);)ge=ge.replace(Z,"$1"+ne+"$2");return ge+Te},t.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var k=/^\w*$/;t.templateString=function(Q,oe){var $={};return Q.replace(t.TEMPLATE_STRING_REGEX,function(Z,se){var ne;return k.test(se)?ne=oe[se]:($[se]=$[se]||t.nestedProperty(oe,se).get,ne=$[se]()),t.isValidTextValue(ne)?ne:""})};var B={max:10,count:0,name:"hovertemplate"};t.hovertemplateString=function(){return ie.apply(B,arguments)};var O={max:10,count:0,name:"texttemplate"};t.texttemplateString=function(){return ie.apply(O,arguments)};var V=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Y(Q){var oe=Q.match(V);return oe?{key:oe[1],op:oe[2],number:Number(oe[3])}:{key:Q,op:null,number:null}}var j={max:10,count:0,name:"texttemplate",parseMultDiv:!0};t.texttemplateStringForShapes=function(){return ie.apply(j,arguments)};var te=/^[:|\|]/;function ie(Q,oe,$){var Z=this,se=arguments;oe||(oe={});var ne={};return Q.replace(t.TEMPLATE_STRING_REGEX,function(ce,ge,Te){var we=ge==="xother"||ge==="yother",Re=ge==="_xother"||ge==="_yother",be=ge==="_xother_"||ge==="_yother_",Ae=ge==="xother_"||ge==="yother_",me=we||Re||Ae||be,Le=ge;(Re||be)&&(Le=Le.substring(1)),(Ae||be)&&(Le=Le.substring(0,Le.length-1));var Ve=null,Ue=null;if(Z.parseMultDiv){var ke=Y(Le);Le=ke.key,Ve=ke.op,Ue=ke.number}var He;if(me){if(He=oe[Le],He===void 0)return""}else{var Ie,rt;for(rt=3;rt=ue&&ce<=J,we=ge>=ue&&ge<=J;if(Te&&(Z=10*Z+ce-ue),we&&(se=10*se+ge-ue),!Te||!we){if(Z!==se)return Z-se;if(ce!==ge)return ce-ge}}return se-Z};var X=2e9;t.seedPseudoRandom=function(){X=2e9},t.pseudoRandom=function(){var Q=X;return X=(69069*X+1)%4294967296,Math.abs(X-Q)<429496729?t.pseudoRandom():X/4294967296},t.fillText=function(Q,oe,$){var Z=Array.isArray($)?function(ce){$.push(ce)}:function(ce){$.text=ce},se=t.extractOption(Q,oe,"htx","hovertext");if(t.isValidTextValue(se))return Z(se);var ne=t.extractOption(Q,oe,"tx","text");if(t.isValidTextValue(ne))return Z(ne)},t.isValidTextValue=function(Q){return Q||Q===0},t.formatPercent=function(Q,oe){oe=oe||0;for(var $=(Math.round(100*Q*Math.pow(10,oe))*Math.pow(.1,oe)).toFixed(oe)+"%",Z=0;Z1&&(we=1):we=0,t.strTranslate(se-we*($+ce),ne-we*(Z+ge))+t.strScale(we)+(Te?"rotate("+Te+(oe?"":" "+$+" "+Z)+")":"")},t.setTransormAndDisplay=function(Q,oe){Q.attr("transform",t.getTextTransform(oe)),Q.style("display",oe.scale?null:"none")},t.ensureUniformFontSize=function(Q,oe){var $=t.extendFlat({},oe);return $.size=Math.max(oe.size,Q._fullLayout.uniformtext.minsize||0),$},t.join2=function(Q,oe,$){var Z=Q.length;return Z>1?Q.slice(0,-1).join(oe)+$+Q[Z-1]:Q.join(oe)},t.bigFont=function(Q){return Math.round(1.2*Q)};var ee=t.getFirefoxVersion(),G=ee!==null&&ee<86;t.getPositionFromD3Event=function(){return G?[g.event.layerX,g.event.layerY]:[g.event.offsetX,g.event.offsetY]}},63620:function(H){H.exports=function(e){return window&&window.process&&window.process.versions?Object.prototype.toString.call(e)==="[object Object]":Object.prototype.toString.call(e)==="[object Object]"&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},37804:function(H,U,e){var g=e(22296),C=/^\w*$/,i=0,S=1,x=2,v=3,p=4;H.exports=function(t,a,n,f){n=n||"name",f=f||"value";var c,l,m,h={};a&&a.length?(m=g(t,a),l=m.get()):l=t,a=a||"";var b={};if(l)for(c=0;c2)return h[w]=h[w]|x,o.set(d,null);if(u){for(c=w;c1){var x=["LOG:"];for(S=0;S1){var v=[];for(S=0;S"),"long")}},i.warn=function(){var S;if(g.logging>0){var x=["WARN:"];for(S=0;S0){var v=[];for(S=0;S"),"stick")}},i.error=function(){var S;if(g.logging>0){var x=["ERROR:"];for(S=0;S0){var v=[];for(S=0;S"),"stick")}}},30988:function(H,U,e){var g=e(33428);H.exports=function(i,S,x){var v=i.selectAll("g."+x.replace(/\s/g,".")).data(S,function(r){return r[0].trace.uid});v.exit().remove(),v.enter().append("g").attr("class",x),v.order();var p=i.classed("rangeplot")?"nodeRangePlot3":"node3";return v.each(function(r){r[0][p]=g.select(this)}),v}},52248:function(H,U,e){var g=e(36524);U.init2dArray=function(C,i){for(var S=new Array(C),x=0;xC/2?g-Math.round(g/C)*C:g}H.exports={mod:U,modHalf:e}},22296:function(H,U,e){var g=e(38248),C=e(38116).isArrayOrTypedArray;H.exports=function(f,c){if(g(c))c=String(c);else if(typeof c!="string"||c.substr(c.length-4)==="[-1]")throw"bad property string";var l=c.split("."),m,h,b,u;for(u=0;u/g),l=0;lr||w===C||wa||o&&c(u))}function m(u,o){var d=u[0],w=u[1];if(d===C||dr||w===C||wa)return!1;var A=v.length,_=v[0][0],y=v[0][1],E=0,T,s,L,M,z;for(T=1;TMath.max(s,_)||w>Math.max(L,y)))if(wn||Math.abs(g(m,c))>r)return!0;return!1},i.filter=function(x,v){var p=[x[0]],r=0,t=0;function a(f){x.push(f);var c=p.length,l=r;p.splice(t+1);for(var m=l+1;m1){var n=x.pop();a(n)}return{addPt:a,raw:x,filtered:p}}},5048:function(H,U,e){var g=e(16576),C=e(28624);H.exports=function(S,x,v){var p=S._fullLayout,r=!0;return p._glcanvas.each(function(t){if(t.regl){t.regl.preloadCachedCode(v);return}if(!(t.pick&&!p._has("parcoords"))){try{t.regl=C({canvas:this,attributes:{antialias:!t.pick,preserveDrawingBuffer:!0},pixelRatio:S._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:x||[],cachedCode:v||{}})}catch{r=!1}t.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(a){S&&S.emit&&S.emit("plotly_webglcontextlost",{event:a,layer:t.key})},!1)}}),r||g({container:p._glcontainer.node()}),r}},34296:function(H,U,e){var g=e(38248),C=e(25928);H.exports=function(x){var v;if(x&&x.hasOwnProperty("userAgent")?v=x.userAgent:v=i(),typeof v!="string")return!0;var p=C({ua:{headers:{"user-agent":v}},tablet:!0,featureDetect:!1});if(!p)for(var r=v.split(" "),t=1;t-1;n--){var f=r[n];if(f.substr(0,8)==="Version/"){var c=f.substr(8).split(".")[0];if(g(c)&&(c=+c),c>=13)return!0}}}return p};function i(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}},52416:function(H){H.exports=function(e,g){if(g instanceof RegExp){for(var C=g.toString(),i=0;iC.queueLength&&(x.undoQueue.queue.shift(),x.undoQueue.index--)},S.startSequence=function(x){x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},x.undoQueue.sequence=!0,x.undoQueue.beginSequence=!0},S.stopSequence=function(x){x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},x.undoQueue.sequence=!1,x.undoQueue.beginSequence=!1},S.undo=function(v){var p,r;if(!(v.undoQueue===void 0||isNaN(v.undoQueue.index)||v.undoQueue.index<=0)){for(v.undoQueue.index--,p=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,r=0;r=v.undoQueue.queue.length)){for(p=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,r=0;r1?(n[l-1]-n[0])/(l-1):1,b,u;for(h>=0?u=f?v:p:u=f?t:r,a+=h*x*(f?-1:1)*(h>=0?1:-1);c90&&C.log("Long binary search..."),c-1};function v(a,n){return an}function t(a,n){return a>=n}U.sorterAsc=function(a,n){return a-n},U.sorterDes=function(a,n){return n-a},U.distinctVals=function(a){var n=a.slice();n.sort(U.sorterAsc);var f;for(f=n.length-1;f>-1&&n[f]===S;f--);for(var c=n[f]-n[0]||1,l=c/(f||1)/1e4,m=[],h,b=0;b<=f;b++){var u=n[b],o=u-h;h===void 0?(m.push(u),h=u):o>l&&(c=Math.min(c,o),m.push(u),h=u)}return{vals:m,minDiff:c}},U.roundUp=function(a,n,f){for(var c=0,l=n.length-1,m,h=0,b=f?0:1,u=f?1:0,o=f?Math.ceil:Math.floor;c0&&(c=1),f&&c)return a.sort(n)}return c?a:a.reverse()},U.findIndexOfMin=function(a,n){n=n||i;for(var f=1/0,c,l=0;lx.length)&&(v=x.length),g(S)||(S=!1),C(x[0])){for(r=new Array(v),p=0;pi.length-1)return i[i.length-1];var x=S%1;return x*i[Math.ceil(S)]+(1-x)*i[Math.floor(S)]}},43080:function(H,U,e){var g=e(72160);function C(i){return i?g(i):[0,0,0,1]}H.exports=C},9188:function(H,U,e){var g=e(2264),C=e(43616),i=e(3400),S=null;function x(){if(S!==null)return S;S=!1;var v=i.isIE()||i.isSafari()||i.isIOS();if(window.navigator.userAgent&&!v){var p=Array.from(g.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")S=p.some(function(f){return r.apply(null,f)});else{var t=C.tester.append("image").attr("style",g.STYLE),a=window.getComputedStyle(t.node()),n=a.imageRendering;S=p.some(function(f){var c=f[1];return n===c||n===c.toLowerCase()}),t.remove()}}return S}H.exports=x},72736:function(H,U,e){var g=e(33428),C=e(3400),i=C.strTranslate,S=e(9616),x=e(84284).LINE_SPACING,v=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;U.convertToTspans=function(B,O,V){var Y=B.text(),j=!B.attr("data-notex")&&O&&O._context.typesetMath&&typeof MathJax<"u"&&Y.match(v),te=g.select(B.node().parentNode);if(te.empty())return;var ie=B.attr("class")?B.attr("class").split(" ")[0]:"text";ie+="-math",te.selectAll("svg."+ie).remove(),te.selectAll("g."+ie+"-group").remove(),B.style("display",null).attr({"data-unformatted":Y,"data-math":"N"});function ue(){te.empty()||(ie=B.attr("class")+"-math",te.select("svg."+ie).remove()),B.text("").style("white-space","pre");var J=D(B.node(),Y);J&&B.style("pointer-events","all"),U.positionText(B),V&&V.call(B)}return j?(O&&O._promises||[]).push(new Promise(function(J){B.style("display","none");var X=parseInt(B.node().style.fontSize,10),ee={fontSize:X};n(j[2],ee,function(G,Q,oe){te.selectAll("svg."+ie).remove(),te.selectAll("g."+ie+"-group").remove();var $=G&&G.select("svg");if(!$||!$.node()){ue(),J();return}var Z=te.append("g").classed(ie+"-group",!0).attr({"pointer-events":"none","data-unformatted":Y,"data-math":"Y"});Z.node().appendChild($.node()),Q&&Q.node()&&$.node().insertBefore(Q.node().cloneNode(!0),$.node().firstChild);var se=oe.width,ne=oe.height;$.attr({class:ie,height:ne,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ce=B.node().style.fill||"black",ge=$.select("g");ge.attr({fill:ce,stroke:ce});var Te=ge.node().getBoundingClientRect(),we=Te.width,Re=Te.height;(we>se||Re>ne)&&($.style("overflow","hidden"),Te=$.node().getBoundingClientRect(),we=Te.width,Re=Te.height);var be=+B.attr("x"),Ae=+B.attr("y"),me=X||B.node().getBoundingClientRect().height,Le=-me/4;if(ie[0]==="y")Z.attr({transform:"rotate("+[-90,be,Ae]+")"+i(-we/2,Le-Re/2)});else if(ie[0]==="l")Ae=Le-Re/2;else if(ie[0]==="a"&&ie.indexOf("atitle")!==0)be=0,Ae=Le;else{var Ve=B.attr("text-anchor");be=be-we*(Ve==="middle"?.5:Ve==="end"?1:0),Ae=Ae+Le-Re/2}$.attr({x:be,y:Ae}),V&&V.call(B,Z),J(Z)})})):ue(),B};var p=/(<|<|<)/g,r=/(>|>|>)/g;function t(B){return B.replace(p,"\\lt ").replace(r,"\\gt ")}var a=[["$","$"],["\\(","\\)"]];function n(B,O,V){var Y=parseInt((MathJax.version||"").split(".")[0]);if(Y!==2&&Y!==3){C.warn("No MathJax version:",MathJax.version);return}var j,te,ie,ue,J=function(){return te=C.extendDeepAll({},MathJax.Hub.config),ie=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},X=function(){te=C.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},ee=function(){if(j=MathJax.Hub.config.menuSettings.renderer,j!=="SVG")return MathJax.Hub.setRenderer("SVG")},G=function(){j=MathJax.config.startup.output,j!=="svg"&&(MathJax.config.startup.output="svg")},Q=function(){var ce="math-output-"+C.randstr({},64);ue=g.select("body").append("div").attr({id:ce}).style({visibility:"hidden",position:"absolute","font-size":O.fontSize+"px"}).text(t(B));var ge=ue.node();return Y===2?MathJax.Hub.Typeset(ge):MathJax.typeset([ge])},oe=function(){var ce=ue.select(Y===2?".MathJax_SVG":".MathJax"),ge=!ce.empty()&&ue.select("svg").node();if(!ge)C.log("There was an error in the tex syntax.",B),V();else{var Te=ge.getBoundingClientRect(),we;Y===2?we=g.select("body").select("#MathJax_SVG_glyphs"):we=ce.select("defs"),V(ce,we,Te)}ue.remove()},$=function(){if(j!=="SVG")return MathJax.Hub.setRenderer(j)},Z=function(){j!=="svg"&&(MathJax.config.startup.output=j)},se=function(){return ie!==void 0&&(MathJax.Hub.processSectionDelay=ie),MathJax.Hub.Config(te)},ne=function(){MathJax.config=te};Y===2?MathJax.Hub.Queue(J,ee,Q,oe,$,se):Y===3&&(X(),G(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){Q(),oe(),Z(),ne()}))}var f={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},c={sub:"0.3em",sup:"-0.6em"},l={sub:"-0.21em",sup:"0.42em"},m="​",h=["http:","https:","mailto:","",void 0,":"],b=U.NEWLINES=/(\r\n?|\n)/g,u=/(<[^<>]*>)/,o=/<(\/?)([^ >]*)(\s+(.*))?>/i,d=//i;U.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,y=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function E(B,O){if(!B)return null;var V=B.match(O),Y=V&&(V[3]||V[4]);return Y&&M(Y)}var T=/(^|;)\s*color:/;U.plainText=function(B,O){O=O||{};for(var V=O.len!==void 0&&O.len!==-1?O.len:1/0,Y=O.allowedTags!==void 0?O.allowedTags:["br"],j="...",te=j.length,ie=B.split(u),ue=[],J="",X=0,ee=0;eete?ue.push(G.substr(0,Z-te)+j):ue.push(G.substr(0,Z));break}J=""}}return ue.join("")};var s={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},L=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function M(B){return B.replace(L,function(O,V){var Y;return V.charAt(0)==="#"?Y=z(V.charAt(1)==="x"?parseInt(V.substr(2),16):parseInt(V.substr(1),10)):Y=s[V],Y||O})}U.convertEntities=M;function z(B){if(!(B>1114111)){var O=String.fromCodePoint;if(O)return O(B);var V=String.fromCharCode;return B<=65535?V(B):V((B>>10)+55232,B%1024+56320)}}function D(B,O){O=O.replace(b," ");var V=!1,Y=[],j,te=-1;function ie(){te++;var Re=document.createElementNS(S.svg,"tspan");g.select(Re).attr({class:"line",dy:te*x+"em"}),B.appendChild(Re),j=Re;var be=Y;if(Y=[{node:Re}],be.length>1)for(var Ae=1;Ae.",O);return}var be=Y.pop();Re!==be.type&&C.log("Start tag <"+be.type+"> doesnt match end tag <"+Re+">. Pretending it did match.",O),j=Y[Y.length-1].node}var ee=d.test(O);ee?ie():(j=B,Y=[{node:B}]);for(var G=O.split(u),Q=0;Qv.ts+S){t();return}v.timer=setTimeout(function(){t(),v.timer=null},S)},U.done=function(C){var i=e[C];return!i||!i.timer?Promise.resolve():new Promise(function(S){var x=i.onDone;i.onDone=function(){x&&x(),S(),i.onDone=null}})},U.clear=function(C){if(C)g(e[C]),delete e[C];else for(var i in e)U.clear(i)};function g(C){C&&C.timer!==null&&(clearTimeout(C.timer),C.timer=null)}},36896:function(H,U,e){var g=e(38248);H.exports=function(i,S){if(i>0)return Math.log(i)/Math.LN10;var x=Math.log(Math.min(S[0],S[1]))/Math.LN10;return g(x)||(x=Math.log(Math.max(S[0],S[1]))/Math.LN10-6),x}},59972:function(H,U,e){var g=H.exports={},C=e(79552).locationmodeToLayer,i=e(55712).NO;g.getTopojsonName=function(S){return[S.scope.replace(/ /g,"-"),"_",S.resolution.toString(),"m"].join("")},g.getTopojsonPath=function(S,x){return S+x+".json"},g.getTopojsonFeatures=function(S,x){var v=C[S.locationmode],p=x.objects[v];return i(x,p).features}},11680:function(H){H.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(H){H.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},69820:function(H,U,e){var g=e(24040);H.exports=function(i){for(var S=g.layoutArrayContainers,x=g.layoutArrayRegexes,v=i.split("[")[0],p,r,t=0;t0&&S.log("Clearing previous rejected promises from queue."),d._promises=[]},U.cleanLayout=function(d){var w,A;d||(d={}),d.xaxis1&&(d.xaxis||(d.xaxis=d.xaxis1),delete d.xaxis1),d.yaxis1&&(d.yaxis||(d.yaxis=d.yaxis1),delete d.yaxis1),d.scene1&&(d.scene||(d.scene=d.scene1),delete d.scene1);var _=(x.subplotsRegistry.cartesian||{}).attrRegex,y=(x.subplotsRegistry.polar||{}).attrRegex,E=(x.subplotsRegistry.ternary||{}).attrRegex,T=(x.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(d);for(w=0;w3?(ee.x=1.02,ee.xanchor="left"):ee.x<-2&&(ee.x=-.02,ee.xanchor="right"),ee.y>3?(ee.y=1.02,ee.yanchor="bottom"):ee.y<-2&&(ee.y=-.02,ee.yanchor="top")),f(d),d.dragmode==="rotate"&&(d.dragmode="orbit"),p.clean(d),d.template&&d.template.layout&&U.cleanLayout(d.template.layout),d};function n(d,w){var A=d[w],_=w.charAt(0);A&&A!=="paper"&&(d[w]=r(A,_,!0))}function f(d){d&&((typeof d.title=="string"||typeof d.title=="number")&&(d.title={text:d.title}),w("titlefont","font"),w("titleposition","position"),w("titleside","side"),w("titleoffset","offset"));function w(A,_){var y=d[A],E=d.title&&d.title[_];y&&!E&&(d.title||(d.title={}),d.title[_]=d[A],delete d[A])}}U.cleanData=function(d){for(var w=0;w0)return d.substr(0,w)}U.hasParent=function(d,w){for(var A=u(w);A;){if(A in d)return!0;A=u(A)}return!1};var o=["x","y","z"];U.clearAxisTypes=function(d,w,A){for(var _=0;_1&&i.warn("Full array edits are incompatible with other edits",l);var w=n[""][""];if(p(w))a.set(null);else if(Array.isArray(w))a.set(w);else return i.warn("Unrecognized full array edit value",l,w),!0;return u?!1:(m(o,d),h(t),!0)}var A=Object.keys(n).map(Number).sort(S),_=a.get(),y=_||[],E=c(d,l).get(),T=[],s=-1,L=y.length,M,z,D,N,I,k,B,O;for(M=0;My.length-(B?0:1)){i.warn("index out of range",l,D);continue}if(k!==void 0)I.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",l,D),p(k)?T.push(D):B?(k==="add"&&(k={}),y.splice(D,0,k),E&&E.splice(D,0,{})):i.warn("Unrecognized full object edit value",l,D,k),s===-1&&(s=D);else for(z=0;z=0;M--)y.splice(T[M],1),E&&E.splice(T[M],1);if(y.length?_||a.set(y):a.set(null),u)return!1;if(m(o,d),b!==C){var V;if(s===-1)V=A;else{for(L=Math.max(y.length,L),V=[],M=0;M=s));M++)V.push(D);for(M=s;M=Me.data.length||mt<-Me.data.length)throw new Error(je+" must be valid indices for gd.data.");if(Ne.indexOf(mt,it+1)>-1||mt>=0&&Ne.indexOf(-Me.data.length+mt)>-1||mt<0&&Ne.indexOf(Me.data.length+mt)>-1)throw new Error("each index in "+je+" must be unique.")}}function V(Me,Ne,je){if(!Array.isArray(Me.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ne)||(Ne=[Ne]),O(Me,Ne,"currentIndices"),typeof je<"u"&&!Array.isArray(je)&&(je=[je]),typeof je<"u"&&O(Me,je,"newIndices"),typeof je<"u"&&Ne.length!==je.length)throw new Error("current and new indices must be of equal length.")}function Y(Me,Ne,je){var it,mt;if(!Array.isArray(Me.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("traces must be defined.");for(Array.isArray(Ne)||(Ne=[Ne]),it=0;it"u")throw new Error("indices must be an integer or array of integers");O(Me,je,"indices");for(var bt in Ne){if(!Array.isArray(Ne[bt])||Ne[bt].length!==je.length)throw new Error("attribute "+bt+" must be an array of length equal to indices array length");if(mt&&(!(bt in it)||!Array.isArray(it[bt])||it[bt].length!==Ne[bt].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}function te(Me,Ne,je,it){var mt=S.isPlainObject(it),bt=[],vt,Lt,ct,Tt,Bt;Array.isArray(je)||(je=[je]),je=B(je,Me.data.length-1);for(var ir in Ne)for(var pt=0;pt=0&&Bt=0&&Bt"u")return Tt=U.redraw(Me),p.add(Me,mt,vt,bt,Lt),Tt;Array.isArray(je)||(je=[je]);try{V(Me,it,je)}catch(Bt){throw Me.data.splice(Me.data.length-Ne.length,Ne.length),Bt}return p.startSequence(Me),p.add(Me,mt,vt,bt,Lt),Tt=U.moveTraces(Me,it,je),p.stopSequence(Me),Tt}function G(Me,Ne){Me=S.getGraphDiv(Me);var je=[],it=U.addTraces,mt=G,bt=[Me,je,Ne],vt=[Me,Ne],Lt,ct;if(typeof Ne>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ne)||(Ne=[Ne]),O(Me,Ne,"indices"),Ne=B(Ne,Me.data.length-1),Ne.sort(S.sorterDes),Lt=0;Lt"u")for(je=[],Tt=0;Tt-1&&bt.indexOf("grouptitlefont")===-1?Lt(bt,bt.replace("titlefont","title.font")):bt.indexOf("titleposition")>-1?Lt(bt,bt.replace("titleposition","title.position")):bt.indexOf("titleside")>-1?Lt(bt,bt.replace("titleside","title.side")):bt.indexOf("titleoffset")>-1&&Lt(bt,bt.replace("titleoffset","title.offset"));function Lt(ct,Tt){Me[Tt]=Me[ct],delete Me[ct]}}function Te(Me,Ne,je){Me=S.getGraphDiv(Me),w.clearPromiseQueue(Me);var it={};if(typeof Ne=="string")it[Ne]=je;else if(S.isPlainObject(Ne))it=S.extendFlat({},Ne);else return S.warn("Relayout fail.",Ne,je),Promise.reject();Object.keys(it).length&&(Me.changed=!0);var mt=Le(Me,it),bt=mt.flags;bt.calc&&(Me.calcdata=void 0);var vt=[a.previousPromises];bt.layoutReplot?vt.push(A.layoutReplot):Object.keys(it).length&&(we(Me,bt,mt)||a.supplyDefaults(Me),bt.legend&&vt.push(A.doLegend),bt.layoutstyle&&vt.push(A.layoutStyles),bt.axrange&&Re(vt,mt.rangesAltered),bt.ticks&&vt.push(A.doTicksRelayout),bt.modebar&&vt.push(A.doModeBar),bt.camera&&vt.push(A.doCamera),bt.colorbars&&vt.push(A.doColorBars),vt.push(L)),vt.push(a.rehover,a.redrag,a.reselect),p.add(Me,Te,[Me,mt.undoit],Te,[Me,mt.redoit]);var Lt=S.syncOrAsync(vt,Me);return(!Lt||!Lt.then)&&(Lt=Promise.resolve(Me)),Lt.then(function(){return Me.emit("plotly_relayout",mt.eventData),Me})}function we(Me,Ne,je){var it=Me._fullLayout;if(!Ne.axrange)return!1;for(var mt in Ne)if(mt!=="axrange"&&Ne[mt])return!1;var bt,vt,Lt=function(Xt,Kt){return S.coerce(bt,vt,c,Xt,Kt)},ct={};for(var Tt in je.rangesAltered){var Bt=n.id2name(Tt);if(bt=Me.layout[Bt],vt=it[Bt],f(bt,vt,Lt,ct),vt._matchGroup){for(var ir in vt._matchGroup)if(ir!==Tt){var pt=it[n.id2name(ir)];pt.autorange=vt.autorange,pt.range=vt.range.slice(),pt._input.range=vt.range.slice()}}}return!0}function Re(Me,Ne){var je=Ne?function(it){var mt=[],bt=!0;for(var vt in Ne){var Lt=n.getFromId(it,vt);if(mt.push(vt),(Lt.ticklabelposition||"").indexOf("inside")!==-1&&Lt._anchorAxis&&mt.push(Lt._anchorAxis._id),Lt._matchGroup)for(var ct in Lt._matchGroup)Ne[ct]||mt.push(ct)}return n.draw(it,mt,{skipTitle:bt})}:function(it){return n.draw(it,"redraw")};Me.push(u,A.doAutoRangeAndConstraints,je,A.drawData,A.finalDraw)}var be=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Ae=/^[xyz]axis[0-9]*\.autorange$/,me=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Le(Me,Ne){var je=Me.layout,it=Me._fullLayout,mt=it._guiEditing,bt=Z(it._preGUI,mt),vt=Object.keys(Ne),Lt=n.list(Me),ct=S.extendDeepAll({},Ne),Tt={},Bt,ir,pt;for(ge(Ne),vt=Object.keys(Ne),ir=0;ir0&&typeof Ht.parts[hr]!="string";)hr--;var vr=Ht.parts[hr],Ye=Ht.parts[hr-1]+"."+vr,Ge=Ht.parts.slice(0,hr).join("."),Nt=x(Me.layout,Ge).get(),Ot=x(it,Ge).get(),Qt=Ht.get();if(Jt!==void 0){gt[kt]=Jt,st[kt]=vr==="reverse"?Jt:$(Qt);var tr=t.getLayoutValObject(it,Ht.parts);if(tr&&tr.impliedEdits&&Jt!==null)for(var fr in tr.impliedEdits)At(S.relativeAttr(kt,fr),tr.impliedEdits[fr]);if(["width","height"].indexOf(kt)!==-1)if(Jt){At("autosize",null);var rr=kt==="height"?"width":"height";At(rr,it[rr])}else it[kt]=Me._initialAutoSize[kt];else if(kt==="autosize")At("width",Jt?null:it.width),At("height",Jt?null:it.height);else if(Ye.match(be))Pt(Ye),x(it,Ge+"._inputRange").set(null);else if(Ye.match(Ae)){Pt(Ye),x(it,Ge+"._inputRange").set(null);var Vt=x(it,Ge).get();Vt._inputDomain&&(Vt._input.domain=Vt._inputDomain.slice())}else Ye.match(me)&&x(it,Ge+"._inputDomain").set(null);if(vr==="type"){It=Nt;var dr=Ot.type==="linear"&&Jt==="log",mr=Ot.type==="log"&&Jt==="linear";if(dr||mr){if(!It||!It.range)At(Ge+".autorange",!0);else if(Ot.autorange)dr&&(It.range=It.range[1]>It.range[0]?[1,2]:[2,1]);else{var xr=It.range[0],pr=It.range[1];dr?(xr<=0&&pr<=0&&At(Ge+".autorange",!0),xr<=0?xr=pr/1e6:pr<=0&&(pr=xr/1e6),At(Ge+".range[0]",Math.log(xr)/Math.LN10),At(Ge+".range[1]",Math.log(pr)/Math.LN10)):(At(Ge+".range[0]",Math.pow(10,xr)),At(Ge+".range[1]",Math.pow(10,pr)))}Array.isArray(it._subplots.polar)&&it._subplots.polar.length&&it[Ht.parts[0]]&&Ht.parts[1]==="radialaxis"&&delete it[Ht.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Me,Ot,Jt,At),r.getComponentMethod("images","convertCoords")(Me,Ot,Jt,At)}else At(Ge+".autorange",!0),At(Ge+".range",null);x(it,Ge+"._inputRange").set(null)}else if(vr.match(y)){var Gr=x(it,kt).get(),Pr=(Jt||{}).type;(!Pr||Pr==="-")&&(Pr="linear"),r.getComponentMethod("annotations","convertCoords")(Me,Gr,Pr,At),r.getComponentMethod("images","convertCoords")(Me,Gr,Pr,At)}var Dr=d.containerArrayMatch(kt);if(Dr){Bt=Dr.array,ir=Dr.index;var cn=Dr.property,rn=tr||{editType:"calc"};ir!==""&&cn===""&&(d.isAddVal(Jt)?st[kt]=null:d.isRemoveVal(Jt)?st[kt]=(x(je,Bt).get()||[])[ir]:S.warn("unrecognized full object value",Ne)),_.update($t,rn),Tt[Bt]||(Tt[Bt]={});var Cn=Tt[Bt][ir];Cn||(Cn=Tt[Bt][ir]={}),Cn[cn]=Jt,delete Ne[kt]}else vr==="reverse"?(Nt.range?Nt.range.reverse():(At(Ge+".autorange",!0),Nt.range=[1,0]),Ot.autorange?$t.calc=!0:$t.plot=!0):(kt==="dragmode"&&(Jt===!1&&Qt!==!1||Jt!==!1&&Qt===!1)||it._has("scatter-like")&&it._has("regl")&&kt==="dragmode"&&(Jt==="lasso"||Jt==="select")&&!(Qt==="lasso"||Qt==="select")||it._has("gl2d")?$t.plot=!0:tr?_.update($t,tr):$t.calc=!0,Ht.set(Jt))}}for(Bt in Tt){var En=d.applyContainerArrayChanges(Me,bt(je,Bt),Tt[Bt],$t,bt);En||($t.plot=!0)}for(var Tr in Ct){It=n.getFromId(Me,Tr);var Cr=It&&It._constraintGroup;if(Cr){$t.calc=!0;for(var Wr in Cr)Ct[Wr]||(n.getFromId(Me,Wr)._constraintShrinkable=!0)}}(Ve(Me)||Ne.height||Ne.width)&&($t.plot=!0);var Ur=it.shapes;for(ir=0;ir1;)if(it.pop(),je=x(Ne,it.join(".")+".uirevision").get(),je!==void 0)return je;return Ne.uirevision}function $e(Me,Ne){for(var je=0;je=mt.length?mt[0]:mt[Tt]:mt}function Lt(Tt){return Array.isArray(bt)?Tt>=bt.length?bt[0]:bt[Tt]:bt}function ct(Tt,Bt){var ir=0;return function(){if(Tt&&++ir===Bt)return Tt()}}return new Promise(function(Tt,Bt){function ir(){if(it._frameQueue.length!==0){for(;it._frameQueue.length;){var vr=it._frameQueue.pop();vr.onInterrupt&&vr.onInterrupt()}Me.emit("plotly_animationinterrupted",[])}}function pt(vr){if(vr.length!==0){for(var Ye=0;Yeit._timeToNext&&Kt()};vr()}var $t=0;function gt(vr){return Array.isArray(mt)?$t>=mt.length?vr.transitionOpts=mt[$t]:vr.transitionOpts=mt[0]:vr.transitionOpts=mt,$t++,vr}var st,At,Ct=[],It=Ne==null,Pt=Array.isArray(Ne),kt=!It&&!Pt&&S.isPlainObject(Ne);if(kt)Ct.push({type:"object",data:gt(S.extendFlat({},Ne))});else if(It||["string","number"].indexOf(typeof Ne)!==-1)for(st=0;st0&&urur)&&hr.push(At);Ct=hr}}Ct.length>0?pt(Ct):(Me.emit("plotly_animated"),Tt())})}function We(Me,Ne,je){if(Me=S.getGraphDiv(Me),Ne==null)return Promise.resolve();if(!S.isPlotDiv(Me))throw new Error("This element is not a Plotly plot: "+Me+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var it,mt,bt,vt,Lt=Me._transitionData._frames,ct=Me._transitionData._frameHash;if(!Array.isArray(Ne))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ne);var Tt=Lt.length+Ne.length*2,Bt=[],ir={};for(it=Ne.length-1;it>=0;it--)if(S.isPlainObject(Ne[it])){var pt=Ne[it].name,Xt=(ct[pt]||ir[pt]||{}).name,Kt=Ne[it].name,or=ct[Xt]||ir[Xt];Xt&&Kt&&typeof Kt=="number"&&or&&EHt.index?-1:kt.index=0;it--){if(mt=Bt[it].frame,typeof mt.name=="number"&&S.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!mt.name)for(;ct[mt.name="frame "+Me._transitionData._counter++];);if(ct[mt.name]){for(bt=0;bt=0;je--)it=Ne[je],bt.push({type:"delete",index:it}),vt.unshift({type:"insert",index:it,value:mt[it]});var Lt=a.modifyFrames,ct=a.modifyFrames,Tt=[Me,vt],Bt=[Me,bt];return p&&p.add(Me,Lt,Tt,ct,Bt),a.modifyFrames(Me,bt)}function xe(Me){Me=S.getGraphDiv(Me);var Ne=Me._fullLayout||{},je=Me._fullData||[];return a.cleanPlot([],{},je,Ne),a.purge(Me),v.purge(Me),Ne._container&&Ne._container.remove(),delete Me._context,Me}function ye(Me){var Ne=Me._fullLayout,je=Me.getBoundingClientRect();if(!S.equalDomRects(je,Ne._lastBBox)){var it=Ne._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Me));Ne._invScaleX=Math.sqrt(it[0][0]*it[0][0]+it[0][1]*it[0][1]+it[0][2]*it[0][2]),Ne._invScaleY=Math.sqrt(it[1][0]*it[1][0]+it[1][1]*it[1][1]+it[1][2]*it[1][2]),Ne._lastBBox=je}}function Ee(Me){var Ne=g.select(Me),je=Me._fullLayout;if(je._calcInverseTransform=ye,je._calcInverseTransform(Me),je._container=Ne.selectAll(".plot-container").data([0]),je._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),je._paperdiv=je._container.selectAll(".svg-container").data([0]),je._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),je._glcontainer=je._paperdiv.selectAll(".gl-container").data([{}]),je._glcontainer.enter().append("div").classed("gl-container",!0),je._paperdiv.selectAll(".main-svg").remove(),je._paperdiv.select(".modebar-container").remove(),je._paper=je._paperdiv.insert("svg",":first-child").classed("main-svg",!0),je._toppaper=je._paperdiv.append("svg").classed("main-svg",!0),je._modebardiv=je._paperdiv.append("div"),delete je._modeBar,je._hoverpaper=je._paperdiv.append("svg").classed("main-svg",!0),!je._uid){var it={};g.selectAll("defs").each(function(){this.id&&(it[this.id.split("-")[1]]=1)}),je._uid=S.randstr(it)}je._paperdiv.selectAll(".main-svg").attr(b.svgAttrs),je._defs=je._paper.append("defs").attr("id","defs-"+je._uid),je._clips=je._defs.append("g").classed("clips",!0),je._topdefs=je._toppaper.append("defs").attr("id","topdefs-"+je._uid),je._topclips=je._topdefs.append("g").classed("clips",!0),je._bgLayer=je._paper.append("g").classed("bglayer",!0),je._draggers=je._paper.append("g").classed("draglayer",!0);var mt=je._paper.append("g").classed("layer-below",!0);je._imageLowerLayer=mt.append("g").classed("imagelayer",!0),je._shapeLowerLayer=mt.append("g").classed("shapelayer",!0),je._cartesianlayer=je._paper.append("g").classed("cartesianlayer",!0),je._polarlayer=je._paper.append("g").classed("polarlayer",!0),je._smithlayer=je._paper.append("g").classed("smithlayer",!0),je._ternarylayer=je._paper.append("g").classed("ternarylayer",!0),je._geolayer=je._paper.append("g").classed("geolayer",!0),je._funnelarealayer=je._paper.append("g").classed("funnelarealayer",!0),je._pielayer=je._paper.append("g").classed("pielayer",!0),je._iciclelayer=je._paper.append("g").classed("iciclelayer",!0),je._treemaplayer=je._paper.append("g").classed("treemaplayer",!0),je._sunburstlayer=je._paper.append("g").classed("sunburstlayer",!0),je._indicatorlayer=je._toppaper.append("g").classed("indicatorlayer",!0),je._glimages=je._paper.append("g").classed("glimages",!0);var bt=je._toppaper.append("g").classed("layer-above",!0);je._imageUpperLayer=bt.append("g").classed("imagelayer",!0),je._shapeUpperLayer=bt.append("g").classed("shapelayer",!0),je._selectionLayer=je._toppaper.append("g").classed("selectionlayer",!0),je._infolayer=je._toppaper.append("g").classed("infolayer",!0),je._menulayer=je._toppaper.append("g").classed("menulayer",!0),je._zoomlayer=je._toppaper.append("g").classed("zoomlayer",!0),je._hoverlayer=je._hoverpaper.append("g").classed("hoverlayer",!0),je._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Me.emit("plotly_framework")}U.animate=Je,U.addFrames=We,U.deleteFrames=Fe,U.addTraces=ee,U.deleteTraces=G,U.extendTraces=J,U.moveTraces=Q,U.prependTraces=X,U.newPlot=k,U._doPlot=s,U.purge=xe,U.react=xt,U.redraw=I,U.relayout=Te,U.restyle=oe,U.setPlotConfig=M,U.update=Ue,U._guiRelayout=ke(Te),U._guiRestyle=ke(oe),U._guiUpdate=ke(Ue),U._storeDirectGUIEdit=ne},20556:function(H){var U={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},e={};function g(C,i){for(var S in C){var x=C[S];x.valType?i[S]=x.dflt:(i[S]||(i[S]={}),g(x,i[S]))}}g(U,e),H.exports={configAttributes:U,dfltConfig:e}},73060:function(H,U,e){var g=e(24040),C=e(3400),i=e(45464),S=e(64859),x=e(16672),v=e(85656),p=e(20556).configAttributes,r=e(67824),t=C.extendDeepAll,a=C.isPlainObject,n=C.isArrayOrTypedArray,f=C.nestedProperty,c=C.valObjectMeta,l="_isSubplotObj",m="_isLinkedToArray",h="_arrayAttrRegexps",b="_deprecated",u=[l,m,h,b];U.IS_SUBPLOT_OBJ=l,U.IS_LINKED_TO_ARRAY=m,U.DEPRECATED=b,U.UNDERSCORE_ATTRS=u,U.get=function(){var N={};g.allTypes.forEach(function(k){N[k]=A(k)});var I={};return Object.keys(g.transformsRegistry).forEach(function(k){I[k]=y(k)}),{defs:{valObjects:c,metaKeys:u.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:N,layout:_(),transforms:I,frames:E(),animation:T(v),config:T(p)}},U.crawl=function(N,I,k,B){var O=k||0;B=B||"",Object.keys(N).forEach(function(V){var Y=N[V];if(u.indexOf(V)===-1){var j=(B?B+".":"")+V;I(Y,V,N,O,j),!U.isValObject(Y)&&a(Y)&&V!=="impliedEdits"&&U.crawl(Y,I,O+1,j)}})},U.isValObject=function(N){return N&&N.valType!==void 0},U.findArrayAttributes=function(N){var I=[],k=[],B=[],O,V;function Y(X,ee,G,Q){k=k.slice(0,Q).concat([ee]),B=B.slice(0,Q).concat([X&&X._isLinkedToArray]);var oe=X&&(X.valType==="data_array"||X.arrayOk===!0)&&!(k[Q-1]==="colorbar"&&(ee==="ticktext"||ee==="tickvals"));oe&&j(O,0,"")}function j(X,ee,G){var Q=X[k[ee]],oe=G+k[ee];if(ee===k.length-1)n(Q)&&I.push(V+oe);else if(B[ee]){if(Array.isArray(Q))for(var $=0;$=Y.length)return!1;O=(g.transformsRegistry[Y[j].type]||{}).attributes,V=O&&O[I[2]],B=3}else{var te=N._module;if(te||(te=(g.modules[N.type||i.type.dflt]||{})._module),!te)return!1;if(O=te.attributes,V=O&&O[k],!V){var ie=te.basePlotModule;ie&&ie.attributes&&(V=ie.attributes[k])}V||(V=i[k])}return d(V,I,B)},U.getLayoutValObject=function(N,I){var k=o(N,I[0]);return d(k,I,1)};function o(N,I){var k,B,O,V,Y=N._basePlotModules;if(Y){var j;for(k=0;k=V.length)return!1;if(N.dimensions===2){if(k++,I.length===k)return N;var Y=I[k];if(!w(Y))return!1;N=V[O][Y]}else N=V[O]}else N=V}}return N}function w(N){return N===Math.round(N)&&N>=0}function A(N){var I,k;I=g.modules[N]._module,k=I.basePlotModule;var B={};B.type=null;var O=t({},i),V=t({},I.attributes);U.crawl(V,function(te,ie,ue,J,X){f(O,X).set(void 0),te===void 0&&f(V,X).set(void 0)}),t(B,O),g.traceIs(N,"noOpacity")&&delete B.opacity,g.traceIs(N,"showLegend")||(delete B.showlegend,delete B.legendgroup),g.traceIs(N,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),I.selectPoints||delete B.selectedpoints,t(B,V),k.attributes&&t(B,k.attributes),B.type=N;var Y={meta:I.meta||{},categories:I.categories||{},animatable:!!I.animatable,type:N,attributes:T(B)};if(I.layoutAttributes){var j={};t(j,I.layoutAttributes),Y.layoutAttributes=T(j)}return I.animatable||U.crawl(Y,function(te){U.isValObject(te)&&"anim"in te&&delete te.anim}),Y}function _(){var N={},I,k;t(N,S);for(I in g.subplotsRegistry)if(k=g.subplotsRegistry[I],!!k.layoutAttributes)if(Array.isArray(k.attr))for(var B=0;B=a&&(t._input||{})._templateitemname;f&&(n=a);var c=r+"["+n+"]",l;function m(){l={},f&&(l[c]={},l[c][i]=f)}m();function h(d,w){l[d]=w}function b(d,w){f?g.nestedProperty(l[c],d).set(w):l[c+"."+d]=w}function u(){var d=l;return m(),d}function o(d,w){d&&b(d,w);var A=u();for(var _ in A)g.nestedProperty(p,_).set(A[_])}return{modifyBase:h,modifyItem:b,getUpdateObj:u,applyUpdate:o}}},39172:function(H,U,e){var g=e(33428),C=e(24040),i=e(7316),S=e(3400),x=e(72736),v=e(73696),p=e(76308),r=e(43616),t=e(81668),a=e(45460),n=e(54460),f=e(84284),c=e(71888),l=c.enforce,m=c.clean,h=e(19280).doAutoRange,b="start",u="middle",o="end";U.layoutStyles=function(k){return S.syncOrAsync([i.doAutoMargin,w],k)};function d(k,B,O){for(var V=0;V=k[1]||Y[1]<=k[0])&&j[0]B[0])return!0}return!1}function w(k){var B=k._fullLayout,O=B._size,V=O.p,Y=n.list(k,"",!0),j,te,ie,ue,J,X;if(B._paperdiv.style({width:k._context.responsive&&B.autosize&&!k._context._hasZeroWidth&&!k.layout.width?"100%":B.width+"px",height:k._context.responsive&&B.autosize&&!k._context._hasZeroHeight&&!k.layout.height?"100%":B.height+"px"}).selectAll(".main-svg").call(r.setSize,B.width,B.height),k._context.setBackground(k,B.paper_bgcolor),U.drawMainTitle(k),a.manage(k),!B._has("cartesian"))return i.previousPromises(k);function ee(xe,ye,Ee){var Me=xe._lw/2;if(xe._id.charAt(0)==="x"){if(ye){if(Ee==="top")return ye._offset-V-Me}else return O.t+O.h*(1-(xe.position||0))+Me%1;return ye._offset+ye._length+V+Me}if(ye){if(Ee==="right")return ye._offset+ye._length+V+Me}else return O.l+O.w*(xe.position||0)+Me%1;return ye._offset-V-Me}for(j=0;j0){L(k,j,J,ue),ie.attr({x:te,y:j,"text-anchor":V,dy:D(B.yanchor)}).call(x.positionText,te,j);var X=(B.text.match(x.BR_TAG_ALL)||[]).length;if(X){var ee=f.LINE_SPACING*X+f.MID_SHIFT;B.y===0&&(ee=-ee),ie.selectAll(".line").each(function(){var G=+this.getAttribute("dy").slice(0,-2)-ee+"em";this.setAttribute("dy",G)})}}}};function E(k,B,O,V,Y){var j=B.yref==="paper"?k._fullLayout._size.h:k._fullLayout.height,te=S.isTopAnchor(B)?V:V-Y,ie=O==="b"?j-te:te;return S.isTopAnchor(B)&&O==="t"||S.isBottomAnchor(B)&&O==="b"?!1:ie.5?"t":"b",te=k._fullLayout.margin[j],ie=0;return B.yref==="paper"?ie=O+B.pad.t+B.pad.b:B.yref==="container"&&(ie=T(j,V,Y,k._fullLayout.height,O)+B.pad.t+B.pad.b),ie>te?ie:0}function L(k,B,O,V){var Y="title.automargin",j=k._fullLayout.title,te=j.y>.5?"t":"b",ie={x:j.x,y:j.y,t:0,b:0},ue={};j.yref==="paper"&&E(k,j,te,B,V)?ie[te]=O:j.yref==="container"&&(ue[te]=O,k._fullLayout._reservedMargin[Y]=ue),i.allowAutoMargin(k,Y),i.autoMargin(k,Y,ie)}function M(k,B){var O=k.title,V=k._size,Y=0;switch(B===b?Y=O.pad.l:B===o&&(Y=-O.pad.r),O.xref){case"paper":return V.l+V.w*O.x+Y;case"container":default:return k.width*O.x+Y}}function z(k,B){var O=k.title,V=k._size,Y=0;if(B==="0em"||!B?Y=-O.pad.b:B===f.CAP_SHIFT+"em"&&(Y=O.pad.t),O.y==="auto")return V.t/2;switch(O.yref){case"paper":return V.t+V.h-V.h*O.y+Y;case"container":default:return k.height-k.height*O.y+Y}}function D(k){return k==="top"?f.CAP_SHIFT+.3+"em":k==="bottom"?"-0.3em":f.MID_SHIFT+"em"}function N(k){var B=k.title,O=u;return S.isRightAnchor(B)?O=o:S.isLeftAnchor(B)&&(O=b),O}function I(k){var B=k.title,O="0em";return S.isTopAnchor(B)?O=f.CAP_SHIFT+"em":S.isMiddleAnchor(B)&&(O=f.MID_SHIFT+"em"),O}U.doTraceStyle=function(k){var B=k.calcdata,O=[],V;for(V=0;VI?A.push({code:"unused",traceType:M,templateCount:N,dataCount:I}):I>N&&A.push({code:"reused",traceType:M,templateCount:N,dataCount:I})}}function k(B,O){for(var V in B)if(V.charAt(0)!=="_"){var Y=B[V],j=c(B,V,O);C(Y)?(Array.isArray(B)&&Y._template===!1&&Y.templateitemname&&A.push({code:"missing",path:j,templateitemname:Y.templateitemname}),k(Y,j)):Array.isArray(Y)&&l(Y)&&k(Y,j)}}if(k({data:y,layout:_},""),A.length)return A.map(m)};function l(h){for(var b=0;b1&&A.push(f("object","layout"))),C.supplyDefaults(_);for(var T=_._fullData,s=y.length,L=0;LM.length&&w.push(f("unused",A,s.concat(M.length)));var B=M.length,O=Array.isArray(k);O&&(B=Math.min(B,k.length));var V,Y,j,te,ie;if(z.dimensions===2)for(Y=0;YM[Y].length&&w.push(f("unused",A,s.concat(Y,M[Y].length)));var ue=M[Y].length;for(V=0;V<(O?Math.min(ue,k[Y].length):ue);V++)j=O?k[Y][V]:k,te=L[Y][V],ie=M[Y][V],g.validate(te,j)?ie!==te&&ie!==+te&&w.push(f("dynamic",A,s.concat(Y,V),te,ie)):w.push(f("value",A,s.concat(Y,V),te))}else w.push(f("array",A,s.concat(Y),L[Y]));else for(Y=0;Y0&&Math.round(m)===m)l=m;else return{vals:n}}for(var h=t.calendar,b=f==="start",u=f==="end",o=r[a+"period0"],d=i(o,h)||0,w=[],A=[],_=[],y=n.length,E=0;ET;)M=S(M,-l,h);for(;M<=T;)M=S(M,l,h);L=S(M,-l,h)}else{for(s=Math.round((T-d)/c),M=d+s*c;M>T;)M-=c;for(;M<=T;)M+=c;L=M-c}w[E]=b?L:u?M:(L+M)/2,A[E]=L,_[E]=M}return{vals:w,starts:A,ends:_}}},26720:function(H){H.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(H,U,e){var g=e(33428),C=e(38248),i=e(3400),S=e(39032).FP_SAFE,x=e(24040),v=e(43616),p=e(79811),r=p.getFromId,t=p.isLinked;H.exports={applyAutorangeOptions:s,getAutoRange:a,makePadFn:f,doAutoRange:h,findExtremes:b,concatExtremes:m};function a(L,M){var z,D,N=[],I=L._fullLayout,k=f(I,M,0),B=f(I,M,1),O=m(L,M),V=O.min,Y=O.max;if(V.length===0||Y.length===0)return i.simpleMap(M.range,M.r2l);var j=V[0].val,te=Y[0].val;for(z=1;z0&&(ge=Q-k(Z)-B(se),ge>oe?Te/ge>$&&(ne=Z,ce=se,$=Te/ge):Te/Q>$&&(ne={val:Z.val,nopad:1},ce={val:se.val,nopad:1},$=Te/Q));function we(Le,Ve){return Math.max(Le,B(Ve))}if(j===te){var Re=j-1,be=j+1;if(ee)if(j===0)N=[0,1];else{var Ae=(j>0?Y:V).reduce(we,0),me=j/(1-Math.min(.5,Ae/Q));N=j>0?[0,me]:[me,0]}else G?N=[Math.max(0,Re),Math.max(1,be)]:N=[Re,be]}else ee?(ne.val>=0&&(ne={val:0,nopad:1}),ce.val<=0&&(ce={val:0,nopad:1})):G&&(ne.val-$*k(ne)<0&&(ne={val:0,nopad:1}),ce.val<=0&&(ce={val:1,nopad:1})),$=(ce.val-ne.val-n(M,Z.val,se.val))/(Q-k(ne)-B(ce)),N=[ne.val-$*k(ne),ce.val+$*B(ce)];return N=s(N,M),M.limitRange&&M.limitRange(),ue&&N.reverse(),i.simpleMap(N,M.l2r||Number)}function n(L,M,z){var D=0;if(L.rangebreaks)for(var N=L.locateBreaks(M,z),I=0;I0?z.ppadplus:z.ppadminus)||z.ppad||0),Z=oe((L._m>0?z.ppadminus:z.ppadplus)||z.ppad||0),se=oe(z.vpadplus||z.vpad),ne=oe(z.vpadminus||z.vpad);if(!V){if(G=1/0,Q=-1/0,O)for(j=0;j0&&(G=te),te>Q&&te-S&&(G=te),te>Q&&te=Te;j--)ge(j);return{min:D,max:N,opts:z}}function u(L,M,z,D){d(L,M,z,D,A)}function o(L,M,z,D){d(L,M,z,D,_)}function d(L,M,z,D,N){for(var I=D.tozero,k=D.extrapad,B=!0,O=0;O=z&&(V.extrapad||!k)){B=!1;break}else N(M,V.val)&&V.pad<=z&&(k||!V.extrapad)&&(L.splice(O,1),O--)}if(B){var Y=I&&M===0;L.push({val:M,pad:Y?0:z,extrapad:Y?!1:k})}}function w(L){return C(L)&&Math.abs(L)=M}function y(L,M){var z=M.autorangeoptions;return z&&z.minallowed!==void 0&&T(M,z.minallowed,z.maxallowed)?z.minallowed:z&&z.clipmin!==void 0&&T(M,z.clipmin,z.clipmax)?Math.max(L,M.d2l(z.clipmin)):L}function E(L,M){var z=M.autorangeoptions;return z&&z.maxallowed!==void 0&&T(M,z.minallowed,z.maxallowed)?z.maxallowed:z&&z.clipmax!==void 0&&T(M,z.clipmin,z.clipmax)?Math.min(L,M.d2l(z.clipmax)):L}function T(L,M,z){return M!==void 0&&z!==void 0?(M=L.d2l(M),z=L.d2l(z),M=O&&(I=O,z=O),k<=O&&(k=O,D=O)}}return z=y(z,M),D=E(D,M),[z,D]}},76808:function(H){H.exports=function(e,g,C){var i,S;if(C){var x=g==="reversed"||g==="min reversed"||g==="max reversed";i=C[x?1:0],S=C[x?0:1]}var v=e("autorangeoptions.minallowed",S===null?i:void 0),p=e("autorangeoptions.maxallowed",i===null?S:void 0);v===void 0&&e("autorangeoptions.clipmin"),p===void 0&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},54460:function(H,U,e){var g=e(33428),C=e(38248),i=e(7316),S=e(24040),x=e(3400),v=x.strTranslate,p=e(72736),r=e(81668),t=e(76308),a=e(43616),n=e(94724),f=e(98728),c=e(39032),l=c.ONEMAXYEAR,m=c.ONEAVGYEAR,h=c.ONEMINYEAR,b=c.ONEMAXQUARTER,u=c.ONEAVGQUARTER,o=c.ONEMINQUARTER,d=c.ONEMAXMONTH,w=c.ONEAVGMONTH,A=c.ONEMINMONTH,_=c.ONEWEEK,y=c.ONEDAY,E=y/2,T=c.ONEHOUR,s=c.ONEMIN,L=c.ONESEC,M=c.MINUS_SIGN,z=c.BADNUM,D={K:"zeroline"},N={K:"gridline",L:"path"},I={K:"minor-gridline",L:"path"},k={K:"tick",L:"path"},B={K:"tick",L:"text"},O={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},V=e(84284),Y=V.MID_SHIFT,j=V.CAP_SHIFT,te=V.LINE_SPACING,ie=V.OPPOSITE_SIDE,ue=3,J=H.exports={};J.setConvert=e(78344);var X=e(52976),ee=e(79811),G=ee.idSort,Q=ee.isLinked;J.id2name=ee.id2name,J.name2id=ee.name2id,J.cleanId=ee.cleanId,J.list=ee.list,J.listIds=ee.listIds,J.getFromId=ee.getFromId,J.getFromTrace=ee.getFromTrace;var oe=e(19280);J.getAutoRange=oe.getAutoRange,J.findExtremes=oe.findExtremes;var $=1e-4;function Z(Ye){var Ge=(Ye[1]-Ye[0])*$;return[Ye[0]-Ge,Ye[1]+Ge]}J.coerceRef=function(Ye,Ge,Nt,Ot,Qt,tr){var fr=Ot.charAt(Ot.length-1),rr=Nt._fullLayout._subplots[fr+"axis"],Vt=Ot+"ref",dr={};return Qt||(Qt=rr[0]||(typeof tr=="string"?tr:tr[0])),tr||(tr=Qt),rr=rr.concat(rr.map(function(mr){return mr+" domain"})),dr[Vt]={valType:"enumerated",values:rr.concat(tr?typeof tr=="string"?[tr]:tr:[]),dflt:Qt},x.coerce(Ye,Ge,dr,Vt)},J.getRefType=function(Ye){return Ye===void 0?Ye:Ye==="paper"?"paper":Ye==="pixel"?"pixel":/( domain)$/.test(Ye)?"domain":"range"},J.coercePosition=function(Ye,Ge,Nt,Ot,Qt,tr){var fr,rr,Vt=J.getRefType(Ot);if(Vt!=="range")fr=x.ensureNumber,rr=Nt(Qt,tr);else{var dr=J.getFromId(Ge,Ot);tr=dr.fraction2r(tr),rr=Nt(Qt,tr),fr=dr.cleanPos}Ye[Qt]=fr(rr)},J.cleanPosition=function(Ye,Ge,Nt){var Ot=Nt==="paper"||Nt==="pixel"?x.ensureNumber:J.getFromId(Ge,Nt).cleanPos;return Ot(Ye)},J.redrawComponents=function(Ye,Ge){Ge=Ge||J.listIds(Ye);var Nt=Ye._fullLayout;function Ot(Qt,tr,fr,rr){for(var Vt=S.getComponentMethod(Qt,tr),dr={},mr=0;mr2e-6||((Nt-Ye._forceTick0)/Ye._minDtick%1+1.000001)%1>2e-6)&&(Ye._minDtick=0))},J.saveRangeInitial=function(Ye,Ge){for(var Nt=J.list(Ye,"",!0),Ot=!1,Qt=0;Qtxr*.3||dr(Ot)||dr(Qt))){var pr=Nt.dtick/2;Ye+=Ye+prfr){var rr=Number(Nt.substr(1));tr.exactYears>fr&&rr%12===0?Ye=J.tickIncrement(Ye,"M6","reverse")+y*1.5:tr.exactMonths>fr?Ye=J.tickIncrement(Ye,"M1","reverse")+y*15.5:Ye-=E;var Vt=J.tickIncrement(Ye,Nt);if(Vt<=Ot)return Vt}return Ye}J.prepMinorTicks=function(Ye,Ge,Nt){if(!Ge.minor.dtick){delete Ye.dtick;var Ot=Ge.dtick&&C(Ge._tmin),Qt;if(Ot){var tr=J.tickIncrement(Ge._tmin,Ge.dtick,!0);Qt=[Ge._tmin,tr*.99+Ge._tmin*.01]}else{var fr=x.simpleMap(Ge.range,Ge.r2l);Qt=[fr[0],.8*fr[0]+.2*fr[1]]}if(Ye.range=x.simpleMap(Qt,Ge.l2r),Ye._isMinor=!0,J.prepTicks(Ye,Nt),Ot){var rr=C(Ge.dtick),Vt=C(Ye.dtick),dr=rr?Ge.dtick:+Ge.dtick.substring(1),mr=Vt?Ye.dtick:+Ye.dtick.substring(1);rr&&Vt?we(dr,mr)?dr===2*_&&mr===2*y&&(Ye.dtick=_):dr===2*_&&mr===3*y?Ye.dtick=_:dr===_&&!(Ge._input.minor||{}).nticks?Ye.dtick=y:Re(dr/mr,2.5)?Ye.dtick=dr/2:Ye.dtick=dr:String(Ge.dtick).charAt(0)==="M"?Vt?Ye.dtick="M1":we(dr,mr)?dr>=12&&mr===2&&(Ye.dtick="M3"):Ye.dtick=Ge.dtick:String(Ye.dtick).charAt(0)==="L"?String(Ge.dtick).charAt(0)==="L"?we(dr,mr)||(Ye.dtick=Re(dr/mr,2.5)?Ge.dtick/2:Ge.dtick):Ye.dtick="D1":Ye.dtick==="D2"&&+Ge.dtick>1&&(Ye.dtick=1)}Ye.range=Ge.range}Ge.minor._tick0Init===void 0&&(Ye.tick0=Ge.tick0)};function we(Ye,Ge){return Math.abs((Ye/Ge+.5)%1-.5)<.001}function Re(Ye,Ge){return Math.abs(Ye/Ge-1)<.001}J.prepTicks=function(Ye,Ge){var Nt=x.simpleMap(Ye.range,Ye.r2l,void 0,void 0,Ge);if(Ye.tickmode==="auto"||!Ye.dtick){var Ot=Ye.nticks,Qt;Ot||(Ye.type==="category"||Ye.type==="multicategory"?(Qt=Ye.tickfont?x.bigFont(Ye.tickfont.size||12):15,Ot=Ye._length/Qt):(Qt=Ye._id.charAt(0)==="y"?40:80,Ot=x.constrain(Ye._length/Qt,4,9)+1),Ye._name==="radialaxis"&&(Ot*=2)),Ye.minor&&Ye.minor.tickmode!=="array"||Ye.tickmode==="array"&&(Ot*=100),Ye._roughDTick=Math.abs(Nt[1]-Nt[0])/Ot,J.autoTicks(Ye,Ye._roughDTick),Ye._minDtick>0&&Ye.dtick0?(tr=Ot-1,fr=Ot):(tr=Ot,fr=Ot);var rr=Ye[tr].value,Vt=Ye[fr].value,dr=Math.abs(Vt-rr),mr=Nt||dr,xr=0;mr>=h?dr>=h&&dr<=l?xr=dr:xr=m:Nt===u&&mr>=o?dr>=o&&dr<=b?xr=dr:xr=u:mr>=A?dr>=A&&dr<=d?xr=dr:xr=w:Nt===_&&mr>=_?xr=_:mr>=y?xr=y:Nt===E&&mr>=E?xr=E:Nt===T&&mr>=T&&(xr=T);var pr;xr>=dr&&(xr=dr,pr=!0);var Gr=Qt+xr;if(Ge.rangebreaks&&xr>0){for(var Pr=84,Dr=0,cn=0;cn_&&(xr=dr)}(xr>0||Ot===0)&&(Ye[Ot].periodX=Qt+xr/2)}}J.calcTicks=function(Ge,Nt){for(var Ot=Ge.type,Qt=Ge.calendar,tr=Ge.ticklabelstep,fr=Ge.ticklabelmode==="period",rr=x.simpleMap(Ge.range,Ge.r2l,void 0,void 0,Nt),Vt=rr[1]=(cn?0:1);rn--){var Cn=!rn;rn?(Ge._dtickInit=Ge.dtick,Ge._tick0Init=Ge.tick0):(Ge.minor._dtickInit=Ge.minor.dtick,Ge.minor._tick0Init=Ge.minor.tick0);var En=rn?Ge:x.extendFlat({},Ge,Ge.minor);if(Cn?J.prepMinorTicks(En,Ge,Nt):J.prepTicks(En,Nt),En.tickmode==="array"){rn?(Pr=[],pr=Ue(Ge,!Cn)):(Dr=[],Gr=Ue(Ge,!Cn));continue}if(En.tickmode==="sync"){Pr=[],pr=Ve(Ge);continue}var Tr=Z(rr),Cr=Tr[0],Wr=Tr[1],Ur=C(En.dtick),an=Ot==="log"&&!(Ur||En.dtick.charAt(0)==="L"),pn=J.tickFirst(En,Nt);if(rn){if(Ge._tmin=pn,pn=Wr:_n<=Wr;_n=J.tickIncrement(_n,ci,Vt,Qt)){if(rn&&kn++,En.rangebreaks&&!Vt){if(_n=mr)break}if(Pr.length>xr||_n===gn)break;gn=_n;var di={value:_n};rn?(an&&_n!==(_n|0)&&(di.simpleLabel=!0),tr>1&&kn%tr&&(di.skipLabel=!0),Pr.push(di)):(di.minor=!0,Dr.push(di))}}if(cn){var li=Ge.minor.ticks==="inside"&&Ge.ticks==="outside"||Ge.minor.ticks==="outside"&&Ge.ticks==="inside";if(!li){for(var ri=Pr.map(function(hn){return hn.value}),wr=[],nn=0;nn-1;An--){if(Pr[An].drop){Pr.splice(An,1);continue}Pr[An].value=Ht(Pr[An].value,Ge);var Di=Ge.c2p(Pr[An].value);(Bn?gi>Di-Jn:gimr||Ormr&&(Ar.periodX=mr),OrQt&&prm)Ge/=m,Ot=Qt(10),Ye.dtick="M"+12*ht(Ge,Ot,ke);else if(tr>w)Ge/=w,Ye.dtick="M"+ht(Ge,1,He);else if(tr>y){if(Ye.dtick=ht(Ge,y,Ye._hasDayOfWeekBreaks?[1,2,7,14]:rt),!Nt){var fr=J.getTickFormat(Ye),rr=Ye.ticklabelmode==="period";rr&&(Ye._rawTick0=Ye.tick0),/%[uVW]/.test(fr)?Ye.tick0=x.dateTick0(Ye.calendar,2):Ye.tick0=x.dateTick0(Ye.calendar,1),rr&&(Ye._dowTick0=Ye.tick0)}}else tr>T?Ye.dtick=ht(Ge,T,He):tr>s?Ye.dtick=ht(Ge,s,Ie):tr>L?Ye.dtick=ht(Ge,L,Ie):(Ot=Qt(10),Ye.dtick=ht(Ge,Ot,ke))}else if(Ye.type==="log"){Ye.tick0=0;var Vt=x.simpleMap(Ye.range,Ye.r2l);if(Ye._isMinor&&(Ge*=1.5),Ge>.7)Ye.dtick=Math.ceil(Ge);else if(Math.abs(Vt[1]-Vt[0])<1){var dr=1.5*Math.abs((Vt[1]-Vt[0])/Ge);Ge=Math.abs(Math.pow(10,Vt[1])-Math.pow(10,Vt[0]))/dr,Ot=Qt(10),Ye.dtick="L"+ht(Ge,Ot,ke)}else Ye.dtick=Ge>.3?"D2":"D1"}else Ye.type==="category"||Ye.type==="multicategory"?(Ye.tick0=0,Ye.dtick=Math.ceil(Math.max(Ge,1))):kt(Ye)?(Ye.tick0=0,Ot=1,Ye.dtick=ht(Ge,Ot,lt)):(Ye.tick0=0,Ot=Qt(10),Ye.dtick=ht(Ge,Ot,ke));if(Ye.dtick===0&&(Ye.dtick=1),!C(Ye.dtick)&&typeof Ye.dtick!="string"){var mr=Ye.dtick;throw Ye.dtick=1,"ax.dtick error: "+String(mr)}};function dt(Ye){var Ge=Ye.dtick;if(Ye._tickexponent=0,!C(Ge)&&typeof Ge!="string"&&(Ge=1),(Ye.type==="category"||Ye.type==="multicategory")&&(Ye._tickround=null),Ye.type==="date"){var Nt=Ye.r2l(Ye.tick0),Ot=Ye.l2r(Nt).replace(/(^-|i)/g,""),Qt=Ot.length;if(String(Ge).charAt(0)==="M")Qt>10||Ot.substr(5)!=="01-01"?Ye._tickround="d":Ye._tickround=+Ge.substr(1)%12===0?"y":"m";else if(Ge>=y&&Qt<=10||Ge>=y*15)Ye._tickround="d";else if(Ge>=s&&Qt<=16||Ge>=T)Ye._tickround="M";else if(Ge>=L&&Qt<=19||Ge>=s)Ye._tickround="S";else{var tr=Ye.l2r(Nt+Ge).replace(/^-/,"").length;Ye._tickround=Math.max(Qt,tr)-20,Ye._tickround<0&&(Ye._tickround=4)}}else if(C(Ge)||Ge.charAt(0)==="L"){var fr=Ye.range.map(Ye.r2d||Number);C(Ge)||(Ge=Number(Ge.substr(1))),Ye._tickround=2-Math.floor(Math.log(Ge)/Math.LN10+.01);var rr=Math.max(Math.abs(fr[0]),Math.abs(fr[1])),Vt=Math.floor(Math.log(rr)/Math.LN10+.01),dr=Ye.minexponent===void 0?3:Ye.minexponent;Math.abs(Vt)>dr&&(ye(Ye.exponentformat)&&!Ee(Vt)?Ye._tickexponent=3*Math.round((Vt-1)/3):Ye._tickexponent=Vt)}else Ye._tickround=null}J.tickIncrement=function(Ye,Ge,Nt,Ot){var Qt=Nt?-1:1;if(C(Ge))return x.increment(Ye,Qt*Ge);var tr=Ge.charAt(0),fr=Qt*Number(Ge.substr(1));if(tr==="M")return x.incrementMonth(Ye,fr,Ot);if(tr==="L")return Math.log(Math.pow(10,Ye)+fr)/Math.LN10;if(tr==="D"){var rr=Ge==="D2"?$e:Ke,Vt=Ye+Qt*.01,dr=x.roundUp(x.mod(Vt,1),rr,Nt);return Math.floor(Vt)+Math.log(g.round(Math.pow(10,dr),1))/Math.LN10}throw"unrecognized dtick "+String(Ge)},J.tickFirst=function(Ye,Ge){var Nt=Ye.r2l||Number,Ot=x.simpleMap(Ye.range,Nt,void 0,void 0,Ge),Qt=Ot[1]=0&&rn<=Ye._length?cn:null};if(tr&&x.isArrayOrTypedArray(Ye.ticktext)){var xr=x.simpleMap(Ye.range,Ye.r2l),pr=(Math.abs(xr[1]-xr[0])-(Ye._lBreaks||0))/1e4;for(dr=0;dr"+rr;else{var dr=Jt(Ye),mr=Ye._trueSide||Ye.side;(!dr&&mr==="top"||dr&&mr==="bottom")&&(fr+="
    ")}Ge.text=fr}function nt(Ye,Ge,Nt,Ot,Qt){var tr=Ye.dtick,fr=Ge.x,rr=Ye.tickformat,Vt=typeof tr=="string"&&tr.charAt(0);if(Qt==="never"&&(Qt=""),Ot&&Vt!=="L"&&(tr="L3",Vt="L"),rr||Vt==="L")Ge.text=Me(Math.pow(10,fr),Ye,Qt,Ot);else if(C(tr)||Vt==="D"&&x.mod(fr+.01,1)<.1){var dr=Math.round(fr),mr=Math.abs(dr),xr=Ye.exponentformat;xr==="power"||ye(xr)&&Ee(dr)?(dr===0?Ge.text=1:dr===1?Ge.text="10":Ge.text="10"+(dr>1?"":M)+mr+"",Ge.fontSize*=1.25):(xr==="e"||xr==="E")&&mr>2?Ge.text="1"+xr+(dr>0?"+":M)+mr:(Ge.text=Me(Math.pow(10,fr),Ye,"","fakehover"),tr==="D1"&&Ye._id.charAt(0)==="y"&&(Ge.dy-=Ge.fontSize/6))}else if(Vt==="D")Ge.text=String(Math.round(Math.pow(10,x.mod(fr,1)))),Ge.fontSize*=.75;else throw"unrecognized dtick "+String(tr);if(Ye.dtick==="D1"){var pr=String(Ge.text).charAt(0);(pr==="0"||pr==="1")&&(Ye._id.charAt(0)==="y"?Ge.dx-=Ge.fontSize/4:(Ge.dy+=Ge.fontSize/2,Ge.dx+=(Ye.range[1]>Ye.range[0]?1:-1)*Ge.fontSize*(fr<0?.5:.25)))}}function ze(Ye,Ge){var Nt=Ye._categories[Math.round(Ge.x)];Nt===void 0&&(Nt=""),Ge.text=String(Nt)}function Ze(Ye,Ge,Nt){var Ot=Math.round(Ge.x),Qt=Ye._categories[Ot]||[],tr=Qt[1]===void 0?"":String(Qt[1]),fr=Qt[0]===void 0?"":String(Qt[0]);Nt?Ge.text=fr+" - "+tr:(Ge.text=tr,Ge.text2=fr)}function Je(Ye,Ge,Nt,Ot,Qt){Qt==="never"?Qt="":Ye.showexponent==="all"&&Math.abs(Ge.x/Ye.dtick)<1e-6&&(Qt="hide"),Ge.text=Me(Ge.x,Ye,Qt,Ot)}function We(Ye,Ge,Nt,Ot,Qt){if(Ye.thetaunit==="radians"&&!Nt){var tr=Ge.x/180;if(tr===0)Ge.text="0";else{var fr=Fe(tr);if(fr[1]>=100)Ge.text=Me(x.deg2rad(Ge.x),Ye,Qt,Ot);else{var rr=Ge.x<0;fr[1]===1?fr[0]===1?Ge.text="π":Ge.text=fr[0]+"π":Ge.text=["",fr[0],"","⁄","",fr[1],"","π"].join(""),rr&&(Ge.text=M+Ge.text)}}}else Ge.text=Me(Ge.x,Ye,Qt,Ot)}function Fe(Ye){function Ge(rr,Vt){return Math.abs(rr-Vt)<=1e-6}function Nt(rr,Vt){return Ge(Vt,0)?rr:Nt(Vt,rr%Vt)}function Ot(rr){for(var Vt=1;!Ge(Math.round(rr*Vt)/Vt,rr);)Vt*=10;return Vt}var Qt=Ot(Ye),tr=Ye*Qt,fr=Math.abs(Nt(tr,Qt));return[Math.round(tr/fr),Math.round(Qt/fr)]}var xe=["f","p","n","μ","m","","k","M","G","T"];function ye(Ye){return Ye==="SI"||Ye==="B"}function Ee(Ye){return Ye>14||Ye<-15}function Me(Ye,Ge,Nt,Ot){var Qt=Ye<0,tr=Ge._tickround,fr=Nt||Ge.exponentformat||"B",rr=Ge._tickexponent,Vt=J.getTickFormat(Ge),dr=Ge.separatethousands;if(Ot){var mr={exponentformat:fr,minexponent:Ge.minexponent,dtick:Ge.showexponent==="none"?Ge.dtick:C(Ye)&&Math.abs(Ye)||1,range:Ge.showexponent==="none"?Ge.range.map(Ge.r2d):[0,Ye||1]};dt(mr),tr=(Number(mr._tickround)||0)+4,rr=mr._tickexponent,Ge.hoverformat&&(Vt=Ge.hoverformat)}if(Vt)return Ge._numFormat(Vt)(Ye).replace(/-/g,M);var xr=Math.pow(10,-tr)/2;if(fr==="none"&&(rr=0),Ye=Math.abs(Ye),Ye"+Pr+"":fr==="B"&&rr===9?Ye+="B":ye(fr)&&(Ye+=xe[rr/3+5])}return Qt?M+Ye:Ye}J.getTickFormat=function(Ye){var Ge;function Nt(Vt){return typeof Vt!="string"?Vt:Number(Vt.replace("M",""))*w}function Ot(Vt,dr){var mr=["L","D"];if(typeof Vt==typeof dr){if(typeof Vt=="number")return Vt-dr;var xr=mr.indexOf(Vt.charAt(0)),pr=mr.indexOf(dr.charAt(0));return xr===pr?Number(Vt.replace(/(L|D)/g,""))-Number(dr.replace(/(L|D)/g,"")):xr-pr}else return typeof Vt=="number"?1:-1}function Qt(Vt,dr,mr){var xr=mr||function(Pr){return Pr},pr=dr[0],Gr=dr[1];return(!pr&&typeof pr!="number"||xr(pr)<=xr(Vt))&&(!Gr&&typeof Gr!="number"||xr(Gr)>=xr(Vt))}function tr(Vt,dr){var mr=dr[0]===null,xr=dr[1]===null,pr=Ot(Vt,dr[0])>=0,Gr=Ot(Vt,dr[1])<=0;return(mr||pr)&&(xr||Gr)}var fr,rr;if(Ye.tickformatstops&&Ye.tickformatstops.length>0)switch(Ye.type){case"date":case"linear":{for(Ge=0;Ge=0&&Qt.unshift(Qt.splice(mr,1).shift())}});var rr={false:{left:0,right:0}};return x.syncOrAsync(Qt.map(function(Vt){return function(){if(Vt){var dr=J.getFromId(Ye,Vt);Nt||(Nt={}),Nt.axShifts=rr,Nt.overlayingShiftedAx=fr;var mr=J.drawOne(Ye,dr,Nt);return dr._shiftPusher&&hr(dr,dr._fullDepth||0,rr,!0),dr._r=dr.range.slice(),dr._rl=x.simpleMap(dr._r,dr.r2l),mr}}}))},J.drawOne=function(Ye,Ge,Nt){Nt=Nt||{};var Ot=Nt.axShifts||{},Qt=Nt.overlayingShiftedAx||[],tr,fr,rr;Ge.setScale();var Vt=Ye._fullLayout,dr=Ge._id,mr=dr.charAt(0),xr=J.counterLetter(dr),pr=Vt._plots[Ge._mainSubplot];if(!pr)return;if(Ge._shiftPusher=Ge.autoshift||Qt.indexOf(Ge._id)!==-1||Qt.indexOf(Ge.overlaying)!==-1,Ge._shiftPusher&Ge.anchor==="free"){var Gr=Ge.linewidth/2||0;Ge.ticks==="inside"&&(Gr+=Ge.ticklen),hr(Ge,Gr,Ot,!0),hr(Ge,Ge.shift||0,Ot,!1)}(Nt.skipTitle!==!0||Ge._shift===void 0)&&(Ge._shift=vr(Ge,Ot));var Pr=pr[mr+"axislayer"],Dr=Ge._mainLinePosition,cn=Dr+=Ge._shift,rn=Ge._mainMirrorPosition,Cn=Ge._vals=J.calcTicks(Ge),En=[Ge.mirror,cn,rn].join("_");for(tr=0;tr0?Pn.bottom-wn:0,Ln))));var ai=0,pi=0;if(Ge._shiftPusher&&(ai=Math.max(Ln,Pn.height>0?Vr==="l"?wn-Pn.left:Pn.right-wn:0),Ge.title.text!==Vt._dfltTitle[mr]&&(pi=(Ge._titleStandoff||0)+(Ge._titleScoot||0),Vr==="l"&&(pi+=Bt(Ge))),Ge._fullDepth=Math.max(ai,pi)),Ge.automargin){Un={x:0,y:0,r:0,l:0,t:0,b:0};var Ci=[0,1],pa=typeof Ge._shift=="number"?Ge._shift:0;if(mr==="x"){if(Vr==="b"?Un[Vr]=Ge._depth:(Un[Vr]=Ge._depth=Math.max(Pn.width>0?wn-Pn.top:0,Ln),Ci.reverse()),Pn.width>0){var ta=Pn.right-(Ge._offset+Ge._length);ta>0&&(Un.xr=1,Un.r=ta);var Eo=Ge._offset-Pn.left;Eo>0&&(Un.xl=0,Un.l=Eo)}}else if(Vr==="l"?(Ge._depth=Math.max(Pn.height>0?wn-Pn.left:0,Ln),Un[Vr]=Ge._depth-pa):(Ge._depth=Math.max(Pn.height>0?Pn.right-wn:0,Ln),Un[Vr]=Ge._depth+pa,Ci.reverse()),Pn.height>0){var xo=Pn.bottom-(Ge._offset+Ge._length);xo>0&&(Un.yb=0,Un.b=xo);var Qa=Ge._offset-Pn.top;Qa>0&&(Un.yt=1,Un.t=Qa)}Un[xr]=Ge.anchor==="free"?Ge.position:Ge._anchorAxis.domain[Ci[0]],Ge.title.text!==Vt._dfltTitle[mr]&&(Un[Vr]+=Bt(Ge)+(Ge.title.standoff||0)),Ge.mirror&&Ge.anchor!=="free"&&(On={x:0,y:0,r:0,l:0,t:0,b:0},On[Qr]=Ge.linewidth,Ge.mirror&&Ge.mirror!==!0&&(On[Qr]+=Ln),Ge.mirror===!0||Ge.mirror==="ticks"?On[xr]=Ge._anchorAxis.domain[Ci[1]]:(Ge.mirror==="all"||Ge.mirror==="allticks")&&(On[xr]=[Ge._counterDomainMin,Ge._counterDomainMax][Ci[1]]))}Zr&&(mi=S.getComponentMethod("rangeslider","autoMarginOpts")(Ye,Ge)),typeof Ge.automargin=="string"&&(Ne(Un,Ge.automargin),Ne(On,Ge.automargin)),i.autoMargin(Ye,$t(Ge),Un),i.autoMargin(Ye,gt(Ge),On),i.autoMargin(Ye,st(Ge),mi)}),x.syncOrAsync(sn)}};function Ne(Ye,Ge){if(Ye){var Nt=Object.keys(O).reduce(function(Ot,Qt){return Ge.indexOf(Qt)!==-1&&O[Qt].forEach(function(tr){Ot[tr]=1}),Ot},{});Object.keys(Ye).forEach(function(Ot){Nt[Ot]||(Ot.length===1?Ye[Ot]=0:delete Ye[Ot])})}}function je(Ye,Ge){var Nt=[],Ot,Qt=function(tr,fr){var rr=tr.xbnd[fr];rr!==null&&Nt.push(x.extendFlat({},tr,{x:rr}))};if(Ge.length){for(Ot=0;Ot60?-.5*ci:Ye.side==="top"!==mr?-ci:0};else if(Ur==="y"){if(pn=!mr&&Wr==="left"||mr&&Wr==="right",Tr=pn?1:-1,mr&&(Tr*=-1),rn=pr,Cn=Gr*Tr,En=0,!mr&&Math.abs(an)===90&&(an===-90&&Wr==="left"||an===90&&Wr==="right"?En=j:En=.5),mr){var gn=C(an)?+an:0;if(gn!==0){var _n=x.deg2rad(gn);Cr=Math.abs(Math.sin(_n))*j*Tr,En=0}}cn.xFn=function(kn){return kn.dx+Ge-(rn+kn.fontSize*En)*Tr+Cr*kn.fontSize},cn.yFn=function(kn){return kn.dy+Cn+kn.fontSize*Y},cn.anchorFn=function(kn,ni){return C(ni)&&Math.abs(ni)===90?"middle":pn?"end":"start"},cn.heightFn=function(kn,ni,ci){return Ye.side==="right"&&(ni*=-1),ni<-30?-ci:ni<30?-.5*ci:0}}return cn};function ct(Ye){return[Ye.text,Ye.x,Ye.axInfo,Ye.font,Ye.fontSize,Ye.fontColor].join("_")}J.drawTicks=function(Ye,Ge,Nt){Nt=Nt||{};var Ot=Ge._id+"tick",Qt=[].concat(Ge.minor&&Ge.minor.ticks?Nt.vals.filter(function(fr){return fr.minor&&!fr.noTick}):[]).concat(Ge.ticks?Nt.vals.filter(function(fr){return!fr.minor&&!fr.noTick}):[]),tr=Nt.layer.selectAll("path."+Ot).data(Qt,ct);tr.exit().remove(),tr.enter().append("path").classed(Ot,1).classed("ticks",1).classed("crisp",Nt.crisp!==!1).each(function(fr){return t.stroke(g.select(this),fr.minor?Ge.minor.tickcolor:Ge.tickcolor)}).style("stroke-width",function(fr){return a.crispRound(Ye,fr.minor?Ge.minor.tickwidth:Ge.tickwidth,1)+"px"}).attr("d",Nt.path).style("display",null),ur(Ge,[k]),tr.attr("transform",Nt.transFn)},J.drawGrid=function(Ye,Ge,Nt){if(Nt=Nt||{},Ge.tickmode!=="sync"){var Ot=Ge._id+"grid",Qt=Ge.minor&&Ge.minor.showgrid,tr=Qt?Nt.vals.filter(function(rn){return rn.minor}):[],fr=Ge.showgrid?Nt.vals.filter(function(rn){return!rn.minor}):[],rr=Nt.counterAxis;if(rr&&J.shouldShowZeroLine(Ye,Ge,rr))for(var Vt=Ge.tickmode==="array",dr=0;dr=0;Pr--){var Dr=Pr?pr:Gr;if(Dr){var cn=Dr.selectAll("path."+Ot).data(Pr?fr:tr,ct);cn.exit().remove(),cn.enter().append("path").classed(Ot,1).classed("crisp",Nt.crisp!==!1),cn.attr("transform",Nt.transFn).attr("d",Nt.path).each(function(rn){return t.stroke(g.select(this),rn.minor?Ge.minor.gridcolor:Ge.gridcolor||"#ddd")}).style("stroke-dasharray",function(rn){return a.dashStyle(rn.minor?Ge.minor.griddash:Ge.griddash,rn.minor?Ge.minor.gridwidth:Ge.gridwidth)}).style("stroke-width",function(rn){return(rn.minor?xr:Ge._gw)+"px"}).style("display",null),typeof Nt.path=="function"&&cn.attr("d",Nt.path)}}ur(Ge,[N,I])}},J.drawZeroLine=function(Ye,Ge,Nt){Nt=Nt||Nt;var Ot=Ge._id+"zl",Qt=J.shouldShowZeroLine(Ye,Ge,Nt.counterAxis),tr=Nt.layer.selectAll("path."+Ot).data(Qt?[{x:0,id:Ge._id}]:[]);tr.exit().remove(),tr.enter().append("path").classed(Ot,1).classed("zl",1).classed("crisp",Nt.crisp!==!1).each(function(){Nt.layer.selectAll("path").sort(function(fr,rr){return G(fr.id,rr.id)})}),tr.attr("transform",Nt.transFn).attr("d",Nt.path).call(t.stroke,Ge.zerolinecolor||t.defaultLine).style("stroke-width",a.crispRound(Ye,Ge.zerolinewidth,Ge._gw||1)+"px").style("display",null),ur(Ge,[D])},J.drawLabels=function(Ye,Ge,Nt){Nt=Nt||{};var Ot=Ye._fullLayout,Qt=Ge._id,tr=Nt.cls||Qt+"tick",fr=Nt.vals.filter(function(wr){return wr.text}),rr=Nt.labelFns,Vt=Nt.secondary?0:Ge.tickangle,dr=(Ge._prevTickAngles||{})[tr],mr=Nt.layer.selectAll("g."+tr).data(Ge.showticklabels?fr:[],ct),xr=[];mr.enter().append("g").classed(tr,1).append("text").attr("text-anchor","middle").each(function(wr){var nn=g.select(this),$r=Ye._promises.length;nn.call(p.positionText,rr.xFn(wr),rr.yFn(wr)).call(a.font,wr.font,wr.fontSize,wr.fontColor).text(wr.text).call(p.convertToTspans,Ye),Ye._promises[$r]?xr.push(Ye._promises.pop().then(function(){pr(nn,Vt)})):pr(nn,Vt)}),ur(Ge,[B]),mr.exit().remove(),Nt.repositionOnUpdate&&mr.each(function(wr){g.select(this).select("text").call(p.positionText,rr.xFn(wr),rr.yFn(wr))});function pr(wr,nn){wr.each(function($r){var dn=g.select(this),Hn=dn.select(".text-math-group"),Tn=rr.anchorFn($r,nn),An=Nt.transFn.call(dn.node(),$r)+(C(nn)&&+nn!=0?" rotate("+nn+","+rr.xFn($r)+","+(rr.yFn($r)-$r.fontSize/2)+")":""),Bn=p.lineCount(dn),Jn=te*$r.fontSize,gi=rr.heightFn($r,C(nn)?+nn:0,(Bn-1)*Jn);if(gi&&(An+=v(0,gi)),Hn.empty()){var Di=dn.select("text");Di.attr({transform:An,"text-anchor":Tn}),Di.style("opacity",1),Ge._adjustTickLabelsOverflow&&Ge._adjustTickLabelsOverflow()}else{var Sr=a.bBox(Hn.node()).width,kr=Sr*{end:-.5,start:.5}[Tn];Hn.attr("transform",An+v(kr,0))}})}Ge._adjustTickLabelsOverflow=function(){var wr=Ge.ticklabeloverflow;if(!(!wr||wr==="allow")){var nn=wr.indexOf("hide")!==-1,$r=Ge._id.charAt(0)==="x",dn=0,Hn=$r?Ye._fullLayout.width:Ye._fullLayout.height;if(wr.indexOf("domain")!==-1){var Tn=x.simpleMap(Ge.range,Ge.r2l);dn=Ge.l2p(Tn[0])+Ge._offset,Hn=Ge.l2p(Tn[1])+Ge._offset}var An=Math.min(dn,Hn),Bn=Math.max(dn,Hn),Jn=Ge.side,gi=1/0,Di=-1/0;mr.each(function(Or){var xn=g.select(this),In=xn.select(".text-math-group");if(In.empty()){var hn=a.bBox(xn.node()),sn=0;$r?(hn.right>Bn||hn.leftBn||hn.top+(Ge.tickangle?0:Or.fontSize/4)Ge["_visibleLabelMin_"+Tn._id]?Or.style("display","none"):Bn.K==="tick"&&!An&&Or.style("display",null)})})})})},pr(mr,dr+1?dr:Vt);function Gr(){return xr.length&&Promise.all(xr)}var Pr=null;function Dr(){if(pr(mr,Vt),fr.length&&Ge.autotickangles&&(Ge.type!=="log"||String(Ge.dtick).charAt(0)!=="D")){Pr=Ge.autotickangles[0];var wr=0,nn=[],$r,dn=1;if(mr.each(function(Ln){wr=Math.max(wr,Ln.fontSize);var Pn=Ge.l2p(Ln.x),Un=or(this),On=a.bBox(Un.node());dn=Math.max(dn,p.lineCount(Un)),nn.push({top:0,bottom:10,height:10,left:Pn-On.width/2,right:Pn+On.width/2+2,width:On.width+2})}),(Ge.tickson==="boundaries"||Ge.showdividers)&&!Nt.secondary){var Hn=2;for(Ge.ticks&&(Hn+=Ge.tickwidth/2),$r=0;$rdi*ci&&(_n=ci,an[Ur]=pn[Ur]=kn[Ur])}var li=Math.abs(_n-gn);li-Tr>0?(li-=Tr,Tr*=1+Tr/li):Tr=0,Ge._id.charAt(0)!=="y"&&(Tr=-Tr),an[Wr]=Cn.p2r(Cn.r2p(pn[Wr])+Cr*Tr),Cn.autorange==="min"||Cn.autorange==="max reversed"?(an[0]=null,Cn._rangeInitial0=void 0,Cn._rangeInitial1=void 0):(Cn.autorange==="max"||Cn.autorange==="min reversed")&&(an[1]=null,Cn._rangeInitial0=void 0,Cn._rangeInitial1=void 0),Ot._insideTickLabelsUpdaterange[Cn._name+".range"]=an}var ri=x.syncOrAsync(cn);return ri&&ri.then&&Ye._promises.push(ri),ri};function Tt(Ye,Ge,Nt){var Ot=Ge._id+"divider",Qt=Nt.vals,tr=Nt.layer.selectAll("path."+Ot).data(Qt,ct);tr.exit().remove(),tr.enter().insert("path",":first-child").classed(Ot,1).classed("crisp",1).call(t.stroke,Ge.dividercolor).style("stroke-width",a.crispRound(Ye,Ge.dividerwidth,1)+"px"),tr.attr("transform",Nt.transFn).attr("d",Nt.path)}J.getPxPosition=function(Ye,Ge){var Nt=Ye._fullLayout._size,Ot=Ge._id.charAt(0),Qt=Ge.side,tr;if(Ge.anchor!=="free"?tr=Ge._anchorAxis:Ot==="x"?tr={_offset:Nt.t+(1-(Ge.position||0))*Nt.h,_length:0}:Ot==="y"&&(tr={_offset:Nt.l+(Ge.position||0)*Nt.w+Ge._shift,_length:0}),Qt==="top"||Qt==="left")return tr._offset;if(Qt==="bottom"||Qt==="right")return tr._offset+tr._length};function Bt(Ye){var Ge=Ye.title.font.size,Nt=(Ye.title.text.match(p.BR_TAG_ALL)||[]).length;return Ye.title.hasOwnProperty("standoff")?Nt?Ge*(j+Nt*te):Ge*j:Nt?Ge*(Nt+1)*te:Ge}function ir(Ye,Ge){var Nt=Ye._fullLayout,Ot=Ge._id,Qt=Ot.charAt(0),tr=Ge.title.font.size,fr;if(Ge.title.hasOwnProperty("standoff"))fr=Ge._depth+Ge.title.standoff+Bt(Ge);else{var rr=Jt(Ge);if(Ge.type==="multicategory")fr=Ge._depth;else{var Vt=1.5*tr;rr&&(Vt=.5*tr,Ge.ticks==="outside"&&(Vt+=Ge.ticklen)),fr=10+Vt+(Ge.linewidth?Ge.linewidth-1:0)}rr||(Qt==="x"?fr+=Ge.side==="top"?tr*(Ge.showticklabels?1:0):tr*(Ge.showticklabels?1.5:.5):fr+=Ge.side==="right"?tr*(Ge.showticklabels?1:.5):tr*(Ge.showticklabels?.5:0))}var dr=J.getPxPosition(Ye,Ge),mr,xr,pr;Qt==="x"?(xr=Ge._offset+Ge._length/2,pr=Ge.side==="top"?dr-fr:dr+fr):(pr=Ge._offset+Ge._length/2,xr=Ge.side==="right"?dr+fr:dr-fr,mr={rotate:"-90",offset:0});var Gr;if(Ge.type!=="multicategory"){var Pr=Ge._selections[Ge._id+"tick"];if(Gr={selection:Pr,side:Ge.side},Pr&&Pr.node()&&Pr.node().parentNode){var Dr=a.getTranslate(Pr.node().parentNode);Gr.offsetLeft=Dr.x,Gr.offsetTop=Dr.y}Ge.title.hasOwnProperty("standoff")&&(Gr.pad=0)}return Ge._titleStandoff=fr,r.draw(Ye,Ot+"title",{propContainer:Ge,propName:Ge._name+".title.text",placeholder:Nt._dfltTitle[Qt],avoid:Gr,transform:mr,attributes:{x:xr,y:pr,"text-anchor":"middle"}})}J.shouldShowZeroLine=function(Ye,Ge,Nt){var Ot=x.simpleMap(Ge.range,Ge.r2l);return Ot[0]*Ot[1]<=0&&Ge.zeroline&&(Ge.type==="linear"||Ge.type==="-")&&!(Ge.rangebreaks&&Ge.maskBreaks(0)===z)&&(pt(Ge,0)||!Xt(Ye,Ge,Nt,Ot)||Kt(Ye,Ge))},J.clipEnds=function(Ye,Ge){return Ge.filter(function(Nt){return pt(Ye,Nt.x)})};function pt(Ye,Ge){var Nt=Ye.l2p(Ge);return Nt>1&&Nt1)for(Qt=1;Qt=Qt.min&&Yeo*2}function n(l){return Math.max(1,(l-1)/1e3)}function f(l,m){for(var h=l.length,b=n(h),u=0,o=0,d={},w=0;wu*2}function c(l){return S(l[0])&&S(l[1])}},28336:function(H,U,e){var g=e(38248),C=e(24040),i=e(3400),S=e(31780),x=e(51272),v=e(94724),p=e(26332),r=e(25404),t=e(95936),a=e(42568),n=e(22416),f=e(42136),c=e(96312),l=e(78344),m=e(33816).WEEKDAY_PATTERN,h=e(33816).HOUR_PATTERN;H.exports=function(w,A,_,y,E){var T=y.letter,s=y.font||{},L=y.splomStash||{},M=_("visible",!y.visibleDflt),z=A._template||{},D=A.type||z.type||"-",N;if(D==="date"){var I=C.getComponentMethod("calendars","handleDefaults");I(w,A,"calendar",y.calendar),y.noTicklabelmode||(N=_("ticklabelmode"))}var k="";(!y.noTicklabelposition||D==="multicategory")&&(k=i.coerce(w,A,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:N==="period"?["outside","inside"]:T==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),y.noTicklabeloverflow||_("ticklabeloverflow",k.indexOf("inside")!==-1?"hide past domain":D==="category"||D==="multicategory"?"allow":"hide past div"),l(A,E),c(w,A,_,y),n(w,A,_,y),D!=="category"&&!y.noHover&&_("hoverformat");var B=_("color"),O=B!==v.color.dflt?B:s.color,V=L.label||E._dfltTitle[T];if(a(w,A,_,D,y),!M)return A;_("title.text",V),i.coerceFont(_,"title.font",{family:s.family,size:i.bigFont(s.size),color:O}),p(w,A,_,D);var Y=y.hasMinor;if(Y&&(S.newContainer(A,"minor"),p(w,A,_,D,{isMinor:!0})),t(w,A,_,D,y),r(w,A,_,y),Y){var j=y.isMinor;y.isMinor=!0,r(w,A,_,y),y.isMinor=j}f(w,A,_,{dfltColor:B,bgColor:y.bgColor,showGrid:y.showGrid,hasMinor:Y,attributes:v}),Y&&!A.minor.ticks&&!A.minor.showgrid&&delete A.minor,(A.showline||A.ticks)&&_("mirror");var te=D==="multicategory";if(!y.noTickson&&(D==="category"||te)&&(A.ticks||A.showgrid)){var ie;te&&(ie="boundaries");var ue=_("tickson",ie);ue==="boundaries"&&delete A.ticklabelposition}if(te){var J=_("showdividers");J&&(_("dividercolor"),_("dividerwidth"))}if(D==="date")if(x(w,A,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:b}),!A.rangebreaks.length)delete A.rangebreaks;else{for(var X=0;X=2){var T="",s,L;if(E.length===2){for(s=0;s<2;s++)if(L=o(E[s]),L){T=m;break}}var M=_("pattern",T);if(M===m)for(s=0;s<2;s++)L=o(E[s]),L&&(w.bounds[s]=E[s]=L-1);if(M)for(s=0;s<2;s++)switch(L=E[s],M){case m:if(!g(L)){w.enabled=!1;return}if(L=+L,L!==Math.floor(L)||L<0||L>=7){w.enabled=!1;return}w.bounds[s]=E[s]=L;break;case h:if(!g(L)){w.enabled=!1;return}if(L=+L,L<0||L>24){w.enabled=!1;return}w.bounds[s]=E[s]=L;break}if(A.autorange===!1){var z=A.range;if(z[0]z[1]){w.enabled=!1;return}}else if(E[0]>z[0]&&E[1]p?1:-1:+(S.substr(1)||1)-+(x.substr(1)||1)},U.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function i(S,x){if(x&&x.length){for(var v=0;v0||g(r),a;t&&(a="array");var n=v("categoryorder",a),f;n==="array"&&(f=v("categoryarray")),!t&&n==="array"&&(n=x.categoryorder="trace"),n==="trace"?x._initialCategories=[]:n==="array"?x._initialCategories=f.slice():(f=C(x,p).sort(),n==="category ascending"?x._initialCategories=f:n==="category descending"&&(x._initialCategories=f.reverse()))}}},98728:function(H,U,e){var g=e(38248),C=e(3400),i=e(39032),S=i.ONEDAY,x=i.ONEWEEK;U.dtick=function(v,p){var r=p==="log",t=p==="date",a=p==="category",n=t?S:1;if(!v)return n;if(g(v))return v=Number(v),v<=0?n:a?Math.max(1,Math.round(v)):t?Math.max(.1,v):v;if(typeof v!="string"||!(t||r))return n;var f=v.charAt(0),c=v.substr(1);return c=g(c)?Number(c):0,c<=0||!(t&&f==="M"&&c===Math.round(c)||r&&f==="L"||r&&f==="D"&&(c===1||c===2))?n:v},U.tick0=function(v,p,r,t){if(p==="date")return C.cleanDate(v,C.dateTick0(r,t%x===0?1:0));if(!(t==="D1"||t==="D2"))return g(v)?Number(v):0}},33816:function(H,U,e){var g=e(53756).counter;H.exports={idRegex:{x:g("x","( domain)?"),y:g("y","( domain)?")},attrRegex:g("[xy]axis"),xAxisMatch:g("xaxis"),yAxisMatch:g("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},71888:function(H,U,e){var g=e(3400),C=e(19280),i=e(79811).id2name,S=e(94724),x=e(21160),v=e(78344),p=e(39032).ALMOST_EQUAL,r=e(84284).FROM_BL;U.handleDefaults=function(h,b,u){var o=u.axIds,d=u.axHasImage,w=b._axisConstraintGroups=[],A=b._axisMatchGroups=[],_,y,E,T,s,L,M,z;for(_=0;_w?u.substr(w):o.substr(d))+A}function l(h,b){for(var u=b._size,o=u.h/u.w,d={},w=Object.keys(h),A=0;Ap*z&&!k)){for(w=0;wX&&neue&&(ue=ne);var ge=(ue-ie)/(2*J);s/=ge,ie=y.l2r(ie),ue=y.l2r(ue),y.range=y._input.range=Y=0){dr._fullLayout._deactivateShape(dr);return}var mr=dr._fullLayout.clickmode;if(X(dr),rr===2&&!Ve&&Ge(),Le)mr.indexOf("select")>-1&&E(Vt,dr,rt,Ke,ce.id,bt),mr.indexOf("event")>-1&&n.click(dr,Vt,ce.id);else if(rr===1&&Ve){var xr=be?ke:Ue,pr=be==="s"||Ae==="w"?0:1,Gr=xr._name+".range["+pr+"]",Pr=B(xr,pr),Dr="left",cn="middle";if(xr.fixedrange)return;be?(cn=be==="n"?"top":"bottom",xr.side==="right"&&(Dr="right")):Ae==="e"&&(Dr="right"),dr._context.showAxisRangeEntryBoxes&&g.select(mt).call(r.makeEditable,{gd:dr,immediate:!0,background:dr._fullLayout.paper_bgcolor,text:String(Pr),fill:xr.tickfont?xr.tickfont.color:"#444",horizontalAlign:Dr,verticalAlign:cn}).on("edit",function(rn){var Cn=xr.d2r(rn);Cn!==void 0&&v.call("_guiRelayout",dr,Gr,Cn)})}}l.init(bt);var ct,Tt,Bt,ir,pt,Xt,Kt,or,$t,gt;function st(rr,Vt,dr){var mr=mt.getBoundingClientRect();ct=Vt-mr.left,Tt=dr-mr.top,ne._fullLayout._calcInverseTransform(ne);var xr=C.apply3DTransform(ne._fullLayout._invTransform)(ct,Tt);ct=xr[0],Tt=xr[1],Bt={l:ct,r:ct,w:0,t:Tt,b:Tt,h:0},ir=ne._hmpixcount?ne._hmlumcount/ne._hmpixcount:S(ne._fullLayout.plot_bgcolor).getLuminance(),pt="M0,0H"+ht+"V"+dt+"H0V0",Xt=!1,Kt="xy",gt=!1,or=te(me,ir,$e,lt,pt),$t=ie(me,$e,lt)}function At(rr,Vt){if(ne._transitioningWithDuration)return!1;var dr=Math.max(0,Math.min(ht,Me*rr+ct)),mr=Math.max(0,Math.min(dt,Ne*Vt+Tt)),xr=Math.abs(dr-ct),pr=Math.abs(mr-Tt);Bt.l=Math.min(ct,dr),Bt.r=Math.max(ct,dr),Bt.t=Math.min(Tt,mr),Bt.b=Math.max(Tt,mr);function Gr(){Kt="",Bt.r=Bt.l,Bt.t=Bt.b,$t.attr("d","M0,0Z")}if(xt.isSubplotConstrained)xr>M||pr>M?(Kt="xy",xr/ht>pr/dt?(pr=xr*dt/ht,Tt>mr?Bt.t=Tt-pr:Bt.b=Tt+pr):(xr=pr*ht/dt,ct>dr?Bt.l=ct-xr:Bt.r=ct+xr),$t.attr("d",oe(Bt))):Gr();else if(St.isSubplotConstrained)if(xr>M||pr>M){Kt="xy";var Pr=Math.min(Bt.l/ht,(dt-Bt.b)/dt),Dr=Math.max(Bt.r/ht,(dt-Bt.t)/dt);Bt.l=Pr*ht,Bt.r=Dr*ht,Bt.b=(1-Pr)*dt,Bt.t=(1-Dr)*dt,$t.attr("d",oe(Bt))}else Gr();else!ze||pr0){var rn;if(St.isSubplotConstrained||!nt&&ze.length===1){for(rn=0;rn1&&(Gr.maxallowed!==void 0&&Je===(Gr.range[0]1&&(Pr.maxallowed!==void 0&&We===(Pr.range[0]=0?Math.min(ne,.9):1/(1/Math.max(ne,-.3)+3.222))}function j(ne,ce,ge){return ne?ne==="nsew"?ge?"":ce==="pan"?"move":"crosshair":ne.toLowerCase()+"-resize":"pointer"}function te(ne,ce,ge,Te,we){return ne.append("path").attr("class","zoombox").style({fill:ce>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",p(ge,Te)).attr("d",we+"Z")}function ie(ne,ce,ge){return ne.append("path").attr("class","zoombox-corners").style({fill:t.background,stroke:t.defaultLine,"stroke-width":1,opacity:0}).attr("transform",p(ce,ge)).attr("d","M0,0Z")}function ue(ne,ce,ge,Te,we,Re){ne.attr("d",Te+"M"+ge.l+","+ge.t+"v"+ge.h+"h"+ge.w+"v-"+ge.h+"h-"+ge.w+"Z"),J(ne,ce,we,Re)}function J(ne,ce,ge,Te){ge||(ne.transition().style("fill",Te>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ce.transition().style("opacity",1).duration(200))}function X(ne){g.select(ne).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function ee(ne){z&&ne.data&&ne._context.showTips&&(C.notifier(C._(ne,"Double-click to zoom back out"),"long"),z=!1)}function G(ne,ce){return"M"+(ne.l-.5)+","+(ce-M-.5)+"h-3v"+(2*M+1)+"h3ZM"+(ne.r+.5)+","+(ce-M-.5)+"h3v"+(2*M+1)+"h-3Z"}function Q(ne,ce){return"M"+(ce-M-.5)+","+(ne.t-.5)+"v-3h"+(2*M+1)+"v3ZM"+(ce-M-.5)+","+(ne.b+.5)+"v3h"+(2*M+1)+"v-3Z"}function oe(ne){var ce=Math.floor(Math.min(ne.b-ne.t,ne.r-ne.l,M)/2);return"M"+(ne.l-3.5)+","+(ne.t-.5+ce)+"h3v"+-ce+"h"+ce+"v-3h-"+(ce+3)+"ZM"+(ne.r+3.5)+","+(ne.t-.5+ce)+"h-3v"+-ce+"h"+-ce+"v-3h"+(ce+3)+"ZM"+(ne.r+3.5)+","+(ne.b+.5-ce)+"h-3v"+ce+"h"+-ce+"v3h"+(ce+3)+"ZM"+(ne.l-3.5)+","+(ne.b+.5-ce)+"h3v"+ce+"h"+ce+"v3h-"+(ce+3)+"Z"}function $(ne,ce,ge,Te,we){for(var Re=!1,be={},Ae={},me,Le,Ve,Ue,ke=(we||{}).xaHash,He=(we||{}).yaHash,Ie=0;Ie_[1]-.000244140625&&(x.domain=l),C.noneOrAll(S.domain,x.domain,l),x.tickmode==="sync"&&(x.tickmode="auto")}return v("layer"),x}},42568:function(H,U,e){var g=e(85024);H.exports=function(i,S,x,v,p){p||(p={});var r=p.tickSuffixDflt,t=g(i),a=x("tickprefix");a&&x("showtickprefix",t);var n=x("ticksuffix",r);n&&x("showticksuffix",t)}},96312:function(H,U,e){var g=e(76808);H.exports=function(i,S,x,v){var p=S._template||{},r=S.type||p.type||"-";x("minallowed"),x("maxallowed");var t=x("range");if(!t){var a;!v.noInsiderange&&r!=="log"&&(a=x("insiderange"),a&&(a[0]===null||a[1]===null)&&(S.insiderange=!1,a=void 0),a&&(t=x("range",a)))}var n=S.getAutorangeDflt(t,v),f=x("autorange",n),c;t&&(t[0]===null&&t[1]===null||(t[0]===null||t[1]===null)&&(f==="reversed"||f===!0)||t[0]!==null&&(f==="min"||f==="max reversed")||t[1]!==null&&(f==="max"||f==="min reversed"))&&(t=void 0,delete S.range,S.autorange=!0,c=!0),c||(n=S.getAutorangeDflt(t,v),f=x("autorange",n)),f&&(g(x,f,t),(r==="linear"||r==="-")&&x("rangemode")),S.cleanRange()}},21160:function(H,U,e){var g=e(84284).FROM_BL;H.exports=function(i,S,x){x===void 0&&(x=g[i.constraintoward||"center"]);var v=[i.r2l(i.range[0]),i.r2l(i.range[1])],p=v[0]+(v[1]-v[0])*x;i.range=i._input.range=[i.l2r(p+(v[0]-p)*S),i.l2r(p+(v[1]-p)*S)],i.setScale()}},78344:function(H,U,e){var g=e(33428),C=e(94336).E9,i=e(3400),S=i.numberFormat,x=e(38248),v=i.cleanNumber,p=i.ms2DateTime,r=i.dateTime2ms,t=i.ensureNumber,a=i.isArrayOrTypedArray,n=e(39032),f=n.FP_SAFE,c=n.BADNUM,l=n.LOG_CLIP,m=n.ONEWEEK,h=n.ONEDAY,b=n.ONEHOUR,u=n.ONEMIN,o=n.ONESEC,d=e(79811),w=e(33816),A=w.HOUR_PATTERN,_=w.WEEKDAY_PATTERN;function y(T){return Math.pow(10,T)}function E(T){return T!=null}H.exports=function(s,L){L=L||{};var M=s._id||"x",z=M.charAt(0);function D(G,Q){if(G>0)return Math.log(G)/Math.LN10;if(G<=0&&Q&&s.range&&s.range.length===2){var oe=s.range[0],$=s.range[1];return .5*(oe+$-2*l*Math.abs(oe-$))}else return c}function N(G,Q,oe,$){if(($||{}).msUTC&&x(G))return+G;var Z=r(G,oe||s.calendar);if(Z===c)if(x(G)){G=+G;var se=Math.floor(i.mod(G+.05,1)*10),ne=Math.round(G-se/10);Z=r(new Date(ne))+se/10}else return c;return Z}function I(G,Q,oe){return p(G,Q,oe||s.calendar)}function k(G){return s._categories[Math.round(G)]}function B(G){if(E(G)){if(s._categoriesMap===void 0&&(s._categoriesMap={}),s._categoriesMap[G]!==void 0)return s._categoriesMap[G];s._categories.push(typeof G=="number"?String(G):G);var Q=s._categories.length-1;return s._categoriesMap[G]=Q,Q}return c}function O(G,Q){for(var oe=new Array(Q),$=0;$s.range[1]&&(oe=!oe);for(var $=oe?-1:1,Z=$*G,se=0,ne=0;nege)se=ne+1;else{se=Z<(ce+ge)/2?ne:ne+1;break}}var Te=s._B[se]||0;return isFinite(Te)?te(G,s._m2,Te):0},J=function(G){var Q=s._rangebreaks.length;if(!Q)return ie(G,s._m,s._b);for(var oe=0,$=0;$s._rangebreaks[$].pmax&&(oe=$+1);return ie(G,s._m2,s._B[oe])}}s.c2l=s.type==="log"?D:t,s.l2c=s.type==="log"?y:t,s.l2p=ue,s.p2l=J,s.c2p=s.type==="log"?function(G,Q){return ue(D(G,Q))}:ue,s.p2c=s.type==="log"?function(G){return y(J(G))}:J,["linear","-"].indexOf(s.type)!==-1?(s.d2r=s.r2d=s.d2c=s.r2c=s.d2l=s.r2l=v,s.c2d=s.c2r=s.l2d=s.l2r=t,s.d2p=s.r2p=function(G){return s.l2p(v(G))},s.p2d=s.p2r=J,s.cleanPos=t):s.type==="log"?(s.d2r=s.d2l=function(G,Q){return D(v(G),Q)},s.r2d=s.r2c=function(G){return y(v(G))},s.d2c=s.r2l=v,s.c2d=s.l2r=t,s.c2r=D,s.l2d=y,s.d2p=function(G,Q){return s.l2p(s.d2r(G,Q))},s.p2d=function(G){return y(J(G))},s.r2p=function(G){return s.l2p(v(G))},s.p2r=J,s.cleanPos=t):s.type==="date"?(s.d2r=s.r2d=i.identity,s.d2c=s.r2c=s.d2l=s.r2l=N,s.c2d=s.c2r=s.l2d=s.l2r=I,s.d2p=s.r2p=function(G,Q,oe){return s.l2p(N(G,0,oe))},s.p2d=s.p2r=function(G,Q,oe){return I(J(G),Q,oe)},s.cleanPos=function(G){return i.cleanDate(G,c,s.calendar)}):s.type==="category"?(s.d2c=s.d2l=B,s.r2d=s.c2d=s.l2d=k,s.d2r=s.d2l_noadd=Y,s.r2c=function(G){var Q=j(G);return Q!==void 0?Q:s.fraction2r(.5)},s.l2r=s.c2r=t,s.r2l=j,s.d2p=function(G){return s.l2p(s.r2c(G))},s.p2d=function(G){return k(J(G))},s.r2p=s.d2p,s.p2r=J,s.cleanPos=function(G){return typeof G=="string"&&G!==""?G:t(G)}):s.type==="multicategory"&&(s.r2d=s.c2d=s.l2d=k,s.d2r=s.d2l_noadd=Y,s.r2c=function(G){var Q=Y(G);return Q!==void 0?Q:s.fraction2r(.5)},s.r2c_just_indices=V,s.l2r=s.c2r=t,s.r2l=Y,s.d2p=function(G){return s.l2p(s.r2c(G))},s.p2d=function(G){return k(J(G))},s.r2p=s.d2p,s.p2r=J,s.cleanPos=function(G){return Array.isArray(G)||typeof G=="string"&&G!==""?G:t(G)},s.setupMultiCategory=function(G){var Q=s._traceIndices,oe,$,Z=s._matchGroup;if(Z&&s._categories.length===0){for(var se in Z)if(se!==M){var ne=L[d.id2name(se)];Q=Q.concat(ne._traceIndices)}}var ce=[[0,{}],[0,{}]],ge=[];for(oe=0;oene[1]&&($[se?0:1]=oe),$[0]===$[1]){var ce=s.l2r(Q),ge=s.l2r(oe);if(Q!==void 0){var Te=ce+1;oe!==void 0&&(Te=Math.min(Te,ge)),$[se?1:0]=Te}if(oe!==void 0){var we=ge+1;Q!==void 0&&(we=Math.max(we,ce)),$[se?0:1]=we}}}},s.cleanRange=function(G,Q){s._cleanRange(G,Q),s.limitRange(G)},s._cleanRange=function(G,Q){Q||(Q={}),G||(G="range");var oe=i.nestedProperty(s,G).get(),$,Z;if(s.type==="date"?Z=i.dfltRange(s.calendar):z==="y"?Z=w.DFLTRANGEY:s._name==="realaxis"?Z=[0,1]:Z=Q.dfltRange||w.DFLTRANGEX,Z=Z.slice(),(s.rangemode==="tozero"||s.rangemode==="nonnegative")&&(Z[0]=0),!oe||oe.length!==2){i.nestedProperty(s,G).set(Z);return}var se=oe[0]===null,ne=oe[1]===null;for(s.type==="date"&&!s.autorange&&(oe[0]=i.cleanDate(oe[0],c,s.calendar),oe[1]=i.cleanDate(oe[1],c,s.calendar)),$=0;$<2;$++)if(s.type==="date"){if(!i.isDateTime(oe[$],s.calendar)){s[G]=Z;break}if(s.r2l(oe[0])===s.r2l(oe[1])){var ce=i.constrain(s.r2l(oe[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);oe[0]=s.l2r(ce-1e3),oe[1]=s.l2r(ce+1e3);break}}else{if(!x(oe[$]))if(!(se||ne)&&x(oe[1-$]))oe[$]=oe[1-$]*($?10:.1);else{s[G]=Z;break}if(oe[$]<-f?oe[$]=-f:oe[$]>f&&(oe[$]=f),oe[0]===oe[1]){var ge=Math.max(1,Math.abs(oe[0]*1e-6));oe[0]-=ge,oe[1]+=ge}}},s.setScale=function(G){var Q=L._size;if(s.overlaying){var oe=d.getFromId({_fullLayout:L},s.overlaying);s.domain=oe.domain}var $=G&&s._r?"_r":"range",Z=s.calendar;s.cleanRange($);var se=s.r2l(s[$][0],Z),ne=s.r2l(s[$][1],Z),ce=z==="y";if(ce?(s._offset=Q.t+(1-s.domain[1])*Q.h,s._length=Q.h*(s.domain[1]-s.domain[0]),s._m=s._length/(se-ne),s._b=-s._m*ne):(s._offset=Q.l+s.domain[0]*Q.w,s._length=Q.w*(s.domain[1]-s.domain[0]),s._m=s._length/(ne-se),s._b=-s._m*se),s._rangebreaks=[],s._lBreaks=0,s._m2=0,s._B=[],s.rangebreaks){var ge,Te;if(s._rangebreaks=s.locateBreaks(Math.min(se,ne),Math.max(se,ne)),s._rangebreaks.length){for(ge=0;gene&&(we=!we),we&&s._rangebreaks.reverse();var Re=we?-1:1;for(s._m2=Re*s._length/(Math.abs(ne-se)-s._lBreaks),s._B.push(-s._m2*(ce?ne:se)),ge=0;geZ&&(Z+=7,se<$&&(se+=7));break;case A:ne=new Date(G);var we=ne.getUTCHours(),Re=ne.getUTCMinutes(),be=ne.getUTCSeconds(),Ae=ne.getUTCMilliseconds();se=we+(Re/60+be/3600+Ae/36e5),$>Z&&(Z+=24,se<$&&(se+=24));break;case"":se=G;break}if(se>=$&&se=$&&G=Ke.min&&(keKe.max&&(Ke.max=He),Ie=!1)}Ie&&ne.push({min:ke,max:He})}};for(oe=0;oe rect").call(S.setTranslate,0,0).call(S.setScale,1,1),A.plot.call(S.setTranslate,_._offset,y._offset).call(S.setScale,1,1);var E=A.plot.selectAll(".scatterlayer .trace");E.selectAll(".point").call(S.setPointGroupScale,1,1),E.selectAll(".textpoint").call(S.setTextPointsScale,1,1),E.call(S.hideOutsideRangePoints,A)}function c(A,_){var y=A.plotinfo,E=y.xaxis,T=y.yaxis,s=E._length,L=T._length,M=!!A.xr1,z=!!A.yr1,D=[];if(M){var N=i.simpleMap(A.xr0,E.r2l),I=i.simpleMap(A.xr1,E.r2l),k=N[1]-N[0],B=I[1]-I[0];D[0]=(N[0]*(1-_)+_*I[0]-N[0])/(N[1]-N[0])*s,D[2]=s*(1-_+_*B/k),E.range[0]=E.l2r(N[0]*(1-_)+_*I[0]),E.range[1]=E.l2r(N[1]*(1-_)+_*I[1])}else D[0]=0,D[2]=s;if(z){var O=i.simpleMap(A.yr0,T.r2l),V=i.simpleMap(A.yr1,T.r2l),Y=O[1]-O[0],j=V[1]-V[0];D[1]=(O[1]*(1-_)+_*V[1]-O[1])/(O[0]-O[1])*L,D[3]=L*(1-_+_*j/Y),T.range[0]=E.l2r(O[0]*(1-_)+_*V[0]),T.range[1]=T.l2r(O[1]*(1-_)+_*V[1])}else D[1]=0,D[3]=L;x.drawOne(p,E,{skipTitle:!0}),x.drawOne(p,T,{skipTitle:!0}),x.redrawComponents(p,[E._id,T._id]);var te=M?s/D[2]:1,ie=z?L/D[3]:1,ue=M?D[0]:0,J=z?D[1]:0,X=M?D[0]/D[2]*s:0,ee=z?D[1]/D[3]*L:0,G=E._offset-X,Q=T._offset-ee;y.clipRect.call(S.setTranslate,ue,J).call(S.setScale,1/te,1/ie),y.plot.call(S.setTranslate,G,Q).call(S.setScale,te,ie),S.setPointGroupScale(y.zoomScalePts,1/te,1/ie),S.setTextPointsScale(y.zoomScaleTxt,1/te,1/ie)}var l;a&&(l=a());function m(){for(var A={},_=0;_t.duration?(m(),o=window.cancelAnimationFrame(w)):o=window.requestAnimationFrame(w)}return b=Date.now(),o=window.requestAnimationFrame(w),Promise.resolve()}},14944:function(H,U,e){var g=e(24040).traceIs,C=e(52976);H.exports=function(r,t,a,n){a("autotypenumbers",n.autotypenumbersDflt);var f=a("type",(n.splomStash||{}).type);f==="-"&&(i(t,n.data),t.type==="-"?t.type="linear":r.type=t.type)};function i(p,r){if(p.type==="-"){var t=p._id,a=t.charAt(0),n;t.indexOf("scene")!==-1&&(t=a);var f=S(r,t,a);if(f){if(f.type==="histogram"&&a==={v:"y",h:"x"}[f.orientation||"v"]){p.type="linear";return}var c=a+"calendar",l=f[c],m={noMultiCategory:!g(f,"cartesian")||g(f,"noMultiCategory")};if(f.type==="box"&&f._hasPreCompStats&&a==={h:"x",v:"y"}[f.orientation||"v"]&&(m.noMultiCategory=!0),m.autotypenumbers=p.autotypenumbers,v(f,a)){var h=x(f),b=[];for(n=0;n0&&(n["_"+t+"axes"]||{})[r])return n;if((n[t+"axis"]||t)===r){if(v(n,t))return n;if((n[t]||[]).length||n[t+"0"])return n}}}function x(p){return{v:"x",h:"y"}[p.orientation||"v"]}function v(p,r){var t=x(p),a=g(p,"box-violin"),n=g(p._fullInput||{},"candlestick");return a&&!n&&r===t&&p[t]===void 0&&p[t+"0"]===void 0}},62460:function(H,U,e){var g=e(24040),C=e(3400);U.manageCommandObserver=function(r,t,a,n){var f={},c=!0;t&&t._commandObserver&&(f=t._commandObserver),f.cache||(f.cache={}),f.lookupTable={};var l=U.hasSimpleAPICommandBindings(r,a,f.lookupTable);if(t&&t._commandObserver){if(l)return f;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,f}if(l){i(r,l,f.cache),f.check=function(){if(c){var u=i(r,l,f.cache);return u.changed&&n&&f.lookupTable[u.value]!==void 0&&(f.disable(),Promise.resolve(n({value:u.value,type:l.type,prop:l.prop,traces:l.traces,index:f.lookupTable[u.value]})).then(f.enable,f.enable)),u.changed}};for(var m=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h0?".":"")+f;C.isPlainObject(c)?p(c,t,l,n+1):t(l,f,c)}})}},86968:function(H,U,e){var g=e(92880).extendFlat;U.u=function(C,i){C=C||{},i=i||{};var S={valType:"info_array",editType:C.editType,items:[{valType:"number",min:0,max:1,editType:C.editType},{valType:"number",min:0,max:1,editType:C.editType}],dflt:[0,1]};C.name&&C.name+"",C.trace,i.description&&""+i.description;var x={x:g({},S,{}),y:g({},S,{}),editType:C.editType};return C.noGridCell||(x.row={valType:"integer",min:0,dflt:0,editType:C.editType},x.column={valType:"integer",min:0,dflt:0,editType:C.editType}),x},U.Q=function(C,i,S,x){var v=x&&x.x||[0,1],p=x&&x.y||[0,1],r=i.grid;if(r){var t=S("domain.column");t!==void 0&&(t0&&B._module.calcGeoJSON(k,z)}if(!D){var O=this.updateProjection(M,z);if(O)return;(!this.viewInitial||this.scope!==N.scope)&&this.saveViewInitial(N)}this.scope=N.scope,this.updateBaseLayers(z,N),this.updateDims(z,N),this.updateFx(z,N),f.generalUpdatePerTraceModule(this.graphDiv,this,M,N);var V=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=V.selectAll(".point"),this.dataPoints.text=V.selectAll("text"),this.dataPaths.line=V.selectAll(".js-line");var Y=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=Y.selectAll("path"),this._render()},E.updateProjection=function(M,z){var D=this.graphDiv,N=z[this.id],I=z._size,k=N.domain,B=N.projection,O=N.lonaxis,V=N.lataxis,Y=O._ax,j=V._ax,te=this.projection=T(N),ie=[[I.l+I.w*k.x[0],I.t+I.h*(1-k.y[1])],[I.l+I.w*k.x[1],I.t+I.h*(1-k.y[0])]],ue=N.center||{},J=B.rotation||{},X=O.range||[],ee=V.range||[];if(N.fitbounds){Y._length=ie[1][0]-ie[0][0],j._length=ie[1][1]-ie[0][1],Y.range=l(D,Y),j.range=l(D,j);var G=(Y.range[0]+Y.range[1])/2,Q=(j.range[0]+j.range[1])/2;if(N._isScoped)ue={lon:G,lat:Q};else if(N._isClipped){ue={lon:G,lat:Q},J={lon:G,lat:Q,roll:J.roll};var oe=B.type,$=d.lonaxisSpan[oe]/2||180,Z=d.lataxisSpan[oe]/2||90;X=[G-$,G+$],ee=[Q-Z,Q+Z]}else ue={lon:G,lat:Q},J={lon:G,lat:J.lat,roll:J.roll}}te.center([ue.lon-J.lon,ue.lat-J.lat]).rotate([-J.lon,-J.lat,J.roll]).parallels(B.parallels);var se=L(X,ee);te.fitExtent(ie,se);var ne=this.bounds=te.getBounds(se),ce=this.fitScale=te.scale(),ge=te.translate();if(N.fitbounds){var Te=te.getBounds(L(Y.range,j.range)),we=Math.min((ne[1][0]-ne[0][0])/(Te[1][0]-Te[0][0]),(ne[1][1]-ne[0][1])/(Te[1][1]-Te[0][1]));isFinite(we)?te.scale(we*ce):p.warn("Something went wrong during"+this.id+"fitbounds computations.")}else te.scale(B.scale*ce);var Re=this.midPt=[(ne[0][0]+ne[1][0])/2,(ne[0][1]+ne[1][1])/2];if(te.translate([ge[0]+(Re[0]-ge[0]),ge[1]+(Re[1]-ge[1])]).clipExtent(ne),N._isAlbersUsa){var be=te([ue.lon,ue.lat]),Ae=te.translate();te.translate([Ae[0]-(be[0]-Ae[0]),Ae[1]-(be[1]-Ae[1])])}},E.updateBaseLayers=function(M,z){var D=this,N=D.topojson,I=D.layers,k=D.basePaths;function B(ie){return ie==="lonaxis"||ie==="lataxis"}function O(ie){return!!d.lineLayers[ie]}function V(ie){return!!d.fillLayers[ie]}var Y=this.hasChoropleth?d.layersForChoropleth:d.layers,j=Y.filter(function(ie){return O(ie)||V(ie)?z["show"+ie]:B(ie)?z[ie].showgrid:!0}),te=D.framework.selectAll(".layer").data(j,String);te.exit().each(function(ie){delete I[ie],delete k[ie],g.select(this).remove()}),te.enter().append("g").attr("class",function(ie){return"layer "+ie}).each(function(ie){var ue=I[ie]=g.select(this);ie==="bg"?D.bgRect=ue.append("rect").style("pointer-events","all"):B(ie)?k[ie]=ue.append("path").style("fill","none"):ie==="backplot"?ue.append("g").classed("choroplethlayer",!0):ie==="frontplot"?ue.append("g").classed("scatterlayer",!0):O(ie)?k[ie]=ue.append("path").style("fill","none").style("stroke-miterlimit",2):V(ie)&&(k[ie]=ue.append("path").style("stroke","none"))}),te.order(),te.each(function(ie){var ue=k[ie],J=d.layerNameToAdjective[ie];ie==="frame"?ue.datum(d.sphereSVG):O(ie)||V(ie)?ue.datum(_(N,N.objects[ie])):B(ie)&&ue.datum(s(ie,z,M)).call(t.stroke,z[ie].gridcolor).call(a.dashLine,z[ie].griddash,z[ie].gridwidth),O(ie)?ue.call(t.stroke,z[J+"color"]).call(a.dashLine,"",z[J+"width"]):V(ie)&&ue.call(t.fill,z[J+"color"])})},E.updateDims=function(M,z){var D=this.bounds,N=(z.framewidth||0)/2,I=D[0][0]-N,k=D[0][1]-N,B=D[1][0]-I+N,O=D[1][1]-k+N;a.setRect(this.clipRect,I,k,B,O),this.bgRect.call(a.setRect,I,k,B,O).call(t.fill,z.bgcolor),this.xaxis._offset=I,this.xaxis._length=B,this.yaxis._offset=k,this.yaxis._length=O},E.updateFx=function(M,z){var D=this,N=D.graphDiv,I=D.bgRect,k=M.dragmode,B=M.clickmode;if(D.isStatic)return;function O(){var te=D.viewInitial,ie={};for(var ue in te)ie[D.id+"."+ue]=te[ue];v.call("_guiRelayout",N,ie),N.emit("plotly_doubleclick",null)}function V(te){return D.projection.invert([te[0]+D.xaxis._offset,te[1]+D.yaxis._offset])}var Y=function(te,ie){if(ie.isRect){var ue=te.range={};ue[D.id]=[V([ie.xmin,ie.ymin]),V([ie.xmax,ie.ymax])]}else{var J=te.lassoPoints={};J[D.id]=ie.map(V)}},j={element:D.bgRect.node(),gd:N,plotinfo:{id:D.id,xaxis:D.xaxis,yaxis:D.yaxis,fillRangeItems:Y},xaxes:[D.xaxis],yaxes:[D.yaxis],subplot:D.id,clickFn:function(te){te===2&&b(N)}};k==="pan"?(I.node().onmousedown=null,I.call(o(D,z)),I.on("dblclick.zoom",O),N._context._scrollZoom.geo||I.on("wheel.zoom",null)):(k==="select"||k==="lasso")&&(I.on(".zoom",null),j.prepFn=function(te,ie,ue){h(te,ie,ue,j,k)},m.init(j)),I.on("mousemove",function(){var te=D.projection.invert(p.getPositionFromD3Event());if(!te)return m.unhover(N,g.event);D.xaxis.p2c=function(){return te[0]},D.yaxis.p2c=function(){return te[1]},n.hover(N,g.event,D.id)}),I.on("mouseout",function(){N._dragging||m.unhover(N,g.event)}),I.on("click",function(){k!=="select"&&k!=="lasso"&&(B.indexOf("select")>-1&&u(g.event,N,[D.xaxis],[D.yaxis],D.id,j),B.indexOf("event")>-1&&n.click(N,g.event))})},E.makeFramework=function(){var M=this,z=M.graphDiv,D=z._fullLayout,N="clip"+D._uid+M.id;M.clipDef=D._clips.append("clipPath").attr("id",N),M.clipRect=M.clipDef.append("rect"),M.framework=g.select(M.container).append("g").attr("class","geo "+M.id).call(a.setClipUrl,N,z),M.project=function(I){var k=M.projection(I);return k?[k[0]-M.xaxis._offset,k[1]-M.yaxis._offset]:[null,null]},M.xaxis={_id:"x",c2p:function(I){return M.project(I)[0]}},M.yaxis={_id:"y",c2p:function(I){return M.project(I)[1]}},M.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(M.mockAxis,D)},E.saveViewInitial=function(M){var z=M.center||{},D=M.projection,N=D.rotation||{};this.viewInitial={fitbounds:M.fitbounds,"projection.scale":D.scale};var I;M._isScoped?I={"center.lon":z.lon,"center.lat":z.lat}:M._isClipped?I={"projection.rotation.lon":N.lon,"projection.rotation.lat":N.lat}:I={"center.lon":z.lon,"center.lat":z.lat,"projection.rotation.lon":N.lon},p.extendFlat(this.viewInitial,I)},E.render=function(M){this._hasMarkerAngles&&M?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},E._render=function(){var M=this.projection,z=M.getPath(),D;function N(k){var B=M(k.lonlat);return B?r(B[0],B[1]):null}function I(k){return M.isLonLatOverEdges(k.lonlat)?"none":null}for(D in this.basePaths)this.basePaths[D].attr("d",z);for(D in this.dataPaths)this.dataPaths[D].attr("d",function(k){return z(k.geojson)});for(D in this.dataPoints)this.dataPoints[D].attr("display",I).attr("transform",N)};function T(M){var z=M.projection,D=z.type,N=d.projNames[D];N="geo"+p.titleCase(N);for(var I=C[N]||x[N],k=I(),B=M._isSatellite?Math.acos(1/z.distance)*180/Math.PI:M._isClipped?d.lonaxisSpan[D]/2:null,O=["center","rotate","parallels","clipExtent"],V=function(te){return te?k:[]},Y=0;YJ}else return!1},k.getPath=function(){return i().projection(k)},k.getBounds=function(te){return k.getPath().bounds(te)},k.precision(d.precision),M._isSatellite&&k.tilt(z.tilt).distance(z.distance),B&&k.clipAngle(B-d.clipPad),k}function s(M,z,D){var N=1e-6,I=2.5,k=z[M],B=d.scopeDefaults[z.scope],O,V,Y;M==="lonaxis"?(O=B.lonaxisRange,V=B.lataxisRange,Y=function(Q,oe){return[Q,oe]}):M==="lataxis"&&(O=B.lataxisRange,V=B.lonaxisRange,Y=function(Q,oe){return[oe,Q]});var j={type:"linear",range:[O[0],O[1]-N],tick0:k.tick0,dtick:k.dtick};c.setConvert(j,D);var te=c.calcTicks(j);!z.isScoped&&M==="lonaxis"&&te.pop();for(var ie=te.length,ue=new Array(ie),J=0;J0&&I<0&&(I+=360);var O=(I-N)/4;return{type:"Polygon",coordinates:[[[N,k],[N,B],[N+O,B],[N+2*O,B],[N+3*O,B],[I,B],[I,k],[I-O,k],[I-2*O,k],[I-3*O,k],[N,k]]]}}},10816:function(H,U,e){var g=e(84888).KY,C=e(3400).counterRegex,i=e(43520),S="geo",x=C(S),v={};v[S]={valType:"subplotid",dflt:S,editType:"calc"};function p(a){for(var n=a._fullLayout,f=a.calcdata,c=n._subplots[S],l=0;l0&&V<0&&(V+=360);var Y=(O+V)/2,j;if(!u){var te=o?h.projRotate:[Y,0,0];j=a("projection.rotation.lon",te[0]),a("projection.rotation.lat",te[1]),a("projection.rotation.roll",te[2]),E=a("showcoastlines",!o&&y),E&&(a("coastlinecolor"),a("coastlinewidth")),E=a("showocean",y?void 0:!1),E&&a("oceancolor")}var ie,ue;if(u?(ie=-96.6,ue=38.7):(ie=o?Y:j,ue=(B[0]+B[1])/2),a("center.lon",ie),a("center.lat",ue),d&&(a("projection.tilt"),a("projection.distance")),w){var J=h.projParallels||[0,60];a("projection.parallels",J)}a("projection.scale"),E=a("showland",y?void 0:!1),E&&a("landcolor"),E=a("showlakes",y?void 0:!1),E&&a("lakecolor"),E=a("showrivers",y?void 0:!1),E&&(a("rivercolor"),a("riverwidth")),E=a("showcountries",o&&m!=="usa"&&y),E&&(a("countrycolor"),a("countrywidth")),(m==="usa"||m==="north america"&&l===50)&&(a("showsubunits",y),a("subunitcolor"),a("subunitwidth")),o||(E=a("showframe",y),E&&(a("framecolor"),a("framewidth"))),a("bgcolor");var X=a("fitbounds");X&&(delete t.projection.scale,o?(delete t.center.lon,delete t.center.lat):A?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}},79248:function(H,U,e){var g=e(33428),C=e(3400),i=e(24040),S=Math.PI/180,x=180/Math.PI,v={cursor:"pointer"},p={cursor:"auto"};function r(s,L){var M=s.projection,z;return L._isScoped?z=n:L._isClipped?z=c:z=f,z(s,M)}H.exports=r;function t(s,L){return g.behavior.zoom().translate(L.translate()).scale(L.scale())}function a(s,L,M){var z=s.id,D=s.graphDiv,N=D.layout,I=N[z],k=D._fullLayout,B=k[z],O={},V={};function Y(j,te){O[z+"."+j]=C.nestedProperty(I,j).get(),i.call("_storeDirectGUIEdit",N,k._preGUI,O);var ie=C.nestedProperty(B,j);ie.get()!==te&&(ie.set(te),C.nestedProperty(I,j).set(te),V[z+"."+j]=te)}M(Y),Y("projection.scale",L.scale()/s.fitScale),Y("fitbounds",!1),D.emit("plotly_relayout",V)}function n(s,L){var M=t(s,L);function z(){g.select(this).style(v)}function D(){L.scale(g.event.scale).translate(g.event.translate),s.render(!0);var k=L.invert(s.midPt);s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.center.lon":k[0],"geo.center.lat":k[1]})}function N(k){var B=L.invert(s.midPt);k("center.lon",B[0]),k("center.lat",B[1])}function I(){g.select(this).style(p),a(s,L,N)}return M.on("zoomstart",z).on("zoom",D).on("zoomend",I),M}function f(s,L){var M=t(s,L),z=2,D,N,I,k,B,O,V,Y,j;function te(G){return L.invert(G)}function ie(G){var Q=te(G);if(!Q)return!0;var oe=L(Q);return Math.abs(oe[0]-G[0])>z||Math.abs(oe[1]-G[1])>z}function ue(){g.select(this).style(v),D=g.mouse(this),N=L.rotate(),I=L.translate(),k=N,B=te(D)}function J(){if(O=g.mouse(this),ie(D)){M.scale(L.scale()),M.translate(L.translate());return}L.scale(g.event.scale),L.translate([I[0],g.event.translate[1]]),B?te(O)&&(Y=te(O),V=[k[0]+(Y[0]-B[0]),N[1],N[2]],L.rotate(V),k=V):(D=O,B=te(D)),j=!0,s.render(!0);var G=L.rotate(),Q=L.invert(s.midPt);s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.center.lon":Q[0],"geo.center.lat":Q[1],"geo.projection.rotation.lon":-G[0]})}function X(){g.select(this).style(p),j&&a(s,L,ee)}function ee(G){var Q=L.rotate(),oe=L.invert(s.midPt);G("projection.rotation.lon",-Q[0]),G("center.lon",oe[0]),G("center.lat",oe[1])}return M.on("zoomstart",ue).on("zoom",J).on("zoomend",X),M}function c(s,L){L.rotate(),L.scale();var M=t(s,L),z=T(M,"zoomstart","zoom","zoomend"),D=0,N=M.on,I;M.on("zoomstart",function(){g.select(this).style(v);var Y=g.mouse(this),j=L.rotate(),te=j,ie=L.translate(),ue=m(j);I=l(L,Y),N.call(M,"zoom",function(){var J=g.mouse(this);if(L.scale(g.event.scale),!I)Y=J,I=l(L,Y);else if(l(L,J)){L.rotate(j).translate(ie);var X=l(L,J),ee=b(I,X),G=A(h(ue,ee)),Q=u(G,I,te);(!isFinite(Q[0])||!isFinite(Q[1])||!isFinite(Q[2]))&&(Q=te),L.rotate(Q),te=Q}B(z.of(this,arguments))}),k(z.of(this,arguments))}).on("zoomend",function(){g.select(this).style(p),N.call(M,"zoom",null),O(z.of(this,arguments)),a(s,L,V)}).on("zoom.redraw",function(){s.render(!0);var Y=L.rotate();s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.projection.rotation.lon":-Y[0],"geo.projection.rotation.lat":-Y[1]})});function k(Y){D++||Y({type:"zoomstart"})}function B(Y){Y({type:"zoom"})}function O(Y){--D||Y({type:"zoomend"})}function V(Y){var j=L.rotate();Y("projection.rotation.lon",-j[0]),Y("projection.rotation.lat",-j[1])}return g.rebind(M,z,"on")}function l(s,L){var M=s.invert(L);return M&&isFinite(M[0])&&isFinite(M[1])&&_(M)}function m(s){var L=.5*s[0]*S,M=.5*s[1]*S,z=.5*s[2]*S,D=Math.sin(L),N=Math.cos(L),I=Math.sin(M),k=Math.cos(M),B=Math.sin(z),O=Math.cos(z);return[N*k*O+D*I*B,D*k*O-N*I*B,N*I*O+D*k*B,N*k*B-D*I*O]}function h(s,L){var M=s[0],z=s[1],D=s[2],N=s[3],I=L[0],k=L[1],B=L[2],O=L[3];return[M*I-z*k-D*B-N*O,M*k+z*I+D*O-N*B,M*B-z*O+D*I+N*k,M*O+z*B-D*k+N*I]}function b(s,L){if(!(!s||!L)){var M=E(s,L),z=Math.sqrt(y(M,M)),D=.5*Math.acos(Math.max(-1,Math.min(1,y(s,L)))),N=Math.sin(D)/z;return z&&[Math.cos(D),M[2]*N,-M[1]*N,M[0]*N]}}function u(s,L,M){var z=w(L,2,s[0]);z=w(z,1,s[1]),z=w(z,0,s[2]-M[2]);var D=L[0],N=L[1],I=L[2],k=z[0],B=z[1],O=z[2],V=Math.atan2(N,D)*x,Y=Math.sqrt(D*D+N*N),j,te;Math.abs(B)>Y?(te=(B>0?90:-90)-V,j=0):(te=Math.asin(B/Y)*x-V,j=Math.sqrt(Y*Y-B*B));var ie=180-te-2*V,ue=(Math.atan2(O,k)-Math.atan2(I,j))*x,J=(Math.atan2(O,k)-Math.atan2(I,-j))*x,X=o(M[0],M[1],te,ue),ee=o(M[0],M[1],ie,J);return X<=ee?[te,ue,M[2]]:[ie,J,M[2]]}function o(s,L,M,z){var D=d(M-s),N=d(z-L);return Math.sqrt(D*D+N*N)}function d(s){return(s%360+540)%360-180}function w(s,L,M){var z=M*S,D=s.slice(),N=L===0?1:0,I=L===2?1:2,k=Math.cos(z),B=Math.sin(z);return D[N]=s[N]*k-s[I]*B,D[I]=s[I]*k+s[N]*B,D}function A(s){return[Math.atan2(2*(s[0]*s[1]+s[2]*s[3]),1-2*(s[1]*s[1]+s[2]*s[2]))*x,Math.asin(Math.max(-1,Math.min(1,2*(s[0]*s[2]-s[3]*s[1]))))*x,Math.atan2(2*(s[0]*s[3]+s[1]*s[2]),1-2*(s[2]*s[2]+s[3]*s[3]))*x]}function _(s){var L=s[0]*S,M=s[1]*S,z=Math.cos(M);return[z*Math.cos(L),z*Math.sin(L),Math.sin(M)]}function y(s,L){for(var M=0,z=0,D=s.length;zMath.abs(E)?(n.boxEnd[1]=n.boxStart[1]+Math.abs(y)*D*(E>=0?1:-1),n.boxEnd[1]u[3]&&(n.boxEnd[1]=u[3],n.boxEnd[0]=n.boxStart[0]+(u[3]-n.boxStart[1])/Math.abs(D))):(n.boxEnd[0]=n.boxStart[0]+Math.abs(E)/D*(y>=0?1:-1),n.boxEnd[0]u[2]&&(n.boxEnd[0]=u[2],n.boxEnd[1]=n.boxStart[1]+(u[2]-n.boxStart[0])*Math.abs(D)))}else M&&(n.boxEnd[0]=n.boxStart[0]),z&&(n.boxEnd[1]=n.boxStart[1])}else n.boxEnabled?(y=n.boxStart[0]!==n.boxEnd[0],E=n.boxStart[1]!==n.boxEnd[1],y||E?(y&&(T(0,n.boxStart[0],n.boxEnd[0]),r.xaxis.autorange=!1),E&&(T(1,n.boxStart[1],n.boxEnd[1]),r.yaxis.autorange=!1),r.relayoutCallback()):r.glplot.setDirty(),n.boxEnabled=!1,n.boxInited=!1):n.boxInited&&(n.boxInited=!1);break;case"pan":n.boxEnabled=!1,n.boxInited=!1,m?(n.panning||(n.dragStart[0]=h,n.dragStart[1]=b),Math.abs(n.dragStart[0]-h)1;function m(h){if(!l){var b=g.validate(n[h],v[h]);if(b)return n[h]}}S(n,f,c,{type:r,attributes:v,handleDefaults:t,fullLayout:f,font:f.font,fullData:c,getDfltFromLayout:m,autotypenumbersDflt:f.autotypenumbers,paper_bgcolor:f.paper_bgcolor,calendar:f.calendar})};function t(a,n,f,c){for(var l=f("bgcolor"),m=C.combine(l,c.paper_bgcolor),h=["up","center","eye"],b=0;b.999)&&(A="turntable")}else A="turntable";f("dragmode",A),f("hovermode",c.getDfltFromLayout("hovermode"))}},346:function(H,U,e){var g=e(86140),C=e(86968).u,i=e(92880).extendFlat,S=e(3400).counterRegex;function x(v,p,r){return{x:{valType:"number",dflt:v,editType:"camera"},y:{valType:"number",dflt:p,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}H.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(x(0,0,1),{}),center:i(x(0,0,0),{}),eye:i(x(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:C({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:g,yaxis:g,zaxis:g,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},9020:function(H,U,e){var g=e(43080),C=["xaxis","yaxis","zaxis"];function i(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var S=i.prototype;S.merge=function(v){for(var p=0;p<3;++p){var r=v[C[p]];if(!r.visible){this.enabled[p]=!1,this.drawSides[p]=!1;continue}this.enabled[p]=r.showspikes,this.colors[p]=g(r.spikecolor),this.drawSides[p]=r.spikesides,this.lineWidth[p]=r.spikethickness}};function x(v){var p=new i;return p.merge(v),p}H.exports=x},87152:function(H,U,e){H.exports=x;var g=e(54460),C=e(3400),i=["xaxis","yaxis","zaxis"];function S(v){for(var p=new Array(3),r=0;r<3;++r){for(var t=v[r],a=new Array(t.length),n=0;n/g," "));a[n]=m,f.tickmode=c}}p.ticks=a;for(var n=0;n<3;++n){.5*(v.glplot.bounds[0][n]+v.glplot.bounds[1][n]);for(var h=0;h<2;++h)p.bounds[h][n]=v.glplot.bounds[h][n]}v.contourLevels=S(a)}},94424:function(H){function U(g,C){var i=[0,0,0,0],S,x;for(S=0;S<4;++S)for(x=0;x<4;++x)i[x]+=g[4*S+x]*C[S];return i}function e(g,C){var i=U(g.projection,U(g.view,U(g.model,[C[0],C[1],C[2],1])));return i}H.exports=e},98432:function(H,U,e){var g=e(67792).gl_plot3d,C=g.createCamera,i=g.createScene,S=e(5408),x=e(89184),v=e(24040),p=e(3400),r=p.preserveDrawingBuffer(),t=e(54460),a=e(93024),n=e(43080),f=e(16576),c=e(94424),l=e(44728),m=e(9020),h=e(87152),b=e(19280).applyAutorangeOptions,u,o,d=!1;function w(D,N){var I=document.createElement("div"),k=D.container;this.graphDiv=D.graphDiv;var B=document.createElementNS("http://www.w3.org/2000/svg","svg");B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",B.style["z-index"]=20,B.style["pointer-events"]="none",I.appendChild(B),this.svgContainer=B,I.id=D.id,I.style.position="absolute",I.style.top=I.style.left="0px",I.style.width=I.style.height="100%",k.appendChild(I),this.fullLayout=N,this.id=D.id||"scene",this.fullSceneLayout=N[this.id],this.plotArgs=[[],{},{}],this.axesOptions=l(N,N[this.id]),this.spikeOptions=m(N[this.id]),this.container=I,this.staticMode=!!D.staticPlot,this.pixelRatio=this.pixelRatio||D.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=v.getComponentMethod("annotations3d","convert"),this.drawAnnotations=v.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var A=w.prototype;A.prepareOptions=function(){var D=this,N={canvas:D.canvas,gl:D.gl,glOptions:{preserveDrawingBuffer:r,premultipliedAlpha:!0,antialias:!0},container:D.container,axes:D.axesOptions,spikes:D.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:D.camera,pixelRatio:D.pixelRatio};if(D.staticMode){if(!o&&(u=document.createElement("canvas"),o=S({canvas:u,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!o))throw new Error("error creating static canvas/context for image server");N.gl=o,N.canvas=u}return N};var _=!0;A.tryCreatePlot=function(){var D=this,N=D.prepareOptions(),I=!0;try{D.glplot=i(N)}catch{if(D.staticMode||!_||r)I=!1;else{p.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{r=N.glOptions.preserveDrawingBuffer=!0,D.glplot=i(N)}catch{r=N.glOptions.preserveDrawingBuffer=!1,I=!1}}}return _=!1,I},A.initializeGLCamera=function(){var D=this,N=D.fullSceneLayout.camera,I=N.projection.type==="orthographic";D.camera=C(D.container,{center:[N.center.x,N.center.y,N.center.z],eye:[N.eye.x,N.eye.y,N.eye.z],up:[N.up.x,N.up.y,N.up.z],_ortho:I,zoomMin:.01,zoomMax:100,mode:"orbit"})},A.initializeGLPlot=function(){var D=this;D.initializeGLCamera();var N=D.tryCreatePlot();if(!N)return f(D);D.traces={},D.make4thDimension();var I=D.graphDiv,k=I.layout,B=function(){var V={};return D.isCameraChanged(k)&&(V[D.id+".camera"]=D.getCamera()),D.isAspectChanged(k)&&(V[D.id+".aspectratio"]=D.glplot.getAspectratio(),k[D.id].aspectmode!=="manual"&&(D.fullSceneLayout.aspectmode=k[D.id].aspectmode=V[D.id+".aspectmode"]="manual")),V},O=function(V){if(V.fullSceneLayout.dragmode!==!1){var Y=B();V.saveLayout(k),V.graphDiv.emit("plotly_relayout",Y)}};return D.glplot.canvas&&(D.glplot.canvas.addEventListener("mouseup",function(){O(D)}),D.glplot.canvas.addEventListener("touchstart",function(){d=!0}),D.glplot.canvas.addEventListener("wheel",function(V){if(I._context._scrollZoom.gl3d){if(D.camera._ortho){var Y=V.deltaX>V.deltaY?1.1:.9090909090909091,j=D.glplot.getAspectratio();D.glplot.setAspectratio({x:Y*j.x,y:Y*j.y,z:Y*j.z})}O(D)}},x?{passive:!1}:!1),D.glplot.canvas.addEventListener("mousemove",function(){if(D.fullSceneLayout.dragmode!==!1&&D.camera.mouseListener.buttons!==0){var V=B();D.graphDiv.emit("plotly_relayouting",V)}}),D.staticMode||D.glplot.canvas.addEventListener("webglcontextlost",function(V){I&&I.emit&&I.emit("plotly_webglcontextlost",{event:V,layer:D.id})},!1)),D.glplot.oncontextloss=function(){D.recoverContext()},D.glplot.onrender=function(){D.render()},!0},A.render=function(){var D=this,N=D.graphDiv,I,k=D.svgContainer,B=D.container.getBoundingClientRect();N._fullLayout._calcInverseTransform(N);var O=N._fullLayout._invScaleX,V=N._fullLayout._invScaleY,Y=B.width*O,j=B.height*V;k.setAttributeNS(null,"viewBox","0 0 "+Y+" "+j),k.setAttributeNS(null,"width",Y),k.setAttributeNS(null,"height",j),h(D),D.glplot.axes.update(D.axesOptions);for(var te=Object.keys(D.traces),ie=null,ue=D.glplot.selection,J=0;J")):I.type==="isosurface"||I.type==="volume"?(oe.valueLabel=t.hoverLabelText(D._mockAxis,D._mockAxis.d2l(ue.traceCoordinate[3]),I.valuehoverformat),ce.push("value: "+oe.valueLabel),ue.textLabel&&ce.push(ue.textLabel),ne=ce.join("
    ")):ne=ue.textLabel;var ge={x:ue.traceCoordinate[0],y:ue.traceCoordinate[1],z:ue.traceCoordinate[2],data:G._input,fullData:G,curveNumber:G.index,pointNumber:Q};a.appendArrayPointValue(ge,G,Q),I._module.eventData&&(ge=G._module.eventData(ge,ue,G,{},Q));var Te={points:[ge]};if(D.fullSceneLayout.hovermode){var we=[];a.loneHover({trace:G,x:(.5+.5*ee[0]/ee[3])*Y,y:(.5-.5*ee[1]/ee[3])*j,xLabel:oe.xLabel,yLabel:oe.yLabel,zLabel:oe.zLabel,text:ne,name:ie.name,color:a.castHoverOption(G,Q,"bgcolor")||ie.color,borderColor:a.castHoverOption(G,Q,"bordercolor"),fontFamily:a.castHoverOption(G,Q,"font.family"),fontSize:a.castHoverOption(G,Q,"font.size"),fontColor:a.castHoverOption(G,Q,"font.color"),nameLength:a.castHoverOption(G,Q,"namelength"),textAlign:a.castHoverOption(G,Q,"align"),hovertemplate:p.castOption(G,Q,"hovertemplate"),hovertemplateLabels:p.extendFlat({},ge,oe),eventData:[ge]},{container:k,gd:N,inOut_bbox:we}),ge.bbox=we[0]}ue.distance<5&&(ue.buttons||d)?N.emit("plotly_click",Te):N.emit("plotly_hover",Te),this.oldEventData=Te}else a.loneUnhover(k),this.oldEventData&&N.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;D.drawAnnotations(D)},A.recoverContext=function(){var D=this;D.glplot.dispose();var N=function(){if(D.glplot.gl.isContextLost()){requestAnimationFrame(N);return}if(!D.initializeGLPlot()){p.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}D.plot.apply(D,D.plotArgs)};requestAnimationFrame(N)};var y=["xaxis","yaxis","zaxis"];function E(D,N,I){for(var k=D.fullSceneLayout,B=0;B<3;B++){var O=y[B],V=O.charAt(0),Y=k[O],j=N[V],te=N[V+"calendar"],ie=N["_"+V+"length"];if(!p.isArrayOrTypedArray(j))I[0][B]=Math.min(I[0][B],0),I[1][B]=Math.max(I[1][B],ie-1);else for(var ue,J=0;J<(ie||j.length);J++)if(p.isArrayOrTypedArray(j[J]))for(var X=0;XG[1][V])G[0][V]=-1,G[1][V]=1;else{var Re=G[1][V]-G[0][V];G[0][V]-=Re/32,G[1][V]+=Re/32}if(oe=[G[0][V],G[1][V]],oe=b(oe,j),G[0][V]=oe[0],G[1][V]=oe[1],j.isReversed()){var be=G[0][V];G[0][V]=G[1][V],G[1][V]=be}}else oe=j.range,G[0][V]=j.r2l(oe[0]),G[1][V]=j.r2l(oe[1]);G[0][V]===G[1][V]&&(G[0][V]-=1,G[1][V]+=1),j.range=[G[0][V],G[1][V]],j.limitRange(),k.glplot.setBounds(V,{min:j.range[0]*X[V],max:j.range[1]*X[V]})}var Ae,me=ie.aspectmode;if(me==="cube")Ae=[1,1,1];else if(me==="manual"){var Le=ie.aspectratio;Ae=[Le.x,Le.y,Le.z]}else if(me==="auto"||me==="data"){var Ve=[1,1,1];for(V=0;V<3;++V){j=ie[y[V]],te=j.type;var Ue=Q[te];Ve[V]=Math.pow(Ue.acc,1/Ue.count)/X[V]}me==="data"||Math.max.apply(null,Ve)/Math.min.apply(null,Ve)<=4?Ae=Ve:Ae=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ie.aspectratio.x=ue.aspectratio.x=Ae[0],ie.aspectratio.y=ue.aspectratio.y=Ae[1],ie.aspectratio.z=ue.aspectratio.z=Ae[2],k.glplot.setAspectratio(ie.aspectratio),k.viewInitial.aspectratio||(k.viewInitial.aspectratio={x:ie.aspectratio.x,y:ie.aspectratio.y,z:ie.aspectratio.z}),k.viewInitial.aspectmode||(k.viewInitial.aspectmode=ie.aspectmode);var ke=ie.domain||null,He=N._size||null;if(ke&&He){var Ie=k.container.style;Ie.position="absolute",Ie.left=He.l+ke.x[0]*He.w+"px",Ie.top=He.t+(1-ke.y[1])*He.h+"px",Ie.width=He.w*(ke.x[1]-ke.x[0])+"px",Ie.height=He.h*(ke.y[1]-ke.y[0])+"px"}k.glplot.redraw()}},A.destroy=function(){var D=this;D.glplot&&(D.camera.mouseListener.enabled=!1,D.container.removeEventListener("wheel",D.camera.wheelListener),D.camera=null,D.glplot.dispose(),D.container.parentNode.removeChild(D.container),D.glplot=null)};function s(D){return[[D.eye.x,D.eye.y,D.eye.z],[D.center.x,D.center.y,D.center.z],[D.up.x,D.up.y,D.up.z]]}function L(D){return{up:{x:D.up[0],y:D.up[1],z:D.up[2]},center:{x:D.center[0],y:D.center[1],z:D.center[2]},eye:{x:D.eye[0],y:D.eye[1],z:D.eye[2]},projection:{type:D._ortho===!0?"orthographic":"perspective"}}}A.getCamera=function(){var D=this;return D.camera.view.recalcMatrix(D.camera.view.lastT()),L(D.camera)},A.setViewport=function(D){var N=this,I=D.camera;N.camera.lookAt.apply(this,s(I)),N.glplot.setAspectratio(D.aspectratio);var k=I.projection.type==="orthographic",B=N.camera._ortho;k!==B&&(N.glplot.redraw(),N.glplot.clearRGBA(),N.glplot.dispose(),N.initializeGLPlot())},A.isCameraChanged=function(D){var N=this,I=N.getCamera(),k=p.nestedProperty(D,N.id+".camera"),B=k.get();function O(te,ie,ue,J){var X=["up","center","eye"],ee=["x","y","z"];return ie[X[ue]]&&te[X[ue]][ee[J]]===ie[X[ue]][ee[J]]}var V=!1;if(B===void 0)V=!0;else{for(var Y=0;Y<3;Y++)for(var j=0;j<3;j++)if(!O(I,B,Y,j)){V=!0;break}(!B.projection||I.projection&&I.projection.type!==B.projection.type)&&(V=!0)}return V},A.isAspectChanged=function(D){var N=this,I=N.glplot.getAspectratio(),k=p.nestedProperty(D,N.id+".aspectratio"),B=k.get();return B===void 0||B.x!==I.x||B.y!==I.y||B.z!==I.z},A.saveLayout=function(D){var N=this,I=N.fullLayout,k,B,O,V,Y,j,te=N.isCameraChanged(D),ie=N.isAspectChanged(D),ue=te||ie;if(ue){var J={};if(te&&(k=N.getCamera(),B=p.nestedProperty(D,N.id+".camera"),O=B.get(),J[N.id+".camera"]=O),ie&&(V=N.glplot.getAspectratio(),Y=p.nestedProperty(D,N.id+".aspectratio"),j=Y.get(),J[N.id+".aspectratio"]=j),v.call("_storeDirectGUIEdit",D,I._preGUI,J),te){B.set(k);var X=p.nestedProperty(I,N.id+".camera");X.set(k)}if(ie){Y.set(V);var ee=p.nestedProperty(I,N.id+".aspectratio");ee.set(V),N.glplot.redraw()}}return ue},A.updateFx=function(D,N){var I=this,k=I.camera;if(k)if(D==="orbit")k.mode="orbit",k.keyBindingMode="rotate";else if(D==="turntable"){k.up=[0,0,1],k.mode="turntable",k.keyBindingMode="rotate";var B=I.graphDiv,O=B._fullLayout,V=I.fullSceneLayout.camera,Y=V.up.x,j=V.up.y,te=V.up.z;if(te/Math.sqrt(Y*Y+j*j+te*te)<.999){var ie=I.id+".camera.up",ue={x:0,y:0,z:1},J={};J[ie]=ue;var X=B.layout;v.call("_storeDirectGUIEdit",X,O._preGUI,J),V.up=ue,p.nestedProperty(X,ie).set(ue)}}else k.keyBindingMode=D;I.fullSceneLayout.hovermode=N};function M(D,N,I){for(var k=0,B=I-1;k0)for(var Y=255/V,j=0;j<3;++j)D[O+j]=Math.min(Y*D[O+j],255)}}A.toImage=function(D){var N=this;D||(D="png"),N.staticMode&&N.container.appendChild(u),N.glplot.redraw();var I=N.glplot.gl,k=I.drawingBufferWidth,B=I.drawingBufferHeight;I.bindFramebuffer(I.FRAMEBUFFER,null);var O=new Uint8Array(k*B*4);I.readPixels(0,0,k,B,I.RGBA,I.UNSIGNED_BYTE,O),M(O,k,B),z(O,k,B);var V=document.createElement("canvas");V.width=k,V.height=B;var Y=V.getContext("2d",{willReadFrequently:!0}),j=Y.createImageData(k,B);j.data.set(O),Y.putImageData(j,0,0);var te;switch(D){case"jpeg":te=V.toDataURL("image/jpeg");break;case"webp":te=V.toDataURL("image/webp");break;default:te=V.toDataURL("image/png")}return N.staticMode&&N.container.removeChild(u),te},A.setConvert=function(){for(var D=this,N=0;N<3;N++){var I=D.fullSceneLayout[y[N]];t.setConvert(I,D.fullLayout),I.setScale=p.noop}},A.make4thDimension=function(){var D=this,N=D.graphDiv,I=N._fullLayout;D._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},t.setConvert(D._mockAxis,I)},H.exports=w},52094:function(H){H.exports=function(e,g,C,i){i=i||e.length;for(var S=new Array(i),x=0;xOpenStreetMap contributors',S=['© Carto',i].join(" "),x=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),v=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),p={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:x,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:x,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:v,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},r=g(p);H.exports={requiredVersion:C,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:p,styleValuesNonMapbox:r,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+C+"."].join(` +`+M(Y.dayMonthYear,I,O,H);return M(k,I,O,H)};var N=3*p;U.incrementMonth=function(I,k,B){B=b(B)&&B;var O=S(I,p);if(I=Math.round(I-O),B)try{var H=Math.round(I/p)+n,Y=f.getComponentMethod("calendars","getCal")(B),j=Y.fromJD(H);return k%12?Y.add(j,k,"m"):Y.add(j,k/12,"y"),(j.toJD()-n)*p+O}catch{i.error("invalid ms "+I+" in calendar "+B)}var et=new Date(I+N);return et.setUTCMonth(et.getUTCMonth()+k)+O-N},U.findExactDates=function(I,k){for(var B=0,O=0,H=0,Y=0,j,et,it=b(k)&&f.getComponentMethod("calendars","getCal")(k),ut=0;ut0&&D[N+1][0]<0)return N;return null}switch(y==="RUS"||y==="FJI"?T=function(D){var N;if(z(D)===null)N=D;else for(N=new Array(D.length),M=0;MN?I[k++]=[D[M][0]+360,D[M][1]]:M===N?(I[k++]=D[M],I[k++]=[D[M][0],-90]):I[k++]=D[M];var B=a.tester(I);B.pts.pop(),E.push(B)}:T=function(D){E.push(a.tester(D))},A.type){case"MultiPolygon":for(s=0;s<_.length;s++)for(L=0;L<_[s].length;L++)T(_[s][L]);break;case"Polygon":for(s=0;s<_.length;s++)T(_[s]);break}return E}function h(w){var A=w.geojson,_=window.PlotlyGeoAssets||{},y=typeof A=="string"?_[A]:A;return r(y)?y:(p.error("Oops ... something went wrong when fetching "+A),!1)}function b(w){var A=w[0].trace,_=h(A);if(!_)return!1;var y={},E=[],T;for(T=0;TE&&(E=L,_=s)}else _=A;return S.default(_).geometry.coordinates}function o(w){var A=window.PlotlyGeoAssets||{},_=[];function y(M){return new Promise(function(z,D){g.json(M,function(N,I){if(N){delete A[M];var k=N.status===404?'GeoJSON at URL "'+M+'" does not exist.':"Unexpected error while fetching from "+M;return D(new Error(k))}return A[M]=I,z(I)})})}function E(M){return new Promise(function(z,D){var N=0,I=setInterval(function(){if(A[M]&&A[M]!=="pending")return clearInterval(I),z(A[M]);if(N>100)return clearInterval(I),D("Unexpected error while fetching from "+M);N++},50)})}for(var T=0;T0&&(x.push(v),v=[])}return v.length>0&&x.push(v),x},U.makeLine=function(C){return C.length===1?{type:"LineString",coordinates:C[0]}:{type:"MultiLineString",coordinates:C}},U.makePolygon=function(C){if(C.length===1)return{type:"Polygon",coordinates:C};for(var i=new Array(C.length),S=0;S1||A<0||A>1?null:{x:p+m*A,y:r+u*A}}U.segmentDistance=function(r,e,a,n,f,c,l,m){if(C(r,e,a,n,f,c,l,m))return 0;var h=a-r,b=n-e,u=l-f,o=m-c,d=h*h+b*b,w=u*u+o*o,A=Math.min(i(h,b,d,f-r,c-e),i(h,b,d,l-r,m-e),i(u,o,w,r-f,e-c),i(u,o,w,a-f,n-c));return Math.sqrt(A)};function i(p,r,e,a,n){var f=a*p+n*r;if(f<0)return a*a+n*n;if(f>e){var c=a-p,l=n-r;return c*c+l*l}else{var m=a*r-n*p;return m*m/e}}var S,x,v;U.getTextLocation=function(r,e,a,n){if((r!==x||n!==v)&&(S={},x=r,v=n),S[a])return S[a];var f=r.getPointAtLength(g(a-n/2,e)),c=r.getPointAtLength(g(a+n/2,e)),l=Math.atan((c.y-f.y)/(c.x-f.x)),m=r.getPointAtLength(g(a,e)),h=(m.x*4+f.x+c.x)/6,b=(m.y*4+f.y+c.y)/6,u={x:h,y:b,theta:l};return S[a]=u,u},U.clearLocationCache=function(){x=null},U.getVisibleSegment=function(r,e,a){var n=e.left,f=e.right,c=e.top,l=e.bottom,m=0,h=r.getTotalLength(),b=h,u,o;function d(A){var _=r.getPointAtLength(A);A===0?u=_:A===h&&(o=_);var y=_.xf?_.x-f:0,E=_.yl?_.y-l:0;return Math.sqrt(y*y+E*E)}for(var w=d(m);w;){if(m+=w+a,m>b)return;w=d(m)}for(w=d(b);w;){if(b-=w+a,m>b)return;w=d(b)}return{min:m,max:b,len:b-m,total:h,isClosed:m===0&&b===h&&Math.abs(u.x-o.x)<.1&&Math.abs(u.y-o.y)<.1}},U.findPointOnPath=function(r,e,a,n){n=n||{};for(var f=n.pathLength||r.getTotalLength(),c=n.tolerance||.001,l=n.iterationLimit||30,m=r.getPointAtLength(0)[a]>r.getPointAtLength(f)[a]?-1:1,h=0,b=0,u=f,o,d,w;h0?u=o:b=o,h++}return d}},33040:function(G,U,t){var g=t(38248),C=t(49760),i=t(72160),S=t(8932),x=t(22548).defaultLine,v=t(38116).isArrayOrTypedArray,p=i(x),r=1;function e(l,m){var h=l;return h[3]*=m,h}function a(l){if(g(l))return p;var m=i(l);return m.length?m:p}function n(l){return g(l)?l:r}function f(l,m,h){var b=l.color;b&&b._inputArray&&(b=b._inputArray);var u=v(b),o=v(m),d=S.extractOpts(l),w=[],A,_,y,E,T;if(d.colorscale!==void 0?A=S.makeColorScaleFuncFromTrace(l):A=a,u?_=function(L,M){return L[M]===void 0?p:i(A(L[M]))}:_=a,o?y=function(L,M){return L[M]===void 0?r:n(L[M])}:y=n,u||o)for(var s=0;s1?(C*t+C*g)/C:t+g,S=String(i).length;if(S>16){var x=String(g).length,v=String(t).length;if(S>=v+x){var p=parseFloat(i).toPrecision(12);p.indexOf("e+")===-1&&(i=+p)}}return i}},3400:function(G,U,t){var g=t(33428),C=t(94336).E9,i=t(57624).E9,S=t(38248),x=t(39032),v=x.FP_SAFE,p=-v,r=x.BADNUM,e=G.exports={};e.adjustFormat=function(ot){return!ot||/^\d[.]\df/.test(ot)||/[.]\d%/.test(ot)?ot:ot==="0.f"?"~f":/^\d%/.test(ot)?"~%":/^\ds/.test(ot)?"~s":!/^[~,.0$]/.test(ot)&&/[&fps]/.test(ot)?"~"+ot:ot};var a={};e.warnBadFormat=function(Q){var ot=String(Q);a[ot]||(a[ot]=1,e.warn('encountered bad format: "'+ot+'"'))},e.noFormat=function(Q){return String(Q)},e.numberFormat=function(Q){var ot;try{ot=i(e.adjustFormat(Q))}catch{return e.warnBadFormat(Q),e.noFormat}return ot},e.nestedProperty=t(22296),e.keyedContainer=t(37804),e.relativeAttr=t(23193),e.isPlainObject=t(63620),e.toLogRange=t(36896),e.relinkPrivateKeys=t(51528);var n=t(38116);e.isArrayBuffer=n.isArrayBuffer,e.isTypedArray=n.isTypedArray,e.isArrayOrTypedArray=n.isArrayOrTypedArray,e.isArray1D=n.isArray1D,e.ensureArray=n.ensureArray,e.concat=n.concat,e.maxRowLength=n.maxRowLength,e.minRowLength=n.minRowLength;var f=t(20435);e.mod=f.mod,e.modHalf=f.modHalf;var c=t(63064);e.valObjectMeta=c.valObjectMeta,e.coerce=c.coerce,e.coerce2=c.coerce2,e.coerceFont=c.coerceFont,e.coercePattern=c.coercePattern,e.coerceHoverinfo=c.coerceHoverinfo,e.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,e.validate=c.validate;var l=t(67555);e.dateTime2ms=l.dateTime2ms,e.isDateTime=l.isDateTime,e.ms2DateTime=l.ms2DateTime,e.ms2DateTimeLocal=l.ms2DateTimeLocal,e.cleanDate=l.cleanDate,e.isJSDate=l.isJSDate,e.formatDate=l.formatDate,e.incrementMonth=l.incrementMonth,e.dateTick0=l.dateTick0,e.dfltRange=l.dfltRange,e.findExactDates=l.findExactDates,e.MIN_MS=l.MIN_MS,e.MAX_MS=l.MAX_MS;var m=t(14952);e.findBin=m.findBin,e.sorterAsc=m.sorterAsc,e.sorterDes=m.sorterDes,e.distinctVals=m.distinctVals,e.roundUp=m.roundUp,e.sort=m.sort,e.findIndexOfMin=m.findIndexOfMin,e.sortObjectKeys=t(95376);var h=t(63084);e.aggNums=h.aggNums,e.len=h.len,e.mean=h.mean,e.median=h.median,e.midRange=h.midRange,e.variance=h.variance,e.stdev=h.stdev,e.interp=h.interp;var b=t(52248);e.init2dArray=b.init2dArray,e.transposeRagged=b.transposeRagged,e.dot=b.dot,e.translationMatrix=b.translationMatrix,e.rotationMatrix=b.rotationMatrix,e.rotationXYMatrix=b.rotationXYMatrix,e.apply3DTransform=b.apply3DTransform,e.apply2DTransform=b.apply2DTransform,e.apply2DTransform2=b.apply2DTransform2,e.convertCssMatrix=b.convertCssMatrix,e.inverseTransformMatrix=b.inverseTransformMatrix;var u=t(11864);e.deg2rad=u.deg2rad,e.rad2deg=u.rad2deg,e.angleDelta=u.angleDelta,e.angleDist=u.angleDist,e.isFullCircle=u.isFullCircle,e.isAngleInsideSector=u.isAngleInsideSector,e.isPtInsideSector=u.isPtInsideSector,e.pathArc=u.pathArc,e.pathSector=u.pathSector,e.pathAnnulus=u.pathAnnulus;var o=t(98308);e.isLeftAnchor=o.isLeftAnchor,e.isCenterAnchor=o.isCenterAnchor,e.isRightAnchor=o.isRightAnchor,e.isTopAnchor=o.isTopAnchor,e.isMiddleAnchor=o.isMiddleAnchor,e.isBottomAnchor=o.isBottomAnchor;var d=t(92348);e.segmentsIntersect=d.segmentsIntersect,e.segmentDistance=d.segmentDistance,e.getTextLocation=d.getTextLocation,e.clearLocationCache=d.clearLocationCache,e.getVisibleSegment=d.getVisibleSegment,e.findPointOnPath=d.findPointOnPath;var w=t(92880);e.extendFlat=w.extendFlat,e.extendDeep=w.extendDeep,e.extendDeepAll=w.extendDeepAll,e.extendDeepNoArrays=w.extendDeepNoArrays;var A=t(24248);e.log=A.log,e.warn=A.warn,e.error=A.error;var _=t(53756);e.counterRegex=_.counter;var y=t(91200);e.throttle=y.throttle,e.throttleDone=y.done,e.clearThrottle=y.clear;var E=t(52200);e.getGraphDiv=E.getGraphDiv,e.isPlotDiv=E.isPlotDiv,e.removeElement=E.removeElement,e.addStyleRule=E.addStyleRule,e.addRelatedStyleRule=E.addRelatedStyleRule,e.deleteRelatedStyleRule=E.deleteRelatedStyleRule,e.getFullTransformMatrix=E.getFullTransformMatrix,e.getElementTransformMatrix=E.getElementTransformMatrix,e.getElementAndAncestors=E.getElementAndAncestors,e.equalDomRects=E.equalDomRects,e.clearResponsive=t(75352),e.preserveDrawingBuffer=t(34296),e.makeTraceGroups=t(30988),e._=t(98356),e.notifier=t(41792),e.filterUnique=t(68944),e.filterVisible=t(43880),e.pushUnique=t(52416),e.increment=t(1396),e.cleanNumber=t(54037),e.ensureNumber=function(ot){return S(ot)?(ot=Number(ot),ot>v||ot=ot?!1:S(Q)&&Q>=0&&Q%1===0},e.noop=t(16628),e.identity=t(35536),e.repeat=function(Q,ot){for(var $=new Array(ot),Z=0;Z$?Math.max($,Math.min(ot,Q)):Math.max(ot,Math.min($,Q))},e.bBoxIntersect=function(Q,ot,$){return $=$||0,Q.left<=ot.right+$&&ot.left<=Q.right+$&&Q.top<=ot.bottom+$&&ot.top<=Q.bottom+$},e.simpleMap=function(Q,ot,$,Z,st){for(var nt=Q.length,ct=new Array(nt),gt=0;gt=Math.pow(2,$)?st>10?(e.warn("randstr failed uniqueness"),ct):Q(ot,$,Z,(st||0)+1):ct},e.OptionControl=function(Q,ot){Q||(Q={}),ot||(ot="opt");var $={};return $.optionList=[],$._newoption=function(Z){Z[ot]=Q,$[Z.name]=Z,$.optionList.push(Z)},$["_"+ot]=Q,$},e.smooth=function(Q,ot){if(ot=Math.round(ot)||0,ot<2)return Q;var $=Q.length,Z=2*$,st=2*ot-1,nt=new Array(st),ct=new Array($),gt,Tt,wt,Rt;for(gt=0;gt=Z&&(wt-=Z*Math.floor(wt/Z)),wt<0?wt=-1-wt:wt>=$&&(wt=Z-1-wt),Rt+=Q[wt]*nt[Tt];ct[gt]=Rt}return ct},e.syncOrAsync=function(Q,ot,$){var Z,st;function nt(){return e.syncOrAsync(Q,ot,$)}for(;Q.length;)if(st=Q.splice(0,1)[0],Z=st(ot),Z&&Z.then)return Z.then(nt);return $&&$(ot)},e.stripTrailingSlash=function(Q){return Q.substr(-1)==="/"?Q.substr(0,Q.length-1):Q},e.noneOrAll=function(Q,ot,$){if(Q){var Z=!1,st=!0,nt,ct;for(nt=0;nt<$.length;nt++)ct=Q[$[nt]],ct!=null?Z=!0:st=!1;if(Z&&!st)for(nt=0;nt<$.length;nt++)Q[$[nt]]=ot[$[nt]]}},e.mergeArray=function(Q,ot,$,Z){var st=typeof Z=="function";if(e.isArrayOrTypedArray(Q))for(var nt=Math.min(Q.length,ot.length),ct=0;ct0?st:0})},e.fillArray=function(Q,ot,$,Z){if(Z=Z||e.identity,e.isArrayOrTypedArray(Q))for(var st=0;st1?st+ct[1]:"";if(nt&&(ct.length>1||gt.length>4||$))for(;Z.test(gt);)gt=gt.replace(Z,"$1"+nt+"$2");return gt+Tt},e.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var k=/^\w*$/;e.templateString=function(Q,ot){var $={};return Q.replace(e.TEMPLATE_STRING_REGEX,function(Z,st){var nt;return k.test(st)?nt=ot[st]:($[st]=$[st]||e.nestedProperty(ot,st).get,nt=$[st]()),e.isValidTextValue(nt)?nt:""})};var B={max:10,count:0,name:"hovertemplate"};e.hovertemplateString=function(){return it.apply(B,arguments)};var O={max:10,count:0,name:"texttemplate"};e.texttemplateString=function(){return it.apply(O,arguments)};var H=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Y(Q){var ot=Q.match(H);return ot?{key:ot[1],op:ot[2],number:Number(ot[3])}:{key:Q,op:null,number:null}}var j={max:10,count:0,name:"texttemplate",parseMultDiv:!0};e.texttemplateStringForShapes=function(){return it.apply(j,arguments)};var et=/^[:|\|]/;function it(Q,ot,$){var Z=this,st=arguments;ot||(ot={});var nt={};return Q.replace(e.TEMPLATE_STRING_REGEX,function(ct,gt,Tt){var wt=gt==="xother"||gt==="yother",Rt=gt==="_xother"||gt==="_yother",bt=gt==="_xother_"||gt==="_yother_",At=gt==="xother_"||gt==="yother_",mt=wt||Rt||At||bt,Lt=gt;(Rt||bt)&&(Lt=Lt.substring(1)),(At||bt)&&(Lt=Lt.substring(0,Lt.length-1));var Ht=null,Ut=null;if(Z.parseMultDiv){var kt=Y(Lt);Lt=kt.key,Ht=kt.op,Ut=kt.number}var Vt;if(mt){if(Vt=ot[Lt],Vt===void 0)return""}else{var It,re;for(re=3;re=ut&&ct<=J,wt=gt>=ut&><=J;if(Tt&&(Z=10*Z+ct-ut),wt&&(st=10*st+gt-ut),!Tt||!wt){if(Z!==st)return Z-st;if(ct!==gt)return ct-gt}}return st-Z};var X=2e9;e.seedPseudoRandom=function(){X=2e9},e.pseudoRandom=function(){var Q=X;return X=(69069*X+1)%4294967296,Math.abs(X-Q)<429496729?e.pseudoRandom():X/4294967296},e.fillText=function(Q,ot,$){var Z=Array.isArray($)?function(ct){$.push(ct)}:function(ct){$.text=ct},st=e.extractOption(Q,ot,"htx","hovertext");if(e.isValidTextValue(st))return Z(st);var nt=e.extractOption(Q,ot,"tx","text");if(e.isValidTextValue(nt))return Z(nt)},e.isValidTextValue=function(Q){return Q||Q===0},e.formatPercent=function(Q,ot){ot=ot||0;for(var $=(Math.round(100*Q*Math.pow(10,ot))*Math.pow(.1,ot)).toFixed(ot)+"%",Z=0;Z1&&(wt=1):wt=0,e.strTranslate(st-wt*($+ct),nt-wt*(Z+gt))+e.strScale(wt)+(Tt?"rotate("+Tt+(ot?"":" "+$+" "+Z)+")":"")},e.setTransormAndDisplay=function(Q,ot){Q.attr("transform",e.getTextTransform(ot)),Q.style("display",ot.scale?null:"none")},e.ensureUniformFontSize=function(Q,ot){var $=e.extendFlat({},ot);return $.size=Math.max(ot.size,Q._fullLayout.uniformtext.minsize||0),$},e.join2=function(Q,ot,$){var Z=Q.length;return Z>1?Q.slice(0,-1).join(ot)+$+Q[Z-1]:Q.join(ot)},e.bigFont=function(Q){return Math.round(1.2*Q)};var tt=e.getFirefoxVersion(),V=tt!==null&&tt<86;e.getPositionFromD3Event=function(){return V?[g.event.layerX,g.event.layerY]:[g.event.offsetX,g.event.offsetY]}},63620:function(G){G.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},37804:function(G,U,t){var g=t(22296),C=/^\w*$/,i=0,S=1,x=2,v=3,p=4;G.exports=function(e,a,n,f){n=n||"name",f=f||"value";var c,l,m,h={};a&&a.length?(m=g(e,a),l=m.get()):l=e,a=a||"";var b={};if(l)for(c=0;c2)return h[w]=h[w]|x,o.set(d,null);if(u){for(c=w;c1){var x=["LOG:"];for(S=0;S1){var v=[];for(S=0;S"),"long")}},i.warn=function(){var S;if(g.logging>0){var x=["WARN:"];for(S=0;S0){var v=[];for(S=0;S"),"stick")}},i.error=function(){var S;if(g.logging>0){var x=["ERROR:"];for(S=0;S0){var v=[];for(S=0;S"),"stick")}}},30988:function(G,U,t){var g=t(33428);G.exports=function(i,S,x){var v=i.selectAll("g."+x.replace(/\s/g,".")).data(S,function(r){return r[0].trace.uid});v.exit().remove(),v.enter().append("g").attr("class",x),v.order();var p=i.classed("rangeplot")?"nodeRangePlot3":"node3";return v.each(function(r){r[0][p]=g.select(this)}),v}},52248:function(G,U,t){var g=t(36524);U.init2dArray=function(C,i){for(var S=new Array(C),x=0;xC/2?g-Math.round(g/C)*C:g}G.exports={mod:U,modHalf:t}},22296:function(G,U,t){var g=t(38248),C=t(38116).isArrayOrTypedArray;G.exports=function(f,c){if(g(c))c=String(c);else if(typeof c!="string"||c.substr(c.length-4)==="[-1]")throw"bad property string";var l=c.split("."),m,h,b,u;for(u=0;u/g),l=0;lr||w===C||wa||o&&c(u))}function m(u,o){var d=u[0],w=u[1];if(d===C||dr||w===C||wa)return!1;var A=v.length,_=v[0][0],y=v[0][1],E=0,T,s,L,M,z;for(T=1;TMath.max(s,_)||w>Math.max(L,y)))if(wn||Math.abs(g(m,c))>r)return!0;return!1},i.filter=function(x,v){var p=[x[0]],r=0,e=0;function a(f){x.push(f);var c=p.length,l=r;p.splice(e+1);for(var m=l+1;m1){var n=x.pop();a(n)}return{addPt:a,raw:x,filtered:p}}},5048:function(G,U,t){var g=t(16576),C=t(28624);G.exports=function(S,x,v){var p=S._fullLayout,r=!0;return p._glcanvas.each(function(e){if(e.regl){e.regl.preloadCachedCode(v);return}if(!(e.pick&&!p._has("parcoords"))){try{e.regl=C({canvas:this,attributes:{antialias:!e.pick,preserveDrawingBuffer:!0},pixelRatio:S._context.plotGlPixelRatio||t.g.devicePixelRatio,extensions:x||[],cachedCode:v||{}})}catch{r=!1}e.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(a){S&&S.emit&&S.emit("plotly_webglcontextlost",{event:a,layer:e.key})},!1)}}),r||g({container:p._glcontainer.node()}),r}},34296:function(G,U,t){var g=t(38248),C=t(25928);G.exports=function(x){var v;if(x&&x.hasOwnProperty("userAgent")?v=x.userAgent:v=i(),typeof v!="string")return!0;var p=C({ua:{headers:{"user-agent":v}},tablet:!0,featureDetect:!1});if(!p)for(var r=v.split(" "),e=1;e-1;n--){var f=r[n];if(f.substr(0,8)==="Version/"){var c=f.substr(8).split(".")[0];if(g(c)&&(c=+c),c>=13)return!0}}}return p};function i(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}},52416:function(G){G.exports=function(t,g){if(g instanceof RegExp){for(var C=g.toString(),i=0;iC.queueLength&&(x.undoQueue.queue.shift(),x.undoQueue.index--)},S.startSequence=function(x){x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},x.undoQueue.sequence=!0,x.undoQueue.beginSequence=!0},S.stopSequence=function(x){x.undoQueue=x.undoQueue||{index:0,queue:[],sequence:!1},x.undoQueue.sequence=!1,x.undoQueue.beginSequence=!1},S.undo=function(v){var p,r;if(!(v.undoQueue===void 0||isNaN(v.undoQueue.index)||v.undoQueue.index<=0)){for(v.undoQueue.index--,p=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,r=0;r=v.undoQueue.queue.length)){for(p=v.undoQueue.queue[v.undoQueue.index],v.undoQueue.inSequence=!0,r=0;r1?(n[l-1]-n[0])/(l-1):1,b,u;for(h>=0?u=f?v:p:u=f?e:r,a+=h*x*(f?-1:1)*(h>=0?1:-1);c90&&C.log("Long binary search..."),c-1};function v(a,n){return an}function e(a,n){return a>=n}U.sorterAsc=function(a,n){return a-n},U.sorterDes=function(a,n){return n-a},U.distinctVals=function(a){var n=a.slice();n.sort(U.sorterAsc);var f;for(f=n.length-1;f>-1&&n[f]===S;f--);for(var c=n[f]-n[0]||1,l=c/(f||1)/1e4,m=[],h,b=0;b<=f;b++){var u=n[b],o=u-h;h===void 0?(m.push(u),h=u):o>l&&(c=Math.min(c,o),m.push(u),h=u)}return{vals:m,minDiff:c}},U.roundUp=function(a,n,f){for(var c=0,l=n.length-1,m,h=0,b=f?0:1,u=f?1:0,o=f?Math.ceil:Math.floor;c0&&(c=1),f&&c)return a.sort(n)}return c?a:a.reverse()},U.findIndexOfMin=function(a,n){n=n||i;for(var f=1/0,c,l=0;lx.length)&&(v=x.length),g(S)||(S=!1),C(x[0])){for(r=new Array(v),p=0;pi.length-1)return i[i.length-1];var x=S%1;return x*i[Math.ceil(S)]+(1-x)*i[Math.floor(S)]}},43080:function(G,U,t){var g=t(72160);function C(i){return i?g(i):[0,0,0,1]}G.exports=C},9188:function(G,U,t){var g=t(2264),C=t(43616),i=t(3400),S=null;function x(){if(S!==null)return S;S=!1;var v=i.isIE()||i.isSafari()||i.isIOS();if(window.navigator.userAgent&&!v){var p=Array.from(g.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")S=p.some(function(f){return r.apply(null,f)});else{var e=C.tester.append("image").attr("style",g.STYLE),a=window.getComputedStyle(e.node()),n=a.imageRendering;S=p.some(function(f){var c=f[1];return n===c||n===c.toLowerCase()}),e.remove()}}return S}G.exports=x},72736:function(G,U,t){var g=t(33428),C=t(3400),i=C.strTranslate,S=t(9616),x=t(84284).LINE_SPACING,v=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;U.convertToTspans=function(B,O,H){var Y=B.text(),j=!B.attr("data-notex")&&O&&O._context.typesetMath&&typeof MathJax<"u"&&Y.match(v),et=g.select(B.node().parentNode);if(et.empty())return;var it=B.attr("class")?B.attr("class").split(" ")[0]:"text";it+="-math",et.selectAll("svg."+it).remove(),et.selectAll("g."+it+"-group").remove(),B.style("display",null).attr({"data-unformatted":Y,"data-math":"N"});function ut(){et.empty()||(it=B.attr("class")+"-math",et.select("svg."+it).remove()),B.text("").style("white-space","pre");var J=D(B.node(),Y);J&&B.style("pointer-events","all"),U.positionText(B),H&&H.call(B)}return j?(O&&O._promises||[]).push(new Promise(function(J){B.style("display","none");var X=parseInt(B.node().style.fontSize,10),tt={fontSize:X};n(j[2],tt,function(V,Q,ot){et.selectAll("svg."+it).remove(),et.selectAll("g."+it+"-group").remove();var $=V&&V.select("svg");if(!$||!$.node()){ut(),J();return}var Z=et.append("g").classed(it+"-group",!0).attr({"pointer-events":"none","data-unformatted":Y,"data-math":"Y"});Z.node().appendChild($.node()),Q&&Q.node()&&$.node().insertBefore(Q.node().cloneNode(!0),$.node().firstChild);var st=ot.width,nt=ot.height;$.attr({class:it,height:nt,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ct=B.node().style.fill||"black",gt=$.select("g");gt.attr({fill:ct,stroke:ct});var Tt=gt.node().getBoundingClientRect(),wt=Tt.width,Rt=Tt.height;(wt>st||Rt>nt)&&($.style("overflow","hidden"),Tt=$.node().getBoundingClientRect(),wt=Tt.width,Rt=Tt.height);var bt=+B.attr("x"),At=+B.attr("y"),mt=X||B.node().getBoundingClientRect().height,Lt=-mt/4;if(it[0]==="y")Z.attr({transform:"rotate("+[-90,bt,At]+")"+i(-wt/2,Lt-Rt/2)});else if(it[0]==="l")At=Lt-Rt/2;else if(it[0]==="a"&&it.indexOf("atitle")!==0)bt=0,At=Lt;else{var Ht=B.attr("text-anchor");bt=bt-wt*(Ht==="middle"?.5:Ht==="end"?1:0),At=At+Lt-Rt/2}$.attr({x:bt,y:At}),H&&H.call(B,Z),J(Z)})})):ut(),B};var p=/(<|<|<)/g,r=/(>|>|>)/g;function e(B){return B.replace(p,"\\lt ").replace(r,"\\gt ")}var a=[["$","$"],["\\(","\\)"]];function n(B,O,H){var Y=parseInt((MathJax.version||"").split(".")[0]);if(Y!==2&&Y!==3){C.warn("No MathJax version:",MathJax.version);return}var j,et,it,ut,J=function(){return et=C.extendDeepAll({},MathJax.Hub.config),it=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:a},displayAlign:"left"})},X=function(){et=C.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=a},tt=function(){if(j=MathJax.Hub.config.menuSettings.renderer,j!=="SVG")return MathJax.Hub.setRenderer("SVG")},V=function(){j=MathJax.config.startup.output,j!=="svg"&&(MathJax.config.startup.output="svg")},Q=function(){var ct="math-output-"+C.randstr({},64);ut=g.select("body").append("div").attr({id:ct}).style({visibility:"hidden",position:"absolute","font-size":O.fontSize+"px"}).text(e(B));var gt=ut.node();return Y===2?MathJax.Hub.Typeset(gt):MathJax.typeset([gt])},ot=function(){var ct=ut.select(Y===2?".MathJax_SVG":".MathJax"),gt=!ct.empty()&&ut.select("svg").node();if(!gt)C.log("There was an error in the tex syntax.",B),H();else{var Tt=gt.getBoundingClientRect(),wt;Y===2?wt=g.select("body").select("#MathJax_SVG_glyphs"):wt=ct.select("defs"),H(ct,wt,Tt)}ut.remove()},$=function(){if(j!=="SVG")return MathJax.Hub.setRenderer(j)},Z=function(){j!=="svg"&&(MathJax.config.startup.output=j)},st=function(){return it!==void 0&&(MathJax.Hub.processSectionDelay=it),MathJax.Hub.Config(et)},nt=function(){MathJax.config=et};Y===2?MathJax.Hub.Queue(J,tt,Q,ot,$,st):Y===3&&(X(),V(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){Q(),ot(),Z(),nt()}))}var f={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},c={sub:"0.3em",sup:"-0.6em"},l={sub:"-0.21em",sup:"0.42em"},m="​",h=["http:","https:","mailto:","",void 0,":"],b=U.NEWLINES=/(\r\n?|\n)/g,u=/(<[^<>]*>)/,o=/<(\/?)([^ >]*)(\s+(.*))?>/i,d=//i;U.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,A=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,_=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,y=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function E(B,O){if(!B)return null;var H=B.match(O),Y=H&&(H[3]||H[4]);return Y&&M(Y)}var T=/(^|;)\s*color:/;U.plainText=function(B,O){O=O||{};for(var H=O.len!==void 0&&O.len!==-1?O.len:1/0,Y=O.allowedTags!==void 0?O.allowedTags:["br"],j="...",et=j.length,it=B.split(u),ut=[],J="",X=0,tt=0;ttet?ut.push(V.substr(0,Z-et)+j):ut.push(V.substr(0,Z));break}J=""}}return ut.join("")};var s={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},L=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function M(B){return B.replace(L,function(O,H){var Y;return H.charAt(0)==="#"?Y=z(H.charAt(1)==="x"?parseInt(H.substr(2),16):parseInt(H.substr(1),10)):Y=s[H],Y||O})}U.convertEntities=M;function z(B){if(!(B>1114111)){var O=String.fromCodePoint;if(O)return O(B);var H=String.fromCharCode;return B<=65535?H(B):H((B>>10)+55232,B%1024+56320)}}function D(B,O){O=O.replace(b," ");var H=!1,Y=[],j,et=-1;function it(){et++;var Rt=document.createElementNS(S.svg,"tspan");g.select(Rt).attr({class:"line",dy:et*x+"em"}),B.appendChild(Rt),j=Rt;var bt=Y;if(Y=[{node:Rt}],bt.length>1)for(var At=1;At.",O);return}var bt=Y.pop();Rt!==bt.type&&C.log("Start tag <"+bt.type+"> doesnt match end tag <"+Rt+">. Pretending it did match.",O),j=Y[Y.length-1].node}var tt=d.test(O);tt?it():(j=B,Y=[{node:B}]);for(var V=O.split(u),Q=0;Qv.ts+S){e();return}v.timer=setTimeout(function(){e(),v.timer=null},S)},U.done=function(C){var i=t[C];return!i||!i.timer?Promise.resolve():new Promise(function(S){var x=i.onDone;i.onDone=function(){x&&x(),S(),i.onDone=null}})},U.clear=function(C){if(C)g(t[C]),delete t[C];else for(var i in t)U.clear(i)};function g(C){C&&C.timer!==null&&(clearTimeout(C.timer),C.timer=null)}},36896:function(G,U,t){var g=t(38248);G.exports=function(i,S){if(i>0)return Math.log(i)/Math.LN10;var x=Math.log(Math.min(S[0],S[1]))/Math.LN10;return g(x)||(x=Math.log(Math.max(S[0],S[1]))/Math.LN10-6),x}},59972:function(G,U,t){var g=G.exports={},C=t(79552).locationmodeToLayer,i=t(55712).NO;g.getTopojsonName=function(S){return[S.scope.replace(/ /g,"-"),"_",S.resolution.toString(),"m"].join("")},g.getTopojsonPath=function(S,x){return S+x+".json"},g.getTopojsonFeatures=function(S,x){var v=C[S.locationmode],p=x.objects[v];return i(x,p).features}},11680:function(G){G.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(G){G.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},69820:function(G,U,t){var g=t(24040);G.exports=function(i){for(var S=g.layoutArrayContainers,x=g.layoutArrayRegexes,v=i.split("[")[0],p,r,e=0;e0&&S.log("Clearing previous rejected promises from queue."),d._promises=[]},U.cleanLayout=function(d){var w,A;d||(d={}),d.xaxis1&&(d.xaxis||(d.xaxis=d.xaxis1),delete d.xaxis1),d.yaxis1&&(d.yaxis||(d.yaxis=d.yaxis1),delete d.yaxis1),d.scene1&&(d.scene||(d.scene=d.scene1),delete d.scene1);var _=(x.subplotsRegistry.cartesian||{}).attrRegex,y=(x.subplotsRegistry.polar||{}).attrRegex,E=(x.subplotsRegistry.ternary||{}).attrRegex,T=(x.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(d);for(w=0;w3?(tt.x=1.02,tt.xanchor="left"):tt.x<-2&&(tt.x=-.02,tt.xanchor="right"),tt.y>3?(tt.y=1.02,tt.yanchor="bottom"):tt.y<-2&&(tt.y=-.02,tt.yanchor="top")),f(d),d.dragmode==="rotate"&&(d.dragmode="orbit"),p.clean(d),d.template&&d.template.layout&&U.cleanLayout(d.template.layout),d};function n(d,w){var A=d[w],_=w.charAt(0);A&&A!=="paper"&&(d[w]=r(A,_,!0))}function f(d){d&&((typeof d.title=="string"||typeof d.title=="number")&&(d.title={text:d.title}),w("titlefont","font"),w("titleposition","position"),w("titleside","side"),w("titleoffset","offset"));function w(A,_){var y=d[A],E=d.title&&d.title[_];y&&!E&&(d.title||(d.title={}),d.title[_]=d[A],delete d[A])}}U.cleanData=function(d){for(var w=0;w0)return d.substr(0,w)}U.hasParent=function(d,w){for(var A=u(w);A;){if(A in d)return!0;A=u(A)}return!1};var o=["x","y","z"];U.clearAxisTypes=function(d,w,A){for(var _=0;_1&&i.warn("Full array edits are incompatible with other edits",l);var w=n[""][""];if(p(w))a.set(null);else if(Array.isArray(w))a.set(w);else return i.warn("Unrecognized full array edit value",l,w),!0;return u?!1:(m(o,d),h(e),!0)}var A=Object.keys(n).map(Number).sort(S),_=a.get(),y=_||[],E=c(d,l).get(),T=[],s=-1,L=y.length,M,z,D,N,I,k,B,O;for(M=0;My.length-(B?0:1)){i.warn("index out of range",l,D);continue}if(k!==void 0)I.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",l,D),p(k)?T.push(D):B?(k==="add"&&(k={}),y.splice(D,0,k),E&&E.splice(D,0,{})):i.warn("Unrecognized full object edit value",l,D,k),s===-1&&(s=D);else for(z=0;z=0;M--)y.splice(T[M],1),E&&E.splice(T[M],1);if(y.length?_||a.set(y):a.set(null),u)return!1;if(m(o,d),b!==C){var H;if(s===-1)H=A;else{for(L=Math.max(y.length,L),H=[],M=0;M=s));M++)H.push(D);for(M=s;M=Mt.data.length||me<-Mt.data.length)throw new Error(jt+" must be valid indices for gd.data.");if(Nt.indexOf(me,ie+1)>-1||me>=0&&Nt.indexOf(-Mt.data.length+me)>-1||me<0&&Nt.indexOf(Mt.data.length+me)>-1)throw new Error("each index in "+jt+" must be unique.")}}function H(Mt,Nt,jt){if(!Array.isArray(Mt.data))throw new Error("gd.data must be an array.");if(typeof Nt>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Nt)||(Nt=[Nt]),O(Mt,Nt,"currentIndices"),typeof jt<"u"&&!Array.isArray(jt)&&(jt=[jt]),typeof jt<"u"&&O(Mt,jt,"newIndices"),typeof jt<"u"&&Nt.length!==jt.length)throw new Error("current and new indices must be of equal length.")}function Y(Mt,Nt,jt){var ie,me;if(!Array.isArray(Mt.data))throw new Error("gd.data must be an array.");if(typeof Nt>"u")throw new Error("traces must be defined.");for(Array.isArray(Nt)||(Nt=[Nt]),ie=0;ie"u")throw new Error("indices must be an integer or array of integers");O(Mt,jt,"indices");for(var be in Nt){if(!Array.isArray(Nt[be])||Nt[be].length!==jt.length)throw new Error("attribute "+be+" must be an array of length equal to indices array length");if(me&&(!(be in ie)||!Array.isArray(ie[be])||ie[be].length!==Nt[be].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}function et(Mt,Nt,jt,ie){var me=S.isPlainObject(ie),be=[],ve,Le,ce,Te,Be;Array.isArray(jt)||(jt=[jt]),jt=B(jt,Mt.data.length-1);for(var ir in Nt)for(var pe=0;pe=0&&Be=0&&Be"u")return Te=U.redraw(Mt),p.add(Mt,me,ve,be,Le),Te;Array.isArray(jt)||(jt=[jt]);try{H(Mt,ie,jt)}catch(Be){throw Mt.data.splice(Mt.data.length-Nt.length,Nt.length),Be}return p.startSequence(Mt),p.add(Mt,me,ve,be,Le),Te=U.moveTraces(Mt,ie,jt),p.stopSequence(Mt),Te}function V(Mt,Nt){Mt=S.getGraphDiv(Mt);var jt=[],ie=U.addTraces,me=V,be=[Mt,jt,Nt],ve=[Mt,Nt],Le,ce;if(typeof Nt>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Nt)||(Nt=[Nt]),O(Mt,Nt,"indices"),Nt=B(Nt,Mt.data.length-1),Nt.sort(S.sorterDes),Le=0;Le"u")for(jt=[],Te=0;Te-1&&be.indexOf("grouptitlefont")===-1?Le(be,be.replace("titlefont","title.font")):be.indexOf("titleposition")>-1?Le(be,be.replace("titleposition","title.position")):be.indexOf("titleside")>-1?Le(be,be.replace("titleside","title.side")):be.indexOf("titleoffset")>-1&&Le(be,be.replace("titleoffset","title.offset"));function Le(ce,Te){Mt[Te]=Mt[ce],delete Mt[ce]}}function Tt(Mt,Nt,jt){Mt=S.getGraphDiv(Mt),w.clearPromiseQueue(Mt);var ie={};if(typeof Nt=="string")ie[Nt]=jt;else if(S.isPlainObject(Nt))ie=S.extendFlat({},Nt);else return S.warn("Relayout fail.",Nt,jt),Promise.reject();Object.keys(ie).length&&(Mt.changed=!0);var me=Lt(Mt,ie),be=me.flags;be.calc&&(Mt.calcdata=void 0);var ve=[a.previousPromises];be.layoutReplot?ve.push(A.layoutReplot):Object.keys(ie).length&&(wt(Mt,be,me)||a.supplyDefaults(Mt),be.legend&&ve.push(A.doLegend),be.layoutstyle&&ve.push(A.layoutStyles),be.axrange&&Rt(ve,me.rangesAltered),be.ticks&&ve.push(A.doTicksRelayout),be.modebar&&ve.push(A.doModeBar),be.camera&&ve.push(A.doCamera),be.colorbars&&ve.push(A.doColorBars),ve.push(L)),ve.push(a.rehover,a.redrag,a.reselect),p.add(Mt,Tt,[Mt,me.undoit],Tt,[Mt,me.redoit]);var Le=S.syncOrAsync(ve,Mt);return(!Le||!Le.then)&&(Le=Promise.resolve(Mt)),Le.then(function(){return Mt.emit("plotly_relayout",me.eventData),Mt})}function wt(Mt,Nt,jt){var ie=Mt._fullLayout;if(!Nt.axrange)return!1;for(var me in Nt)if(me!=="axrange"&&Nt[me])return!1;var be,ve,Le=function(Xe,Ke){return S.coerce(be,ve,c,Xe,Ke)},ce={};for(var Te in jt.rangesAltered){var Be=n.id2name(Te);if(be=Mt.layout[Be],ve=ie[Be],f(be,ve,Le,ce),ve._matchGroup){for(var ir in ve._matchGroup)if(ir!==Te){var pe=ie[n.id2name(ir)];pe.autorange=ve.autorange,pe.range=ve.range.slice(),pe._input.range=ve.range.slice()}}}return!0}function Rt(Mt,Nt){var jt=Nt?function(ie){var me=[],be=!0;for(var ve in Nt){var Le=n.getFromId(ie,ve);if(me.push(ve),(Le.ticklabelposition||"").indexOf("inside")!==-1&&Le._anchorAxis&&me.push(Le._anchorAxis._id),Le._matchGroup)for(var ce in Le._matchGroup)Nt[ce]||me.push(ce)}return n.draw(ie,me,{skipTitle:be})}:function(ie){return n.draw(ie,"redraw")};Mt.push(u,A.doAutoRangeAndConstraints,jt,A.drawData,A.finalDraw)}var bt=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,At=/^[xyz]axis[0-9]*\.autorange$/,mt=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Lt(Mt,Nt){var jt=Mt.layout,ie=Mt._fullLayout,me=ie._guiEditing,be=Z(ie._preGUI,me),ve=Object.keys(Nt),Le=n.list(Mt),ce=S.extendDeepAll({},Nt),Te={},Be,ir,pe;for(gt(Nt),ve=Object.keys(Nt),ir=0;ir0&&typeof Ve.parts[hr]!="string";)hr--;var vr=Ve.parts[hr],Yt=Ve.parts[hr-1]+"."+vr,Gt=Ve.parts.slice(0,hr).join("."),Ne=x(Mt.layout,Gt).get(),Oe=x(ie,Gt).get(),Qe=Ve.get();if(Je!==void 0){ge[ke]=Je,se[ke]=vr==="reverse"?Je:$(Qe);var er=e.getLayoutValObject(ie,Ve.parts);if(er&&er.impliedEdits&&Je!==null)for(var fr in er.impliedEdits)Ae(S.relativeAttr(ke,fr),er.impliedEdits[fr]);if(["width","height"].indexOf(ke)!==-1)if(Je){Ae("autosize",null);var rr=ke==="height"?"width":"height";Ae(rr,ie[rr])}else ie[ke]=Mt._initialAutoSize[ke];else if(ke==="autosize")Ae("width",Je?null:ie.width),Ae("height",Je?null:ie.height);else if(Yt.match(bt))Pe(Yt),x(ie,Gt+"._inputRange").set(null);else if(Yt.match(At)){Pe(Yt),x(ie,Gt+"._inputRange").set(null);var He=x(ie,Gt).get();He._inputDomain&&(He._input.domain=He._inputDomain.slice())}else Yt.match(mt)&&x(ie,Gt+"._inputDomain").set(null);if(vr==="type"){Ie=Ne;var dr=Oe.type==="linear"&&Je==="log",mr=Oe.type==="log"&&Je==="linear";if(dr||mr){if(!Ie||!Ie.range)Ae(Gt+".autorange",!0);else if(Oe.autorange)dr&&(Ie.range=Ie.range[1]>Ie.range[0]?[1,2]:[2,1]);else{var xr=Ie.range[0],pr=Ie.range[1];dr?(xr<=0&&pr<=0&&Ae(Gt+".autorange",!0),xr<=0?xr=pr/1e6:pr<=0&&(pr=xr/1e6),Ae(Gt+".range[0]",Math.log(xr)/Math.LN10),Ae(Gt+".range[1]",Math.log(pr)/Math.LN10)):(Ae(Gt+".range[0]",Math.pow(10,xr)),Ae(Gt+".range[1]",Math.pow(10,pr)))}Array.isArray(ie._subplots.polar)&&ie._subplots.polar.length&&ie[Ve.parts[0]]&&Ve.parts[1]==="radialaxis"&&delete ie[Ve.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(Mt,Oe,Je,Ae),r.getComponentMethod("images","convertCoords")(Mt,Oe,Je,Ae)}else Ae(Gt+".autorange",!0),Ae(Gt+".range",null);x(ie,Gt+"._inputRange").set(null)}else if(vr.match(y)){var Gr=x(ie,ke).get(),Pr=(Je||{}).type;(!Pr||Pr==="-")&&(Pr="linear"),r.getComponentMethod("annotations","convertCoords")(Mt,Gr,Pr,Ae),r.getComponentMethod("images","convertCoords")(Mt,Gr,Pr,Ae)}var Dr=d.containerArrayMatch(ke);if(Dr){Be=Dr.array,ir=Dr.index;var cn=Dr.property,rn=er||{editType:"calc"};ir!==""&&cn===""&&(d.isAddVal(Je)?se[ke]=null:d.isRemoveVal(Je)?se[ke]=(x(jt,Be).get()||[])[ir]:S.warn("unrecognized full object value",Nt)),_.update($e,rn),Te[Be]||(Te[Be]={});var Cn=Te[Be][ir];Cn||(Cn=Te[Be][ir]={}),Cn[cn]=Je,delete Nt[ke]}else vr==="reverse"?(Ne.range?Ne.range.reverse():(Ae(Gt+".autorange",!0),Ne.range=[1,0]),Oe.autorange?$e.calc=!0:$e.plot=!0):(ke==="dragmode"&&(Je===!1&&Qe!==!1||Je!==!1&&Qe===!1)||ie._has("scatter-like")&&ie._has("regl")&&ke==="dragmode"&&(Je==="lasso"||Je==="select")&&!(Qe==="lasso"||Qe==="select")||ie._has("gl2d")?$e.plot=!0:er?_.update($e,er):$e.calc=!0,Ve.set(Je))}}for(Be in Te){var En=d.applyContainerArrayChanges(Mt,be(jt,Be),Te[Be],$e,be);En||($e.plot=!0)}for(var Tr in Ce){Ie=n.getFromId(Mt,Tr);var Cr=Ie&&Ie._constraintGroup;if(Cr){$e.calc=!0;for(var Wr in Cr)Ce[Wr]||(n.getFromId(Mt,Wr)._constraintShrinkable=!0)}}(Ht(Mt)||Nt.height||Nt.width)&&($e.plot=!0);var Ur=ie.shapes;for(ir=0;ir1;)if(ie.pop(),jt=x(Nt,ie.join(".")+".uirevision").get(),jt!==void 0)return jt;return Nt.uirevision}function $t(Mt,Nt){for(var jt=0;jt=me.length?me[0]:me[Te]:me}function Le(Te){return Array.isArray(be)?Te>=be.length?be[0]:be[Te]:be}function ce(Te,Be){var ir=0;return function(){if(Te&&++ir===Be)return Te()}}return new Promise(function(Te,Be){function ir(){if(ie._frameQueue.length!==0){for(;ie._frameQueue.length;){var vr=ie._frameQueue.pop();vr.onInterrupt&&vr.onInterrupt()}Mt.emit("plotly_animationinterrupted",[])}}function pe(vr){if(vr.length!==0){for(var Yt=0;Ytie._timeToNext&&Ke()};vr()}var $e=0;function ge(vr){return Array.isArray(me)?$e>=me.length?vr.transitionOpts=me[$e]:vr.transitionOpts=me[0]:vr.transitionOpts=me,$e++,vr}var se,Ae,Ce=[],Ie=Nt==null,Pe=Array.isArray(Nt),ke=!Ie&&!Pe&&S.isPlainObject(Nt);if(ke)Ce.push({type:"object",data:ge(S.extendFlat({},Nt))});else if(Ie||["string","number"].indexOf(typeof Nt)!==-1)for(se=0;se0&&urur)&&hr.push(Ae);Ce=hr}}Ce.length>0?pe(Ce):(Mt.emit("plotly_animated"),Te())})}function Wt(Mt,Nt,jt){if(Mt=S.getGraphDiv(Mt),Nt==null)return Promise.resolve();if(!S.isPlotDiv(Mt))throw new Error("This element is not a Plotly plot: "+Mt+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var ie,me,be,ve,Le=Mt._transitionData._frames,ce=Mt._transitionData._frameHash;if(!Array.isArray(Nt))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Nt);var Te=Le.length+Nt.length*2,Be=[],ir={};for(ie=Nt.length-1;ie>=0;ie--)if(S.isPlainObject(Nt[ie])){var pe=Nt[ie].name,Xe=(ce[pe]||ir[pe]||{}).name,Ke=Nt[ie].name,or=ce[Xe]||ir[Xe];Xe&&Ke&&typeof Ke=="number"&&or&&EVe.index?-1:ke.index=0;ie--){if(me=Be[ie].frame,typeof me.name=="number"&&S.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!me.name)for(;ce[me.name="frame "+Mt._transitionData._counter++];);if(ce[me.name]){for(be=0;be=0;jt--)ie=Nt[jt],be.push({type:"delete",index:ie}),ve.unshift({type:"insert",index:ie,value:me[ie]});var Le=a.modifyFrames,ce=a.modifyFrames,Te=[Mt,ve],Be=[Mt,be];return p&&p.add(Mt,Le,Te,ce,Be),a.modifyFrames(Mt,be)}function xt(Mt){Mt=S.getGraphDiv(Mt);var Nt=Mt._fullLayout||{},jt=Mt._fullData||[];return a.cleanPlot([],{},jt,Nt),a.purge(Mt),v.purge(Mt),Nt._container&&Nt._container.remove(),delete Mt._context,Mt}function yt(Mt){var Nt=Mt._fullLayout,jt=Mt.getBoundingClientRect();if(!S.equalDomRects(jt,Nt._lastBBox)){var ie=Nt._invTransform=S.inverseTransformMatrix(S.getFullTransformMatrix(Mt));Nt._invScaleX=Math.sqrt(ie[0][0]*ie[0][0]+ie[0][1]*ie[0][1]+ie[0][2]*ie[0][2]),Nt._invScaleY=Math.sqrt(ie[1][0]*ie[1][0]+ie[1][1]*ie[1][1]+ie[1][2]*ie[1][2]),Nt._lastBBox=jt}}function Et(Mt){var Nt=g.select(Mt),jt=Mt._fullLayout;if(jt._calcInverseTransform=yt,jt._calcInverseTransform(Mt),jt._container=Nt.selectAll(".plot-container").data([0]),jt._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),jt._paperdiv=jt._container.selectAll(".svg-container").data([0]),jt._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),jt._glcontainer=jt._paperdiv.selectAll(".gl-container").data([{}]),jt._glcontainer.enter().append("div").classed("gl-container",!0),jt._paperdiv.selectAll(".main-svg").remove(),jt._paperdiv.select(".modebar-container").remove(),jt._paper=jt._paperdiv.insert("svg",":first-child").classed("main-svg",!0),jt._toppaper=jt._paperdiv.append("svg").classed("main-svg",!0),jt._modebardiv=jt._paperdiv.append("div"),delete jt._modeBar,jt._hoverpaper=jt._paperdiv.append("svg").classed("main-svg",!0),!jt._uid){var ie={};g.selectAll("defs").each(function(){this.id&&(ie[this.id.split("-")[1]]=1)}),jt._uid=S.randstr(ie)}jt._paperdiv.selectAll(".main-svg").attr(b.svgAttrs),jt._defs=jt._paper.append("defs").attr("id","defs-"+jt._uid),jt._clips=jt._defs.append("g").classed("clips",!0),jt._topdefs=jt._toppaper.append("defs").attr("id","topdefs-"+jt._uid),jt._topclips=jt._topdefs.append("g").classed("clips",!0),jt._bgLayer=jt._paper.append("g").classed("bglayer",!0),jt._draggers=jt._paper.append("g").classed("draglayer",!0);var me=jt._paper.append("g").classed("layer-below",!0);jt._imageLowerLayer=me.append("g").classed("imagelayer",!0),jt._shapeLowerLayer=me.append("g").classed("shapelayer",!0),jt._cartesianlayer=jt._paper.append("g").classed("cartesianlayer",!0),jt._polarlayer=jt._paper.append("g").classed("polarlayer",!0),jt._smithlayer=jt._paper.append("g").classed("smithlayer",!0),jt._ternarylayer=jt._paper.append("g").classed("ternarylayer",!0),jt._geolayer=jt._paper.append("g").classed("geolayer",!0),jt._funnelarealayer=jt._paper.append("g").classed("funnelarealayer",!0),jt._pielayer=jt._paper.append("g").classed("pielayer",!0),jt._iciclelayer=jt._paper.append("g").classed("iciclelayer",!0),jt._treemaplayer=jt._paper.append("g").classed("treemaplayer",!0),jt._sunburstlayer=jt._paper.append("g").classed("sunburstlayer",!0),jt._indicatorlayer=jt._toppaper.append("g").classed("indicatorlayer",!0),jt._glimages=jt._paper.append("g").classed("glimages",!0);var be=jt._toppaper.append("g").classed("layer-above",!0);jt._imageUpperLayer=be.append("g").classed("imagelayer",!0),jt._shapeUpperLayer=be.append("g").classed("shapelayer",!0),jt._selectionLayer=jt._toppaper.append("g").classed("selectionlayer",!0),jt._infolayer=jt._toppaper.append("g").classed("infolayer",!0),jt._menulayer=jt._toppaper.append("g").classed("menulayer",!0),jt._zoomlayer=jt._toppaper.append("g").classed("zoomlayer",!0),jt._hoverlayer=jt._hoverpaper.append("g").classed("hoverlayer",!0),jt._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Mt.emit("plotly_framework")}U.animate=Jt,U.addFrames=Wt,U.deleteFrames=Ft,U.addTraces=tt,U.deleteTraces=V,U.extendTraces=J,U.moveTraces=Q,U.prependTraces=X,U.newPlot=k,U._doPlot=s,U.purge=xt,U.react=xe,U.redraw=I,U.relayout=Tt,U.restyle=ot,U.setPlotConfig=M,U.update=Ut,U._guiRelayout=kt(Tt),U._guiRestyle=kt(ot),U._guiUpdate=kt(Ut),U._storeDirectGUIEdit=nt},20556:function(G){var U={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","mapbox"],extras:[!0,!1],dflt:"gl3d+geo+mapbox"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/"},mapboxAccessToken:{valType:"string",dflt:null},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},globalTransforms:{valType:"any",dflt:[]},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},t={};function g(C,i){for(var S in C){var x=C[S];x.valType?i[S]=x.dflt:(i[S]||(i[S]={}),g(x,i[S]))}}g(U,t),G.exports={configAttributes:U,dfltConfig:t}},73060:function(G,U,t){var g=t(24040),C=t(3400),i=t(45464),S=t(64859),x=t(16672),v=t(85656),p=t(20556).configAttributes,r=t(67824),e=C.extendDeepAll,a=C.isPlainObject,n=C.isArrayOrTypedArray,f=C.nestedProperty,c=C.valObjectMeta,l="_isSubplotObj",m="_isLinkedToArray",h="_arrayAttrRegexps",b="_deprecated",u=[l,m,h,b];U.IS_SUBPLOT_OBJ=l,U.IS_LINKED_TO_ARRAY=m,U.DEPRECATED=b,U.UNDERSCORE_ATTRS=u,U.get=function(){var N={};g.allTypes.forEach(function(k){N[k]=A(k)});var I={};return Object.keys(g.transformsRegistry).forEach(function(k){I[k]=y(k)}),{defs:{valObjects:c,metaKeys:u.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:N,layout:_(),transforms:I,frames:E(),animation:T(v),config:T(p)}},U.crawl=function(N,I,k,B){var O=k||0;B=B||"",Object.keys(N).forEach(function(H){var Y=N[H];if(u.indexOf(H)===-1){var j=(B?B+".":"")+H;I(Y,H,N,O,j),!U.isValObject(Y)&&a(Y)&&H!=="impliedEdits"&&U.crawl(Y,I,O+1,j)}})},U.isValObject=function(N){return N&&N.valType!==void 0},U.findArrayAttributes=function(N){var I=[],k=[],B=[],O,H;function Y(X,tt,V,Q){k=k.slice(0,Q).concat([tt]),B=B.slice(0,Q).concat([X&&X._isLinkedToArray]);var ot=X&&(X.valType==="data_array"||X.arrayOk===!0)&&!(k[Q-1]==="colorbar"&&(tt==="ticktext"||tt==="tickvals"));ot&&j(O,0,"")}function j(X,tt,V){var Q=X[k[tt]],ot=V+k[tt];if(tt===k.length-1)n(Q)&&I.push(H+ot);else if(B[tt]){if(Array.isArray(Q))for(var $=0;$=Y.length)return!1;O=(g.transformsRegistry[Y[j].type]||{}).attributes,H=O&&O[I[2]],B=3}else{var et=N._module;if(et||(et=(g.modules[N.type||i.type.dflt]||{})._module),!et)return!1;if(O=et.attributes,H=O&&O[k],!H){var it=et.basePlotModule;it&&it.attributes&&(H=it.attributes[k])}H||(H=i[k])}return d(H,I,B)},U.getLayoutValObject=function(N,I){var k=o(N,I[0]);return d(k,I,1)};function o(N,I){var k,B,O,H,Y=N._basePlotModules;if(Y){var j;for(k=0;k=H.length)return!1;if(N.dimensions===2){if(k++,I.length===k)return N;var Y=I[k];if(!w(Y))return!1;N=H[O][Y]}else N=H[O]}else N=H}}return N}function w(N){return N===Math.round(N)&&N>=0}function A(N){var I,k;I=g.modules[N]._module,k=I.basePlotModule;var B={};B.type=null;var O=e({},i),H=e({},I.attributes);U.crawl(H,function(et,it,ut,J,X){f(O,X).set(void 0),et===void 0&&f(H,X).set(void 0)}),e(B,O),g.traceIs(N,"noOpacity")&&delete B.opacity,g.traceIs(N,"showLegend")||(delete B.showlegend,delete B.legendgroup),g.traceIs(N,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),I.selectPoints||delete B.selectedpoints,e(B,H),k.attributes&&e(B,k.attributes),B.type=N;var Y={meta:I.meta||{},categories:I.categories||{},animatable:!!I.animatable,type:N,attributes:T(B)};if(I.layoutAttributes){var j={};e(j,I.layoutAttributes),Y.layoutAttributes=T(j)}return I.animatable||U.crawl(Y,function(et){U.isValObject(et)&&"anim"in et&&delete et.anim}),Y}function _(){var N={},I,k;e(N,S);for(I in g.subplotsRegistry)if(k=g.subplotsRegistry[I],!!k.layoutAttributes)if(Array.isArray(k.attr))for(var B=0;B=a&&(e._input||{})._templateitemname;f&&(n=a);var c=r+"["+n+"]",l;function m(){l={},f&&(l[c]={},l[c][i]=f)}m();function h(d,w){l[d]=w}function b(d,w){f?g.nestedProperty(l[c],d).set(w):l[c+"."+d]=w}function u(){var d=l;return m(),d}function o(d,w){d&&b(d,w);var A=u();for(var _ in A)g.nestedProperty(p,_).set(A[_])}return{modifyBase:h,modifyItem:b,getUpdateObj:u,applyUpdate:o}}},39172:function(G,U,t){var g=t(33428),C=t(24040),i=t(7316),S=t(3400),x=t(72736),v=t(73696),p=t(76308),r=t(43616),e=t(81668),a=t(45460),n=t(54460),f=t(84284),c=t(71888),l=c.enforce,m=c.clean,h=t(19280).doAutoRange,b="start",u="middle",o="end";U.layoutStyles=function(k){return S.syncOrAsync([i.doAutoMargin,w],k)};function d(k,B,O){for(var H=0;H=k[1]||Y[1]<=k[0])&&j[0]B[0])return!0}return!1}function w(k){var B=k._fullLayout,O=B._size,H=O.p,Y=n.list(k,"",!0),j,et,it,ut,J,X;if(B._paperdiv.style({width:k._context.responsive&&B.autosize&&!k._context._hasZeroWidth&&!k.layout.width?"100%":B.width+"px",height:k._context.responsive&&B.autosize&&!k._context._hasZeroHeight&&!k.layout.height?"100%":B.height+"px"}).selectAll(".main-svg").call(r.setSize,B.width,B.height),k._context.setBackground(k,B.paper_bgcolor),U.drawMainTitle(k),a.manage(k),!B._has("cartesian"))return i.previousPromises(k);function tt(xt,yt,Et){var Mt=xt._lw/2;if(xt._id.charAt(0)==="x"){if(yt){if(Et==="top")return yt._offset-H-Mt}else return O.t+O.h*(1-(xt.position||0))+Mt%1;return yt._offset+yt._length+H+Mt}if(yt){if(Et==="right")return yt._offset+yt._length+H+Mt}else return O.l+O.w*(xt.position||0)+Mt%1;return yt._offset-H-Mt}for(j=0;j0){L(k,j,J,ut),it.attr({x:et,y:j,"text-anchor":H,dy:D(B.yanchor)}).call(x.positionText,et,j);var X=(B.text.match(x.BR_TAG_ALL)||[]).length;if(X){var tt=f.LINE_SPACING*X+f.MID_SHIFT;B.y===0&&(tt=-tt),it.selectAll(".line").each(function(){var V=+this.getAttribute("dy").slice(0,-2)-tt+"em";this.setAttribute("dy",V)})}}}};function E(k,B,O,H,Y){var j=B.yref==="paper"?k._fullLayout._size.h:k._fullLayout.height,et=S.isTopAnchor(B)?H:H-Y,it=O==="b"?j-et:et;return S.isTopAnchor(B)&&O==="t"||S.isBottomAnchor(B)&&O==="b"?!1:it.5?"t":"b",et=k._fullLayout.margin[j],it=0;return B.yref==="paper"?it=O+B.pad.t+B.pad.b:B.yref==="container"&&(it=T(j,H,Y,k._fullLayout.height,O)+B.pad.t+B.pad.b),it>et?it:0}function L(k,B,O,H){var Y="title.automargin",j=k._fullLayout.title,et=j.y>.5?"t":"b",it={x:j.x,y:j.y,t:0,b:0},ut={};j.yref==="paper"&&E(k,j,et,B,H)?it[et]=O:j.yref==="container"&&(ut[et]=O,k._fullLayout._reservedMargin[Y]=ut),i.allowAutoMargin(k,Y),i.autoMargin(k,Y,it)}function M(k,B){var O=k.title,H=k._size,Y=0;switch(B===b?Y=O.pad.l:B===o&&(Y=-O.pad.r),O.xref){case"paper":return H.l+H.w*O.x+Y;case"container":default:return k.width*O.x+Y}}function z(k,B){var O=k.title,H=k._size,Y=0;if(B==="0em"||!B?Y=-O.pad.b:B===f.CAP_SHIFT+"em"&&(Y=O.pad.t),O.y==="auto")return H.t/2;switch(O.yref){case"paper":return H.t+H.h-H.h*O.y+Y;case"container":default:return k.height-k.height*O.y+Y}}function D(k){return k==="top"?f.CAP_SHIFT+.3+"em":k==="bottom"?"-0.3em":f.MID_SHIFT+"em"}function N(k){var B=k.title,O=u;return S.isRightAnchor(B)?O=o:S.isLeftAnchor(B)&&(O=b),O}function I(k){var B=k.title,O="0em";return S.isTopAnchor(B)?O=f.CAP_SHIFT+"em":S.isMiddleAnchor(B)&&(O=f.MID_SHIFT+"em"),O}U.doTraceStyle=function(k){var B=k.calcdata,O=[],H;for(H=0;HI?A.push({code:"unused",traceType:M,templateCount:N,dataCount:I}):I>N&&A.push({code:"reused",traceType:M,templateCount:N,dataCount:I})}}function k(B,O){for(var H in B)if(H.charAt(0)!=="_"){var Y=B[H],j=c(B,H,O);C(Y)?(Array.isArray(B)&&Y._template===!1&&Y.templateitemname&&A.push({code:"missing",path:j,templateitemname:Y.templateitemname}),k(Y,j)):Array.isArray(Y)&&l(Y)&&k(Y,j)}}if(k({data:y,layout:_},""),A.length)return A.map(m)};function l(h){for(var b=0;b1&&A.push(f("object","layout"))),C.supplyDefaults(_);for(var T=_._fullData,s=y.length,L=0;LM.length&&w.push(f("unused",A,s.concat(M.length)));var B=M.length,O=Array.isArray(k);O&&(B=Math.min(B,k.length));var H,Y,j,et,it;if(z.dimensions===2)for(Y=0;YM[Y].length&&w.push(f("unused",A,s.concat(Y,M[Y].length)));var ut=M[Y].length;for(H=0;H<(O?Math.min(ut,k[Y].length):ut);H++)j=O?k[Y][H]:k,et=L[Y][H],it=M[Y][H],g.validate(et,j)?it!==et&&it!==+et&&w.push(f("dynamic",A,s.concat(Y,H),et,it)):w.push(f("value",A,s.concat(Y,H),et))}else w.push(f("array",A,s.concat(Y),L[Y]));else for(Y=0;Y0&&Math.round(m)===m)l=m;else return{vals:n}}for(var h=e.calendar,b=f==="start",u=f==="end",o=r[a+"period0"],d=i(o,h)||0,w=[],A=[],_=[],y=n.length,E=0;ET;)M=S(M,-l,h);for(;M<=T;)M=S(M,l,h);L=S(M,-l,h)}else{for(s=Math.round((T-d)/c),M=d+s*c;M>T;)M-=c;for(;M<=T;)M+=c;L=M-c}w[E]=b?L:u?M:(L+M)/2,A[E]=L,_[E]=M}return{vals:w,starts:A,ends:_}}},26720:function(G){G.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(G,U,t){var g=t(33428),C=t(38248),i=t(3400),S=t(39032).FP_SAFE,x=t(24040),v=t(43616),p=t(79811),r=p.getFromId,e=p.isLinked;G.exports={applyAutorangeOptions:s,getAutoRange:a,makePadFn:f,doAutoRange:h,findExtremes:b,concatExtremes:m};function a(L,M){var z,D,N=[],I=L._fullLayout,k=f(I,M,0),B=f(I,M,1),O=m(L,M),H=O.min,Y=O.max;if(H.length===0||Y.length===0)return i.simpleMap(M.range,M.r2l);var j=H[0].val,et=Y[0].val;for(z=1;z0&&(gt=Q-k(Z)-B(st),gt>ot?Tt/gt>$&&(nt=Z,ct=st,$=Tt/gt):Tt/Q>$&&(nt={val:Z.val,nopad:1},ct={val:st.val,nopad:1},$=Tt/Q));function wt(Lt,Ht){return Math.max(Lt,B(Ht))}if(j===et){var Rt=j-1,bt=j+1;if(tt)if(j===0)N=[0,1];else{var At=(j>0?Y:H).reduce(wt,0),mt=j/(1-Math.min(.5,At/Q));N=j>0?[0,mt]:[mt,0]}else V?N=[Math.max(0,Rt),Math.max(1,bt)]:N=[Rt,bt]}else tt?(nt.val>=0&&(nt={val:0,nopad:1}),ct.val<=0&&(ct={val:0,nopad:1})):V&&(nt.val-$*k(nt)<0&&(nt={val:0,nopad:1}),ct.val<=0&&(ct={val:1,nopad:1})),$=(ct.val-nt.val-n(M,Z.val,st.val))/(Q-k(nt)-B(ct)),N=[nt.val-$*k(nt),ct.val+$*B(ct)];return N=s(N,M),M.limitRange&&M.limitRange(),ut&&N.reverse(),i.simpleMap(N,M.l2r||Number)}function n(L,M,z){var D=0;if(L.rangebreaks)for(var N=L.locateBreaks(M,z),I=0;I0?z.ppadplus:z.ppadminus)||z.ppad||0),Z=ot((L._m>0?z.ppadminus:z.ppadplus)||z.ppad||0),st=ot(z.vpadplus||z.vpad),nt=ot(z.vpadminus||z.vpad);if(!H){if(V=1/0,Q=-1/0,O)for(j=0;j0&&(V=et),et>Q&&et-S&&(V=et),et>Q&&et=Tt;j--)gt(j);return{min:D,max:N,opts:z}}function u(L,M,z,D){d(L,M,z,D,A)}function o(L,M,z,D){d(L,M,z,D,_)}function d(L,M,z,D,N){for(var I=D.tozero,k=D.extrapad,B=!0,O=0;O=z&&(H.extrapad||!k)){B=!1;break}else N(M,H.val)&&H.pad<=z&&(k||!H.extrapad)&&(L.splice(O,1),O--)}if(B){var Y=I&&M===0;L.push({val:M,pad:Y?0:z,extrapad:Y?!1:k})}}function w(L){return C(L)&&Math.abs(L)=M}function y(L,M){var z=M.autorangeoptions;return z&&z.minallowed!==void 0&&T(M,z.minallowed,z.maxallowed)?z.minallowed:z&&z.clipmin!==void 0&&T(M,z.clipmin,z.clipmax)?Math.max(L,M.d2l(z.clipmin)):L}function E(L,M){var z=M.autorangeoptions;return z&&z.maxallowed!==void 0&&T(M,z.minallowed,z.maxallowed)?z.maxallowed:z&&z.clipmax!==void 0&&T(M,z.clipmin,z.clipmax)?Math.min(L,M.d2l(z.clipmax)):L}function T(L,M,z){return M!==void 0&&z!==void 0?(M=L.d2l(M),z=L.d2l(z),M=O&&(I=O,z=O),k<=O&&(k=O,D=O)}}return z=y(z,M),D=E(D,M),[z,D]}},76808:function(G){G.exports=function(t,g,C){var i,S;if(C){var x=g==="reversed"||g==="min reversed"||g==="max reversed";i=C[x?1:0],S=C[x?0:1]}var v=t("autorangeoptions.minallowed",S===null?i:void 0),p=t("autorangeoptions.maxallowed",i===null?S:void 0);v===void 0&&t("autorangeoptions.clipmin"),p===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}},54460:function(G,U,t){var g=t(33428),C=t(38248),i=t(7316),S=t(24040),x=t(3400),v=x.strTranslate,p=t(72736),r=t(81668),e=t(76308),a=t(43616),n=t(94724),f=t(98728),c=t(39032),l=c.ONEMAXYEAR,m=c.ONEAVGYEAR,h=c.ONEMINYEAR,b=c.ONEMAXQUARTER,u=c.ONEAVGQUARTER,o=c.ONEMINQUARTER,d=c.ONEMAXMONTH,w=c.ONEAVGMONTH,A=c.ONEMINMONTH,_=c.ONEWEEK,y=c.ONEDAY,E=y/2,T=c.ONEHOUR,s=c.ONEMIN,L=c.ONESEC,M=c.MINUS_SIGN,z=c.BADNUM,D={K:"zeroline"},N={K:"gridline",L:"path"},I={K:"minor-gridline",L:"path"},k={K:"tick",L:"path"},B={K:"tick",L:"text"},O={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},H=t(84284),Y=H.MID_SHIFT,j=H.CAP_SHIFT,et=H.LINE_SPACING,it=H.OPPOSITE_SIDE,ut=3,J=G.exports={};J.setConvert=t(78344);var X=t(52976),tt=t(79811),V=tt.idSort,Q=tt.isLinked;J.id2name=tt.id2name,J.name2id=tt.name2id,J.cleanId=tt.cleanId,J.list=tt.list,J.listIds=tt.listIds,J.getFromId=tt.getFromId,J.getFromTrace=tt.getFromTrace;var ot=t(19280);J.getAutoRange=ot.getAutoRange,J.findExtremes=ot.findExtremes;var $=1e-4;function Z(Yt){var Gt=(Yt[1]-Yt[0])*$;return[Yt[0]-Gt,Yt[1]+Gt]}J.coerceRef=function(Yt,Gt,Ne,Oe,Qe,er){var fr=Oe.charAt(Oe.length-1),rr=Ne._fullLayout._subplots[fr+"axis"],He=Oe+"ref",dr={};return Qe||(Qe=rr[0]||(typeof er=="string"?er:er[0])),er||(er=Qe),rr=rr.concat(rr.map(function(mr){return mr+" domain"})),dr[He]={valType:"enumerated",values:rr.concat(er?typeof er=="string"?[er]:er:[]),dflt:Qe},x.coerce(Yt,Gt,dr,He)},J.getRefType=function(Yt){return Yt===void 0?Yt:Yt==="paper"?"paper":Yt==="pixel"?"pixel":/( domain)$/.test(Yt)?"domain":"range"},J.coercePosition=function(Yt,Gt,Ne,Oe,Qe,er){var fr,rr,He=J.getRefType(Oe);if(He!=="range")fr=x.ensureNumber,rr=Ne(Qe,er);else{var dr=J.getFromId(Gt,Oe);er=dr.fraction2r(er),rr=Ne(Qe,er),fr=dr.cleanPos}Yt[Qe]=fr(rr)},J.cleanPosition=function(Yt,Gt,Ne){var Oe=Ne==="paper"||Ne==="pixel"?x.ensureNumber:J.getFromId(Gt,Ne).cleanPos;return Oe(Yt)},J.redrawComponents=function(Yt,Gt){Gt=Gt||J.listIds(Yt);var Ne=Yt._fullLayout;function Oe(Qe,er,fr,rr){for(var He=S.getComponentMethod(Qe,er),dr={},mr=0;mr2e-6||((Ne-Yt._forceTick0)/Yt._minDtick%1+1.000001)%1>2e-6)&&(Yt._minDtick=0))},J.saveRangeInitial=function(Yt,Gt){for(var Ne=J.list(Yt,"",!0),Oe=!1,Qe=0;Qexr*.3||dr(Oe)||dr(Qe))){var pr=Ne.dtick/2;Yt+=Yt+prfr){var rr=Number(Ne.substr(1));er.exactYears>fr&&rr%12===0?Yt=J.tickIncrement(Yt,"M6","reverse")+y*1.5:er.exactMonths>fr?Yt=J.tickIncrement(Yt,"M1","reverse")+y*15.5:Yt-=E;var He=J.tickIncrement(Yt,Ne);if(He<=Oe)return He}return Yt}J.prepMinorTicks=function(Yt,Gt,Ne){if(!Gt.minor.dtick){delete Yt.dtick;var Oe=Gt.dtick&&C(Gt._tmin),Qe;if(Oe){var er=J.tickIncrement(Gt._tmin,Gt.dtick,!0);Qe=[Gt._tmin,er*.99+Gt._tmin*.01]}else{var fr=x.simpleMap(Gt.range,Gt.r2l);Qe=[fr[0],.8*fr[0]+.2*fr[1]]}if(Yt.range=x.simpleMap(Qe,Gt.l2r),Yt._isMinor=!0,J.prepTicks(Yt,Ne),Oe){var rr=C(Gt.dtick),He=C(Yt.dtick),dr=rr?Gt.dtick:+Gt.dtick.substring(1),mr=He?Yt.dtick:+Yt.dtick.substring(1);rr&&He?wt(dr,mr)?dr===2*_&&mr===2*y&&(Yt.dtick=_):dr===2*_&&mr===3*y?Yt.dtick=_:dr===_&&!(Gt._input.minor||{}).nticks?Yt.dtick=y:Rt(dr/mr,2.5)?Yt.dtick=dr/2:Yt.dtick=dr:String(Gt.dtick).charAt(0)==="M"?He?Yt.dtick="M1":wt(dr,mr)?dr>=12&&mr===2&&(Yt.dtick="M3"):Yt.dtick=Gt.dtick:String(Yt.dtick).charAt(0)==="L"?String(Gt.dtick).charAt(0)==="L"?wt(dr,mr)||(Yt.dtick=Rt(dr/mr,2.5)?Gt.dtick/2:Gt.dtick):Yt.dtick="D1":Yt.dtick==="D2"&&+Gt.dtick>1&&(Yt.dtick=1)}Yt.range=Gt.range}Gt.minor._tick0Init===void 0&&(Yt.tick0=Gt.tick0)};function wt(Yt,Gt){return Math.abs((Yt/Gt+.5)%1-.5)<.001}function Rt(Yt,Gt){return Math.abs(Yt/Gt-1)<.001}J.prepTicks=function(Yt,Gt){var Ne=x.simpleMap(Yt.range,Yt.r2l,void 0,void 0,Gt);if(Yt.tickmode==="auto"||!Yt.dtick){var Oe=Yt.nticks,Qe;Oe||(Yt.type==="category"||Yt.type==="multicategory"?(Qe=Yt.tickfont?x.bigFont(Yt.tickfont.size||12):15,Oe=Yt._length/Qe):(Qe=Yt._id.charAt(0)==="y"?40:80,Oe=x.constrain(Yt._length/Qe,4,9)+1),Yt._name==="radialaxis"&&(Oe*=2)),Yt.minor&&Yt.minor.tickmode!=="array"||Yt.tickmode==="array"&&(Oe*=100),Yt._roughDTick=Math.abs(Ne[1]-Ne[0])/Oe,J.autoTicks(Yt,Yt._roughDTick),Yt._minDtick>0&&Yt.dtick0?(er=Oe-1,fr=Oe):(er=Oe,fr=Oe);var rr=Yt[er].value,He=Yt[fr].value,dr=Math.abs(He-rr),mr=Ne||dr,xr=0;mr>=h?dr>=h&&dr<=l?xr=dr:xr=m:Ne===u&&mr>=o?dr>=o&&dr<=b?xr=dr:xr=u:mr>=A?dr>=A&&dr<=d?xr=dr:xr=w:Ne===_&&mr>=_?xr=_:mr>=y?xr=y:Ne===E&&mr>=E?xr=E:Ne===T&&mr>=T&&(xr=T);var pr;xr>=dr&&(xr=dr,pr=!0);var Gr=Qe+xr;if(Gt.rangebreaks&&xr>0){for(var Pr=84,Dr=0,cn=0;cn_&&(xr=dr)}(xr>0||Oe===0)&&(Yt[Oe].periodX=Qe+xr/2)}}J.calcTicks=function(Gt,Ne){for(var Oe=Gt.type,Qe=Gt.calendar,er=Gt.ticklabelstep,fr=Gt.ticklabelmode==="period",rr=x.simpleMap(Gt.range,Gt.r2l,void 0,void 0,Ne),He=rr[1]=(cn?0:1);rn--){var Cn=!rn;rn?(Gt._dtickInit=Gt.dtick,Gt._tick0Init=Gt.tick0):(Gt.minor._dtickInit=Gt.minor.dtick,Gt.minor._tick0Init=Gt.minor.tick0);var En=rn?Gt:x.extendFlat({},Gt,Gt.minor);if(Cn?J.prepMinorTicks(En,Gt,Ne):J.prepTicks(En,Ne),En.tickmode==="array"){rn?(Pr=[],pr=Ut(Gt,!Cn)):(Dr=[],Gr=Ut(Gt,!Cn));continue}if(En.tickmode==="sync"){Pr=[],pr=Ht(Gt);continue}var Tr=Z(rr),Cr=Tr[0],Wr=Tr[1],Ur=C(En.dtick),an=Oe==="log"&&!(Ur||En.dtick.charAt(0)==="L"),pn=J.tickFirst(En,Ne);if(rn){if(Gt._tmin=pn,pn=Wr:_n<=Wr;_n=J.tickIncrement(_n,ci,He,Qe)){if(rn&&kn++,En.rangebreaks&&!He){if(_n=mr)break}if(Pr.length>xr||_n===gn)break;gn=_n;var di={value:_n};rn?(an&&_n!==(_n|0)&&(di.simpleLabel=!0),er>1&&kn%er&&(di.skipLabel=!0),Pr.push(di)):(di.minor=!0,Dr.push(di))}}if(cn){var li=Gt.minor.ticks==="inside"&&Gt.ticks==="outside"||Gt.minor.ticks==="outside"&&Gt.ticks==="inside";if(!li){for(var ri=Pr.map(function(hn){return hn.value}),wr=[],nn=0;nn-1;An--){if(Pr[An].drop){Pr.splice(An,1);continue}Pr[An].value=Ve(Pr[An].value,Gt);var Di=Gt.c2p(Pr[An].value);(Bn?gi>Di-Jn:gimr||Ormr&&(Ar.periodX=mr),OrQe&&prm)Gt/=m,Oe=Qe(10),Yt.dtick="M"+12*he(Gt,Oe,kt);else if(er>w)Gt/=w,Yt.dtick="M"+he(Gt,1,Vt);else if(er>y){if(Yt.dtick=he(Gt,y,Yt._hasDayOfWeekBreaks?[1,2,7,14]:re),!Ne){var fr=J.getTickFormat(Yt),rr=Yt.ticklabelmode==="period";rr&&(Yt._rawTick0=Yt.tick0),/%[uVW]/.test(fr)?Yt.tick0=x.dateTick0(Yt.calendar,2):Yt.tick0=x.dateTick0(Yt.calendar,1),rr&&(Yt._dowTick0=Yt.tick0)}}else er>T?Yt.dtick=he(Gt,T,Vt):er>s?Yt.dtick=he(Gt,s,It):er>L?Yt.dtick=he(Gt,L,It):(Oe=Qe(10),Yt.dtick=he(Gt,Oe,kt))}else if(Yt.type==="log"){Yt.tick0=0;var He=x.simpleMap(Yt.range,Yt.r2l);if(Yt._isMinor&&(Gt*=1.5),Gt>.7)Yt.dtick=Math.ceil(Gt);else if(Math.abs(He[1]-He[0])<1){var dr=1.5*Math.abs((He[1]-He[0])/Gt);Gt=Math.abs(Math.pow(10,He[1])-Math.pow(10,He[0]))/dr,Oe=Qe(10),Yt.dtick="L"+he(Gt,Oe,kt)}else Yt.dtick=Gt>.3?"D2":"D1"}else Yt.type==="category"||Yt.type==="multicategory"?(Yt.tick0=0,Yt.dtick=Math.ceil(Math.max(Gt,1))):ke(Yt)?(Yt.tick0=0,Oe=1,Yt.dtick=he(Gt,Oe,le)):(Yt.tick0=0,Oe=Qe(10),Yt.dtick=he(Gt,Oe,kt));if(Yt.dtick===0&&(Yt.dtick=1),!C(Yt.dtick)&&typeof Yt.dtick!="string"){var mr=Yt.dtick;throw Yt.dtick=1,"ax.dtick error: "+String(mr)}};function de(Yt){var Gt=Yt.dtick;if(Yt._tickexponent=0,!C(Gt)&&typeof Gt!="string"&&(Gt=1),(Yt.type==="category"||Yt.type==="multicategory")&&(Yt._tickround=null),Yt.type==="date"){var Ne=Yt.r2l(Yt.tick0),Oe=Yt.l2r(Ne).replace(/(^-|i)/g,""),Qe=Oe.length;if(String(Gt).charAt(0)==="M")Qe>10||Oe.substr(5)!=="01-01"?Yt._tickround="d":Yt._tickround=+Gt.substr(1)%12===0?"y":"m";else if(Gt>=y&&Qe<=10||Gt>=y*15)Yt._tickround="d";else if(Gt>=s&&Qe<=16||Gt>=T)Yt._tickround="M";else if(Gt>=L&&Qe<=19||Gt>=s)Yt._tickround="S";else{var er=Yt.l2r(Ne+Gt).replace(/^-/,"").length;Yt._tickround=Math.max(Qe,er)-20,Yt._tickround<0&&(Yt._tickround=4)}}else if(C(Gt)||Gt.charAt(0)==="L"){var fr=Yt.range.map(Yt.r2d||Number);C(Gt)||(Gt=Number(Gt.substr(1))),Yt._tickround=2-Math.floor(Math.log(Gt)/Math.LN10+.01);var rr=Math.max(Math.abs(fr[0]),Math.abs(fr[1])),He=Math.floor(Math.log(rr)/Math.LN10+.01),dr=Yt.minexponent===void 0?3:Yt.minexponent;Math.abs(He)>dr&&(yt(Yt.exponentformat)&&!Et(He)?Yt._tickexponent=3*Math.round((He-1)/3):Yt._tickexponent=He)}else Yt._tickround=null}J.tickIncrement=function(Yt,Gt,Ne,Oe){var Qe=Ne?-1:1;if(C(Gt))return x.increment(Yt,Qe*Gt);var er=Gt.charAt(0),fr=Qe*Number(Gt.substr(1));if(er==="M")return x.incrementMonth(Yt,fr,Oe);if(er==="L")return Math.log(Math.pow(10,Yt)+fr)/Math.LN10;if(er==="D"){var rr=Gt==="D2"?$t:Kt,He=Yt+Qe*.01,dr=x.roundUp(x.mod(He,1),rr,Ne);return Math.floor(He)+Math.log(g.round(Math.pow(10,dr),1))/Math.LN10}throw"unrecognized dtick "+String(Gt)},J.tickFirst=function(Yt,Gt){var Ne=Yt.r2l||Number,Oe=x.simpleMap(Yt.range,Ne,void 0,void 0,Gt),Qe=Oe[1]=0&&rn<=Yt._length?cn:null};if(er&&x.isArrayOrTypedArray(Yt.ticktext)){var xr=x.simpleMap(Yt.range,Yt.r2l),pr=(Math.abs(xr[1]-xr[0])-(Yt._lBreaks||0))/1e4;for(dr=0;dr"+rr;else{var dr=Je(Yt),mr=Yt._trueSide||Yt.side;(!dr&&mr==="top"||dr&&mr==="bottom")&&(fr+="
    ")}Gt.text=fr}function ne(Yt,Gt,Ne,Oe,Qe){var er=Yt.dtick,fr=Gt.x,rr=Yt.tickformat,He=typeof er=="string"&&er.charAt(0);if(Qe==="never"&&(Qe=""),Oe&&He!=="L"&&(er="L3",He="L"),rr||He==="L")Gt.text=Mt(Math.pow(10,fr),Yt,Qe,Oe);else if(C(er)||He==="D"&&x.mod(fr+.01,1)<.1){var dr=Math.round(fr),mr=Math.abs(dr),xr=Yt.exponentformat;xr==="power"||yt(xr)&&Et(dr)?(dr===0?Gt.text=1:dr===1?Gt.text="10":Gt.text="10"+(dr>1?"":M)+mr+"",Gt.fontSize*=1.25):(xr==="e"||xr==="E")&&mr>2?Gt.text="1"+xr+(dr>0?"+":M)+mr:(Gt.text=Mt(Math.pow(10,fr),Yt,"","fakehover"),er==="D1"&&Yt._id.charAt(0)==="y"&&(Gt.dy-=Gt.fontSize/6))}else if(He==="D")Gt.text=String(Math.round(Math.pow(10,x.mod(fr,1)))),Gt.fontSize*=.75;else throw"unrecognized dtick "+String(er);if(Yt.dtick==="D1"){var pr=String(Gt.text).charAt(0);(pr==="0"||pr==="1")&&(Yt._id.charAt(0)==="y"?Gt.dx-=Gt.fontSize/4:(Gt.dy+=Gt.fontSize/2,Gt.dx+=(Yt.range[1]>Yt.range[0]?1:-1)*Gt.fontSize*(fr<0?.5:.25)))}}function zt(Yt,Gt){var Ne=Yt._categories[Math.round(Gt.x)];Ne===void 0&&(Ne=""),Gt.text=String(Ne)}function Xt(Yt,Gt,Ne){var Oe=Math.round(Gt.x),Qe=Yt._categories[Oe]||[],er=Qe[1]===void 0?"":String(Qe[1]),fr=Qe[0]===void 0?"":String(Qe[0]);Ne?Gt.text=fr+" - "+er:(Gt.text=er,Gt.text2=fr)}function Jt(Yt,Gt,Ne,Oe,Qe){Qe==="never"?Qe="":Yt.showexponent==="all"&&Math.abs(Gt.x/Yt.dtick)<1e-6&&(Qe="hide"),Gt.text=Mt(Gt.x,Yt,Qe,Oe)}function Wt(Yt,Gt,Ne,Oe,Qe){if(Yt.thetaunit==="radians"&&!Ne){var er=Gt.x/180;if(er===0)Gt.text="0";else{var fr=Ft(er);if(fr[1]>=100)Gt.text=Mt(x.deg2rad(Gt.x),Yt,Qe,Oe);else{var rr=Gt.x<0;fr[1]===1?fr[0]===1?Gt.text="π":Gt.text=fr[0]+"π":Gt.text=["",fr[0],"","⁄","",fr[1],"","π"].join(""),rr&&(Gt.text=M+Gt.text)}}}else Gt.text=Mt(Gt.x,Yt,Qe,Oe)}function Ft(Yt){function Gt(rr,He){return Math.abs(rr-He)<=1e-6}function Ne(rr,He){return Gt(He,0)?rr:Ne(He,rr%He)}function Oe(rr){for(var He=1;!Gt(Math.round(rr*He)/He,rr);)He*=10;return He}var Qe=Oe(Yt),er=Yt*Qe,fr=Math.abs(Ne(er,Qe));return[Math.round(er/fr),Math.round(Qe/fr)]}var xt=["f","p","n","μ","m","","k","M","G","T"];function yt(Yt){return Yt==="SI"||Yt==="B"}function Et(Yt){return Yt>14||Yt<-15}function Mt(Yt,Gt,Ne,Oe){var Qe=Yt<0,er=Gt._tickround,fr=Ne||Gt.exponentformat||"B",rr=Gt._tickexponent,He=J.getTickFormat(Gt),dr=Gt.separatethousands;if(Oe){var mr={exponentformat:fr,minexponent:Gt.minexponent,dtick:Gt.showexponent==="none"?Gt.dtick:C(Yt)&&Math.abs(Yt)||1,range:Gt.showexponent==="none"?Gt.range.map(Gt.r2d):[0,Yt||1]};de(mr),er=(Number(mr._tickround)||0)+4,rr=mr._tickexponent,Gt.hoverformat&&(He=Gt.hoverformat)}if(He)return Gt._numFormat(He)(Yt).replace(/-/g,M);var xr=Math.pow(10,-er)/2;if(fr==="none"&&(rr=0),Yt=Math.abs(Yt),Yt"+Pr+"":fr==="B"&&rr===9?Yt+="B":yt(fr)&&(Yt+=xt[rr/3+5])}return Qe?M+Yt:Yt}J.getTickFormat=function(Yt){var Gt;function Ne(He){return typeof He!="string"?He:Number(He.replace("M",""))*w}function Oe(He,dr){var mr=["L","D"];if(typeof He==typeof dr){if(typeof He=="number")return He-dr;var xr=mr.indexOf(He.charAt(0)),pr=mr.indexOf(dr.charAt(0));return xr===pr?Number(He.replace(/(L|D)/g,""))-Number(dr.replace(/(L|D)/g,"")):xr-pr}else return typeof He=="number"?1:-1}function Qe(He,dr,mr){var xr=mr||function(Pr){return Pr},pr=dr[0],Gr=dr[1];return(!pr&&typeof pr!="number"||xr(pr)<=xr(He))&&(!Gr&&typeof Gr!="number"||xr(Gr)>=xr(He))}function er(He,dr){var mr=dr[0]===null,xr=dr[1]===null,pr=Oe(He,dr[0])>=0,Gr=Oe(He,dr[1])<=0;return(mr||pr)&&(xr||Gr)}var fr,rr;if(Yt.tickformatstops&&Yt.tickformatstops.length>0)switch(Yt.type){case"date":case"linear":{for(Gt=0;Gt=0&&Qe.unshift(Qe.splice(mr,1).shift())}});var rr={false:{left:0,right:0}};return x.syncOrAsync(Qe.map(function(He){return function(){if(He){var dr=J.getFromId(Yt,He);Ne||(Ne={}),Ne.axShifts=rr,Ne.overlayingShiftedAx=fr;var mr=J.drawOne(Yt,dr,Ne);return dr._shiftPusher&&hr(dr,dr._fullDepth||0,rr,!0),dr._r=dr.range.slice(),dr._rl=x.simpleMap(dr._r,dr.r2l),mr}}}))},J.drawOne=function(Yt,Gt,Ne){Ne=Ne||{};var Oe=Ne.axShifts||{},Qe=Ne.overlayingShiftedAx||[],er,fr,rr;Gt.setScale();var He=Yt._fullLayout,dr=Gt._id,mr=dr.charAt(0),xr=J.counterLetter(dr),pr=He._plots[Gt._mainSubplot];if(!pr)return;if(Gt._shiftPusher=Gt.autoshift||Qe.indexOf(Gt._id)!==-1||Qe.indexOf(Gt.overlaying)!==-1,Gt._shiftPusher&Gt.anchor==="free"){var Gr=Gt.linewidth/2||0;Gt.ticks==="inside"&&(Gr+=Gt.ticklen),hr(Gt,Gr,Oe,!0),hr(Gt,Gt.shift||0,Oe,!1)}(Ne.skipTitle!==!0||Gt._shift===void 0)&&(Gt._shift=vr(Gt,Oe));var Pr=pr[mr+"axislayer"],Dr=Gt._mainLinePosition,cn=Dr+=Gt._shift,rn=Gt._mainMirrorPosition,Cn=Gt._vals=J.calcTicks(Gt),En=[Gt.mirror,cn,rn].join("_");for(er=0;er0?Pn.bottom-wn:0,Ln))));var ai=0,pi=0;if(Gt._shiftPusher&&(ai=Math.max(Ln,Pn.height>0?Hr==="l"?wn-Pn.left:Pn.right-wn:0),Gt.title.text!==He._dfltTitle[mr]&&(pi=(Gt._titleStandoff||0)+(Gt._titleScoot||0),Hr==="l"&&(pi+=Be(Gt))),Gt._fullDepth=Math.max(ai,pi)),Gt.automargin){Un={x:0,y:0,r:0,l:0,t:0,b:0};var Ci=[0,1],pa=typeof Gt._shift=="number"?Gt._shift:0;if(mr==="x"){if(Hr==="b"?Un[Hr]=Gt._depth:(Un[Hr]=Gt._depth=Math.max(Pn.width>0?wn-Pn.top:0,Ln),Ci.reverse()),Pn.width>0){var ea=Pn.right-(Gt._offset+Gt._length);ea>0&&(Un.xr=1,Un.r=ea);var Eo=Gt._offset-Pn.left;Eo>0&&(Un.xl=0,Un.l=Eo)}}else if(Hr==="l"?(Gt._depth=Math.max(Pn.height>0?wn-Pn.left:0,Ln),Un[Hr]=Gt._depth-pa):(Gt._depth=Math.max(Pn.height>0?Pn.right-wn:0,Ln),Un[Hr]=Gt._depth+pa,Ci.reverse()),Pn.height>0){var xo=Pn.bottom-(Gt._offset+Gt._length);xo>0&&(Un.yb=0,Un.b=xo);var Qa=Gt._offset-Pn.top;Qa>0&&(Un.yt=1,Un.t=Qa)}Un[xr]=Gt.anchor==="free"?Gt.position:Gt._anchorAxis.domain[Ci[0]],Gt.title.text!==He._dfltTitle[mr]&&(Un[Hr]+=Be(Gt)+(Gt.title.standoff||0)),Gt.mirror&&Gt.anchor!=="free"&&(On={x:0,y:0,r:0,l:0,t:0,b:0},On[Qr]=Gt.linewidth,Gt.mirror&&Gt.mirror!==!0&&(On[Qr]+=Ln),Gt.mirror===!0||Gt.mirror==="ticks"?On[xr]=Gt._anchorAxis.domain[Ci[1]]:(Gt.mirror==="all"||Gt.mirror==="allticks")&&(On[xr]=[Gt._counterDomainMin,Gt._counterDomainMax][Ci[1]]))}Zr&&(mi=S.getComponentMethod("rangeslider","autoMarginOpts")(Yt,Gt)),typeof Gt.automargin=="string"&&(Nt(Un,Gt.automargin),Nt(On,Gt.automargin)),i.autoMargin(Yt,$e(Gt),Un),i.autoMargin(Yt,ge(Gt),On),i.autoMargin(Yt,se(Gt),mi)}),x.syncOrAsync(sn)}};function Nt(Yt,Gt){if(Yt){var Ne=Object.keys(O).reduce(function(Oe,Qe){return Gt.indexOf(Qe)!==-1&&O[Qe].forEach(function(er){Oe[er]=1}),Oe},{});Object.keys(Yt).forEach(function(Oe){Ne[Oe]||(Oe.length===1?Yt[Oe]=0:delete Yt[Oe])})}}function jt(Yt,Gt){var Ne=[],Oe,Qe=function(er,fr){var rr=er.xbnd[fr];rr!==null&&Ne.push(x.extendFlat({},er,{x:rr}))};if(Gt.length){for(Oe=0;Oe60?-.5*ci:Yt.side==="top"!==mr?-ci:0};else if(Ur==="y"){if(pn=!mr&&Wr==="left"||mr&&Wr==="right",Tr=pn?1:-1,mr&&(Tr*=-1),rn=pr,Cn=Gr*Tr,En=0,!mr&&Math.abs(an)===90&&(an===-90&&Wr==="left"||an===90&&Wr==="right"?En=j:En=.5),mr){var gn=C(an)?+an:0;if(gn!==0){var _n=x.deg2rad(gn);Cr=Math.abs(Math.sin(_n))*j*Tr,En=0}}cn.xFn=function(kn){return kn.dx+Gt-(rn+kn.fontSize*En)*Tr+Cr*kn.fontSize},cn.yFn=function(kn){return kn.dy+Cn+kn.fontSize*Y},cn.anchorFn=function(kn,ni){return C(ni)&&Math.abs(ni)===90?"middle":pn?"end":"start"},cn.heightFn=function(kn,ni,ci){return Yt.side==="right"&&(ni*=-1),ni<-30?-ci:ni<30?-.5*ci:0}}return cn};function ce(Yt){return[Yt.text,Yt.x,Yt.axInfo,Yt.font,Yt.fontSize,Yt.fontColor].join("_")}J.drawTicks=function(Yt,Gt,Ne){Ne=Ne||{};var Oe=Gt._id+"tick",Qe=[].concat(Gt.minor&&Gt.minor.ticks?Ne.vals.filter(function(fr){return fr.minor&&!fr.noTick}):[]).concat(Gt.ticks?Ne.vals.filter(function(fr){return!fr.minor&&!fr.noTick}):[]),er=Ne.layer.selectAll("path."+Oe).data(Qe,ce);er.exit().remove(),er.enter().append("path").classed(Oe,1).classed("ticks",1).classed("crisp",Ne.crisp!==!1).each(function(fr){return e.stroke(g.select(this),fr.minor?Gt.minor.tickcolor:Gt.tickcolor)}).style("stroke-width",function(fr){return a.crispRound(Yt,fr.minor?Gt.minor.tickwidth:Gt.tickwidth,1)+"px"}).attr("d",Ne.path).style("display",null),ur(Gt,[k]),er.attr("transform",Ne.transFn)},J.drawGrid=function(Yt,Gt,Ne){if(Ne=Ne||{},Gt.tickmode!=="sync"){var Oe=Gt._id+"grid",Qe=Gt.minor&&Gt.minor.showgrid,er=Qe?Ne.vals.filter(function(rn){return rn.minor}):[],fr=Gt.showgrid?Ne.vals.filter(function(rn){return!rn.minor}):[],rr=Ne.counterAxis;if(rr&&J.shouldShowZeroLine(Yt,Gt,rr))for(var He=Gt.tickmode==="array",dr=0;dr=0;Pr--){var Dr=Pr?pr:Gr;if(Dr){var cn=Dr.selectAll("path."+Oe).data(Pr?fr:er,ce);cn.exit().remove(),cn.enter().append("path").classed(Oe,1).classed("crisp",Ne.crisp!==!1),cn.attr("transform",Ne.transFn).attr("d",Ne.path).each(function(rn){return e.stroke(g.select(this),rn.minor?Gt.minor.gridcolor:Gt.gridcolor||"#ddd")}).style("stroke-dasharray",function(rn){return a.dashStyle(rn.minor?Gt.minor.griddash:Gt.griddash,rn.minor?Gt.minor.gridwidth:Gt.gridwidth)}).style("stroke-width",function(rn){return(rn.minor?xr:Gt._gw)+"px"}).style("display",null),typeof Ne.path=="function"&&cn.attr("d",Ne.path)}}ur(Gt,[N,I])}},J.drawZeroLine=function(Yt,Gt,Ne){Ne=Ne||Ne;var Oe=Gt._id+"zl",Qe=J.shouldShowZeroLine(Yt,Gt,Ne.counterAxis),er=Ne.layer.selectAll("path."+Oe).data(Qe?[{x:0,id:Gt._id}]:[]);er.exit().remove(),er.enter().append("path").classed(Oe,1).classed("zl",1).classed("crisp",Ne.crisp!==!1).each(function(){Ne.layer.selectAll("path").sort(function(fr,rr){return V(fr.id,rr.id)})}),er.attr("transform",Ne.transFn).attr("d",Ne.path).call(e.stroke,Gt.zerolinecolor||e.defaultLine).style("stroke-width",a.crispRound(Yt,Gt.zerolinewidth,Gt._gw||1)+"px").style("display",null),ur(Gt,[D])},J.drawLabels=function(Yt,Gt,Ne){Ne=Ne||{};var Oe=Yt._fullLayout,Qe=Gt._id,er=Ne.cls||Qe+"tick",fr=Ne.vals.filter(function(wr){return wr.text}),rr=Ne.labelFns,He=Ne.secondary?0:Gt.tickangle,dr=(Gt._prevTickAngles||{})[er],mr=Ne.layer.selectAll("g."+er).data(Gt.showticklabels?fr:[],ce),xr=[];mr.enter().append("g").classed(er,1).append("text").attr("text-anchor","middle").each(function(wr){var nn=g.select(this),$r=Yt._promises.length;nn.call(p.positionText,rr.xFn(wr),rr.yFn(wr)).call(a.font,wr.font,wr.fontSize,wr.fontColor).text(wr.text).call(p.convertToTspans,Yt),Yt._promises[$r]?xr.push(Yt._promises.pop().then(function(){pr(nn,He)})):pr(nn,He)}),ur(Gt,[B]),mr.exit().remove(),Ne.repositionOnUpdate&&mr.each(function(wr){g.select(this).select("text").call(p.positionText,rr.xFn(wr),rr.yFn(wr))});function pr(wr,nn){wr.each(function($r){var dn=g.select(this),Vn=dn.select(".text-math-group"),Tn=rr.anchorFn($r,nn),An=Ne.transFn.call(dn.node(),$r)+(C(nn)&&+nn!=0?" rotate("+nn+","+rr.xFn($r)+","+(rr.yFn($r)-$r.fontSize/2)+")":""),Bn=p.lineCount(dn),Jn=et*$r.fontSize,gi=rr.heightFn($r,C(nn)?+nn:0,(Bn-1)*Jn);if(gi&&(An+=v(0,gi)),Vn.empty()){var Di=dn.select("text");Di.attr({transform:An,"text-anchor":Tn}),Di.style("opacity",1),Gt._adjustTickLabelsOverflow&&Gt._adjustTickLabelsOverflow()}else{var Sr=a.bBox(Vn.node()).width,kr=Sr*{end:-.5,start:.5}[Tn];Vn.attr("transform",An+v(kr,0))}})}Gt._adjustTickLabelsOverflow=function(){var wr=Gt.ticklabeloverflow;if(!(!wr||wr==="allow")){var nn=wr.indexOf("hide")!==-1,$r=Gt._id.charAt(0)==="x",dn=0,Vn=$r?Yt._fullLayout.width:Yt._fullLayout.height;if(wr.indexOf("domain")!==-1){var Tn=x.simpleMap(Gt.range,Gt.r2l);dn=Gt.l2p(Tn[0])+Gt._offset,Vn=Gt.l2p(Tn[1])+Gt._offset}var An=Math.min(dn,Vn),Bn=Math.max(dn,Vn),Jn=Gt.side,gi=1/0,Di=-1/0;mr.each(function(Or){var xn=g.select(this),In=xn.select(".text-math-group");if(In.empty()){var hn=a.bBox(xn.node()),sn=0;$r?(hn.right>Bn||hn.leftBn||hn.top+(Gt.tickangle?0:Or.fontSize/4)Gt["_visibleLabelMin_"+Tn._id]?Or.style("display","none"):Bn.K==="tick"&&!An&&Or.style("display",null)})})})})},pr(mr,dr+1?dr:He);function Gr(){return xr.length&&Promise.all(xr)}var Pr=null;function Dr(){if(pr(mr,He),fr.length&&Gt.autotickangles&&(Gt.type!=="log"||String(Gt.dtick).charAt(0)!=="D")){Pr=Gt.autotickangles[0];var wr=0,nn=[],$r,dn=1;if(mr.each(function(Ln){wr=Math.max(wr,Ln.fontSize);var Pn=Gt.l2p(Ln.x),Un=or(this),On=a.bBox(Un.node());dn=Math.max(dn,p.lineCount(Un)),nn.push({top:0,bottom:10,height:10,left:Pn-On.width/2,right:Pn+On.width/2+2,width:On.width+2})}),(Gt.tickson==="boundaries"||Gt.showdividers)&&!Ne.secondary){var Vn=2;for(Gt.ticks&&(Vn+=Gt.tickwidth/2),$r=0;$rdi*ci&&(_n=ci,an[Ur]=pn[Ur]=kn[Ur])}var li=Math.abs(_n-gn);li-Tr>0?(li-=Tr,Tr*=1+Tr/li):Tr=0,Gt._id.charAt(0)!=="y"&&(Tr=-Tr),an[Wr]=Cn.p2r(Cn.r2p(pn[Wr])+Cr*Tr),Cn.autorange==="min"||Cn.autorange==="max reversed"?(an[0]=null,Cn._rangeInitial0=void 0,Cn._rangeInitial1=void 0):(Cn.autorange==="max"||Cn.autorange==="min reversed")&&(an[1]=null,Cn._rangeInitial0=void 0,Cn._rangeInitial1=void 0),Oe._insideTickLabelsUpdaterange[Cn._name+".range"]=an}var ri=x.syncOrAsync(cn);return ri&&ri.then&&Yt._promises.push(ri),ri};function Te(Yt,Gt,Ne){var Oe=Gt._id+"divider",Qe=Ne.vals,er=Ne.layer.selectAll("path."+Oe).data(Qe,ce);er.exit().remove(),er.enter().insert("path",":first-child").classed(Oe,1).classed("crisp",1).call(e.stroke,Gt.dividercolor).style("stroke-width",a.crispRound(Yt,Gt.dividerwidth,1)+"px"),er.attr("transform",Ne.transFn).attr("d",Ne.path)}J.getPxPosition=function(Yt,Gt){var Ne=Yt._fullLayout._size,Oe=Gt._id.charAt(0),Qe=Gt.side,er;if(Gt.anchor!=="free"?er=Gt._anchorAxis:Oe==="x"?er={_offset:Ne.t+(1-(Gt.position||0))*Ne.h,_length:0}:Oe==="y"&&(er={_offset:Ne.l+(Gt.position||0)*Ne.w+Gt._shift,_length:0}),Qe==="top"||Qe==="left")return er._offset;if(Qe==="bottom"||Qe==="right")return er._offset+er._length};function Be(Yt){var Gt=Yt.title.font.size,Ne=(Yt.title.text.match(p.BR_TAG_ALL)||[]).length;return Yt.title.hasOwnProperty("standoff")?Ne?Gt*(j+Ne*et):Gt*j:Ne?Gt*(Ne+1)*et:Gt}function ir(Yt,Gt){var Ne=Yt._fullLayout,Oe=Gt._id,Qe=Oe.charAt(0),er=Gt.title.font.size,fr;if(Gt.title.hasOwnProperty("standoff"))fr=Gt._depth+Gt.title.standoff+Be(Gt);else{var rr=Je(Gt);if(Gt.type==="multicategory")fr=Gt._depth;else{var He=1.5*er;rr&&(He=.5*er,Gt.ticks==="outside"&&(He+=Gt.ticklen)),fr=10+He+(Gt.linewidth?Gt.linewidth-1:0)}rr||(Qe==="x"?fr+=Gt.side==="top"?er*(Gt.showticklabels?1:0):er*(Gt.showticklabels?1.5:.5):fr+=Gt.side==="right"?er*(Gt.showticklabels?1:.5):er*(Gt.showticklabels?.5:0))}var dr=J.getPxPosition(Yt,Gt),mr,xr,pr;Qe==="x"?(xr=Gt._offset+Gt._length/2,pr=Gt.side==="top"?dr-fr:dr+fr):(pr=Gt._offset+Gt._length/2,xr=Gt.side==="right"?dr+fr:dr-fr,mr={rotate:"-90",offset:0});var Gr;if(Gt.type!=="multicategory"){var Pr=Gt._selections[Gt._id+"tick"];if(Gr={selection:Pr,side:Gt.side},Pr&&Pr.node()&&Pr.node().parentNode){var Dr=a.getTranslate(Pr.node().parentNode);Gr.offsetLeft=Dr.x,Gr.offsetTop=Dr.y}Gt.title.hasOwnProperty("standoff")&&(Gr.pad=0)}return Gt._titleStandoff=fr,r.draw(Yt,Oe+"title",{propContainer:Gt,propName:Gt._name+".title.text",placeholder:Ne._dfltTitle[Qe],avoid:Gr,transform:mr,attributes:{x:xr,y:pr,"text-anchor":"middle"}})}J.shouldShowZeroLine=function(Yt,Gt,Ne){var Oe=x.simpleMap(Gt.range,Gt.r2l);return Oe[0]*Oe[1]<=0&&Gt.zeroline&&(Gt.type==="linear"||Gt.type==="-")&&!(Gt.rangebreaks&&Gt.maskBreaks(0)===z)&&(pe(Gt,0)||!Xe(Yt,Gt,Ne,Oe)||Ke(Yt,Gt))},J.clipEnds=function(Yt,Gt){return Gt.filter(function(Ne){return pe(Yt,Ne.x)})};function pe(Yt,Gt){var Ne=Yt.l2p(Gt);return Ne>1&&Ne1)for(Qe=1;Qe=Qe.min&&Yto*2}function n(l){return Math.max(1,(l-1)/1e3)}function f(l,m){for(var h=l.length,b=n(h),u=0,o=0,d={},w=0;wu*2}function c(l){return S(l[0])&&S(l[1])}},28336:function(G,U,t){var g=t(38248),C=t(24040),i=t(3400),S=t(31780),x=t(51272),v=t(94724),p=t(26332),r=t(25404),e=t(95936),a=t(42568),n=t(22416),f=t(42136),c=t(96312),l=t(78344),m=t(33816).WEEKDAY_PATTERN,h=t(33816).HOUR_PATTERN;G.exports=function(w,A,_,y,E){var T=y.letter,s=y.font||{},L=y.splomStash||{},M=_("visible",!y.visibleDflt),z=A._template||{},D=A.type||z.type||"-",N;if(D==="date"){var I=C.getComponentMethod("calendars","handleDefaults");I(w,A,"calendar",y.calendar),y.noTicklabelmode||(N=_("ticklabelmode"))}var k="";(!y.noTicklabelposition||D==="multicategory")&&(k=i.coerce(w,A,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:N==="period"?["outside","inside"]:T==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),y.noTicklabeloverflow||_("ticklabeloverflow",k.indexOf("inside")!==-1?"hide past domain":D==="category"||D==="multicategory"?"allow":"hide past div"),l(A,E),c(w,A,_,y),n(w,A,_,y),D!=="category"&&!y.noHover&&_("hoverformat");var B=_("color"),O=B!==v.color.dflt?B:s.color,H=L.label||E._dfltTitle[T];if(a(w,A,_,D,y),!M)return A;_("title.text",H),i.coerceFont(_,"title.font",{family:s.family,size:i.bigFont(s.size),color:O}),p(w,A,_,D);var Y=y.hasMinor;if(Y&&(S.newContainer(A,"minor"),p(w,A,_,D,{isMinor:!0})),e(w,A,_,D,y),r(w,A,_,y),Y){var j=y.isMinor;y.isMinor=!0,r(w,A,_,y),y.isMinor=j}f(w,A,_,{dfltColor:B,bgColor:y.bgColor,showGrid:y.showGrid,hasMinor:Y,attributes:v}),Y&&!A.minor.ticks&&!A.minor.showgrid&&delete A.minor,(A.showline||A.ticks)&&_("mirror");var et=D==="multicategory";if(!y.noTickson&&(D==="category"||et)&&(A.ticks||A.showgrid)){var it;et&&(it="boundaries");var ut=_("tickson",it);ut==="boundaries"&&delete A.ticklabelposition}if(et){var J=_("showdividers");J&&(_("dividercolor"),_("dividerwidth"))}if(D==="date")if(x(w,A,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:b}),!A.rangebreaks.length)delete A.rangebreaks;else{for(var X=0;X=2){var T="",s,L;if(E.length===2){for(s=0;s<2;s++)if(L=o(E[s]),L){T=m;break}}var M=_("pattern",T);if(M===m)for(s=0;s<2;s++)L=o(E[s]),L&&(w.bounds[s]=E[s]=L-1);if(M)for(s=0;s<2;s++)switch(L=E[s],M){case m:if(!g(L)){w.enabled=!1;return}if(L=+L,L!==Math.floor(L)||L<0||L>=7){w.enabled=!1;return}w.bounds[s]=E[s]=L;break;case h:if(!g(L)){w.enabled=!1;return}if(L=+L,L<0||L>24){w.enabled=!1;return}w.bounds[s]=E[s]=L;break}if(A.autorange===!1){var z=A.range;if(z[0]z[1]){w.enabled=!1;return}}else if(E[0]>z[0]&&E[1]p?1:-1:+(S.substr(1)||1)-+(x.substr(1)||1)},U.ref2id=function(S){return/^[xyz]/.test(S)?S.split(" ")[0]:!1};function i(S,x){if(x&&x.length){for(var v=0;v0||g(r),a;e&&(a="array");var n=v("categoryorder",a),f;n==="array"&&(f=v("categoryarray")),!e&&n==="array"&&(n=x.categoryorder="trace"),n==="trace"?x._initialCategories=[]:n==="array"?x._initialCategories=f.slice():(f=C(x,p).sort(),n==="category ascending"?x._initialCategories=f:n==="category descending"&&(x._initialCategories=f.reverse()))}}},98728:function(G,U,t){var g=t(38248),C=t(3400),i=t(39032),S=i.ONEDAY,x=i.ONEWEEK;U.dtick=function(v,p){var r=p==="log",e=p==="date",a=p==="category",n=e?S:1;if(!v)return n;if(g(v))return v=Number(v),v<=0?n:a?Math.max(1,Math.round(v)):e?Math.max(.1,v):v;if(typeof v!="string"||!(e||r))return n;var f=v.charAt(0),c=v.substr(1);return c=g(c)?Number(c):0,c<=0||!(e&&f==="M"&&c===Math.round(c)||r&&f==="L"||r&&f==="D"&&(c===1||c===2))?n:v},U.tick0=function(v,p,r,e){if(p==="date")return C.cleanDate(v,C.dateTick0(r,e%x===0?1:0));if(!(e==="D1"||e==="D2"))return g(v)?Number(v):0}},33816:function(G,U,t){var g=t(53756).counter;G.exports={idRegex:{x:g("x","( domain)?"),y:g("y","( domain)?")},attrRegex:g("[xy]axis"),xAxisMatch:g("xaxis"),yAxisMatch:g("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},71888:function(G,U,t){var g=t(3400),C=t(19280),i=t(79811).id2name,S=t(94724),x=t(21160),v=t(78344),p=t(39032).ALMOST_EQUAL,r=t(84284).FROM_BL;U.handleDefaults=function(h,b,u){var o=u.axIds,d=u.axHasImage,w=b._axisConstraintGroups=[],A=b._axisMatchGroups=[],_,y,E,T,s,L,M,z;for(_=0;_w?u.substr(w):o.substr(d))+A}function l(h,b){for(var u=b._size,o=u.h/u.w,d={},w=Object.keys(h),A=0;Ap*z&&!k)){for(w=0;wX&&ntut&&(ut=nt);var gt=(ut-it)/(2*J);s/=gt,it=y.l2r(it),ut=y.l2r(ut),y.range=y._input.range=Y=0){dr._fullLayout._deactivateShape(dr);return}var mr=dr._fullLayout.clickmode;if(X(dr),rr===2&&!Ht&&Gt(),Lt)mr.indexOf("select")>-1&&E(He,dr,re,Kt,ct.id,be),mr.indexOf("event")>-1&&n.click(dr,He,ct.id);else if(rr===1&&Ht){var xr=bt?kt:Ut,pr=bt==="s"||At==="w"?0:1,Gr=xr._name+".range["+pr+"]",Pr=B(xr,pr),Dr="left",cn="middle";if(xr.fixedrange)return;bt?(cn=bt==="n"?"top":"bottom",xr.side==="right"&&(Dr="right")):At==="e"&&(Dr="right"),dr._context.showAxisRangeEntryBoxes&&g.select(me).call(r.makeEditable,{gd:dr,immediate:!0,background:dr._fullLayout.paper_bgcolor,text:String(Pr),fill:xr.tickfont?xr.tickfont.color:"#444",horizontalAlign:Dr,verticalAlign:cn}).on("edit",function(rn){var Cn=xr.d2r(rn);Cn!==void 0&&v.call("_guiRelayout",dr,Gr,Cn)})}}l.init(be);var ce,Te,Be,ir,pe,Xe,Ke,or,$e,ge;function se(rr,He,dr){var mr=me.getBoundingClientRect();ce=He-mr.left,Te=dr-mr.top,nt._fullLayout._calcInverseTransform(nt);var xr=C.apply3DTransform(nt._fullLayout._invTransform)(ce,Te);ce=xr[0],Te=xr[1],Be={l:ce,r:ce,w:0,t:Te,b:Te,h:0},ir=nt._hmpixcount?nt._hmlumcount/nt._hmpixcount:S(nt._fullLayout.plot_bgcolor).getLuminance(),pe="M0,0H"+he+"V"+de+"H0V0",Xe=!1,Ke="xy",ge=!1,or=et(mt,ir,$t,le,pe),$e=it(mt,$t,le)}function Ae(rr,He){if(nt._transitioningWithDuration)return!1;var dr=Math.max(0,Math.min(he,Mt*rr+ce)),mr=Math.max(0,Math.min(de,Nt*He+Te)),xr=Math.abs(dr-ce),pr=Math.abs(mr-Te);Be.l=Math.min(ce,dr),Be.r=Math.max(ce,dr),Be.t=Math.min(Te,mr),Be.b=Math.max(Te,mr);function Gr(){Ke="",Be.r=Be.l,Be.t=Be.b,$e.attr("d","M0,0Z")}if(xe.isSubplotConstrained)xr>M||pr>M?(Ke="xy",xr/he>pr/de?(pr=xr*de/he,Te>mr?Be.t=Te-pr:Be.b=Te+pr):(xr=pr*he/de,ce>dr?Be.l=ce-xr:Be.r=ce+xr),$e.attr("d",ot(Be))):Gr();else if(Se.isSubplotConstrained)if(xr>M||pr>M){Ke="xy";var Pr=Math.min(Be.l/he,(de-Be.b)/de),Dr=Math.max(Be.r/he,(de-Be.t)/de);Be.l=Pr*he,Be.r=Dr*he,Be.b=(1-Pr)*de,Be.t=(1-Dr)*de,$e.attr("d",ot(Be))}else Gr();else!zt||pr0){var rn;if(Se.isSubplotConstrained||!ne&&zt.length===1){for(rn=0;rn1&&(Gr.maxallowed!==void 0&&Jt===(Gr.range[0]1&&(Pr.maxallowed!==void 0&&Wt===(Pr.range[0]=0?Math.min(nt,.9):1/(1/Math.max(nt,-.3)+3.222))}function j(nt,ct,gt){return nt?nt==="nsew"?gt?"":ct==="pan"?"move":"crosshair":nt.toLowerCase()+"-resize":"pointer"}function et(nt,ct,gt,Tt,wt){return nt.append("path").attr("class","zoombox").style({fill:ct>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",p(gt,Tt)).attr("d",wt+"Z")}function it(nt,ct,gt){return nt.append("path").attr("class","zoombox-corners").style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("transform",p(ct,gt)).attr("d","M0,0Z")}function ut(nt,ct,gt,Tt,wt,Rt){nt.attr("d",Tt+"M"+gt.l+","+gt.t+"v"+gt.h+"h"+gt.w+"v-"+gt.h+"h-"+gt.w+"Z"),J(nt,ct,wt,Rt)}function J(nt,ct,gt,Tt){gt||(nt.transition().style("fill",Tt>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ct.transition().style("opacity",1).duration(200))}function X(nt){g.select(nt).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function tt(nt){z&&nt.data&&nt._context.showTips&&(C.notifier(C._(nt,"Double-click to zoom back out"),"long"),z=!1)}function V(nt,ct){return"M"+(nt.l-.5)+","+(ct-M-.5)+"h-3v"+(2*M+1)+"h3ZM"+(nt.r+.5)+","+(ct-M-.5)+"h3v"+(2*M+1)+"h-3Z"}function Q(nt,ct){return"M"+(ct-M-.5)+","+(nt.t-.5)+"v-3h"+(2*M+1)+"v3ZM"+(ct-M-.5)+","+(nt.b+.5)+"v3h"+(2*M+1)+"v-3Z"}function ot(nt){var ct=Math.floor(Math.min(nt.b-nt.t,nt.r-nt.l,M)/2);return"M"+(nt.l-3.5)+","+(nt.t-.5+ct)+"h3v"+-ct+"h"+ct+"v-3h-"+(ct+3)+"ZM"+(nt.r+3.5)+","+(nt.t-.5+ct)+"h-3v"+-ct+"h"+-ct+"v-3h"+(ct+3)+"ZM"+(nt.r+3.5)+","+(nt.b+.5-ct)+"h-3v"+ct+"h"+-ct+"v3h"+(ct+3)+"ZM"+(nt.l-3.5)+","+(nt.b+.5-ct)+"h3v"+ct+"h"+ct+"v3h-"+(ct+3)+"Z"}function $(nt,ct,gt,Tt,wt){for(var Rt=!1,bt={},At={},mt,Lt,Ht,Ut,kt=(wt||{}).xaHash,Vt=(wt||{}).yaHash,It=0;It_[1]-.000244140625&&(x.domain=l),C.noneOrAll(S.domain,x.domain,l),x.tickmode==="sync"&&(x.tickmode="auto")}return v("layer"),x}},42568:function(G,U,t){var g=t(85024);G.exports=function(i,S,x,v,p){p||(p={});var r=p.tickSuffixDflt,e=g(i),a=x("tickprefix");a&&x("showtickprefix",e);var n=x("ticksuffix",r);n&&x("showticksuffix",e)}},96312:function(G,U,t){var g=t(76808);G.exports=function(i,S,x,v){var p=S._template||{},r=S.type||p.type||"-";x("minallowed"),x("maxallowed");var e=x("range");if(!e){var a;!v.noInsiderange&&r!=="log"&&(a=x("insiderange"),a&&(a[0]===null||a[1]===null)&&(S.insiderange=!1,a=void 0),a&&(e=x("range",a)))}var n=S.getAutorangeDflt(e,v),f=x("autorange",n),c;e&&(e[0]===null&&e[1]===null||(e[0]===null||e[1]===null)&&(f==="reversed"||f===!0)||e[0]!==null&&(f==="min"||f==="max reversed")||e[1]!==null&&(f==="max"||f==="min reversed"))&&(e=void 0,delete S.range,S.autorange=!0,c=!0),c||(n=S.getAutorangeDflt(e,v),f=x("autorange",n)),f&&(g(x,f,e),(r==="linear"||r==="-")&&x("rangemode")),S.cleanRange()}},21160:function(G,U,t){var g=t(84284).FROM_BL;G.exports=function(i,S,x){x===void 0&&(x=g[i.constraintoward||"center"]);var v=[i.r2l(i.range[0]),i.r2l(i.range[1])],p=v[0]+(v[1]-v[0])*x;i.range=i._input.range=[i.l2r(p+(v[0]-p)*S),i.l2r(p+(v[1]-p)*S)],i.setScale()}},78344:function(G,U,t){var g=t(33428),C=t(94336).E9,i=t(3400),S=i.numberFormat,x=t(38248),v=i.cleanNumber,p=i.ms2DateTime,r=i.dateTime2ms,e=i.ensureNumber,a=i.isArrayOrTypedArray,n=t(39032),f=n.FP_SAFE,c=n.BADNUM,l=n.LOG_CLIP,m=n.ONEWEEK,h=n.ONEDAY,b=n.ONEHOUR,u=n.ONEMIN,o=n.ONESEC,d=t(79811),w=t(33816),A=w.HOUR_PATTERN,_=w.WEEKDAY_PATTERN;function y(T){return Math.pow(10,T)}function E(T){return T!=null}G.exports=function(s,L){L=L||{};var M=s._id||"x",z=M.charAt(0);function D(V,Q){if(V>0)return Math.log(V)/Math.LN10;if(V<=0&&Q&&s.range&&s.range.length===2){var ot=s.range[0],$=s.range[1];return .5*(ot+$-2*l*Math.abs(ot-$))}else return c}function N(V,Q,ot,$){if(($||{}).msUTC&&x(V))return+V;var Z=r(V,ot||s.calendar);if(Z===c)if(x(V)){V=+V;var st=Math.floor(i.mod(V+.05,1)*10),nt=Math.round(V-st/10);Z=r(new Date(nt))+st/10}else return c;return Z}function I(V,Q,ot){return p(V,Q,ot||s.calendar)}function k(V){return s._categories[Math.round(V)]}function B(V){if(E(V)){if(s._categoriesMap===void 0&&(s._categoriesMap={}),s._categoriesMap[V]!==void 0)return s._categoriesMap[V];s._categories.push(typeof V=="number"?String(V):V);var Q=s._categories.length-1;return s._categoriesMap[V]=Q,Q}return c}function O(V,Q){for(var ot=new Array(Q),$=0;$s.range[1]&&(ot=!ot);for(var $=ot?-1:1,Z=$*V,st=0,nt=0;ntgt)st=nt+1;else{st=Z<(ct+gt)/2?nt:nt+1;break}}var Tt=s._B[st]||0;return isFinite(Tt)?et(V,s._m2,Tt):0},J=function(V){var Q=s._rangebreaks.length;if(!Q)return it(V,s._m,s._b);for(var ot=0,$=0;$s._rangebreaks[$].pmax&&(ot=$+1);return it(V,s._m2,s._B[ot])}}s.c2l=s.type==="log"?D:e,s.l2c=s.type==="log"?y:e,s.l2p=ut,s.p2l=J,s.c2p=s.type==="log"?function(V,Q){return ut(D(V,Q))}:ut,s.p2c=s.type==="log"?function(V){return y(J(V))}:J,["linear","-"].indexOf(s.type)!==-1?(s.d2r=s.r2d=s.d2c=s.r2c=s.d2l=s.r2l=v,s.c2d=s.c2r=s.l2d=s.l2r=e,s.d2p=s.r2p=function(V){return s.l2p(v(V))},s.p2d=s.p2r=J,s.cleanPos=e):s.type==="log"?(s.d2r=s.d2l=function(V,Q){return D(v(V),Q)},s.r2d=s.r2c=function(V){return y(v(V))},s.d2c=s.r2l=v,s.c2d=s.l2r=e,s.c2r=D,s.l2d=y,s.d2p=function(V,Q){return s.l2p(s.d2r(V,Q))},s.p2d=function(V){return y(J(V))},s.r2p=function(V){return s.l2p(v(V))},s.p2r=J,s.cleanPos=e):s.type==="date"?(s.d2r=s.r2d=i.identity,s.d2c=s.r2c=s.d2l=s.r2l=N,s.c2d=s.c2r=s.l2d=s.l2r=I,s.d2p=s.r2p=function(V,Q,ot){return s.l2p(N(V,0,ot))},s.p2d=s.p2r=function(V,Q,ot){return I(J(V),Q,ot)},s.cleanPos=function(V){return i.cleanDate(V,c,s.calendar)}):s.type==="category"?(s.d2c=s.d2l=B,s.r2d=s.c2d=s.l2d=k,s.d2r=s.d2l_noadd=Y,s.r2c=function(V){var Q=j(V);return Q!==void 0?Q:s.fraction2r(.5)},s.l2r=s.c2r=e,s.r2l=j,s.d2p=function(V){return s.l2p(s.r2c(V))},s.p2d=function(V){return k(J(V))},s.r2p=s.d2p,s.p2r=J,s.cleanPos=function(V){return typeof V=="string"&&V!==""?V:e(V)}):s.type==="multicategory"&&(s.r2d=s.c2d=s.l2d=k,s.d2r=s.d2l_noadd=Y,s.r2c=function(V){var Q=Y(V);return Q!==void 0?Q:s.fraction2r(.5)},s.r2c_just_indices=H,s.l2r=s.c2r=e,s.r2l=Y,s.d2p=function(V){return s.l2p(s.r2c(V))},s.p2d=function(V){return k(J(V))},s.r2p=s.d2p,s.p2r=J,s.cleanPos=function(V){return Array.isArray(V)||typeof V=="string"&&V!==""?V:e(V)},s.setupMultiCategory=function(V){var Q=s._traceIndices,ot,$,Z=s._matchGroup;if(Z&&s._categories.length===0){for(var st in Z)if(st!==M){var nt=L[d.id2name(st)];Q=Q.concat(nt._traceIndices)}}var ct=[[0,{}],[0,{}]],gt=[];for(ot=0;otnt[1]&&($[st?0:1]=ot),$[0]===$[1]){var ct=s.l2r(Q),gt=s.l2r(ot);if(Q!==void 0){var Tt=ct+1;ot!==void 0&&(Tt=Math.min(Tt,gt)),$[st?1:0]=Tt}if(ot!==void 0){var wt=gt+1;Q!==void 0&&(wt=Math.max(wt,ct)),$[st?0:1]=wt}}}},s.cleanRange=function(V,Q){s._cleanRange(V,Q),s.limitRange(V)},s._cleanRange=function(V,Q){Q||(Q={}),V||(V="range");var ot=i.nestedProperty(s,V).get(),$,Z;if(s.type==="date"?Z=i.dfltRange(s.calendar):z==="y"?Z=w.DFLTRANGEY:s._name==="realaxis"?Z=[0,1]:Z=Q.dfltRange||w.DFLTRANGEX,Z=Z.slice(),(s.rangemode==="tozero"||s.rangemode==="nonnegative")&&(Z[0]=0),!ot||ot.length!==2){i.nestedProperty(s,V).set(Z);return}var st=ot[0]===null,nt=ot[1]===null;for(s.type==="date"&&!s.autorange&&(ot[0]=i.cleanDate(ot[0],c,s.calendar),ot[1]=i.cleanDate(ot[1],c,s.calendar)),$=0;$<2;$++)if(s.type==="date"){if(!i.isDateTime(ot[$],s.calendar)){s[V]=Z;break}if(s.r2l(ot[0])===s.r2l(ot[1])){var ct=i.constrain(s.r2l(ot[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);ot[0]=s.l2r(ct-1e3),ot[1]=s.l2r(ct+1e3);break}}else{if(!x(ot[$]))if(!(st||nt)&&x(ot[1-$]))ot[$]=ot[1-$]*($?10:.1);else{s[V]=Z;break}if(ot[$]<-f?ot[$]=-f:ot[$]>f&&(ot[$]=f),ot[0]===ot[1]){var gt=Math.max(1,Math.abs(ot[0]*1e-6));ot[0]-=gt,ot[1]+=gt}}},s.setScale=function(V){var Q=L._size;if(s.overlaying){var ot=d.getFromId({_fullLayout:L},s.overlaying);s.domain=ot.domain}var $=V&&s._r?"_r":"range",Z=s.calendar;s.cleanRange($);var st=s.r2l(s[$][0],Z),nt=s.r2l(s[$][1],Z),ct=z==="y";if(ct?(s._offset=Q.t+(1-s.domain[1])*Q.h,s._length=Q.h*(s.domain[1]-s.domain[0]),s._m=s._length/(st-nt),s._b=-s._m*nt):(s._offset=Q.l+s.domain[0]*Q.w,s._length=Q.w*(s.domain[1]-s.domain[0]),s._m=s._length/(nt-st),s._b=-s._m*st),s._rangebreaks=[],s._lBreaks=0,s._m2=0,s._B=[],s.rangebreaks){var gt,Tt;if(s._rangebreaks=s.locateBreaks(Math.min(st,nt),Math.max(st,nt)),s._rangebreaks.length){for(gt=0;gtnt&&(wt=!wt),wt&&s._rangebreaks.reverse();var Rt=wt?-1:1;for(s._m2=Rt*s._length/(Math.abs(nt-st)-s._lBreaks),s._B.push(-s._m2*(ct?nt:st)),gt=0;gtZ&&(Z+=7,st<$&&(st+=7));break;case A:nt=new Date(V);var wt=nt.getUTCHours(),Rt=nt.getUTCMinutes(),bt=nt.getUTCSeconds(),At=nt.getUTCMilliseconds();st=wt+(Rt/60+bt/3600+At/36e5),$>Z&&(Z+=24,st<$&&(st+=24));break;case"":st=V;break}if(st>=$&&st=$&&V=Kt.min&&(ktKt.max&&(Kt.max=Vt),It=!1)}It&&nt.push({min:kt,max:Vt})}};for(ot=0;ot rect").call(S.setTranslate,0,0).call(S.setScale,1,1),A.plot.call(S.setTranslate,_._offset,y._offset).call(S.setScale,1,1);var E=A.plot.selectAll(".scatterlayer .trace");E.selectAll(".point").call(S.setPointGroupScale,1,1),E.selectAll(".textpoint").call(S.setTextPointsScale,1,1),E.call(S.hideOutsideRangePoints,A)}function c(A,_){var y=A.plotinfo,E=y.xaxis,T=y.yaxis,s=E._length,L=T._length,M=!!A.xr1,z=!!A.yr1,D=[];if(M){var N=i.simpleMap(A.xr0,E.r2l),I=i.simpleMap(A.xr1,E.r2l),k=N[1]-N[0],B=I[1]-I[0];D[0]=(N[0]*(1-_)+_*I[0]-N[0])/(N[1]-N[0])*s,D[2]=s*(1-_+_*B/k),E.range[0]=E.l2r(N[0]*(1-_)+_*I[0]),E.range[1]=E.l2r(N[1]*(1-_)+_*I[1])}else D[0]=0,D[2]=s;if(z){var O=i.simpleMap(A.yr0,T.r2l),H=i.simpleMap(A.yr1,T.r2l),Y=O[1]-O[0],j=H[1]-H[0];D[1]=(O[1]*(1-_)+_*H[1]-O[1])/(O[0]-O[1])*L,D[3]=L*(1-_+_*j/Y),T.range[0]=E.l2r(O[0]*(1-_)+_*H[0]),T.range[1]=T.l2r(O[1]*(1-_)+_*H[1])}else D[1]=0,D[3]=L;x.drawOne(p,E,{skipTitle:!0}),x.drawOne(p,T,{skipTitle:!0}),x.redrawComponents(p,[E._id,T._id]);var et=M?s/D[2]:1,it=z?L/D[3]:1,ut=M?D[0]:0,J=z?D[1]:0,X=M?D[0]/D[2]*s:0,tt=z?D[1]/D[3]*L:0,V=E._offset-X,Q=T._offset-tt;y.clipRect.call(S.setTranslate,ut,J).call(S.setScale,1/et,1/it),y.plot.call(S.setTranslate,V,Q).call(S.setScale,et,it),S.setPointGroupScale(y.zoomScalePts,1/et,1/it),S.setTextPointsScale(y.zoomScaleTxt,1/et,1/it)}var l;a&&(l=a());function m(){for(var A={},_=0;_e.duration?(m(),o=window.cancelAnimationFrame(w)):o=window.requestAnimationFrame(w)}return b=Date.now(),o=window.requestAnimationFrame(w),Promise.resolve()}},14944:function(G,U,t){var g=t(24040).traceIs,C=t(52976);G.exports=function(r,e,a,n){a("autotypenumbers",n.autotypenumbersDflt);var f=a("type",(n.splomStash||{}).type);f==="-"&&(i(e,n.data),e.type==="-"?e.type="linear":r.type=e.type)};function i(p,r){if(p.type==="-"){var e=p._id,a=e.charAt(0),n;e.indexOf("scene")!==-1&&(e=a);var f=S(r,e,a);if(f){if(f.type==="histogram"&&a==={v:"y",h:"x"}[f.orientation||"v"]){p.type="linear";return}var c=a+"calendar",l=f[c],m={noMultiCategory:!g(f,"cartesian")||g(f,"noMultiCategory")};if(f.type==="box"&&f._hasPreCompStats&&a==={h:"x",v:"y"}[f.orientation||"v"]&&(m.noMultiCategory=!0),m.autotypenumbers=p.autotypenumbers,v(f,a)){var h=x(f),b=[];for(n=0;n0&&(n["_"+e+"axes"]||{})[r])return n;if((n[e+"axis"]||e)===r){if(v(n,e))return n;if((n[e]||[]).length||n[e+"0"])return n}}}function x(p){return{v:"x",h:"y"}[p.orientation||"v"]}function v(p,r){var e=x(p),a=g(p,"box-violin"),n=g(p._fullInput||{},"candlestick");return a&&!n&&r===e&&p[e]===void 0&&p[e+"0"]===void 0}},62460:function(G,U,t){var g=t(24040),C=t(3400);U.manageCommandObserver=function(r,e,a,n){var f={},c=!0;e&&e._commandObserver&&(f=e._commandObserver),f.cache||(f.cache={}),f.lookupTable={};var l=U.hasSimpleAPICommandBindings(r,a,f.lookupTable);if(e&&e._commandObserver){if(l)return f;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,f}if(l){i(r,l,f.cache),f.check=function(){if(c){var u=i(r,l,f.cache);return u.changed&&n&&f.lookupTable[u.value]!==void 0&&(f.disable(),Promise.resolve(n({value:u.value,type:l.type,prop:l.prop,traces:l.traces,index:f.lookupTable[u.value]})).then(f.enable,f.enable)),u.changed}};for(var m=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h0?".":"")+f;C.isPlainObject(c)?p(c,e,l,n+1):e(l,f,c)}})}},86968:function(G,U,t){var g=t(92880).extendFlat;U.u=function(C,i){C=C||{},i=i||{};var S={valType:"info_array",editType:C.editType,items:[{valType:"number",min:0,max:1,editType:C.editType},{valType:"number",min:0,max:1,editType:C.editType}],dflt:[0,1]};C.name&&C.name+"",C.trace,i.description&&""+i.description;var x={x:g({},S,{}),y:g({},S,{}),editType:C.editType};return C.noGridCell||(x.row={valType:"integer",min:0,dflt:0,editType:C.editType},x.column={valType:"integer",min:0,dflt:0,editType:C.editType}),x},U.Q=function(C,i,S,x){var v=x&&x.x||[0,1],p=x&&x.y||[0,1],r=i.grid;if(r){var e=S("domain.column");e!==void 0&&(e0&&B._module.calcGeoJSON(k,z)}if(!D){var O=this.updateProjection(M,z);if(O)return;(!this.viewInitial||this.scope!==N.scope)&&this.saveViewInitial(N)}this.scope=N.scope,this.updateBaseLayers(z,N),this.updateDims(z,N),this.updateFx(z,N),f.generalUpdatePerTraceModule(this.graphDiv,this,M,N);var H=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=H.selectAll(".point"),this.dataPoints.text=H.selectAll("text"),this.dataPaths.line=H.selectAll(".js-line");var Y=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=Y.selectAll("path"),this._render()},E.updateProjection=function(M,z){var D=this.graphDiv,N=z[this.id],I=z._size,k=N.domain,B=N.projection,O=N.lonaxis,H=N.lataxis,Y=O._ax,j=H._ax,et=this.projection=T(N),it=[[I.l+I.w*k.x[0],I.t+I.h*(1-k.y[1])],[I.l+I.w*k.x[1],I.t+I.h*(1-k.y[0])]],ut=N.center||{},J=B.rotation||{},X=O.range||[],tt=H.range||[];if(N.fitbounds){Y._length=it[1][0]-it[0][0],j._length=it[1][1]-it[0][1],Y.range=l(D,Y),j.range=l(D,j);var V=(Y.range[0]+Y.range[1])/2,Q=(j.range[0]+j.range[1])/2;if(N._isScoped)ut={lon:V,lat:Q};else if(N._isClipped){ut={lon:V,lat:Q},J={lon:V,lat:Q,roll:J.roll};var ot=B.type,$=d.lonaxisSpan[ot]/2||180,Z=d.lataxisSpan[ot]/2||90;X=[V-$,V+$],tt=[Q-Z,Q+Z]}else ut={lon:V,lat:Q},J={lon:V,lat:J.lat,roll:J.roll}}et.center([ut.lon-J.lon,ut.lat-J.lat]).rotate([-J.lon,-J.lat,J.roll]).parallels(B.parallels);var st=L(X,tt);et.fitExtent(it,st);var nt=this.bounds=et.getBounds(st),ct=this.fitScale=et.scale(),gt=et.translate();if(N.fitbounds){var Tt=et.getBounds(L(Y.range,j.range)),wt=Math.min((nt[1][0]-nt[0][0])/(Tt[1][0]-Tt[0][0]),(nt[1][1]-nt[0][1])/(Tt[1][1]-Tt[0][1]));isFinite(wt)?et.scale(wt*ct):p.warn("Something went wrong during"+this.id+"fitbounds computations.")}else et.scale(B.scale*ct);var Rt=this.midPt=[(nt[0][0]+nt[1][0])/2,(nt[0][1]+nt[1][1])/2];if(et.translate([gt[0]+(Rt[0]-gt[0]),gt[1]+(Rt[1]-gt[1])]).clipExtent(nt),N._isAlbersUsa){var bt=et([ut.lon,ut.lat]),At=et.translate();et.translate([At[0]-(bt[0]-At[0]),At[1]-(bt[1]-At[1])])}},E.updateBaseLayers=function(M,z){var D=this,N=D.topojson,I=D.layers,k=D.basePaths;function B(it){return it==="lonaxis"||it==="lataxis"}function O(it){return!!d.lineLayers[it]}function H(it){return!!d.fillLayers[it]}var Y=this.hasChoropleth?d.layersForChoropleth:d.layers,j=Y.filter(function(it){return O(it)||H(it)?z["show"+it]:B(it)?z[it].showgrid:!0}),et=D.framework.selectAll(".layer").data(j,String);et.exit().each(function(it){delete I[it],delete k[it],g.select(this).remove()}),et.enter().append("g").attr("class",function(it){return"layer "+it}).each(function(it){var ut=I[it]=g.select(this);it==="bg"?D.bgRect=ut.append("rect").style("pointer-events","all"):B(it)?k[it]=ut.append("path").style("fill","none"):it==="backplot"?ut.append("g").classed("choroplethlayer",!0):it==="frontplot"?ut.append("g").classed("scatterlayer",!0):O(it)?k[it]=ut.append("path").style("fill","none").style("stroke-miterlimit",2):H(it)&&(k[it]=ut.append("path").style("stroke","none"))}),et.order(),et.each(function(it){var ut=k[it],J=d.layerNameToAdjective[it];it==="frame"?ut.datum(d.sphereSVG):O(it)||H(it)?ut.datum(_(N,N.objects[it])):B(it)&&ut.datum(s(it,z,M)).call(e.stroke,z[it].gridcolor).call(a.dashLine,z[it].griddash,z[it].gridwidth),O(it)?ut.call(e.stroke,z[J+"color"]).call(a.dashLine,"",z[J+"width"]):H(it)&&ut.call(e.fill,z[J+"color"])})},E.updateDims=function(M,z){var D=this.bounds,N=(z.framewidth||0)/2,I=D[0][0]-N,k=D[0][1]-N,B=D[1][0]-I+N,O=D[1][1]-k+N;a.setRect(this.clipRect,I,k,B,O),this.bgRect.call(a.setRect,I,k,B,O).call(e.fill,z.bgcolor),this.xaxis._offset=I,this.xaxis._length=B,this.yaxis._offset=k,this.yaxis._length=O},E.updateFx=function(M,z){var D=this,N=D.graphDiv,I=D.bgRect,k=M.dragmode,B=M.clickmode;if(D.isStatic)return;function O(){var et=D.viewInitial,it={};for(var ut in et)it[D.id+"."+ut]=et[ut];v.call("_guiRelayout",N,it),N.emit("plotly_doubleclick",null)}function H(et){return D.projection.invert([et[0]+D.xaxis._offset,et[1]+D.yaxis._offset])}var Y=function(et,it){if(it.isRect){var ut=et.range={};ut[D.id]=[H([it.xmin,it.ymin]),H([it.xmax,it.ymax])]}else{var J=et.lassoPoints={};J[D.id]=it.map(H)}},j={element:D.bgRect.node(),gd:N,plotinfo:{id:D.id,xaxis:D.xaxis,yaxis:D.yaxis,fillRangeItems:Y},xaxes:[D.xaxis],yaxes:[D.yaxis],subplot:D.id,clickFn:function(et){et===2&&b(N)}};k==="pan"?(I.node().onmousedown=null,I.call(o(D,z)),I.on("dblclick.zoom",O),N._context._scrollZoom.geo||I.on("wheel.zoom",null)):(k==="select"||k==="lasso")&&(I.on(".zoom",null),j.prepFn=function(et,it,ut){h(et,it,ut,j,k)},m.init(j)),I.on("mousemove",function(){var et=D.projection.invert(p.getPositionFromD3Event());if(!et)return m.unhover(N,g.event);D.xaxis.p2c=function(){return et[0]},D.yaxis.p2c=function(){return et[1]},n.hover(N,g.event,D.id)}),I.on("mouseout",function(){N._dragging||m.unhover(N,g.event)}),I.on("click",function(){k!=="select"&&k!=="lasso"&&(B.indexOf("select")>-1&&u(g.event,N,[D.xaxis],[D.yaxis],D.id,j),B.indexOf("event")>-1&&n.click(N,g.event))})},E.makeFramework=function(){var M=this,z=M.graphDiv,D=z._fullLayout,N="clip"+D._uid+M.id;M.clipDef=D._clips.append("clipPath").attr("id",N),M.clipRect=M.clipDef.append("rect"),M.framework=g.select(M.container).append("g").attr("class","geo "+M.id).call(a.setClipUrl,N,z),M.project=function(I){var k=M.projection(I);return k?[k[0]-M.xaxis._offset,k[1]-M.yaxis._offset]:[null,null]},M.xaxis={_id:"x",c2p:function(I){return M.project(I)[0]}},M.yaxis={_id:"y",c2p:function(I){return M.project(I)[1]}},M.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(M.mockAxis,D)},E.saveViewInitial=function(M){var z=M.center||{},D=M.projection,N=D.rotation||{};this.viewInitial={fitbounds:M.fitbounds,"projection.scale":D.scale};var I;M._isScoped?I={"center.lon":z.lon,"center.lat":z.lat}:M._isClipped?I={"projection.rotation.lon":N.lon,"projection.rotation.lat":N.lat}:I={"center.lon":z.lon,"center.lat":z.lat,"projection.rotation.lon":N.lon},p.extendFlat(this.viewInitial,I)},E.render=function(M){this._hasMarkerAngles&&M?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},E._render=function(){var M=this.projection,z=M.getPath(),D;function N(k){var B=M(k.lonlat);return B?r(B[0],B[1]):null}function I(k){return M.isLonLatOverEdges(k.lonlat)?"none":null}for(D in this.basePaths)this.basePaths[D].attr("d",z);for(D in this.dataPaths)this.dataPaths[D].attr("d",function(k){return z(k.geojson)});for(D in this.dataPoints)this.dataPoints[D].attr("display",I).attr("transform",N)};function T(M){var z=M.projection,D=z.type,N=d.projNames[D];N="geo"+p.titleCase(N);for(var I=C[N]||x[N],k=I(),B=M._isSatellite?Math.acos(1/z.distance)*180/Math.PI:M._isClipped?d.lonaxisSpan[D]/2:null,O=["center","rotate","parallels","clipExtent"],H=function(et){return et?k:[]},Y=0;YJ}else return!1},k.getPath=function(){return i().projection(k)},k.getBounds=function(et){return k.getPath().bounds(et)},k.precision(d.precision),M._isSatellite&&k.tilt(z.tilt).distance(z.distance),B&&k.clipAngle(B-d.clipPad),k}function s(M,z,D){var N=1e-6,I=2.5,k=z[M],B=d.scopeDefaults[z.scope],O,H,Y;M==="lonaxis"?(O=B.lonaxisRange,H=B.lataxisRange,Y=function(Q,ot){return[Q,ot]}):M==="lataxis"&&(O=B.lataxisRange,H=B.lonaxisRange,Y=function(Q,ot){return[ot,Q]});var j={type:"linear",range:[O[0],O[1]-N],tick0:k.tick0,dtick:k.dtick};c.setConvert(j,D);var et=c.calcTicks(j);!z.isScoped&&M==="lonaxis"&&et.pop();for(var it=et.length,ut=new Array(it),J=0;J0&&I<0&&(I+=360);var O=(I-N)/4;return{type:"Polygon",coordinates:[[[N,k],[N,B],[N+O,B],[N+2*O,B],[N+3*O,B],[I,B],[I,k],[I-O,k],[I-2*O,k],[I-3*O,k],[N,k]]]}}},10816:function(G,U,t){var g=t(84888).KY,C=t(3400).counterRegex,i=t(43520),S="geo",x=C(S),v={};v[S]={valType:"subplotid",dflt:S,editType:"calc"};function p(a){for(var n=a._fullLayout,f=a.calcdata,c=n._subplots[S],l=0;l0&&H<0&&(H+=360);var Y=(O+H)/2,j;if(!u){var et=o?h.projRotate:[Y,0,0];j=a("projection.rotation.lon",et[0]),a("projection.rotation.lat",et[1]),a("projection.rotation.roll",et[2]),E=a("showcoastlines",!o&&y),E&&(a("coastlinecolor"),a("coastlinewidth")),E=a("showocean",y?void 0:!1),E&&a("oceancolor")}var it,ut;if(u?(it=-96.6,ut=38.7):(it=o?Y:j,ut=(B[0]+B[1])/2),a("center.lon",it),a("center.lat",ut),d&&(a("projection.tilt"),a("projection.distance")),w){var J=h.projParallels||[0,60];a("projection.parallels",J)}a("projection.scale"),E=a("showland",y?void 0:!1),E&&a("landcolor"),E=a("showlakes",y?void 0:!1),E&&a("lakecolor"),E=a("showrivers",y?void 0:!1),E&&(a("rivercolor"),a("riverwidth")),E=a("showcountries",o&&m!=="usa"&&y),E&&(a("countrycolor"),a("countrywidth")),(m==="usa"||m==="north america"&&l===50)&&(a("showsubunits",y),a("subunitcolor"),a("subunitwidth")),o||(E=a("showframe",y),E&&(a("framecolor"),a("framewidth"))),a("bgcolor");var X=a("fitbounds");X&&(delete e.projection.scale,o?(delete e.center.lon,delete e.center.lat):A?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}},79248:function(G,U,t){var g=t(33428),C=t(3400),i=t(24040),S=Math.PI/180,x=180/Math.PI,v={cursor:"pointer"},p={cursor:"auto"};function r(s,L){var M=s.projection,z;return L._isScoped?z=n:L._isClipped?z=c:z=f,z(s,M)}G.exports=r;function e(s,L){return g.behavior.zoom().translate(L.translate()).scale(L.scale())}function a(s,L,M){var z=s.id,D=s.graphDiv,N=D.layout,I=N[z],k=D._fullLayout,B=k[z],O={},H={};function Y(j,et){O[z+"."+j]=C.nestedProperty(I,j).get(),i.call("_storeDirectGUIEdit",N,k._preGUI,O);var it=C.nestedProperty(B,j);it.get()!==et&&(it.set(et),C.nestedProperty(I,j).set(et),H[z+"."+j]=et)}M(Y),Y("projection.scale",L.scale()/s.fitScale),Y("fitbounds",!1),D.emit("plotly_relayout",H)}function n(s,L){var M=e(s,L);function z(){g.select(this).style(v)}function D(){L.scale(g.event.scale).translate(g.event.translate),s.render(!0);var k=L.invert(s.midPt);s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.center.lon":k[0],"geo.center.lat":k[1]})}function N(k){var B=L.invert(s.midPt);k("center.lon",B[0]),k("center.lat",B[1])}function I(){g.select(this).style(p),a(s,L,N)}return M.on("zoomstart",z).on("zoom",D).on("zoomend",I),M}function f(s,L){var M=e(s,L),z=2,D,N,I,k,B,O,H,Y,j;function et(V){return L.invert(V)}function it(V){var Q=et(V);if(!Q)return!0;var ot=L(Q);return Math.abs(ot[0]-V[0])>z||Math.abs(ot[1]-V[1])>z}function ut(){g.select(this).style(v),D=g.mouse(this),N=L.rotate(),I=L.translate(),k=N,B=et(D)}function J(){if(O=g.mouse(this),it(D)){M.scale(L.scale()),M.translate(L.translate());return}L.scale(g.event.scale),L.translate([I[0],g.event.translate[1]]),B?et(O)&&(Y=et(O),H=[k[0]+(Y[0]-B[0]),N[1],N[2]],L.rotate(H),k=H):(D=O,B=et(D)),j=!0,s.render(!0);var V=L.rotate(),Q=L.invert(s.midPt);s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.center.lon":Q[0],"geo.center.lat":Q[1],"geo.projection.rotation.lon":-V[0]})}function X(){g.select(this).style(p),j&&a(s,L,tt)}function tt(V){var Q=L.rotate(),ot=L.invert(s.midPt);V("projection.rotation.lon",-Q[0]),V("center.lon",ot[0]),V("center.lat",ot[1])}return M.on("zoomstart",ut).on("zoom",J).on("zoomend",X),M}function c(s,L){L.rotate(),L.scale();var M=e(s,L),z=T(M,"zoomstart","zoom","zoomend"),D=0,N=M.on,I;M.on("zoomstart",function(){g.select(this).style(v);var Y=g.mouse(this),j=L.rotate(),et=j,it=L.translate(),ut=m(j);I=l(L,Y),N.call(M,"zoom",function(){var J=g.mouse(this);if(L.scale(g.event.scale),!I)Y=J,I=l(L,Y);else if(l(L,J)){L.rotate(j).translate(it);var X=l(L,J),tt=b(I,X),V=A(h(ut,tt)),Q=u(V,I,et);(!isFinite(Q[0])||!isFinite(Q[1])||!isFinite(Q[2]))&&(Q=et),L.rotate(Q),et=Q}B(z.of(this,arguments))}),k(z.of(this,arguments))}).on("zoomend",function(){g.select(this).style(p),N.call(M,"zoom",null),O(z.of(this,arguments)),a(s,L,H)}).on("zoom.redraw",function(){s.render(!0);var Y=L.rotate();s.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":L.scale()/s.fitScale,"geo.projection.rotation.lon":-Y[0],"geo.projection.rotation.lat":-Y[1]})});function k(Y){D++||Y({type:"zoomstart"})}function B(Y){Y({type:"zoom"})}function O(Y){--D||Y({type:"zoomend"})}function H(Y){var j=L.rotate();Y("projection.rotation.lon",-j[0]),Y("projection.rotation.lat",-j[1])}return g.rebind(M,z,"on")}function l(s,L){var M=s.invert(L);return M&&isFinite(M[0])&&isFinite(M[1])&&_(M)}function m(s){var L=.5*s[0]*S,M=.5*s[1]*S,z=.5*s[2]*S,D=Math.sin(L),N=Math.cos(L),I=Math.sin(M),k=Math.cos(M),B=Math.sin(z),O=Math.cos(z);return[N*k*O+D*I*B,D*k*O-N*I*B,N*I*O+D*k*B,N*k*B-D*I*O]}function h(s,L){var M=s[0],z=s[1],D=s[2],N=s[3],I=L[0],k=L[1],B=L[2],O=L[3];return[M*I-z*k-D*B-N*O,M*k+z*I+D*O-N*B,M*B-z*O+D*I+N*k,M*O+z*B-D*k+N*I]}function b(s,L){if(!(!s||!L)){var M=E(s,L),z=Math.sqrt(y(M,M)),D=.5*Math.acos(Math.max(-1,Math.min(1,y(s,L)))),N=Math.sin(D)/z;return z&&[Math.cos(D),M[2]*N,-M[1]*N,M[0]*N]}}function u(s,L,M){var z=w(L,2,s[0]);z=w(z,1,s[1]),z=w(z,0,s[2]-M[2]);var D=L[0],N=L[1],I=L[2],k=z[0],B=z[1],O=z[2],H=Math.atan2(N,D)*x,Y=Math.sqrt(D*D+N*N),j,et;Math.abs(B)>Y?(et=(B>0?90:-90)-H,j=0):(et=Math.asin(B/Y)*x-H,j=Math.sqrt(Y*Y-B*B));var it=180-et-2*H,ut=(Math.atan2(O,k)-Math.atan2(I,j))*x,J=(Math.atan2(O,k)-Math.atan2(I,-j))*x,X=o(M[0],M[1],et,ut),tt=o(M[0],M[1],it,J);return X<=tt?[et,ut,M[2]]:[it,J,M[2]]}function o(s,L,M,z){var D=d(M-s),N=d(z-L);return Math.sqrt(D*D+N*N)}function d(s){return(s%360+540)%360-180}function w(s,L,M){var z=M*S,D=s.slice(),N=L===0?1:0,I=L===2?1:2,k=Math.cos(z),B=Math.sin(z);return D[N]=s[N]*k-s[I]*B,D[I]=s[I]*k+s[N]*B,D}function A(s){return[Math.atan2(2*(s[0]*s[1]+s[2]*s[3]),1-2*(s[1]*s[1]+s[2]*s[2]))*x,Math.asin(Math.max(-1,Math.min(1,2*(s[0]*s[2]-s[3]*s[1]))))*x,Math.atan2(2*(s[0]*s[3]+s[1]*s[2]),1-2*(s[2]*s[2]+s[3]*s[3]))*x]}function _(s){var L=s[0]*S,M=s[1]*S,z=Math.cos(M);return[z*Math.cos(L),z*Math.sin(L),Math.sin(M)]}function y(s,L){for(var M=0,z=0,D=s.length;zMath.abs(E)?(n.boxEnd[1]=n.boxStart[1]+Math.abs(y)*D*(E>=0?1:-1),n.boxEnd[1]u[3]&&(n.boxEnd[1]=u[3],n.boxEnd[0]=n.boxStart[0]+(u[3]-n.boxStart[1])/Math.abs(D))):(n.boxEnd[0]=n.boxStart[0]+Math.abs(E)/D*(y>=0?1:-1),n.boxEnd[0]u[2]&&(n.boxEnd[0]=u[2],n.boxEnd[1]=n.boxStart[1]+(u[2]-n.boxStart[0])*Math.abs(D)))}else M&&(n.boxEnd[0]=n.boxStart[0]),z&&(n.boxEnd[1]=n.boxStart[1])}else n.boxEnabled?(y=n.boxStart[0]!==n.boxEnd[0],E=n.boxStart[1]!==n.boxEnd[1],y||E?(y&&(T(0,n.boxStart[0],n.boxEnd[0]),r.xaxis.autorange=!1),E&&(T(1,n.boxStart[1],n.boxEnd[1]),r.yaxis.autorange=!1),r.relayoutCallback()):r.glplot.setDirty(),n.boxEnabled=!1,n.boxInited=!1):n.boxInited&&(n.boxInited=!1);break;case"pan":n.boxEnabled=!1,n.boxInited=!1,m?(n.panning||(n.dragStart[0]=h,n.dragStart[1]=b),Math.abs(n.dragStart[0]-h)1;function m(h){if(!l){var b=g.validate(n[h],v[h]);if(b)return n[h]}}S(n,f,c,{type:r,attributes:v,handleDefaults:e,fullLayout:f,font:f.font,fullData:c,getDfltFromLayout:m,autotypenumbersDflt:f.autotypenumbers,paper_bgcolor:f.paper_bgcolor,calendar:f.calendar})};function e(a,n,f,c){for(var l=f("bgcolor"),m=C.combine(l,c.paper_bgcolor),h=["up","center","eye"],b=0;b.999)&&(A="turntable")}else A="turntable";f("dragmode",A),f("hovermode",c.getDfltFromLayout("hovermode"))}},346:function(G,U,t){var g=t(86140),C=t(86968).u,i=t(92880).extendFlat,S=t(3400).counterRegex;function x(v,p,r){return{x:{valType:"number",dflt:v,editType:"camera"},y:{valType:"number",dflt:p,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}G.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(x(0,0,1),{}),center:i(x(0,0,0),{}),eye:i(x(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:C({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:g,yaxis:g,zaxis:g,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},9020:function(G,U,t){var g=t(43080),C=["xaxis","yaxis","zaxis"];function i(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}var S=i.prototype;S.merge=function(v){for(var p=0;p<3;++p){var r=v[C[p]];if(!r.visible){this.enabled[p]=!1,this.drawSides[p]=!1;continue}this.enabled[p]=r.showspikes,this.colors[p]=g(r.spikecolor),this.drawSides[p]=r.spikesides,this.lineWidth[p]=r.spikethickness}};function x(v){var p=new i;return p.merge(v),p}G.exports=x},87152:function(G,U,t){G.exports=x;var g=t(54460),C=t(3400),i=["xaxis","yaxis","zaxis"];function S(v){for(var p=new Array(3),r=0;r<3;++r){for(var e=v[r],a=new Array(e.length),n=0;n/g," "));a[n]=m,f.tickmode=c}}p.ticks=a;for(var n=0;n<3;++n){.5*(v.glplot.bounds[0][n]+v.glplot.bounds[1][n]);for(var h=0;h<2;++h)p.bounds[h][n]=v.glplot.bounds[h][n]}v.contourLevels=S(a)}},94424:function(G){function U(g,C){var i=[0,0,0,0],S,x;for(S=0;S<4;++S)for(x=0;x<4;++x)i[x]+=g[4*S+x]*C[S];return i}function t(g,C){var i=U(g.projection,U(g.view,U(g.model,[C[0],C[1],C[2],1])));return i}G.exports=t},98432:function(G,U,t){var g=t(67792).gl_plot3d,C=g.createCamera,i=g.createScene,S=t(5408),x=t(89184),v=t(24040),p=t(3400),r=p.preserveDrawingBuffer(),e=t(54460),a=t(93024),n=t(43080),f=t(16576),c=t(94424),l=t(44728),m=t(9020),h=t(87152),b=t(19280).applyAutorangeOptions,u,o,d=!1;function w(D,N){var I=document.createElement("div"),k=D.container;this.graphDiv=D.graphDiv;var B=document.createElementNS("http://www.w3.org/2000/svg","svg");B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",B.style["z-index"]=20,B.style["pointer-events"]="none",I.appendChild(B),this.svgContainer=B,I.id=D.id,I.style.position="absolute",I.style.top=I.style.left="0px",I.style.width=I.style.height="100%",k.appendChild(I),this.fullLayout=N,this.id=D.id||"scene",this.fullSceneLayout=N[this.id],this.plotArgs=[[],{},{}],this.axesOptions=l(N,N[this.id]),this.spikeOptions=m(N[this.id]),this.container=I,this.staticMode=!!D.staticPlot,this.pixelRatio=this.pixelRatio||D.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=v.getComponentMethod("annotations3d","convert"),this.drawAnnotations=v.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var A=w.prototype;A.prepareOptions=function(){var D=this,N={canvas:D.canvas,gl:D.gl,glOptions:{preserveDrawingBuffer:r,premultipliedAlpha:!0,antialias:!0},container:D.container,axes:D.axesOptions,spikes:D.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:D.camera,pixelRatio:D.pixelRatio};if(D.staticMode){if(!o&&(u=document.createElement("canvas"),o=S({canvas:u,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!o))throw new Error("error creating static canvas/context for image server");N.gl=o,N.canvas=u}return N};var _=!0;A.tryCreatePlot=function(){var D=this,N=D.prepareOptions(),I=!0;try{D.glplot=i(N)}catch{if(D.staticMode||!_||r)I=!1;else{p.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{r=N.glOptions.preserveDrawingBuffer=!0,D.glplot=i(N)}catch{r=N.glOptions.preserveDrawingBuffer=!1,I=!1}}}return _=!1,I},A.initializeGLCamera=function(){var D=this,N=D.fullSceneLayout.camera,I=N.projection.type==="orthographic";D.camera=C(D.container,{center:[N.center.x,N.center.y,N.center.z],eye:[N.eye.x,N.eye.y,N.eye.z],up:[N.up.x,N.up.y,N.up.z],_ortho:I,zoomMin:.01,zoomMax:100,mode:"orbit"})},A.initializeGLPlot=function(){var D=this;D.initializeGLCamera();var N=D.tryCreatePlot();if(!N)return f(D);D.traces={},D.make4thDimension();var I=D.graphDiv,k=I.layout,B=function(){var H={};return D.isCameraChanged(k)&&(H[D.id+".camera"]=D.getCamera()),D.isAspectChanged(k)&&(H[D.id+".aspectratio"]=D.glplot.getAspectratio(),k[D.id].aspectmode!=="manual"&&(D.fullSceneLayout.aspectmode=k[D.id].aspectmode=H[D.id+".aspectmode"]="manual")),H},O=function(H){if(H.fullSceneLayout.dragmode!==!1){var Y=B();H.saveLayout(k),H.graphDiv.emit("plotly_relayout",Y)}};return D.glplot.canvas&&(D.glplot.canvas.addEventListener("mouseup",function(){O(D)}),D.glplot.canvas.addEventListener("touchstart",function(){d=!0}),D.glplot.canvas.addEventListener("wheel",function(H){if(I._context._scrollZoom.gl3d){if(D.camera._ortho){var Y=H.deltaX>H.deltaY?1.1:.9090909090909091,j=D.glplot.getAspectratio();D.glplot.setAspectratio({x:Y*j.x,y:Y*j.y,z:Y*j.z})}O(D)}},x?{passive:!1}:!1),D.glplot.canvas.addEventListener("mousemove",function(){if(D.fullSceneLayout.dragmode!==!1&&D.camera.mouseListener.buttons!==0){var H=B();D.graphDiv.emit("plotly_relayouting",H)}}),D.staticMode||D.glplot.canvas.addEventListener("webglcontextlost",function(H){I&&I.emit&&I.emit("plotly_webglcontextlost",{event:H,layer:D.id})},!1)),D.glplot.oncontextloss=function(){D.recoverContext()},D.glplot.onrender=function(){D.render()},!0},A.render=function(){var D=this,N=D.graphDiv,I,k=D.svgContainer,B=D.container.getBoundingClientRect();N._fullLayout._calcInverseTransform(N);var O=N._fullLayout._invScaleX,H=N._fullLayout._invScaleY,Y=B.width*O,j=B.height*H;k.setAttributeNS(null,"viewBox","0 0 "+Y+" "+j),k.setAttributeNS(null,"width",Y),k.setAttributeNS(null,"height",j),h(D),D.glplot.axes.update(D.axesOptions);for(var et=Object.keys(D.traces),it=null,ut=D.glplot.selection,J=0;J")):I.type==="isosurface"||I.type==="volume"?(ot.valueLabel=e.hoverLabelText(D._mockAxis,D._mockAxis.d2l(ut.traceCoordinate[3]),I.valuehoverformat),ct.push("value: "+ot.valueLabel),ut.textLabel&&ct.push(ut.textLabel),nt=ct.join("
    ")):nt=ut.textLabel;var gt={x:ut.traceCoordinate[0],y:ut.traceCoordinate[1],z:ut.traceCoordinate[2],data:V._input,fullData:V,curveNumber:V.index,pointNumber:Q};a.appendArrayPointValue(gt,V,Q),I._module.eventData&&(gt=V._module.eventData(gt,ut,V,{},Q));var Tt={points:[gt]};if(D.fullSceneLayout.hovermode){var wt=[];a.loneHover({trace:V,x:(.5+.5*tt[0]/tt[3])*Y,y:(.5-.5*tt[1]/tt[3])*j,xLabel:ot.xLabel,yLabel:ot.yLabel,zLabel:ot.zLabel,text:nt,name:it.name,color:a.castHoverOption(V,Q,"bgcolor")||it.color,borderColor:a.castHoverOption(V,Q,"bordercolor"),fontFamily:a.castHoverOption(V,Q,"font.family"),fontSize:a.castHoverOption(V,Q,"font.size"),fontColor:a.castHoverOption(V,Q,"font.color"),nameLength:a.castHoverOption(V,Q,"namelength"),textAlign:a.castHoverOption(V,Q,"align"),hovertemplate:p.castOption(V,Q,"hovertemplate"),hovertemplateLabels:p.extendFlat({},gt,ot),eventData:[gt]},{container:k,gd:N,inOut_bbox:wt}),gt.bbox=wt[0]}ut.distance<5&&(ut.buttons||d)?N.emit("plotly_click",Tt):N.emit("plotly_hover",Tt),this.oldEventData=Tt}else a.loneUnhover(k),this.oldEventData&&N.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;D.drawAnnotations(D)},A.recoverContext=function(){var D=this;D.glplot.dispose();var N=function(){if(D.glplot.gl.isContextLost()){requestAnimationFrame(N);return}if(!D.initializeGLPlot()){p.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}D.plot.apply(D,D.plotArgs)};requestAnimationFrame(N)};var y=["xaxis","yaxis","zaxis"];function E(D,N,I){for(var k=D.fullSceneLayout,B=0;B<3;B++){var O=y[B],H=O.charAt(0),Y=k[O],j=N[H],et=N[H+"calendar"],it=N["_"+H+"length"];if(!p.isArrayOrTypedArray(j))I[0][B]=Math.min(I[0][B],0),I[1][B]=Math.max(I[1][B],it-1);else for(var ut,J=0;J<(it||j.length);J++)if(p.isArrayOrTypedArray(j[J]))for(var X=0;XV[1][H])V[0][H]=-1,V[1][H]=1;else{var Rt=V[1][H]-V[0][H];V[0][H]-=Rt/32,V[1][H]+=Rt/32}if(ot=[V[0][H],V[1][H]],ot=b(ot,j),V[0][H]=ot[0],V[1][H]=ot[1],j.isReversed()){var bt=V[0][H];V[0][H]=V[1][H],V[1][H]=bt}}else ot=j.range,V[0][H]=j.r2l(ot[0]),V[1][H]=j.r2l(ot[1]);V[0][H]===V[1][H]&&(V[0][H]-=1,V[1][H]+=1),j.range=[V[0][H],V[1][H]],j.limitRange(),k.glplot.setBounds(H,{min:j.range[0]*X[H],max:j.range[1]*X[H]})}var At,mt=it.aspectmode;if(mt==="cube")At=[1,1,1];else if(mt==="manual"){var Lt=it.aspectratio;At=[Lt.x,Lt.y,Lt.z]}else if(mt==="auto"||mt==="data"){var Ht=[1,1,1];for(H=0;H<3;++H){j=it[y[H]],et=j.type;var Ut=Q[et];Ht[H]=Math.pow(Ut.acc,1/Ut.count)/X[H]}mt==="data"||Math.max.apply(null,Ht)/Math.min.apply(null,Ht)<=4?At=Ht:At=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");it.aspectratio.x=ut.aspectratio.x=At[0],it.aspectratio.y=ut.aspectratio.y=At[1],it.aspectratio.z=ut.aspectratio.z=At[2],k.glplot.setAspectratio(it.aspectratio),k.viewInitial.aspectratio||(k.viewInitial.aspectratio={x:it.aspectratio.x,y:it.aspectratio.y,z:it.aspectratio.z}),k.viewInitial.aspectmode||(k.viewInitial.aspectmode=it.aspectmode);var kt=it.domain||null,Vt=N._size||null;if(kt&&Vt){var It=k.container.style;It.position="absolute",It.left=Vt.l+kt.x[0]*Vt.w+"px",It.top=Vt.t+(1-kt.y[1])*Vt.h+"px",It.width=Vt.w*(kt.x[1]-kt.x[0])+"px",It.height=Vt.h*(kt.y[1]-kt.y[0])+"px"}k.glplot.redraw()}},A.destroy=function(){var D=this;D.glplot&&(D.camera.mouseListener.enabled=!1,D.container.removeEventListener("wheel",D.camera.wheelListener),D.camera=null,D.glplot.dispose(),D.container.parentNode.removeChild(D.container),D.glplot=null)};function s(D){return[[D.eye.x,D.eye.y,D.eye.z],[D.center.x,D.center.y,D.center.z],[D.up.x,D.up.y,D.up.z]]}function L(D){return{up:{x:D.up[0],y:D.up[1],z:D.up[2]},center:{x:D.center[0],y:D.center[1],z:D.center[2]},eye:{x:D.eye[0],y:D.eye[1],z:D.eye[2]},projection:{type:D._ortho===!0?"orthographic":"perspective"}}}A.getCamera=function(){var D=this;return D.camera.view.recalcMatrix(D.camera.view.lastT()),L(D.camera)},A.setViewport=function(D){var N=this,I=D.camera;N.camera.lookAt.apply(this,s(I)),N.glplot.setAspectratio(D.aspectratio);var k=I.projection.type==="orthographic",B=N.camera._ortho;k!==B&&(N.glplot.redraw(),N.glplot.clearRGBA(),N.glplot.dispose(),N.initializeGLPlot())},A.isCameraChanged=function(D){var N=this,I=N.getCamera(),k=p.nestedProperty(D,N.id+".camera"),B=k.get();function O(et,it,ut,J){var X=["up","center","eye"],tt=["x","y","z"];return it[X[ut]]&&et[X[ut]][tt[J]]===it[X[ut]][tt[J]]}var H=!1;if(B===void 0)H=!0;else{for(var Y=0;Y<3;Y++)for(var j=0;j<3;j++)if(!O(I,B,Y,j)){H=!0;break}(!B.projection||I.projection&&I.projection.type!==B.projection.type)&&(H=!0)}return H},A.isAspectChanged=function(D){var N=this,I=N.glplot.getAspectratio(),k=p.nestedProperty(D,N.id+".aspectratio"),B=k.get();return B===void 0||B.x!==I.x||B.y!==I.y||B.z!==I.z},A.saveLayout=function(D){var N=this,I=N.fullLayout,k,B,O,H,Y,j,et=N.isCameraChanged(D),it=N.isAspectChanged(D),ut=et||it;if(ut){var J={};if(et&&(k=N.getCamera(),B=p.nestedProperty(D,N.id+".camera"),O=B.get(),J[N.id+".camera"]=O),it&&(H=N.glplot.getAspectratio(),Y=p.nestedProperty(D,N.id+".aspectratio"),j=Y.get(),J[N.id+".aspectratio"]=j),v.call("_storeDirectGUIEdit",D,I._preGUI,J),et){B.set(k);var X=p.nestedProperty(I,N.id+".camera");X.set(k)}if(it){Y.set(H);var tt=p.nestedProperty(I,N.id+".aspectratio");tt.set(H),N.glplot.redraw()}}return ut},A.updateFx=function(D,N){var I=this,k=I.camera;if(k)if(D==="orbit")k.mode="orbit",k.keyBindingMode="rotate";else if(D==="turntable"){k.up=[0,0,1],k.mode="turntable",k.keyBindingMode="rotate";var B=I.graphDiv,O=B._fullLayout,H=I.fullSceneLayout.camera,Y=H.up.x,j=H.up.y,et=H.up.z;if(et/Math.sqrt(Y*Y+j*j+et*et)<.999){var it=I.id+".camera.up",ut={x:0,y:0,z:1},J={};J[it]=ut;var X=B.layout;v.call("_storeDirectGUIEdit",X,O._preGUI,J),H.up=ut,p.nestedProperty(X,it).set(ut)}}else k.keyBindingMode=D;I.fullSceneLayout.hovermode=N};function M(D,N,I){for(var k=0,B=I-1;k0)for(var Y=255/H,j=0;j<3;++j)D[O+j]=Math.min(Y*D[O+j],255)}}A.toImage=function(D){var N=this;D||(D="png"),N.staticMode&&N.container.appendChild(u),N.glplot.redraw();var I=N.glplot.gl,k=I.drawingBufferWidth,B=I.drawingBufferHeight;I.bindFramebuffer(I.FRAMEBUFFER,null);var O=new Uint8Array(k*B*4);I.readPixels(0,0,k,B,I.RGBA,I.UNSIGNED_BYTE,O),M(O,k,B),z(O,k,B);var H=document.createElement("canvas");H.width=k,H.height=B;var Y=H.getContext("2d",{willReadFrequently:!0}),j=Y.createImageData(k,B);j.data.set(O),Y.putImageData(j,0,0);var et;switch(D){case"jpeg":et=H.toDataURL("image/jpeg");break;case"webp":et=H.toDataURL("image/webp");break;default:et=H.toDataURL("image/png")}return N.staticMode&&N.container.removeChild(u),et},A.setConvert=function(){for(var D=this,N=0;N<3;N++){var I=D.fullSceneLayout[y[N]];e.setConvert(I,D.fullLayout),I.setScale=p.noop}},A.make4thDimension=function(){var D=this,N=D.graphDiv,I=N._fullLayout;D._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},e.setConvert(D._mockAxis,I)},G.exports=w},52094:function(G){G.exports=function(t,g,C,i){i=i||t.length;for(var S=new Array(i),x=0;xOpenStreetMap contributors',S=['© Carto',i].join(" "),x=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),v=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),p={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:S,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:x,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:x,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:v,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},r=g(p);G.exports={requiredVersion:C,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:p,styleValuesNonMapbox:r,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+C+"."].join(` `),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(` `),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",r.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` `),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(` -`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}},89032:function(H,U,e){var g=e(3400);H.exports=function(i,S){var x=i.split(" "),v=x[0],p=x[1],r=g.isArrayOrTypedArray(S)?g.mean(S):S,t=.5+r/100,a=1.5+r/100,n=["",""],f=[0,0];switch(v){case"top":n[0]="top",f[1]=-a;break;case"bottom":n[0]="bottom",f[1]=a;break}switch(p){case"left":n[1]="right",f[0]=-t;break;case"right":n[1]="left",f[0]=t;break}var c;return n[0]&&n[1]?c=n.join("-"):n[0]?c=n[0]:n[1]?c=n[1]:c="center",{anchor:c,offset:f}}},33688:function(H,U,e){var g=e(3480),C=e(3400),i=C.strTranslate,S=C.strScale,x=e(84888).KY,v=e(9616),p=e(33428),r=e(43616),t=e(72736),a=e(14440),n="mapbox",f=U.constants=e(47552);U.name=n,U.attr="subplot",U.idRoot=n,U.idRegex=U.attrRegex=C.counterRegex(n),U.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},U.layoutAttributes=e(5232),U.supplyLayoutDefaults=e(5976),U.plot=function(h){var b=h._fullLayout,u=h.calcdata,o=b._subplots[n];if(g.version!==f.requiredVersion)throw new Error(f.wrongVersionErrorMsg);var d=c(h,o);g.accessToken=d;for(var w=0;wN/2){var I=L.split("|").join("
    ");z.text(I).attr("data-unformatted",I).call(t.convertToTspans,m),D=r.bBox(z.node())}z.attr("transform",i(-3,-D.height+8)),M.insert("rect",".static-attribution").attr({x:-D.width-6,y:-D.height-3,width:D.width+6,height:D.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;D.width+6>N&&(k=N/(D.width+6));var B=[u.l+u.w*w.x[1],u.t+u.h*(1-w.y[0])];M.attr("transform",i(B[0],B[1])+S(k))}};function c(m,h){var b=m._fullLayout,u=m._context;if(u.mapboxAccessToken==="")return"";for(var o=[],d=[],w=!1,A=!1,_=0;_1&&C.warn(f.multipleTokensErrorMsg),o[0]):(d.length&&C.log(["Listed mapbox access token(s)",d.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function l(m){return typeof m=="string"&&(f.styleValuesMapbox.indexOf(m)!==-1||m.indexOf("mapbox://")===0||m.indexOf("stamen")===0)}U.updateFx=function(m){for(var h=m._fullLayout,b=h._subplots[n],u=0;u0){for(var f=0;f0}function r(a){var n={},f={};switch(a.type){case"circle":g.extendFlat(f,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":g.extendFlat(f,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":g.extendFlat(f,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,l=i(c.textposition,c.iconsize);g.extendFlat(n,{"icon-image":c.icon+"-15","icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":l.anchor,"text-offset":l.offset,"symbol-placement":c.placement}),g.extendFlat(f,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":g.extendFlat(f,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:n,paint:f}}function t(a){var n=a.sourcetype,f=a.source,c={type:n},l;return n==="geojson"?l="data":n==="vector"?l=typeof f=="string"?"url":"tiles":n==="raster"?(l="tiles",c.tileSize=256):n==="image"&&(l="url",c.coordinates=a.coordinates),c[l]=f,a.sourceattribution&&(c.attribution=C(a.sourceattribution)),c}H.exports=function(n,f,c){var l=new x(n,f);return l.update(c),l}},5232:function(H,U,e){var g=e(3400),C=e(76308).defaultLine,i=e(86968).u,S=e(25376),x=e(52904).textposition,v=e(67824).overrideAll,p=e(31780).templatedArray,r=e(47552),t=S({});t.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=H.exports=v({_arrayAttrRegexps:[g.counterRegex("mapbox",".layers",!0)],domain:i({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:r.styleValuesMapbox.concat(r.styleValuesNonMapbox),dflt:r.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:p("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:C},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:C}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:t,textposition:g.extendFlat({},x,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}},5976:function(H,U,e){var g=e(3400),C=e(168),i=e(51272),S=e(5232);H.exports=function(r,t,a){C(r,t,a,{type:"mapbox",attributes:S,handleDefaults:x,partition:"y",accessToken:t._mapboxAccessToken})};function x(p,r,t,a){t("accesstoken",a.accessToken),t("style"),t("center.lon"),t("center.lat"),t("zoom"),t("bearing"),t("pitch");var n=t("bounds.west"),f=t("bounds.east"),c=t("bounds.south"),l=t("bounds.north");(n===void 0||f===void 0||c===void 0||l===void 0)&&delete r.bounds,i(p,r,{name:"layers",handleItemDefaults:v}),r._input=p}function v(p,r){function t(m,h){return g.coerce(p,r,S.layers,m,h)}var a=t("visible");if(a){var n=t("sourcetype"),f=n==="raster"||n==="image";t("source"),t("sourceattribution"),n==="vector"&&t("sourcelayer"),n==="image"&&t("coordinates");var c;f&&(c="raster");var l=t("type",c);f&&l!=="raster"&&(l=r.type="raster",g.log("Source types *raster* and *image* must drawn *raster* layer type.")),t("below"),t("color"),t("opacity"),t("minzoom"),t("maxzoom"),l==="circle"&&t("circle.radius"),l==="line"&&(t("line.width"),t("line.dash")),l==="fill"&&t("fill.outlinecolor"),l==="symbol"&&(t("symbol.icon"),t("symbol.iconsize"),t("symbol.text"),g.coerceFont(t,"symbol.textfont"),t("symbol.textposition"),t("symbol.placement"))}}},14440:function(H,U,e){var g=e(3480),C=e(3400),i=e(27144),S=e(24040),x=e(54460),v=e(86476),p=e(93024),r=e(72760),t=r.drawMode,a=r.selectMode,n=e(22676).prepSelect,f=e(22676).clearOutline,c=e(22676).clearSelectionsCache,l=e(22676).selectOnClick,m=e(47552),h=e(22360);function b(_,y){this.id=y,this.gd=_;var E=_._fullLayout,T=_._context;this.container=E._glcontainer.node(),this.isStatic=T.staticPlot,this.uid=E._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(E),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=b.prototype;u.plot=function(_,y,E){var T=this,s=y[T.id];T.map&&s.accesstoken!==T.accessToken&&(T.map.remove(),T.map=null,T.styleObj=null,T.traceHash={},T.layerList=[]);var L;T.map?L=new Promise(function(M,z){T.updateMap(_,y,M,z)}):L=new Promise(function(M,z){T.createMap(_,y,M,z)}),E.push(L)},u.createMap=function(_,y,E,T){var s=this,L=y[s.id],M=s.styleObj=d(L.style,y);s.accessToken=L.accesstoken;var z=L.bounds,D=z?[[z.west,z.south],[z.east,z.north]]:null,N=s.map=new g.Map({container:s.div,style:M.style,center:A(L.center),zoom:L.zoom,bearing:L.bearing,pitch:L.pitch,maxBounds:D,interactive:!s.isStatic,preserveDrawingBuffer:s.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new g.AttributionControl({compact:!0}));N._canvas.style.left="0px",N._canvas.style.top="0px",s.rejectOnError(T),s.isStatic||s.initFx(_,y);var I=[];I.push(new Promise(function(k){N.once("load",k)})),I=I.concat(i.fetchTraceGeoData(_)),Promise.all(I).then(function(){s.fillBelowLookup(_,y),s.updateData(_),s.updateLayout(y),s.resolveOnRender(E)}).catch(T)},u.updateMap=function(_,y,E,T){var s=this,L=s.map,M=y[this.id];s.rejectOnError(T);var z=[],D=d(M.style,y);JSON.stringify(s.styleObj)!==JSON.stringify(D)&&(s.styleObj=D,L.setStyle(D.style),s.traceHash={},z.push(new Promise(function(N){L.once("styledata",N)}))),z=z.concat(i.fetchTraceGeoData(_)),Promise.all(z).then(function(){s.fillBelowLookup(_,y),s.updateData(_),s.updateLayout(y),s.resolveOnRender(E)}).catch(T)},u.fillBelowLookup=function(_,y){var E=y[this.id],T=E.layers,s,L,M=this.belowLookup={},z=!1;for(s=0;s<_.length;s++){var D=_[s][0].trace,N=D._module;typeof D.below=="string"?L=D.below:N.getBelow&&(L=N.getBelow(D,this)),L===""&&(z=!0),M["trace-"+D.uid]=L||""}for(s=0;s1)for(s=0;s-1&&l(D.originalEvent,T,[E.xaxis],[E.yaxis],E.id,z),N.indexOf("event")>-1&&p.click(T,D.originalEvent)}}},u.updateFx=function(_){var y=this,E=y.map,T=y.gd;if(y.isStatic)return;function s(D){var N=y.map.unproject(D);return[N.lng,N.lat]}var L=_.dragmode,M;M=function(D,N){if(N.isRect){var I=D.range={};I[y.id]=[s([N.xmin,N.ymin]),s([N.xmax,N.ymax])]}else{var k=D.lassoPoints={};k[y.id]=N.map(s)}};var z=y.dragOptions;y.dragOptions=C.extendDeep(z||{},{dragmode:_.dragmode,element:y.div,gd:T,plotinfo:{id:y.id,domain:_[y.id].domain,xaxis:y.xaxis,yaxis:y.yaxis,fillRangeItems:M},xaxes:[y.xaxis],yaxes:[y.yaxis],subplot:y.id}),E.off("click",y.onClickInPanHandler),a(L)||t(L)?(E.dragPan.disable(),E.on("zoomstart",y.clearOutline),y.dragOptions.prepFn=function(D,N,I){n(D,N,I,y.dragOptions,L)},v.init(y.dragOptions)):(E.dragPan.enable(),E.off("zoomstart",y.clearOutline),y.div.onmousedown=null,y.div.ontouchstart=null,y.div.removeEventListener("touchstart",y.div._ontouchstart),y.onClickInPanHandler=y.onClickInPanFn(y.dragOptions),E.on("click",y.onClickInPanHandler))},u.updateFramework=function(_){var y=_[this.id].domain,E=_._size,T=this.div.style;T.width=E.w*(y.x[1]-y.x[0])+"px",T.height=E.h*(y.y[1]-y.y[0])+"px",T.left=E.l+y.x[0]*E.w+"px",T.top=E.t+(1-y.y[1])*E.h+"px",this.xaxis._offset=E.l+y.x[0]*E.w,this.xaxis._length=E.w*(y.x[1]-y.x[0]),this.yaxis._offset=E.t+(1-y.y[1])*E.h,this.yaxis._length=E.h*(y.y[1]-y.y[0])},u.updateLayers=function(_){var y=_[this.id],E=y.layers,T=this.layerList,s;if(E.length!==T.length){for(s=0;s=Q.width-20?(Z["text-anchor"]="start",Z.x=5):(Z["text-anchor"]="end",Z.x=Q._paper.attr("width")-7),oe.attr(Z);var se=oe.select(".js-link-to-tool"),ne=oe.select(".js-link-spacer"),ce=oe.select(".js-sourcelinks");G._context.showSources&&G._context.showSources(G),G._context.showLink&&_(G,se),ne.text(se.text()&&ce.text()?" - ":"")}};function _(G,Q){Q.text("");var oe=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(G._context.linkText+" »");if(G._context.sendData)oe.on("click",function(){d.sendDataToCloud(G)});else{var $=window.location.pathname.split("/"),Z=window.location.search;oe.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+$[2].split(".")[0]+"/"+$[1]+Z})}}d.sendDataToCloud=function(G){var Q=(window.PLOTLYENV||{}).BASE_URL||G._context.plotlyServerURL;if(Q){G.emit("plotly_beforeexport");var oe=g.select(G).append("div").attr("id","hiddenform").style("display","none"),$=oe.append("form").attr({action:Q+"/external",method:"post",target:"_blank"}),Z=$.append("input").attr({type:"text",name:"data"});return Z.node().value=d.graphJson(G,!1,"keepdata"),$.node().submit(),oe.remove(),G.emit("plotly_afterexport"),!1}};var y=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],E=["year","month","dayMonth","dayMonthYear"];d.supplyDefaults=function(G,Q){var oe=Q&&Q.skipUpdateCalc,$=G._fullLayout||{};if($._skipDefaults){delete $._skipDefaults;return}var Z=G._fullLayout={},se=G.layout||{},ne=G._fullData||[],ce=G._fullData=[],ge=G.data||[],Te=G.calcdata||[],we=G._context||{},Re;G._transitionData||d.createTransitionData(G),Z._dfltTitle={plot:o(G,"Click to enter Plot title"),x:o(G,"Click to enter X axis title"),y:o(G,"Click to enter Y axis title"),colorbar:o(G,"Click to enter Colorscale title"),annotation:o(G,"new text")},Z._traceWord=o(G,"trace");var be=L(G,y);if(Z._mapboxAccessToken=we.mapboxAccessToken,$._initialAutoSizeIsDone){var Ae=$.width,me=$.height;d.supplyLayoutGlobalDefaults(se,Z,be),se.width||(Z.width=Ae),se.height||(Z.height=me),d.sanitizeMargins(Z)}else{d.supplyLayoutGlobalDefaults(se,Z,be);var Le=!se.width||!se.height,Ve=Z.autosize,Ue=we.autosizable,ke=Le&&(Ve||Ue);ke?d.plotAutoSize(G,se,Z):Le&&d.sanitizeMargins(Z),!Ve&&Le&&(se.width=Z.width,se.height=Z.height)}Z._d3locale=M(be,Z.separators),Z._extraFormat=L(G,E),Z._initialAutoSizeIsDone=!0,Z._dataLength=ge.length,Z._modules=[],Z._visibleModules=[],Z._basePlotModules=[];var He=Z._subplots=s(),Ie=Z._splomAxes={x:{},y:{}},rt=Z._splomSubplots={};Z._splomGridDflt={},Z._scatterStackOpts={},Z._firstScatter={},Z._alignmentOpts={},Z._colorAxes={},Z._requestRangeslider={},Z._traceUids=T(ne,ge),Z._globalTransforms=(G._context||{}).globalTransforms,d.supplyDataDefaults(ge,ce,se,Z);var Ke=Object.keys(Ie.x),$e=Object.keys(Ie.y);if(Ke.length>1&&$e.length>1){for(v.getComponentMethod("grid","sizeDefaults")(se,Z),Re=0;Re15&&$e.length>15&&Z.shapes.length===0&&Z.images.length===0,d.linkSubplots(ce,Z,ne,$),d.cleanPlot(ce,Z,ne,$);var St=!!($._has&&$._has("gl2d")),nt=!!(Z._has&&Z._has("gl2d")),ze=!!($._has&&$._has("cartesian")),Ze=!!(Z._has&&Z._has("cartesian")),Je=ze||St,We=Ze||nt;Je&&!We?$._bgLayer.remove():We&&!Je&&(Z._shouldCreateBgLayer=!0),$._zoomlayer&&!G._dragging&&c({_fullLayout:$}),z(ce,Z),u(Z,$),v.getComponentMethod("colorscale","crossTraceDefaults")(ce,Z),Z._preGUI||(Z._preGUI={}),Z._tracePreGUI||(Z._tracePreGUI={});var Fe=Z._tracePreGUI,xe={},ye;for(ye in Fe)xe[ye]="old";for(Re=0;Re0){var we=1-2*se;ne=Math.round(we*ne),ce=Math.round(we*ce)}}var Re=d.layoutAttributes.width.min,be=d.layoutAttributes.height.min;ne1,me=!oe.height&&Math.abs($.height-ce)>1;(me||Ae)&&(Ae&&($.width=ne),me&&($.height=ce)),Q._initialAutoSize||(Q._initialAutoSize={width:ne,height:ce}),d.sanitizeMargins($)},d.supplyLayoutModuleDefaults=function(G,Q,oe,$){var Z=v.componentsRegistry,se=Q._basePlotModules,ne,ce,ge,Te=v.subplotsRegistry.cartesian;for(ne in Z)ge=Z[ne],ge.includeBasePlot&&ge.includeBasePlot(G,Q);se.length||se.push(Te),Q._has("cartesian")&&(v.getComponentMethod("grid","contentDefaults")(G,Q),Te.finalizeSubplots(G,Q));for(var we in Q._subplots)Q._subplots[we].sort(t.subplotSort);for(ce=0;ce1&&(oe.l/=Ve,oe.r/=Ve)}if(be){var Ue=(oe.t+oe.b)/be;Ue>1&&(oe.t/=Ue,oe.b/=Ue)}var ke=oe.xl!==void 0?oe.xl:oe.x,He=oe.xr!==void 0?oe.xr:oe.x,Ie=oe.yt!==void 0?oe.yt:oe.y,rt=oe.yb!==void 0?oe.yb:oe.y;Ae[Q]={l:{val:ke,size:oe.l+Le},r:{val:He,size:oe.r+Le},b:{val:rt,size:oe.b+Le},t:{val:Ie,size:oe.t+Le}},me[Q]=1}if(!$._replotting)return d.doAutoMargin(G)}};function Y(G){if("_redrawFromAutoMarginCount"in G._fullLayout)return!1;var Q=f.list(G,"",!0);for(var oe in Q)if(Q[oe].autoshift||Q[oe].shift)return!0;return!1}d.doAutoMargin=function(G){var Q=G._fullLayout,oe=Q.width,$=Q.height;Q._size||(Q._size={}),B(Q);var Z=Q._size,se=Q.margin,ne={t:0,b:0,l:0,r:0},ce=t.extendFlat({},Z),ge=se.l,Te=se.r,we=se.t,Re=se.b,be=Q._pushmargin,Ae=Q._pushmarginIds,me=Q.minreducedwidth,Le=Q.minreducedheight;if(se.autoexpand!==!1){for(var Ve in be)Ae[Ve]||delete be[Ve];var Ue=G._fullLayout._reservedMargin;for(var ke in Ue)for(var He in Ue[ke]){var Ie=Ue[ke][He];ne[He]=Math.max(ne[He],Ie)}be.base={l:{val:0,size:ge},r:{val:1,size:Te},t:{val:1,size:we},b:{val:0,size:Re}};for(var rt in ne){var Ke=0;for(var $e in be)$e!=="base"&&S(be[$e][rt].size)&&(Ke=be[$e][rt].size>Ke?be[$e][rt].size:Ke);var lt=Math.max(0,se[rt]-Ke);ne[rt]=Math.max(0,ne[rt]-lt)}for(var ht in be){var dt=be[ht].l||{},xt=be[ht].b||{},St=dt.val,nt=dt.size,ze=xt.val,Ze=xt.size,Je=oe-ne.r-ne.l,We=$-ne.t-ne.b;for(var Fe in be){if(S(nt)&&be[Fe].r){var xe=be[Fe].r.val,ye=be[Fe].r.size;if(xe>St){var Ee=(nt*xe+(ye-Je)*St)/(xe-St),Me=(ye*(1-St)+(nt-Je)*(1-xe))/(xe-St);Ee+Me>ge+Te&&(ge=Ee,Te=Me)}}if(S(Ze)&&be[Fe].t){var Ne=be[Fe].t.val,je=be[Fe].t.size;if(Ne>ze){var it=(Ze*Ne+(je-We)*ze)/(Ne-ze),mt=(je*(1-ze)+(Ze-We)*(1-Ne))/(Ne-ze);it+mt>Re+we&&(Re=it,we=mt)}}}}}var bt=t.constrain(oe-se.l-se.r,O,me),vt=t.constrain($-se.t-se.b,V,Le),Lt=Math.max(0,oe-bt),ct=Math.max(0,$-vt);if(Lt){var Tt=(ge+Te)/Lt;Tt>1&&(ge/=Tt,Te/=Tt)}if(ct){var Bt=(Re+we)/ct;Bt>1&&(Re/=Bt,we/=Bt)}if(Z.l=Math.round(ge)+ne.l,Z.r=Math.round(Te)+ne.r,Z.t=Math.round(we)+ne.t,Z.b=Math.round(Re)+ne.b,Z.p=Math.round(se.pad),Z.w=Math.round(oe)-Z.l-Z.r,Z.h=Math.round($)-Z.t-Z.b,!Q._replotting&&(d.didMarginChange(ce,Z)||Y(G))){"_redrawFromAutoMarginCount"in Q?Q._redrawFromAutoMarginCount++:Q._redrawFromAutoMarginCount=1;var ir=3*(1+Object.keys(Ae).length);if(Q._redrawFromAutoMarginCount1)return!0}return!1},d.graphJson=function(G,Q,oe,$,Z,se){(Z&&Q&&!G._fullData||Z&&!Q&&!G._fullLayout)&&d.supplyDefaults(G);var ne=Z?G._fullData:G.data,ce=Z?G._fullLayout:G.layout,ge=(G._transitionData||{})._frames;function Te(be,Ae){if(typeof be=="function")return Ae?"_function_":null;if(t.isPlainObject(be)){var me={},Le;return Object.keys(be).sort().forEach(function(He){if(["_","["].indexOf(He.charAt(0))===-1){if(typeof be[He]=="function"){Ae&&(me[He]="_function");return}if(oe==="keepdata"){if(He.substr(He.length-3)==="src")return}else if(oe==="keepstream"){if(Le=be[He+"src"],typeof Le=="string"&&Le.indexOf(":")>0&&!t.isPlainObject(be.stream))return}else if(oe!=="keepall"&&(Le=be[He+"src"],typeof Le=="string"&&Le.indexOf(":")>0))return;me[He]=Te(be[He],Ae)}}),me}var Ve=Array.isArray(be),Ue=t.isTypedArray(be);if((Ve||Ue)&&be.dtype&&be.shape){var ke=be.bdata;return Te({dtype:be.dtype,shape:be.shape,bdata:t.isArrayBuffer(ke)?x.encode(ke):ke},Ae)}return Ve?be.map(function(He){return Te(He,Ae)}):Ue?t.simpleMap(be,t.identity):t.isJSDate(be)?t.ms2DateTimeLocal(+be):be}var we={data:(ne||[]).map(function(be){var Ae=Te(be);return Q&&delete Ae.fit,Ae})};if(!Q&&(we.layout=Te(ce),Z)){var Re=ce._size;we.layout.computed={margin:{b:Re.b,l:Re.l,r:Re.r,t:Re.t}}}return ge&&(we.frames=Te(ge)),se&&(we.config=Te(G._context,!0)),$==="object"?we:JSON.stringify(we)},d.modifyFrames=function(G,Q){var oe,$,Z,se=G._transitionData._frames,ne=G._transitionData._frameHash;for(oe=0;oe0&&(G._transitioningWithDuration=!0),G._transitionData._interruptCallbacks.push(function(){$=!0}),oe.redraw&&G._transitionData._interruptCallbacks.push(function(){return v.call("redraw",G)}),G._transitionData._interruptCallbacks.push(function(){G.emit("plotly_transitioninterrupted",[])});var be=0,Ae=0;function me(){return be++,function(){Ae++,!$&&Ae===be&&ce(Re)}}oe.runFn(me),setTimeout(me())})}function ce(Re){if(G._transitionData)return se(G._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(oe.redraw)return v.call("redraw",G)}).then(function(){G._transitioning=!1,G._transitioningWithDuration=!1,G.emit("plotly_transitioned",[])}).then(Re)}function ge(){if(G._transitionData)return G._transitioning=!1,Z(G._transitionData._interruptCallbacks)}var Te=[d.previousPromises,ge,oe.prepareFn,d.rehover,d.reselect,ne],we=t.syncOrAsync(Te,G);return(!we||!we.then)&&(we=Promise.resolve()),we.then(function(){return G})}d.doCalcdata=function(G,Q){var oe=f.list(G),$=G._fullData,Z=G._fullLayout,se,ne,ce,ge,Te=new Array($.length),we=(G.calcdata||[]).slice();for(G.calcdata=Te,Z._numBoxes=0,Z._numViolins=0,Z._violinScaleGroupStats={},G._hmpixcount=0,G._hmlumcount=0,Z._piecolormap={},Z._sunburstcolormap={},Z._treemapcolormap={},Z._iciclecolormap={},Z._funnelareacolormap={},ce=0;ce<$.length;ce++)if(Array.isArray(Q)&&Q.indexOf(ce)===-1){Te[ce]=we[ce];continue}for(ce=0;ce<$.length;ce++)se=$[ce],se._arrayAttrs=p.findArrayAttributes(se),se._extremes={};var Re=Z._subplots.polar||[];for(ce=0;ce=0;ge--)if(rt[ge].enabled){se._indexToPoints=rt[ge]._indexToPoints;break}ne&&ne.calc&&(Ie=ne.calc(G,se))}(!Array.isArray(Ie)||!Ie[0])&&(Ie=[{x:n,y:n}]),Ie[0].t||(Ie[0].t={}),Ie[0].trace=se,Te[ke]=Ie}}for(X(oe,$,Z),ce=0;ce<$.length;ce++)Ve(ce,!0);for(ce=0;ce<$.length;ce++)Le(ce);for(me&&X(oe,$,Z),ce=0;ce<$.length;ce++)Ve(ce,!0);for(ce=0;ce<$.length;ce++)Ve(ce,!1);ee(G);var Ue=J(oe,G);if(Ue.length){for(Z._numBoxes=0,Z._numViolins=0,ce=0;ce0?E:1/0},A=i(d,w),_=g.mod(A+1,d.length);return[d[A],d[_]]}function m(o){return Math.abs(o)>1e-10?o:0}function h(o,d,w){d=d||0,w=w||0;for(var A=o.length,_=new Array(A),y=0;ybe?(Ae=se,me=se*be,Ue=(ne-me)/G.h/2,Le=[$[0],$[1]],Ve=[Z[0]+Ue,Z[1]-Ue]):(Ae=ne/be,me=ne,Ue=(se-Ae)/G.w/2,Le=[$[0]+Ue,$[1]-Ue],Ve=[Z[0],Z[1]]),X.xLength2=Ae,X.yLength2=me,X.xDomain2=Le,X.yDomain2=Ve;var ke=X.xOffset2=G.l+G.w*Le[0],He=X.yOffset2=G.t+G.h*(1-Ve[1]),Ie=X.radius=Ae/Te,rt=X.innerRadius=X.getHole(J)*Ie,Ke=X.cx=ke-Ie*ge[0],$e=X.cy=He+Ie*ge[3],lt=X.cxx=Ke-ke,ht=X.cyy=$e-He,dt=Q.side,xt;dt==="counterclockwise"?(xt=dt,dt="top"):dt==="clockwise"&&(xt=dt,dt="bottom"),X.radialAxis=X.mockAxis(ue,J,Q,{_id:"x",side:dt,_trueSide:xt,domain:[rt/G.w,Ie/G.w]}),X.angularAxis=X.mockAxis(ue,J,oe,{side:"right",domain:[0,Math.PI],autorange:!1}),X.doAutoRange(ue,J),X.updateAngularAxis(ue,J),X.updateRadialAxis(ue,J),X.updateRadialAxisTitle(ue,J),X.xaxis=X.mockCartesianAxis(ue,J,{_id:"x",domain:Le}),X.yaxis=X.mockCartesianAxis(ue,J,{_id:"y",domain:Ve});var St=X.pathSubplot();X.clipPaths.forTraces.select("path").attr("d",St).attr("transform",v(lt,ht)),ee.frontplot.attr("transform",v(ke,He)).call(r.setClipUrl,X._hasClipOnAxisFalse?null:X.clipIds.forTraces,X.gd),ee.bg.attr("d",St).attr("transform",v(Ke,$e)).call(p.fill,J.bgcolor)},V.mockAxis=function(ue,J,X,ee){var G=S.extendFlat({},X,ee);return f(G,J,ue),G},V.mockCartesianAxis=function(ue,J,X){var ee=this,G=ee.isSmith,Q=X._id,oe=S.extendFlat({type:"linear"},X);n(oe,ue);var $={x:[0,2],y:[1,3]};return oe.setRange=function(){var Z=ee.sectorBBox,se=$[Q],ne=ee.radialAxis._rl,ce=(ne[1]-ne[0])/(1-ee.getHole(J));oe.range=[Z[se[0]]*ce,Z[se[1]]*ce]},oe.isPtWithinRange=Q==="x"&&!G?function(Z){return ee.isPtInside(Z)}:function(){return!0},oe.setRange(),oe.setScale(),oe},V.doAutoRange=function(ue,J){var X=this,ee=X.gd,G=X.radialAxis,Q=X.getRadial(J);c(ee,G);var oe=G.range;if(Q.range=oe.slice(),Q._input.range=oe.slice(),G._rl=[G.r2l(oe[0],null,"gregorian"),G.r2l(oe[1],null,"gregorian")],G.minallowed!==void 0){var $=G.r2l(G.minallowed);G._rl[0]>G._rl[1]?G._rl[1]=Math.max(G._rl[1],$):G._rl[0]=Math.max(G._rl[0],$)}if(G.maxallowed!==void 0){var Z=G.r2l(G.maxallowed);G._rl[0]90&&ne<=270&&(ce.tickangle=180);var we=Te?function(Ie){var rt=D(X,L([Ie.x,0]));return v(rt[0]-$,rt[1]-Z)}:function(Ie){return v(ce.l2p(Ie.x)+oe,0)},Re=Te?function(Ie){return z(X,Ie.x,-1/0,1/0)}:function(Ie){return X.pathArc(ce.r2p(Ie.x)+oe)},be=Y(se);if(X.radialTickLayout!==be&&(G["radial-axis"].selectAll(".xtick").remove(),X.radialTickLayout=be),ge){ce.setScale();var Ae=0,me=Te?(ce.tickvals||[]).filter(function(Ie){return Ie>=0}).map(function(Ie){return a.tickText(ce,Ie,!0,!1)}):a.calcTicks(ce),Le=Te?me:a.clipEnds(ce,me),Ve=a.getTickSigns(ce)[2];Te&&((ce.ticks==="top"&&ce.side==="bottom"||ce.ticks==="bottom"&&ce.side==="top")&&(Ve=-Ve),ce.ticks==="top"&&ce.side==="top"&&(Ae=-ce.ticklen),ce.ticks==="bottom"&&ce.side==="bottom"&&(Ae=ce.ticklen)),a.drawTicks(ee,ce,{vals:me,layer:G["radial-axis"],path:a.makeTickPath(ce,0,Ve),transFn:we,crisp:!1}),a.drawGrid(ee,ce,{vals:Le,layer:G["radial-grid"],path:Re,transFn:S.noop,crisp:!1}),a.drawLabels(ee,ce,{vals:me,layer:G["radial-axis"],transFn:we,labelFns:a.makeLabelFns(ce,Ae)})}var Ue=X.radialAxisAngle=X.vangles?B(te(k(se.angle),X.vangles)):se.angle,ke=v($,Z),He=ke+x(-Ue);ie(G["radial-axis"],ge&&(se.showticklabels||se.ticks),{transform:He}),ie(G["radial-grid"],ge&&se.showgrid,{transform:Te?"":ke}),ie(G["radial-line"].select("line"),ge&&se.showline,{x1:Te?-Q:oe,y1:0,x2:Q,y2:0,transform:He}).attr("stroke-width",se.linewidth).call(p.stroke,se.linecolor)},V.updateRadialAxisTitle=function(ue,J,X){if(!this.isSmith){var ee=this,G=ee.gd,Q=ee.radius,oe=ee.cx,$=ee.cy,Z=ee.getRadial(J),se=ee.id+"title",ne=0;if(Z.title){var ce=r.bBox(ee.layers["radial-axis"].node()).height,ge=Z.title.font.size,Te=Z.side;ne=Te==="top"?ge:Te==="counterclockwise"?-(ce+ge*.4):ce+ge*.8}var we=X!==void 0?X:ee.radialAxisAngle,Re=k(we),be=Math.cos(Re),Ae=Math.sin(Re),me=oe+Q/2*be+ne*Ae,Le=$-Q/2*Ae+ne*be;ee.layers["radial-axis-title"]=b.draw(G,se,{propContainer:Z,propName:ee.id+".radialaxis.title",placeholder:N(G,"Click to enter radial axis title"),attributes:{x:me,y:Le,"text-anchor":"middle"},transform:{rotate:-we}})}},V.updateAngularAxis=function(ue,J){var X=this,ee=X.gd,G=X.layers,Q=X.radius,oe=X.innerRadius,$=X.cx,Z=X.cy,se=X.getAngular(J),ne=X.angularAxis,ce=X.isSmith;ce||(X.fillViewInitialKey("angularaxis.rotation",se.rotation),ne.setGeometry(),ne.setScale());var ge=ce?function(rt){var Ke=D(X,L([0,rt.x]));return Math.atan2(Ke[0]-$,Ke[1]-Z)-Math.PI/2}:function(rt){return ne.t2g(rt.x)};ne.type==="linear"&&ne.thetaunit==="radians"&&(ne.tick0=B(ne.tick0),ne.dtick=B(ne.dtick));var Te=function(rt){return v($+Q*Math.cos(rt),Z-Q*Math.sin(rt))},we=ce?function(rt){var Ke=D(X,L([0,rt.x]));return v(Ke[0],Ke[1])}:function(rt){return Te(ge(rt))},Re=ce?function(rt){var Ke=D(X,L([0,rt.x])),$e=Math.atan2(Ke[0]-$,Ke[1]-Z)-Math.PI/2;return v(Ke[0],Ke[1])+x(-B($e))}:function(rt){var Ke=ge(rt);return Te(Ke)+x(-B(Ke))},be=ce?function(rt){return M(X,rt.x,0,1/0)}:function(rt){var Ke=ge(rt),$e=Math.cos(Ke),lt=Math.sin(Ke);return"M"+[$+oe*$e,Z-oe*lt]+"L"+[$+Q*$e,Z-Q*lt]},Ae=a.makeLabelFns(ne,0),me=Ae.labelStandoff,Le={};Le.xFn=function(rt){var Ke=ge(rt);return Math.cos(Ke)*me},Le.yFn=function(rt){var Ke=ge(rt),$e=Math.sin(Ke)>0?.2:1;return-Math.sin(Ke)*(me+rt.fontSize*$e)+Math.abs(Math.cos(Ke))*(rt.fontSize*y)},Le.anchorFn=function(rt){var Ke=ge(rt),$e=Math.cos(Ke);return Math.abs($e)<.1?"middle":$e>0?"start":"end"},Le.heightFn=function(rt,Ke,$e){var lt=ge(rt);return-.5*(1+Math.sin(lt))*$e};var Ve=Y(se);X.angularTickLayout!==Ve&&(G["angular-axis"].selectAll("."+ne._id+"tick").remove(),X.angularTickLayout=Ve);var Ue=ce?[1/0].concat(ne.tickvals||[]).map(function(rt){return a.tickText(ne,rt,!0,!1)}):a.calcTicks(ne);ce&&(Ue[0].text="∞",Ue[0].fontSize*=1.75);var ke;if(J.gridshape==="linear"?(ke=Ue.map(ge),S.angleDelta(ke[0],ke[1])<0&&(ke=ke.slice().reverse())):ke=null,X.vangles=ke,ne.type==="category"&&(Ue=Ue.filter(function(rt){return S.isAngleInsideSector(ge(rt),X.sectorInRad)})),ne.visible){var He=ne.ticks==="inside"?-1:1,Ie=(ne.linewidth||1)/2;a.drawTicks(ee,ne,{vals:Ue,layer:G["angular-axis"],path:"M"+He*Ie+",0h"+He*ne.ticklen,transFn:Re,crisp:!1}),a.drawGrid(ee,ne,{vals:Ue,layer:G["angular-grid"],path:be,transFn:S.noop,crisp:!1}),a.drawLabels(ee,ne,{vals:Ue,layer:G["angular-axis"],repositionOnUpdate:!0,transFn:we,labelFns:Le})}ie(G["angular-line"].select("path"),se.showline,{d:X.pathSubplot(),transform:v($,Z)}).attr("stroke-width",se.linewidth).call(p.stroke,se.linecolor)},V.updateFx=function(ue,J){if(!this.gd._context.staticPlot){var X=!this.isSmith;X&&(this.updateAngularDrag(ue),this.updateRadialDrag(ue,J,0),this.updateRadialDrag(ue,J,1)),this.updateHoverAndMainDrag(ue)}},V.updateHoverAndMainDrag=function(ue){var J=this,X=J.isSmith,ee=J.gd,G=J.layers,Q=ue._zoomlayer,oe=E.MINZOOM,$=E.OFFEDGE,Z=J.radius,se=J.innerRadius,ne=J.cx,ce=J.cy,ge=J.cxx,Te=J.cyy,we=J.sectorInRad,Re=J.vangles,be=J.radialAxis,Ae=T.clampTiny,me=T.findXYatLength,Le=T.findEnclosingVertexAngles,Ve=E.cornerHalfWidth,Ue=E.cornerLen/2,ke,He,Ie=l.makeDragger(G,"path","maindrag",ue.dragmode===!1?"none":"crosshair");g.select(Ie).attr("d",J.pathSubplot()).attr("transform",v(ne,ce)),Ie.onmousemove=function(ct){h.hover(ee,ct,J.id),ee._fullLayout._lasthover=Ie,ee._fullLayout._hoversubplot=J.id},Ie.onmouseout=function(ct){ee._dragging||m.unhover(ee,ct)};var rt={element:Ie,gd:ee,subplot:J.id,plotinfo:{id:J.id,xaxis:J.xaxis,yaxis:J.yaxis},xaxes:[J.xaxis],yaxes:[J.yaxis]},Ke,$e,lt,ht,dt,xt,St,nt,ze;function Ze(ct,Tt){return Math.sqrt(ct*ct+Tt*Tt)}function Je(ct,Tt){return Ze(ct-ge,Tt-Te)}function We(ct,Tt){return Math.atan2(Te-Tt,ct-ge)}function Fe(ct,Tt){return[ct*Math.cos(Tt),ct*Math.sin(-Tt)]}function xe(ct,Tt){if(ct===0)return J.pathSector(2*Ve);var Bt=Ue/ct,ir=Tt-Bt,pt=Tt+Bt,Xt=Math.max(0,Math.min(ct,Z)),Kt=Xt-Ve,or=Xt+Ve;return"M"+Fe(Kt,ir)+"A"+[Kt,Kt]+" 0,0,0 "+Fe(Kt,pt)+"L"+Fe(or,pt)+"A"+[or,or]+" 0,0,1 "+Fe(or,ir)+"Z"}function ye(ct,Tt,Bt){if(ct===0)return J.pathSector(2*Ve);var ir=Fe(ct,Tt),pt=Fe(ct,Bt),Xt=Ae((ir[0]+pt[0])/2),Kt=Ae((ir[1]+pt[1])/2),or,$t;if(Xt&&Kt){var gt=Kt/Xt,st=-1/gt,At=me(Ve,gt,Xt,Kt);or=me(Ue,st,At[0][0],At[0][1]),$t=me(Ue,st,At[1][0],At[1][1])}else{var Ct,It;Kt?(Ct=Ue,It=Ve):(Ct=Ve,It=Ue),or=[[Xt-Ct,Kt-It],[Xt+Ct,Kt-It]],$t=[[Xt-Ct,Kt+It],[Xt+Ct,Kt+It]]}return"M"+or.join("L")+"L"+$t.reverse().join("L")+"Z"}function Ee(){lt=null,ht=null,dt=J.pathSubplot(),xt=!1;var ct=ee._fullLayout[J.id];St=C(ct.bgcolor).getLuminance(),nt=l.makeZoombox(Q,St,ne,ce,dt),nt.attr("fill-rule","evenodd"),ze=l.makeCorners(Q,ne,ce),d(ee)}function Me(ct,Tt){return Tt=Math.max(Math.min(Tt,Z),se),ct<$?ct=0:Z-ct<$?ct=Z:Tt<$?Tt=0:Z-Tt<$&&(Tt=Z),Math.abs(Tt-ct)>oe?(ct-1&&ct===1&&o(Tt,ee,[J.xaxis],[J.yaxis],J.id,rt),Bt.indexOf("event")>-1&&h.click(ee,Tt,J.id)}rt.prepFn=function(ct,Tt,Bt){var ir=ee._fullLayout.dragmode,pt=Ie.getBoundingClientRect();ee._fullLayout._calcInverseTransform(ee);var Xt=ee._fullLayout._invTransform;ke=ee._fullLayout._invScaleX,He=ee._fullLayout._invScaleY;var Kt=S.apply3DTransform(Xt)(Tt-pt.left,Bt-pt.top);if(Ke=Kt[0],$e=Kt[1],Re){var or=T.findPolygonOffset(Z,we[0],we[1],Re);Ke+=ge+or[0],$e+=Te+or[1]}switch(ir){case"zoom":rt.clickFn=Lt,X||(Re?rt.moveFn=mt:rt.moveFn=je,rt.doneFn=bt,Ee());break;case"select":case"lasso":u(ct,Tt,Bt,rt,ir);break}},m.init(rt)},V.updateRadialDrag=function(ue,J,X){var ee=this,G=ee.gd,Q=ee.layers,oe=ee.radius,$=ee.innerRadius,Z=ee.cx,se=ee.cy,ne=ee.radialAxis,ce=E.radialDragBoxSize,ge=ce/2;if(!ne.visible)return;var Te=k(ee.radialAxisAngle),we=ne._rl,Re=we[0],be=we[1],Ae=we[X],me=.75*(we[1]-we[0])/(1-ee.getHole(J))/oe,Le,Ve,Ue;X?(Le=Z+(oe+ge)*Math.cos(Te),Ve=se-(oe+ge)*Math.sin(Te),Ue="radialdrag"):(Le=Z+($-ge)*Math.cos(Te),Ve=se-($-ge)*Math.sin(Te),Ue="radialdrag-inner");var ke=l.makeRectDragger(Q,Ue,"crosshair",-ge,-ge,ce,ce),He={element:ke,gd:G};ue.dragmode===!1&&(He.dragmode=!1),ie(g.select(ke),ne.visible&&$0!=(X?Ke>Re:Ke=90||G>90&&Q>=450?Te=1:$<=0&&se<=0?Te=0:Te=Math.max($,se),G<=180&&Q>=180||G>180&&Q>=540?ne=-1:oe>=0&&Z>=0?ne=0:ne=Math.min(oe,Z),G<=270&&Q>=270||G>270&&Q>=630?ce=-1:$>=0&&se>=0?ce=0:ce=Math.min($,se),Q>=360?ge=1:oe<=0&&Z<=0?ge=0:ge=Math.max(oe,Z),[ne,ce,ge,Te]}function te(ue,J){var X=function(G){return S.angleDist(ue,G)},ee=S.findIndexOfMin(J,X);return J[ee]}function ie(ue,J,X){return J?(ue.attr("display",null),ue.attr(X)):ue&&ue.attr("display","none"),ue}},57696:function(H,U,e){var g=e(3400),C=e(78344),i=g.deg2rad,S=g.rad2deg;H.exports=function(a,n,f){switch(C(a,f),a._id){case"x":case"radialaxis":x(a,n);break;case"angularaxis":r(a,n);break}};function x(t,a){var n=a._subplot;t.setGeometry=function(){var f=t._rl[0],c=t._rl[1],l=n.innerRadius,m=(n.radius-l)/(c-f),h=l/m,b=f>c?function(u){return u<=0}:function(u){return u>=0};t.c2g=function(u){var o=t.c2l(u)-f;return(b(o)?o:0)+h},t.g2c=function(u){return t.l2c(u+f-h)},t.g2p=function(u){return u*m},t.c2p=function(u){return t.g2p(t.c2g(u))}}}function v(t,a){return a==="degrees"?i(t):t}function p(t,a){return a==="degrees"?S(t):t}function r(t,a){var n=t.type;if(n==="linear"){var f=t.d2c,c=t.c2d;t.d2c=function(l,m){return v(f(l),m)},t.c2d=function(l,m){return c(p(l,m))}}t.makeCalcdata=function(l,m){var h=l[m],b=l._length,u,o,d=function(E){return t.d2c(E,l.thetaunit)};if(h)for(u=new Array(b),o=0;o0?1:0}function e(x){var v=x[0],p=x[1];if(!isFinite(v)||!isFinite(p))return[1,0];var r=(v+1)*(v+1)+p*p;return[(v*v+p*p-1)/r,2*p/r]}function g(x,v){var p=v[0],r=v[1];return[p*x.radius+x.cx,-r*x.radius+x.cy]}function C(x,v){return v*x.radius}function i(x,v,p,r){var t=g(x,e([p,v])),a=t[0],n=t[1],f=g(x,e([r,v])),c=f[0],l=f[1];if(v===0)return["M"+a+","+n,"L"+c+","+l].join(" ");var m=C(x,1/Math.abs(v));return["M"+a+","+n,"A"+m+","+m+" 0 0,"+(v<0?1:0)+" "+c+","+l].join(" ")}function S(x,v,p,r){var t=C(x,1/(v+1)),a=g(x,e([v,p])),n=a[0],f=a[1],c=g(x,e([v,r])),l=c[0],m=c[1];if(U(p)!==U(r)){var h=g(x,e([v,0])),b=h[0],u=h[1];return["M"+n+","+f,"A"+t+","+t+" 0 0,"+(00){for(var v=[],p=0;p=o&&(y.min=0,E.min=0,T.min=0,l.aaxis&&delete l.aaxis.min,l.baxis&&delete l.baxis.min,l.caxis&&delete l.caxis.min)}function c(l,m,h,b){var u=a[m._name];function o(s,L){return i.coerce(l,m,u,s,L)}o("uirevision",b.uirevision),m.type="linear";var d=o("color"),w=d!==u.color.dflt?d:h.font.color,A=m._name,_=A.charAt(0).toUpperCase(),y="Component "+_,E=o("title.text",y);m._hovertitle=E===y?E:_,i.coerceFont(o,"title.font",{family:h.font.family,size:i.bigFont(h.font.size),color:w}),o("min"),r(l,m,o,"linear"),v(l,m,o,"linear"),x(l,m,o,"linear",{noAutotickangles:!0}),p(l,m,o,{outerTicks:!0});var T=o("showticklabels");T&&(i.coerceFont(o,"tickfont",{family:h.font.family,size:h.font.size,color:w}),o("tickangle"),o("tickformat")),t(l,m,o,{dfltColor:d,bgColor:h.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u}),o("hoverformat"),o("layer")}},24696:function(H,U,e){var g=e(33428),C=e(49760),i=e(24040),S=e(3400),x=S.strTranslate,v=S._,p=e(76308),r=e(43616),t=e(78344),a=e(92880).extendFlat,n=e(7316),f=e(54460),c=e(86476),l=e(93024),m=e(72760),h=m.freeMode,b=m.rectMode,u=e(81668),o=e(22676).prepSelect,d=e(22676).selectOnClick,w=e(22676).clearOutline,A=e(22676).clearSelectionsCache,_=e(33816);function y(B,O){this.id=B.id,this.graphDiv=B.graphDiv,this.init(O),this.makeFramework(O),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}H.exports=y;var E=y.prototype;E.init=function(B){this.container=B._ternarylayer,this.defs=B._defs,this.layoutId=B._uid,this.traceHash={},this.layers={}},E.plot=function(B,O){var V=this,Y=O[V.id],j=O._size;V._hasClipOnAxisFalse=!1;for(var te=0;teT*X?(ne=X,se=ne*T):(se=J,ne=se/T),ce=ie*se/J,ge=ue*ne/X,$=O.l+O.w*j-se/2,Z=O.t+O.h*(1-te)-ne/2,V.x0=$,V.y0=Z,V.w=se,V.h=ne,V.sum=ee,V.xaxis={type:"linear",range:[G+2*oe-ee,ee-G-2*Q],domain:[j-ce/2,j+ce/2],_id:"x"},t(V.xaxis,V.graphDiv._fullLayout),V.xaxis.setScale(),V.xaxis.isPtWithinRange=function(He){return He.a>=V.aaxis.range[0]&&He.a<=V.aaxis.range[1]&&He.b>=V.baxis.range[1]&&He.b<=V.baxis.range[0]&&He.c>=V.caxis.range[1]&&He.c<=V.caxis.range[0]},V.yaxis={type:"linear",range:[G,ee-Q-oe],domain:[te-ge/2,te+ge/2],_id:"y"},t(V.yaxis,V.graphDiv._fullLayout),V.yaxis.setScale(),V.yaxis.isPtWithinRange=function(){return!0};var Te=V.yaxis.domain[0],we=V.aaxis=a({},B.aaxis,{range:[G,ee-Q-oe],side:"left",tickangle:(+B.aaxis.tickangle||0)-30,domain:[Te,Te+ge*T],anchor:"free",position:0,_id:"y",_length:se});t(we,V.graphDiv._fullLayout),we.setScale();var Re=V.baxis=a({},B.baxis,{range:[ee-G-oe,Q],side:"bottom",domain:V.xaxis.domain,anchor:"free",position:0,_id:"x",_length:se});t(Re,V.graphDiv._fullLayout),Re.setScale();var be=V.caxis=a({},B.caxis,{range:[ee-G-Q,oe],side:"right",tickangle:(+B.caxis.tickangle||0)+30,domain:[Te,Te+ge*T],anchor:"free",position:0,_id:"y",_length:se});t(be,V.graphDiv._fullLayout),be.setScale();var Ae="M"+$+","+(Z+ne)+"h"+se+"l-"+se/2+",-"+ne+"Z";V.clipDef.select("path").attr("d",Ae),V.layers.plotbg.select("path").attr("d",Ae);var me="M0,"+ne+"h"+se+"l-"+se/2+",-"+ne+"Z";V.clipDefRelative.select("path").attr("d",me);var Le=x($,Z);V.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Le),V.clipDefRelative.select("path").attr("transform",null);var Ve=x($-Re._offset,Z+ne);V.layers.baxis.attr("transform",Ve),V.layers.bgrid.attr("transform",Ve);var Ue=x($+se/2,Z)+"rotate(30)"+x(0,-we._offset);V.layers.aaxis.attr("transform",Ue),V.layers.agrid.attr("transform",Ue);var ke=x($+se/2,Z)+"rotate(-30)"+x(0,-be._offset);V.layers.caxis.attr("transform",ke),V.layers.cgrid.attr("transform",ke),V.drawAxes(!0),V.layers.aline.select("path").attr("d",we.showline?"M"+$+","+(Z+ne)+"l"+se/2+",-"+ne:"M0,0").call(p.stroke,we.linecolor||"#000").style("stroke-width",(we.linewidth||0)+"px"),V.layers.bline.select("path").attr("d",Re.showline?"M"+$+","+(Z+ne)+"h"+se:"M0,0").call(p.stroke,Re.linecolor||"#000").style("stroke-width",(Re.linewidth||0)+"px"),V.layers.cline.select("path").attr("d",be.showline?"M"+($+se/2)+","+Z+"l"+se/2+","+ne:"M0,0").call(p.stroke,be.linecolor||"#000").style("stroke-width",(be.linewidth||0)+"px"),V.graphDiv._context.staticPlot||V.initInteractions(),r.setClipUrl(V.layers.frontplot,V._hasClipOnAxisFalse?null:V.clipId,V.graphDiv)},E.drawAxes=function(B){var O=this,V=O.graphDiv,Y=O.id.substr(7)+"title",j=O.layers,te=O.aaxis,ie=O.baxis,ue=O.caxis;if(O.drawAx(te),O.drawAx(ie),O.drawAx(ue),B){var J=Math.max(te.showticklabels?te.tickfont.size/2:0,(ue.showticklabels?ue.tickfont.size*.75:0)+(ue.ticks==="outside"?ue.ticklen*.87:0)),X=(ie.showticklabels?ie.tickfont.size:0)+(ie.ticks==="outside"?ie.ticklen:0)+3;j["a-title"]=u.draw(V,"a"+Y,{propContainer:te,propName:O.id+".aaxis.title",placeholder:v(V,"Click to enter Component A title"),attributes:{x:O.x0+O.w/2,y:O.y0-te.title.font.size/3-J,"text-anchor":"middle"}}),j["b-title"]=u.draw(V,"b"+Y,{propContainer:ie,propName:O.id+".baxis.title",placeholder:v(V,"Click to enter Component B title"),attributes:{x:O.x0-X,y:O.y0+O.h+ie.title.font.size*.83+X,"text-anchor":"middle"}}),j["c-title"]=u.draw(V,"c"+Y,{propContainer:ue,propName:O.id+".caxis.title",placeholder:v(V,"Click to enter Component C title"),attributes:{x:O.x0+O.w+X,y:O.y0+O.h+ue.title.font.size*.83+X,"text-anchor":"middle"}})}},E.drawAx=function(B){var O=this,V=O.graphDiv,Y=B._name,j=Y.charAt(0),te=B._id,ie=O.layers[Y],ue=30,J=j+"tickLayout",X=s(B);O[J]!==X&&(ie.selectAll("."+te+"tick").remove(),O[J]=X),B.setScale();var ee=f.calcTicks(B),G=f.clipEnds(B,ee),Q=f.makeTransTickFn(B),oe=f.getTickSigns(B)[2],$=S.deg2rad(ue),Z=oe*(B.linewidth||1)/2,se=oe*B.ticklen,ne=O.w,ce=O.h,ge=j==="b"?"M0,"+Z+"l"+Math.sin($)*se+","+Math.cos($)*se:"M"+Z+",0l"+Math.cos($)*se+","+-Math.sin($)*se,Te={a:"M0,0l"+ce+",-"+ne/2,b:"M0,0l-"+ne/2+",-"+ce,c:"M0,0l-"+ce+","+ne/2}[j];f.drawTicks(V,B,{vals:B.ticks==="inside"?G:ee,layer:ie,path:ge,transFn:Q,crisp:!1}),f.drawGrid(V,B,{vals:G,layer:O.layers[j+"grid"],path:Te,transFn:Q,crisp:!1}),f.drawLabels(V,B,{vals:ee,layer:ie,transFn:Q,labelFns:f.makeLabelFns(B,0,ue)})};function s(B){return B.ticks+String(B.ticklen)+String(B.showticklabels)}var L=_.MINZOOM/2+.87,M="m-0.87,.5h"+L+"v3h-"+(L+5.2)+"l"+(L/2+2.6)+",-"+(L*.87+4.5)+"l2.6,1.5l-"+L/2+","+L*.87+"Z",z="m0.87,.5h-"+L+"v3h"+(L+5.2)+"l-"+(L/2+2.6)+",-"+(L*.87+4.5)+"l-2.6,1.5l"+L/2+","+L*.87+"Z",D="m0,1l"+L/2+","+L*.87+"l2.6,-1.5l-"+(L/2+2.6)+",-"+(L*.87+4.5)+"l-"+(L/2+2.6)+","+(L*.87+4.5)+"l2.6,1.5l"+L/2+",-"+L*.87+"Z",N="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",I=!0;E.clearOutline=function(){A(this.dragOptions),w(this.dragOptions.gd)},E.initInteractions=function(){var B=this,O=B.layers.plotbg.select("path").node(),V=B.graphDiv,Y=V._fullLayout._zoomlayer,j,te;this.dragOptions={element:O,gd:V,plotinfo:{id:B.id,domain:V._fullLayout[B.id].domain,xaxis:B.xaxis,yaxis:B.yaxis},subplot:B.id,prepFn:function(Ve,Ue,ke){B.dragOptions.xaxes=[B.xaxis],B.dragOptions.yaxes=[B.yaxis],j=V._fullLayout._invScaleX,te=V._fullLayout._invScaleY;var He=B.dragOptions.dragmode=V._fullLayout.dragmode;h(He)?B.dragOptions.minDrag=1:B.dragOptions.minDrag=void 0,He==="zoom"?(B.dragOptions.moveFn=Re,B.dragOptions.clickFn=ne,B.dragOptions.doneFn=be,ce(Ve,Ue,ke)):He==="pan"?(B.dragOptions.moveFn=me,B.dragOptions.clickFn=ne,B.dragOptions.doneFn=Le,Ae(),B.clearOutline(V)):(b(He)||h(He))&&o(Ve,Ue,ke,B.dragOptions,He)}};var ie,ue,J,X,ee,G,Q,oe,$,Z;function se(Ve){var Ue={};return Ue[B.id+".aaxis.min"]=Ve.a,Ue[B.id+".baxis.min"]=Ve.b,Ue[B.id+".caxis.min"]=Ve.c,Ue}function ne(Ve,Ue){var ke=V._fullLayout.clickmode;k(V),Ve===2&&(V.emit("plotly_doubleclick",null),i.call("_guiRelayout",V,se({a:0,b:0,c:0}))),ke.indexOf("select")>-1&&Ve===1&&d(Ue,V,[B.xaxis],[B.yaxis],B.id,B.dragOptions),ke.indexOf("event")>-1&&l.click(V,Ue,B.id)}function ce(Ve,Ue,ke){var He=O.getBoundingClientRect();ie=Ue-He.left,ue=ke-He.top,V._fullLayout._calcInverseTransform(V);var Ie=V._fullLayout._invTransform,rt=S.apply3DTransform(Ie)(ie,ue);ie=rt[0],ue=rt[1],J={a:B.aaxis.range[0],b:B.baxis.range[1],c:B.caxis.range[1]},ee=J,X=B.aaxis.range[1]-J.a,G=C(B.graphDiv._fullLayout[B.id].bgcolor).getLuminance(),Q="M0,"+B.h+"L"+B.w/2+", 0L"+B.w+","+B.h+"Z",oe=!1,$=Y.append("path").attr("class","zoombox").attr("transform",x(B.x0,B.y0)).style({fill:G>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",Q),Z=Y.append("path").attr("class","zoombox-corners").attr("transform",x(B.x0,B.y0)).style({fill:p.background,stroke:p.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),B.clearOutline(V)}function ge(Ve,Ue){return 1-Ue/B.h}function Te(Ve,Ue){return 1-(Ve+(B.h-Ue)/Math.sqrt(3))/B.w}function we(Ve,Ue){return(Ve-(B.h-Ue)/Math.sqrt(3))/B.w}function Re(Ve,Ue){var ke=ie+Ve*j,He=ue+Ue*te,Ie=Math.max(0,Math.min(1,ge(ie,ue),ge(ke,He))),rt=Math.max(0,Math.min(1,Te(ie,ue),Te(ke,He))),Ke=Math.max(0,Math.min(1,we(ie,ue),we(ke,He))),$e=(Ie/2+Ke)*B.w,lt=(1-Ie/2-rt)*B.w,ht=($e+lt)/2,dt=lt-$e,xt=(1-Ie)*B.h,St=xt-dt/T;dt<_.MINZOOM?(ee=J,$.attr("d",Q),Z.attr("d","M0,0Z")):(ee={a:J.a+Ie*X,b:J.b+rt*X,c:J.c+Ke*X},$.attr("d",Q+"M"+$e+","+xt+"H"+lt+"L"+ht+","+St+"L"+$e+","+xt+"Z"),Z.attr("d","M"+ie+","+ue+N+"M"+$e+","+xt+M+"M"+lt+","+xt+z+"M"+ht+","+St+D)),oe||($.transition().style("fill",G>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Z.transition().style("opacity",1).duration(200),oe=!0),V.emit("plotly_relayouting",se(ee))}function be(){k(V),ee!==J&&(i.call("_guiRelayout",V,se(ee)),I&&V.data&&V._context.showTips&&(S.notifier(v(V,"Double-click to zoom back out"),"long"),I=!1))}function Ae(){J={a:B.aaxis.range[0],b:B.baxis.range[1],c:B.caxis.range[1]},ee=J}function me(Ve,Ue){var ke=Ve/B.xaxis._m,He=Ue/B.yaxis._m;ee={a:J.a-He,b:J.b+(ke+He)/2,c:J.c-(ke-He)/2};var Ie=[ee.a,ee.b,ee.c].sort(S.sorterAsc),rt={a:Ie.indexOf(ee.a),b:Ie.indexOf(ee.b),c:Ie.indexOf(ee.c)};Ie[0]<0&&(Ie[1]+Ie[0]/2<0?(Ie[2]+=Ie[0]+Ie[1],Ie[0]=Ie[1]=0):(Ie[2]+=Ie[0]/2,Ie[1]+=Ie[0]/2,Ie[0]=0),ee={a:Ie[rt.a],b:Ie[rt.b],c:Ie[rt.c]},Ue=(J.a-ee.a)*B.yaxis._m,Ve=(J.c-ee.c-J.b+ee.b)*B.xaxis._m);var Ke=x(B.x0+Ve,B.y0+Ue);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ke);var $e=x(-Ve,-Ue);B.clipDefRelative.select("path").attr("transform",$e),B.aaxis.range=[ee.a,B.sum-ee.b-ee.c],B.baxis.range=[B.sum-ee.a-ee.c,ee.b],B.caxis.range=[B.sum-ee.a-ee.b,ee.c],B.drawAxes(!1),B._hasClipOnAxisFalse&&B.plotContainer.select(".scatterlayer").selectAll(".trace").call(r.hideOutsideRangePoints,B),V.emit("plotly_relayouting",se(ee))}function Le(){i.call("_guiRelayout",V,se(ee))}O.onmousemove=function(Ve){l.hover(V,Ve,B.id),V._fullLayout._lasthover=O,V._fullLayout._hoversubplot=B.id},O.onmouseout=function(Ve){V._dragging||c.unhover(V,Ve)},c.init(this.dragOptions)};function k(B){g.select(B).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}},24040:function(H,U,e){var g=e(24248),C=e(16628),i=e(52416),S=e(63620),x=e(52200).addStyleRule,v=e(92880),p=e(45464),r=e(64859),t=v.extendFlat,a=v.extendDeepAll;U.modules={},U.allCategories={},U.allTypes=[],U.subplotsRegistry={},U.transformsRegistry={},U.componentsRegistry={},U.layoutArrayContainers=[],U.layoutArrayRegexes=[],U.traceLayoutAttributes={},U.localeRegistry={},U.apiMethodRegistry={},U.collectableSubplotTypes=null,U.register=function(A){if(U.collectableSubplotTypes=null,A)A&&!Array.isArray(A)&&(A=[A]);else throw new Error("No argument passed to Plotly.register.");for(var _=0;_-1}H.exports=function(r,t){var a,n=r.data,f=r.layout,c=S([],n),l=S({},f,x(t.tileClass)),m=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var h=Object.keys(l);for(a=0;a")!==-1?"":f.html(l).text()});return f.remove(),c}function a(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}H.exports=function(f,c,l){var m=f._fullLayout,h=m._paper,b=m._toppaper,u=m.width,o=m.height,d;h.insert("rect",":first-child").call(i.setRect,0,0,u,o).call(S.fill,m.paper_bgcolor);var w=m._basePlotModules||[];for(d=0;dV+B||!g(O))}for(var j=0;j=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&g(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function l(m,h,b,u,o,d){d=d||{};var w=d.moduleHasSelected!==!1,A=d.moduleHasUnselected!==!1,_=d.moduleHasConstrain!==!1,y=d.moduleHasCliponaxis!==!1,E=d.moduleHasTextangle!==!1,T=d.moduleHasInsideanchor!==!1,s=!!d.hasPathbar,L=Array.isArray(o)||o==="auto",M=L||o==="inside",z=L||o==="outside";if(M||z){var D=a(u,"textfont",b.font),N=C.extendFlat({},D),I=m.textfont&&m.textfont.color,k=!I;if(k&&delete N.color,a(u,"insidetextfont",N),s){var B=C.extendFlat({},D);k&&delete B.color,a(u,"pathbar.textfont",B)}z&&a(u,"outsidetextfont",D),w&&u("selected.textfont.color"),A&&u("unselected.textfont.color"),_&&u("constraintext"),y&&u("cliponaxis"),E&&u("textangle"),u("texttemplate")}M&&T&&u("insidetextanchor")}H.exports={supplyDefaults:n,crossTraceDefaults:f,handleText:l,validateCornerradius:c}},52160:function(H){H.exports=function(e,g,C){return e.x="xVal"in g?g.xVal:g.x,e.y="yVal"in g?g.yVal:g.y,g.xa&&(e.xaxis=g.xa),g.ya&&(e.yaxis=g.ya),C.orientation==="h"?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},60444:function(H,U,e){var g=e(38248),C=e(49760),i=e(3400).isArrayOrTypedArray;U.coerceString=function(S,x,v){if(typeof x=="string"){if(x||!S.noBlank)return x}else if((typeof x=="number"||x===!0)&&!S.strict)return String(x);return v!==void 0?v:S.dflt},U.coerceNumber=function(S,x,v){if(g(x)){x=+x;var p=S.min,r=S.max,t=p!==void 0&&xr;if(!t)return x}return v!==void 0?v:S.dflt},U.coerceColor=function(S,x,v){return C(x).isValid()?x:v!==void 0?v:S.dflt},U.coerceEnumerated=function(S,x,v){return S.coerceNumber&&(x=+x),S.values.indexOf(x)!==-1?x:v!==void 0?v:S.dflt},U.getValue=function(S,x){var v;return i(S)?x0?ge+=Te:y<0&&(ge-=Te)}return ge}function ue(ce){var ge=y,Te=ce.b,we=ie(ce);return g.inbox(Te-ge,we-ge,w+(we-ge)/(we-Te)-1)}function J(ce){var ge=y,Te=ce.b,we=ie(ce);return g.inbox(Te-ge,we-ge,A+(we-ge)/(we-Te)-1)}var X=n[E+"a"],ee=n[T+"a"];M=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function G(ce){return(s(ce)+L(ce))/2}var Q=g.getDistanceFunction(l,s,L,G);if(g.getClosest(h,Q,n),n.index!==!1&&h[n.index].p!==p){D||(O=function(ce){return Math.min(N(ce),ce.p-u.bargroupwidth/2)},V=function(ce){return Math.max(I(ce),ce.p+u.bargroupwidth/2)});var oe=n.index,$=h[oe],Z=b.base?$.b+$.s:$.s;n[T+"0"]=n[T+"1"]=ee.c2p($[T],!0),n[T+"LabelVal"]=Z;var se=u.extents[u.extents.round($.p)];n[E+"0"]=X.c2p(o?O($):se[0],!0),n[E+"1"]=X.c2p(o?V($):se[1],!0);var ne=$.orig_p!==void 0;return n[E+"LabelVal"]=ne?$.orig_p:$.p,n.labelLabel=v(X,n[E+"LabelVal"],b[E+"hoverformat"]),n.valueLabel=v(ee,n[T+"LabelVal"],b[T+"hoverformat"]),n.baseLabel=v(ee,$.b,b[T+"hoverformat"]),n.spikeDistance=(J($)+te($))/2,n[E+"Spike"]=X.c2p($.p,!0),S($,b,n),n.hovertemplate=b.hovertemplate,n}}function a(n,f){var c=f.mcc||n.marker.color,l=f.mlcc||n.marker.line.color,m=x(n,f);if(i.opacity(c))return c;if(i.opacity(l)&&m)return l}H.exports={hoverPoints:r,hoverOnBars:t,getTraceColor:a}},51132:function(H,U,e){H.exports={attributes:e(20832),layoutAttributes:e(39324),supplyDefaults:e(31508).supplyDefaults,crossTraceDefaults:e(31508).crossTraceDefaults,supplyLayoutDefaults:e(37156),calc:e(71820),crossTraceCalc:e(96376).crossTraceCalc,colorbar:e(5528),arraysToCalcdata:e(84664),plot:e(98184).plot,style:e(60100).style,styleOnSelect:e(60100).styleOnSelect,hoverPoints:e(63400).hoverPoints,eventData:e(52160),selectPoints:e(45784),moduleType:"trace",name:"bar",basePlotModule:e(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(H){H.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(H,U,e){var g=e(24040),C=e(54460),i=e(3400),S=e(39324),x=e(31508).validateCornerradius;H.exports=function(v,p,r){function t(d,w){return i.coerce(v,p,S,d,w)}for(var a=!1,n=!1,f=!1,c={},l=t("barmode"),m=0;m0)-(j<0)}function _(j,te){return j0}function s(j,te,ie,ue,J,X){var ee=te.xaxis,G=te.yaxis,Q=j._fullLayout,oe=j._context.staticPlot;J||(J={mode:Q.barmode,norm:Q.barmode,gap:Q.bargap,groupgap:Q.bargroupgap},n("bar",Q));var $=i.makeTraceGroups(ue,ie,"trace bars").each(function(Z){var se=g.select(this),ne=Z[0].trace,ce=Z[0].t,ge=ne.type==="waterfall",Te=ne.type==="funnel",we=ne.type==="histogram",Re=ne.type==="bar",be=Re||Te,Ae=0;ge&&ne.connector.visible&&ne.connector.mode==="between"&&(Ae=ne.connector.line.width/2);var me=ne.orientation==="h",Le=T(J),Ve=i.ensureSingle(se,"g","points"),Ue=w(ne),ke=Ve.selectAll("g.point").data(i.identity,Ue);ke.enter().append("g").classed("point",!0),ke.exit().remove(),ke.each(function(Ie,rt){var Ke=g.select(this),$e=y(Ie,ee,G,me),lt=$e[0][0],ht=$e[0][1],dt=$e[1][0],xt=$e[1][1],St=(me?ht-lt:xt-dt)===0;St&&be&&c.getLineWidth(ne,Ie)&&(St=!1),St||(St=!C(lt)||!C(ht)||!C(dt)||!C(xt)),Ie.isBlank=St,St&&(me?ht=lt:xt=dt),Ae&&!St&&(me?(lt-=_(lt,ht)*Ae,ht+=_(lt,ht)*Ae):(dt-=_(dt,xt)*Ae,xt+=_(dt,xt)*Ae));var nt,ze;if(ne.type==="waterfall"){if(!St){var Ze=ne[Ie.dir].marker;nt=Ze.line.width,ze=Ze.color}}else nt=c.getLineWidth(ne,Ie),ze=Ie.mc||ne.marker.color;function Je(st){var At=g.round(nt/2%1,2);return J.gap===0&&J.groupgap===0?g.round(Math.round(st)-At,2):st}function We(st,At,Ct){return Ct&&st===At?st:Math.abs(st-At)>=2?Je(st):st>At?Math.ceil(st):Math.floor(st)}var Fe=x.opacity(ze),xe=Fe<1||nt>.01?Je:We;j._context.staticPlot||(lt=xe(lt,ht,me),ht=xe(ht,lt,me),dt=xe(dt,xt,!me),xt=xe(xt,dt,!me));var ye=me?ee.c2p:G.c2p,Ee;Ie.s0>0?Ee=Ie._sMax:Ie.s0<0?Ee=Ie._sMin:Ee=Ie.s1>0?Ie._sMax:Ie._sMin;function Me(st,At){if(!st)return 0;var Ct=Math.abs(me?xt-dt:ht-lt),It=Math.abs(me?ht-lt:xt-dt),Pt=xe(Math.abs(ye(Ee,!0)-ye(0,!0))),kt=Ie.hasB?Math.min(Ct/2,It/2):Math.min(Ct/2,Pt),Ht;if(At==="%"){var Jt=Math.min(50,st);Ht=Ct*(Jt/100)}else Ht=st;return xe(Math.max(Math.min(Ht,kt),0))}var Ne=Re||we?Me(ce.cornerradiusvalue,ce.cornerradiusform):0,je,it,mt="M"+lt+","+dt+"V"+xt+"H"+ht+"V"+dt+"Z",bt=0;if(Ne&&Ie.s){var vt=A(Ie.s0)===0||A(Ie.s)===A(Ie.s0)?Ie.s1:Ie.s0;if(bt=xe(Ie.hasB?0:Math.abs(ye(Ee,!0)-ye(vt,!0))),bt0?Math.sqrt(bt*(2*Ne-bt)):0,pt=Lt>0?Math.max:Math.min;je="M"+lt+","+dt+"V"+(xt-Bt*ct)+"H"+pt(ht-(Ne-bt)*Lt,lt)+"A "+Ne+","+Ne+" 0 0 "+Tt+" "+ht+","+(xt-Ne*ct-ir)+"V"+(dt+Ne*ct+ir)+"A "+Ne+","+Ne+" 0 0 "+Tt+" "+pt(ht-(Ne-bt)*Lt,lt)+","+(dt+Bt*ct)+"Z"}else if(Ie.hasB)je="M"+(lt+Ne*Lt)+","+dt+"A "+Ne+","+Ne+" 0 0 "+Tt+" "+lt+","+(dt+Ne*ct)+"V"+(xt-Ne*ct)+"A "+Ne+","+Ne+" 0 0 "+Tt+" "+(lt+Ne*Lt)+","+xt+"H"+(ht-Ne*Lt)+"A "+Ne+","+Ne+" 0 0 "+Tt+" "+ht+","+(xt-Ne*ct)+"V"+(dt+Ne*ct)+"A "+Ne+","+Ne+" 0 0 "+Tt+" "+(ht-Ne*Lt)+","+dt+"Z";else{it=Math.abs(xt-dt)+bt;var Xt=it0?Math.sqrt(bt*(2*Ne-bt)):0,or=ct>0?Math.max:Math.min;je="M"+(lt+Xt*Lt)+","+dt+"V"+or(xt-(Ne-bt)*ct,dt)+"A "+Ne+","+Ne+" 0 0 "+Tt+" "+(lt+Ne*Lt-Kt)+","+xt+"H"+(ht-Ne*Lt+Kt)+"A "+Ne+","+Ne+" 0 0 "+Tt+" "+(ht-Xt*Lt)+","+or(xt-(Ne-bt)*ct,dt)+"V"+dt+"Z"}}else je=mt}else je=mt;var $t=E(i.ensureSingle(Ke,"path"),Q,J,X);if($t.style("vector-effect",oe?"none":"non-scaling-stroke").attr("d",isNaN((ht-lt)*(xt-dt))||St&&j._context.staticPlot?"M0,0Z":je).call(v.setClipUrl,te.layerClipId,j),!Q.uniformtext.mode&&Le){var gt=v.makePointStyleFns(ne);v.singlePointStyle(Ie,$t,ne,gt,j)}L(j,te,Ke,Z,rt,lt,ht,dt,xt,Ne,bt,J,X),te.layerClipId&&v.hideOutsideRangePoint(Ie,Ke.select("text"),ee,G,ne.xcalendar,ne.ycalendar)});var He=ne.cliponaxis===!1;v.setClipUrl(se,He?null:te.layerClipId,j)});p.getComponentMethod("errorbars","plot")(j,$,te,J)}function L(j,te,ie,ue,J,X,ee,G,Q,oe,$,Z,se){var ne=te.xaxis,ce=te.yaxis,ge=j._fullLayout,Te;function we(it,mt,bt){var vt=i.ensureSingle(it,"text").text(mt).attr({class:"bartext bartext-"+Te,"text-anchor":"middle","data-notex":1}).call(v.font,bt).call(S.convertToTspans,j);return vt}var Re=ue[0].trace,be=Re.orientation==="h",Ae=B(ge,ue,J,ne,ce);Te=O(Re,J);var me=Z.mode==="stack"||Z.mode==="relative",Le=ue[J],Ve=!me||Le._outmost,Ue=Le.hasB,ke=oe&&oe-$>o;if(!Ae||Te==="none"||(Le.isBlank||X===ee||G===Q)&&(Te==="auto"||Te==="inside")){ie.select("text").remove();return}var He=ge.font,Ie=f.getBarColor(ue[J],Re),rt=f.getInsideTextFont(Re,J,He,Ie),Ke=f.getOutsideTextFont(Re,J,He),$e=Re.insidetextanchor||"end",lt=ie.datum();be?ne.type==="log"&<.s0<=0&&(ne.range[0]0&&Je>0,xe;ke?Ue?xe=M(xt-2*oe,St,Ze,Je,be)||M(xt,St-2*oe,Ze,Je,be):be?xe=M(xt-(oe-$),St,Ze,Je,be)||M(xt,St-2*(oe-$),Ze,Je,be):xe=M(xt,St-(oe-$),Ze,Je,be)||M(xt-2*(oe-$),St,Ze,Je,be):xe=M(xt,St,Ze,Je,be),Fe&&xe?Te="inside":(Te="outside",nt.remove(),nt=null)}else Te="inside";if(!nt){We=i.ensureUniformFontSize(j,Te==="outside"?Ke:rt),nt=we(ie,Ae,We);var ye=nt.attr("transform");if(nt.attr("transform",""),ze=v.bBox(nt.node()),Ze=ze.width,Je=ze.height,nt.attr("transform",ye),Ze<=0||Je<=0){nt.remove();return}}var Ee=Re.textangle,Me,Ne;Te==="outside"?(Ne=Re.constraintext==="both"||Re.constraintext==="outside",Me=k(X,ee,G,Q,ze,{isHorizontal:be,constrained:Ne,angle:Ee})):(Ne=Re.constraintext==="both"||Re.constraintext==="inside",Me=N(X,ee,G,Q,ze,{isHorizontal:be,constrained:Ne,angle:Ee,anchor:$e,hasB:Ue,r:oe,overhead:$})),Me.fontSize=We.size,a(Re.type==="histogram"?"bar":Re.type,Me,ge),Le.transform=Me;var je=E(nt,ge,Z,se);i.setTransormAndDisplay(je,Me)}function M(j,te,ie,ue,J){if(j<0||te<0)return!1;var X=ie<=j&&ue<=te,ee=ie<=te&&ue<=j,G=J?j>=ie*(te/ue):te>=ue*(j/ie);return X||ee||G}function z(j){return j==="auto"?0:j}function D(j,te){var ie=Math.PI/180*te,ue=Math.abs(Math.sin(ie)),J=Math.abs(Math.cos(ie));return{x:j.width*J+j.height*ue,y:j.width*ue+j.height*J}}function N(j,te,ie,ue,J,X){var ee=!!X.isHorizontal,G=!!X.constrained,Q=X.angle||0,oe=X.anchor,$=oe==="end",Z=oe==="start",se=X.leftToRight||0,ne=(se+1)/2,ce=1-ne,ge=X.hasB,Te=X.r,we=X.overhead,Re=J.width,be=J.height,Ae=Math.abs(te-j),me=Math.abs(ue-ie),Le=Ae>2*o&&me>2*o?o:0;Ae-=2*Le,me-=2*Le;var Ve=z(Q);Q==="auto"&&!(Re<=Ae&&be<=me)&&(Re>Ae||be>me)&&(!(Re>me||be>Ae)||Reo){var Ie=I(j,te,ie,ue,Ue,Te,we,ee,ge);ke=Ie.scale,He=Ie.pad}else ke=1,G&&(ke=Math.min(1,Ae/Ue.x,me/Ue.y)),He=0;var rt=J.left*ce+J.right*ne,Ke=(J.top+J.bottom)/2,$e=(j+o)*ce+(te-o)*ne,lt=(ie+ue)/2,ht=0,dt=0;if(Z||$){var xt=(ee?Ue.x:Ue.y)/2;Te&&($||ge)&&(Le+=He);var St=ee?_(j,te):_(ie,ue);ee?Z?($e=j+St*Le,ht=-St*xt):($e=te-St*Le,ht=St*xt):Z?(lt=ie+St*Le,dt=-St*xt):(lt=ue-St*Le,dt=St*xt)}return{textX:rt,textY:Ke,targetX:$e,targetY:lt,anchorX:ht,anchorY:dt,scale:ke,rotate:Ve}}function I(j,te,ie,ue,J,X,ee,G,Q){var oe=Math.max(0,Math.abs(te-j)-2*o),$=Math.max(0,Math.abs(ue-ie)-2*o),Z=X-o,se=ee?Z-Math.sqrt(Z*Z-(Z-ee)*(Z-ee)):Z,ne=Q?Z*2:G?Z-ee:2*se,ce=Q?Z*2:G?2*se:Z-ee,ge,Te,we,Re,be;return J.y/J.x>=$/(oe-ne)?Re=$/J.y:J.y/J.x<=($-ce)/oe?Re=oe/J.x:!Q&&G?(ge=J.x*J.x+J.y*J.y/4,Te=-2*J.x*(oe-Z)-J.y*($/2-Z),we=(oe-Z)*(oe-Z)+($/2-Z)*($/2-Z)-Z*Z,Re=(-Te+Math.sqrt(Te*Te-4*ge*we))/(2*ge)):Q?(ge=(J.x*J.x+J.y*J.y)/4,Te=-J.x*(oe/2-Z)-J.y*($/2-Z),we=(oe/2-Z)*(oe/2-Z)+($/2-Z)*($/2-Z)-Z*Z,Re=(-Te+Math.sqrt(Te*Te-4*ge*we))/(2*ge)):(ge=J.x*J.x/4+J.y*J.y,Te=-J.x*(oe/2-Z)-2*J.y*($-Z),we=(oe/2-Z)*(oe/2-Z)+($-Z)*($-Z)-Z*Z,Re=(-Te+Math.sqrt(Te*Te-4*ge*we))/(2*ge)),Re=Math.min(1,Re),G?be=Math.max(0,Z-Math.sqrt(Math.max(0,Z*Z-(Z-($-J.y*Re)/2)*(Z-($-J.y*Re)/2)))-ee):be=Math.max(0,Z-Math.sqrt(Math.max(0,Z*Z-(Z-(oe-J.x*Re)/2)*(Z-(oe-J.x*Re)/2)))-ee),{scale:Re,pad:be}}function k(j,te,ie,ue,J,X){var ee=!!X.isHorizontal,G=!!X.constrained,Q=X.angle||0,oe=J.width,$=J.height,Z=Math.abs(te-j),se=Math.abs(ue-ie),ne;ee?ne=se>2*o?o:0:ne=Z>2*o?o:0;var ce=1;G&&(ce=ee?Math.min(1,se/$):Math.min(1,Z/oe));var ge=z(Q),Te=D(J,ge),we=(ee?Te.x:Te.y)/2,Re=(J.left+J.right)/2,be=(J.top+J.bottom)/2,Ae=(j+te)/2,me=(ie+ue)/2,Le=0,Ve=0,Ue=ee?_(te,j):_(ie,ue);return ee?(Ae=te-Ue*ne,Le=Ue*we):(me=ue+Ue*ne,Ve=-Ue*we),{textX:Re,textY:be,targetX:Ae,targetY:me,anchorX:Le,anchorY:Ve,scale:ce,rotate:ge}}function B(j,te,ie,ue,J){var X=te[0].trace,ee=X.texttemplate,G;return ee?G=V(j,te,ie,ue,J):X.textinfo?G=Y(te,ie,ue,J):G=c.getValue(X.text,ie),c.coerceString(h,G)}function O(j,te){var ie=c.getValue(j.textposition,te);return c.coerceEnumerated(b,ie)}function V(j,te,ie,ue,J){var X=te[0].trace,ee=i.castOption(X,ie,"texttemplate");if(!ee)return"";var G=X.type==="histogram",Q=X.type==="waterfall",oe=X.type==="funnel",$=X.orientation==="h",Z,se,ne,ce;$?(Z="y",se=J,ne="x",ce=ue):(Z="x",se=ue,ne="y",ce=J);function ge(Le){return r(se,se.c2l(Le),!0).text}function Te(Le){return r(ce,ce.c2l(Le),!0).text}var we=te[ie],Re={};Re.label=we.p,Re.labelLabel=Re[Z+"Label"]=ge(we.p);var be=i.castOption(X,we.i,"text");(be===0||be)&&(Re.text=be),Re.value=we.s,Re.valueLabel=Re[ne+"Label"]=Te(we.s);var Ae={};u(Ae,X,we.i),(G||Ae.x===void 0)&&(Ae.x=$?Re.value:Re.label),(G||Ae.y===void 0)&&(Ae.y=$?Re.label:Re.value),(G||Ae.xLabel===void 0)&&(Ae.xLabel=$?Re.valueLabel:Re.labelLabel),(G||Ae.yLabel===void 0)&&(Ae.yLabel=$?Re.labelLabel:Re.valueLabel),Q&&(Re.delta=+we.rawS||we.s,Re.deltaLabel=Te(Re.delta),Re.final=we.v,Re.finalLabel=Te(Re.final),Re.initial=Re.final-Re.delta,Re.initialLabel=Te(Re.initial)),oe&&(Re.value=we.s,Re.valueLabel=Te(Re.value),Re.percentInitial=we.begR,Re.percentInitialLabel=i.formatPercent(we.begR),Re.percentPrevious=we.difR,Re.percentPreviousLabel=i.formatPercent(we.difR),Re.percentTotal=we.sumR,Re.percenTotalLabel=i.formatPercent(we.sumR));var me=i.castOption(X,we.i,"customdata");return me&&(Re.customdata=me),i.texttemplateString(ee,Re,j._d3locale,Ae,Re,X._meta||{})}function Y(j,te,ie,ue){var J=j[0].trace,X=J.orientation==="h",ee=J.type==="waterfall",G=J.type==="funnel";function Q(me){var Le=X?ue:ie;return r(Le,me,!0).text}function oe(me){var Le=X?ie:ue;return r(Le,+me,!0).text}var $=J.textinfo,Z=j[te],se=$.split("+"),ne=[],ce,ge=function(me){return se.indexOf(me)!==-1};if(ge("label")&&ne.push(Q(j[te].p)),ge("text")&&(ce=i.castOption(J,Z.i,"text"),(ce===0||ce)&&ne.push(ce)),ee){var Te=+Z.rawS||Z.s,we=Z.v,Re=we-Te;ge("initial")&&ne.push(oe(Re)),ge("delta")&&ne.push(oe(Te)),ge("final")&&ne.push(oe(we))}if(G){ge("value")&&ne.push(oe(Z.s));var be=0;ge("percent initial")&&be++,ge("percent previous")&&be++,ge("percent total")&&be++;var Ae=be>1;ge("percent initial")&&(ce=i.formatPercent(Z.begR),Ae&&(ce+=" of initial"),ne.push(ce)),ge("percent previous")&&(ce=i.formatPercent(Z.difR),Ae&&(ce+=" of previous"),ne.push(ce)),ge("percent total")&&(ce=i.formatPercent(Z.sumR),Ae&&(ce+=" of total"),ne.push(ce))}return ne.join("
    ")}H.exports={plot:s,toMoveInsideBar:N}},45784:function(H){H.exports=function(g,C){var i=g.cd,S=g.xaxis,x=g.yaxis,v=i[0].trace,p=v.type==="funnel",r=v.orientation==="h",t=[],a;if(C===!1)for(a=0;a1||s.bargap===0&&s.bargroupgap===0&&!L[0].trace.marker.line.width)&&g.select(this).attr("shape-rendering","crispEdges")}),E.selectAll("g.points").each(function(L){var M=g.select(this),z=L[0].trace;c(M,z,y)}),x.getComponentMethod("errorbars","style")(E)}function c(y,E,T){i.pointStyle(y.selectAll("path"),E,T),l(y,E,T)}function l(y,E,T){y.selectAll("text").each(function(s){var L=g.select(this),M=S.ensureUniformFontSize(T,u(L,s,E,T));i.font(L,M)})}function m(y,E,T){var s=E[0].trace;s.selectedpoints?h(T,s,y):(c(T,s,y),x.getComponentMethod("errorbars","style")(T))}function h(y,E,T){i.selectedPointStyle(y.selectAll("path"),E),b(y.selectAll("text"),E,T)}function b(y,E,T){y.each(function(s){var L=g.select(this),M;if(s.selected){M=S.ensureUniformFontSize(T,u(L,s,E,T));var z=E.selected.textfont&&E.selected.textfont.color;z&&(M.color=z),i.font(L,M)}else i.selectedTextStyle(L,E)})}function u(y,E,T,s){var L=s._fullLayout.font,M=T.textfont;if(y.classed("bartext-inside")){var z=_(E,T);M=d(T,E.i,L,z)}else y.classed("bartext-outside")&&(M=w(T,E.i,L));return M}function o(y,E,T){return A(r,y.textfont,E,T)}function d(y,E,T,s){var L=o(y,E,T),M=y._input.textfont===void 0||y._input.textfont.color===void 0||Array.isArray(y.textfont.color)&&y.textfont.color[E]===void 0;return M&&(L={color:C.contrast(s),family:L.family,size:L.size}),A(t,y.insidetextfont,E,L)}function w(y,E,T){var s=o(y,E,T);return A(a,y.outsidetextfont,E,s)}function A(y,E,T,s){E=E||{};var L=n.getValue(E.family,T),M=n.getValue(E.size,T),z=n.getValue(E.color,T);return{family:n.coerceString(y.family,L,s.family),size:n.coerceNumber(y.size,M,s.size),color:n.coerceColor(y.color,z,s.color)}}function _(y,E){return E.type==="waterfall"?E[y.dir].marker.color:y.mcc||y.mc||E.marker.color}H.exports={style:f,styleTextPoints:l,styleOnSelect:m,getInsideTextFont:d,getOutsideTextFont:w,getBarColor:_,resizeText:v}},55592:function(H,U,e){var g=e(76308),C=e(94288).hasColorscale,i=e(27260),S=e(3400).coercePattern;H.exports=function(v,p,r,t,a){var n=r("marker.color",t),f=C(v,"marker");f&&i(v,p,a,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",g.defaultLine),C(v,"marker.line")&&i(v,p,a,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),S(r,"marker.pattern",n,f),r("selected.marker.color"),r("unselected.marker.color")}},82744:function(H,U,e){var g=e(33428),C=e(3400);function i(p,r,t){var a=p._fullLayout,n=a["_"+t+"Text_minsize"];if(n){var f=a.uniformtext.mode==="hide",c;switch(t){case"funnelarea":case"pie":case"sunburst":c="g.slice";break;case"treemap":case"icicle":c="g.slice, g.pathbar";break;default:c="g.points > g.point"}r.selectAll(c).each(function(l){var m=l.transform;if(m){m.scale=f&&m.hide?0:n/m.fontSize;var h=g.select(this).select("text");C.setTransormAndDisplay(h,m)}})}}function S(p,r,t){if(t.uniformtext.mode){var a=v(p),n=t.uniformtext.minsize,f=r.scale*r.fontSize;r.hide=fl.range[1]&&(w+=Math.PI);var A=function(T){return b(d,w,[T.rp0,T.rp1],[T.thetag0,T.thetag1],h)?u+Math.min(1,Math.abs(T.thetag1-T.thetag0)/o)-1+(T.rp1-d)/(T.rp1-T.rp0)-1:1/0};if(g.getClosest(n,A,r),r.index!==!1){var _=r.index,y=n[_];r.x0=r.x1=y.ct[0],r.y0=r.y1=y.ct[1];var E=C.extendFlat({},y,{r:y.s,theta:y.p});return S(y,f,r),x(E,f,c,r),r.hovertemplate=f.hovertemplate,r.color=i(f,y),r.xLabelVal=r.yLabelVal=void 0,y.s<0&&(r.idealAlign="left"),[r]}}},94456:function(H,U,e){H.exports={moduleType:"trace",name:"barpolar",basePlotModule:e(40872),categories:["polar","bar","showLegend"],attributes:e(78100),layoutAttributes:e(9320),supplyDefaults:e(70384),supplyLayoutDefaults:e(89580),calc:e(47056).calc,crossTraceCalc:e(47056).crossTraceCalc,plot:e(42040),colorbar:e(5528),formatLabels:e(22852),style:e(60100).style,styleOnSelect:e(60100).styleOnSelect,hoverPoints:e(68896),selectPoints:e(45784),meta:{}}},9320:function(H){H.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(H,U,e){var g=e(3400),C=e(9320);H.exports=function(i,S,x){var v={},p;function r(n,f){return g.coerce(i[p]||{},S[p],C,n,f)}for(var t=0;t0?(l=f,m=c):(l=c,m=f);var h=x.findEnclosingVertexAngles(l,p.vangles)[0],b=x.findEnclosingVertexAngles(m,p.vangles)[1],u=[h,(l+m)/2,b];return x.pathPolygonAnnulus(a,n,l,m,u,r,t)}:function(a,n,f,c){return i.pathAnnulus(a,n,f,c,r,t)}}},63188:function(H,U,e){var g=e(98304),C=e(52904),i=e(20832),S=e(22548),x=e(29736).axisHoverFormat,v=e(21776).Ks,p=e(92880).extendFlat,r=C.marker,t=r.line;H.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:C.xperiod,yperiod:C.yperiod,xperiod0:C.xperiod0,yperiod0:C.yperiod0,xperiodalignment:C.xperiodalignment,yperiodalignment:C.yperiodalignment,xhoverformat:x("x"),yhoverformat:x("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:p({},r.symbol,{arrayOk:!1,editType:"plot"}),opacity:p({},r.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:p({},r.angle,{arrayOk:!1,editType:"calc"}),size:p({},r.size,{arrayOk:!1,editType:"calc"}),color:p({},r.color,{arrayOk:!1,editType:"style"}),line:{color:p({},t.color,{arrayOk:!1,dflt:S.defaultLine,editType:"style"}),width:p({},t.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:g(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:C.selected.marker,editType:"style"},unselected:{marker:C.unselected.marker,editType:"style"},text:p({},C.text,{}),hovertext:p({},C.hovertext,{}),hovertemplate:v({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},62555:function(H,U,e){var g=e(38248),C=e(54460),i=e(1220),S=e(3400),x=e(39032).BADNUM,v=S._;H.exports=function(w,A){var _=w._fullLayout,y=C.getFromId(w,A.xaxis||"x"),E=C.getFromId(w,A.yaxis||"y"),T=[],s=A.type==="violin"?"_numViolins":"_numBoxes",L,M,z,D,N,I,k;A.orientation==="h"?(z=y,D="x",N=E,I="y",k=!!A.yperiodalignment):(z=E,D="y",N=y,I="x",k=!!A.xperiodalignment);var B=p(A,I,N,_[s]),O=B[0],V=B[1],Y=S.distinctVals(O,N),j=Y.vals,te=Y.minDiff/2,ie,ue,J,X,ee,G,Q=(A.boxpoints||A.points)==="all"?S.identity:function(St){return St.vie.uf};if(A._hasPreCompStats){var oe=A[D],$=function(St){return z.d2c((A[St]||[])[L])},Z=1/0,se=-1/0;for(L=0;L=ie.q1&&ie.q3>=ie.med){var ce=$("lowerfence");ie.lf=ce!==x&&ce<=ie.q1?ce:m(ie,J,X);var ge=$("upperfence");ie.uf=ge!==x&&ge>=ie.q3?ge:h(ie,J,X);var Te=$("mean");ie.mean=Te!==x?Te:X?S.mean(J,X):(ie.q1+ie.q3)/2;var we=$("sd");ie.sd=Te!==x&&we>=0?we:X?S.stdev(J,X,ie.mean):ie.q3-ie.q1,ie.lo=b(ie),ie.uo=u(ie);var Re=$("notchspan");Re=Re!==x&&Re>0?Re:o(ie,X),ie.ln=ie.med-Re,ie.un=ie.med+Re;var be=ie.lf,Ae=ie.uf;A.boxpoints&&J.length&&(be=Math.min(be,J[0]),Ae=Math.max(Ae,J[X-1])),A.notched&&(be=Math.min(be,ie.ln),Ae=Math.max(Ae,ie.un)),ie.min=be,ie.max=Ae}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ie.q1,"median = "+ie.med,"q3 = "+ie.q3].join(` -`));var me;ie.med!==x?me=ie.med:ie.q1!==x?ie.q3!==x?me=(ie.q1+ie.q3)/2:me=ie.q1:ie.q3!==x?me=ie.q3:me=0,ie.med=me,ie.q1=ie.q3=me,ie.lf=ie.uf=me,ie.mean=ie.sd=me,ie.ln=ie.un=me,ie.min=ie.max=me}Z=Math.min(Z,ie.min),se=Math.max(se,ie.max),ie.pts2=ue.filter(Q),T.push(ie)}}A._extremes[z._id]=C.findExtremes(z,[Z,se],{padded:!0})}else{var Le=z.makeCalcdata(A,D),Ve=r(j,te),Ue=j.length,ke=t(Ue);for(L=0;L=0&&He0){if(ie={},ie.pos=ie[I]=j[L],ue=ie.pts=ke[L].sort(c),J=ie[D]=ue.map(l),X=J.length,ie.min=J[0],ie.max=J[X-1],ie.mean=S.mean(J,X),ie.sd=S.stdev(J,X,ie.mean)*A.sdmultiple,ie.med=S.interp(J,.5),X%2&&($e||lt)){var ht,dt;$e?(ht=J.slice(0,X/2),dt=J.slice(X/2+1)):lt&&(ht=J.slice(0,X/2+1),dt=J.slice(X/2)),ie.q1=S.interp(ht,.5),ie.q3=S.interp(dt,.5)}else ie.q1=S.interp(J,.25),ie.q3=S.interp(J,.75);ie.lf=m(ie,J,X),ie.uf=h(ie,J,X),ie.lo=b(ie),ie.uo=u(ie);var xt=o(ie,X);ie.ln=ie.med-xt,ie.un=ie.med+xt,Ie=Math.min(Ie,ie.ln),rt=Math.max(rt,ie.un),ie.pts2=ue.filter(Q),T.push(ie)}A.notched&&S.isTypedArray(Le)&&(Le=Array.from(Le)),A._extremes[z._id]=C.findExtremes(z,A.notched?Le.concat([Ie,rt]):Le,{padded:!0})}return f(T,A),T.length>0?(T[0].t={num:_[s],dPos:te,posLetter:I,valLetter:D,labels:{med:v(w,"median:"),min:v(w,"min:"),q1:v(w,"q1:"),q3:v(w,"q3:"),max:v(w,"max:"),mean:A.boxmean==="sd"||A.sizemode==="sd"?v(w,"mean ± σ:").replace("σ",A.sdmultiple===1?"σ":A.sdmultiple+"σ"):v(w,"mean:"),lf:v(w,"lower fence:"),uf:v(w,"upper fence:")}},_[s]++,T):[{t:{empty:!0}}]};function p(d,w,A,_){var y=w in d,E=w+"0"in d,T="d"+w in d;if(y||E&&T){var s=A.makeCalcdata(d,w),L=i(d,A,w,s).vals;return[L,s]}var M;E?M=d[w+"0"]:"name"in d&&(A.type==="category"||g(d.name)&&["linear","log"].indexOf(A.type)!==-1||S.isDateTime(d.name)&&A.type==="date")?M=d.name:M=_;for(var z=A.type==="multicategory"?A.r2c_just_indices(M):A.d2c(M,0,d[w+"calendar"]),D=d._length,N=new Array(D),I=0;I1,E=1-f[p+"gap"],T=1-f[p+"groupgap"];for(m=0;m0;if(z==="positive"?(ie=D*(M?1:.5),X=J,ue=X=I):z==="negative"?(ie=X=I,ue=D*(M?1:.5),ee=J):(ie=ue=D,X=ee=J),se){var ne=s.pointpos,ce=s.jitter,ge=s.marker.size/2,Te=0;ne+ce>=0&&(Te=J*(ne+ce),Te>ie?(Z=!0,oe=ge,G=Te):Te>X&&(oe=ge,G=ie)),Te<=ie&&(G=ie);var we=0;ne-ce<=0&&(we=-J*(ne-ce),we>ue?(Z=!0,$=ge,Q=we):we>ee&&($=ge,Q=ue)),we<=ue&&(Q=ue)}else G=ie,Q=ue;var Re=new Array(b.length);for(h=0;h0?(z="v",E>0?D=Math.min(s,T):D=Math.min(T)):E>0?(z="h",D=Math.min(s)):D=0;if(!D){c.visible=!1;return}c._length=D;var O=l("orientation",z);c._hasPreCompStats?O==="v"&&E===0?(l("x0",0),l("dx",1)):O==="h"&&y===0&&(l("y0",0),l("dy",1)):O==="v"&&E===0?l("x0"):O==="h"&&y===0&&l("y0");var V=C.getComponentMethod("calendars","handleTraceDefaults");V(f,c,["x","y"],m)}function a(f,c,l,m){var h=m.prefix,b=g.coerce2(f,c,p,"marker.outliercolor"),u=l("marker.line.outliercolor"),o="outliers";c._hasPreCompStats?o="all":(b||u)&&(o="suspectedoutliers");var d=l(h+"points",o);d?(l("jitter",d==="all"?.3:0),l("pointpos",d==="all"?-1.5:0),l("marker.symbol"),l("marker.opacity"),l("marker.size"),l("marker.angle"),l("marker.color",c.line.color),l("marker.line.color"),l("marker.line.width"),d==="suspectedoutliers"&&(l("marker.line.outliercolor",c.marker.color),l("marker.line.outlierwidth")),l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size"),l("text"),l("hovertext")):delete c.marker;var w=l("hoveron");(w==="all"||w.indexOf("points")!==-1)&&l("hovertemplate"),g.coerceSelectionMarkerOpacity(c,l)}function n(f,c){var l,m;function h(o){return g.coerce(m._input,m,p,o)}for(var b=0;bA.lo&&(O.so=!0)}return y});w.enter().append("path").classed("point",!0),w.exit().remove(),w.call(i.translatePoints,l,m)}function t(a,n,f,c){var l=n.val,m=n.pos,h=!!m.rangebreaks,b=c.bPos,u=c.bPosPxOffset||0,o=f.boxmean||(f.meanline||{}).visible,d,w;Array.isArray(c.bdPos)?(d=c.bdPos[0],w=c.bdPos[1]):(d=c.bdPos,w=c.bdPos);var A=a.selectAll("path.mean").data(f.type==="box"&&f.boxmean||f.type==="violin"&&f.box.visible&&f.meanline.visible?C.identity:[]);A.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),A.exit().remove(),A.each(function(_){var y=m.c2l(_.pos+b,!0),E=m.l2p(y-d)+u,T=m.l2p(y+w)+u,s=h?(E+T)/2:m.l2p(y)+u,L=l.c2p(_.mean,!0),M=l.c2p(_.mean-_.sd,!0),z=l.c2p(_.mean+_.sd,!0);f.orientation==="h"?g.select(this).attr("d","M"+L+","+E+"V"+T+(o==="sd"?"m0,0L"+M+","+s+"L"+L+","+E+"L"+z+","+s+"Z":"")):g.select(this).attr("d","M"+E+","+L+"H"+T+(o==="sd"?"m0,0L"+s+","+M+"L"+E+","+L+"L"+s+","+z+"Z":""))})}H.exports={plot:v,plotBoxAndWhiskers:p,plotPoints:r,plotBoxMean:t}},8264:function(H){H.exports=function(e,g){var C=e.cd,i=e.xaxis,S=e.yaxis,x=[],v,p;if(g===!1)for(v=0;v=10)return null;for(var x=1/0,v=-1/0,p=i.length,r=0;r0?Math.floor:Math.ceil,k=D>0?Math.ceil:Math.floor,B=D>0?Math.min:Math.max,O=D>0?Math.max:Math.min,V=I(M+N),Y=k(z-N);f=L(M);var j=[[f]];for(v=V;v*D=0;S--)x[a-S]=e[n][S],v[a-S]=g[n][S];for(p.push({x,y:v,bicubic:r}),S=n,x=[],v=[];S>=0;S--)x[n-S]=e[S][0],v[n-S]=g[S][0];return p.push({x,y:v,bicubic:t}),p}},19216:function(H,U,e){var g=e(54460),C=e(92880).extendFlat;H.exports=function(S,x,v){var p,r,t,a,n,f,c,l,m,h,b,u,o,d,w=S["_"+x],A=S[x+"axis"],_=A._gridlines=[],y=A._minorgridlines=[],E=A._boundarylines=[],T=S["_"+v],s=S[v+"axis"];A.tickmode==="array"&&(A.tickvals=w.slice());var L=S._xctrl,M=S._yctrl,z=L[0].length,D=L.length,N=S._a.length,I=S._b.length;g.prepTicks(A),A.tickmode==="array"&&delete A.tickvals;var k=A.smoothing?3:1;function B(V){var Y,j,te,ie,ue,J,X,ee,G,Q,oe,$,Z=[],se=[],ne={};if(x==="b")for(j=S.b2j(V),te=Math.floor(Math.max(0,Math.min(I-2,j))),ie=j-te,ne.length=I,ne.crossLength=N,ne.xy=function(ce){return S.evalxy([],ce,j)},ne.dxy=function(ce,ge){return S.dxydi([],ce,te,ge,ie)},Y=0;Y0&&(G=S.dxydi([],Y-1,te,0,ie),Z.push(ue[0]+G[0]/3),se.push(ue[1]+G[1]/3),Q=S.dxydi([],Y-1,te,1,ie),Z.push(ee[0]-Q[0]/3),se.push(ee[1]-Q[1]/3)),Z.push(ee[0]),se.push(ee[1]),ue=ee;else for(Y=S.a2i(V),J=Math.floor(Math.max(0,Math.min(N-2,Y))),X=Y-J,ne.length=N,ne.crossLength=I,ne.xy=function(ce){return S.evalxy([],Y,ce)},ne.dxy=function(ce,ge){return S.dxydj([],J,ce,X,ge)},j=0;j0&&(oe=S.dxydj([],J,j-1,X,0),Z.push(ue[0]+oe[0]/3),se.push(ue[1]+oe[1]/3),$=S.dxydj([],J,j-1,X,1),Z.push(ee[0]-$[0]/3),se.push(ee[1]-$[1]/3)),Z.push(ee[0]),se.push(ee[1]),ue=ee;return ne.axisLetter=x,ne.axis=A,ne.crossAxis=s,ne.value=V,ne.constvar=v,ne.index=l,ne.x=Z,ne.y=se,ne.smoothing=s.smoothing,ne}function O(V){var Y,j,te,ie,ue,J=[],X=[],ee={};if(ee.length=w.length,ee.crossLength=T.length,x==="b")for(te=Math.max(0,Math.min(I-2,V)),ue=Math.min(1,Math.max(0,V-te)),ee.xy=function(G){return S.evalxy([],G,V)},ee.dxy=function(G,Q){return S.dxydi([],G,te,Q,ue)},Y=0;Yw.length-1)&&_.push(C(O(r),{color:A.gridcolor,width:A.gridwidth,dash:A.griddash}));for(l=f;lw.length-1)&&!(b<0||b>w.length-1))for(u=w[t],o=w[b],p=0;pw[w.length-1])&&y.push(C(B(h),{color:A.minorgridcolor,width:A.minorgridwidth,dash:A.minorgriddash})));A.startline&&E.push(C(O(0),{color:A.startlinecolor,width:A.startlinewidth})),A.endline&&E.push(C(O(w.length-1),{color:A.endlinecolor,width:A.endlinewidth}))}else{for(a=5e-15,n=[Math.floor((w[w.length-1]-A.tick0)/A.dtick*(1+a)),Math.ceil((w[0]-A.tick0)/A.dtick/(1+a))].sort(function(V,Y){return V-Y}),f=n[0],c=n[1],l=f;l<=c;l++)m=A.tick0+A.dtick*l,_.push(C(B(m),{color:A.gridcolor,width:A.gridwidth,dash:A.griddash}));for(l=f-1;lw[w.length-1])&&y.push(C(B(h),{color:A.minorgridcolor,width:A.minorgridwidth,dash:A.minorgriddash}));A.startline&&E.push(C(B(w[0]),{color:A.startlinecolor,width:A.startlinewidth})),A.endline&&E.push(C(B(w[w.length-1]),{color:A.endlinecolor,width:A.endlinewidth}))}}},14724:function(H,U,e){var g=e(54460),C=e(92880).extendFlat;H.exports=function(S,x){var v,p,r,t,a,n=x._labels=[],f=x._gridlines;for(v=0;vS.length&&(i=i.slice(0,S.length)):i=[],v=0;v90&&(c-=180,r=-r),{angle:c,flip:r,p:e.c2p(i,g,C),offsetMultplier:t}}},164:function(H,U,e){var g=e(33428),C=e(43616),i=e(87072),S=e(53416),x=e(15584),v=e(72736),p=e(3400),r=p.strRotate,t=p.strTranslate,a=e(84284);H.exports=function(o,d,w,A){var _=o._context.staticPlot,y=d.xaxis,E=d.yaxis,T=o._fullLayout,s=T._clips;p.makeTraceGroups(A,w,"trace").each(function(L){var M=g.select(this),z=L[0],D=z.trace,N=D.aaxis,I=D.baxis,k=p.ensureSingle(M,"g","minorlayer"),B=p.ensureSingle(M,"g","majorlayer"),O=p.ensureSingle(M,"g","boundarylayer"),V=p.ensureSingle(M,"g","labellayer");M.style("opacity",D.opacity),f(y,E,B,N,"a",N._gridlines,!0),f(y,E,B,I,"b",I._gridlines,!0),f(y,E,k,N,"a",N._minorgridlines,!0),f(y,E,k,I,"b",I._minorgridlines,!0),f(y,E,O,N,"a-boundary",N._boundarylines,_),f(y,E,O,I,"b-boundary",I._boundarylines,_);var Y=c(o,y,E,D,z,V,N._labels,"a-label"),j=c(o,y,E,D,z,V,I._labels,"b-label");l(o,V,D,z,y,E,Y,j),n(D,z,s,y,E)})};function n(u,o,d,w,A){var _,y,E,T,s=d.select("#"+u._clipPathId);s.size()||(s=d.append("clipPath").classed("carpetclip",!0));var L=p.ensureSingle(s,"path","carpetboundary"),M=o.clipsegments,z=[];for(T=0;T0?"start":"end","data-notex":1}).call(C.font,M.font).text(M.text).call(v.convertToTspans,u),B=C.bBox(this);k.attr("transform",t(D.p[0],D.p[1])+r(D.angle)+t(M.axis.labelpadding*I,B.height*.3)),s=Math.max(s,B.width+M.axis.labelpadding)}),T.exit().remove(),L.maxExtent=s,L}function l(u,o,d,w,A,_,y,E){var T,s,L,M,z=p.aggNums(Math.min,null,d.a),D=p.aggNums(Math.max,null,d.a),N=p.aggNums(Math.min,null,d.b),I=p.aggNums(Math.max,null,d.b);T=.5*(z+D),s=N,L=d.ab2xy(T,s,!0),M=d.dxyda_rough(T,s),y.angle===void 0&&p.extendFlat(y,x(d,A,_,L,d.dxydb_rough(T,s))),b(u,o,d,w,L,M,d.aaxis,A,_,y,"a-title"),T=z,s=.5*(N+I),L=d.ab2xy(T,s,!0),M=d.dxydb_rough(T,s),E.angle===void 0&&p.extendFlat(E,x(d,A,_,L,d.dxyda_rough(T,s))),b(u,o,d,w,L,M,d.baxis,A,_,E,"b-title")}var m=a.LINE_SPACING,h=(1-a.MID_SHIFT)/m+1;function b(u,o,d,w,A,_,y,E,T,s,L){var M=[];y.title.text&&M.push(y.title.text);var z=o.selectAll("text."+L).data(M),D=s.maxExtent;z.enter().append("text").classed(L,!0),z.each(function(){var N=x(d,E,T,A,_);["start","both"].indexOf(y.showticklabels)===-1&&(D=0);var I=y.title.font.size;D+=I+y.title.offset;var k=s.angle+(s.flip<0?180:0),B=(k-N.angle+450)%360,O=B>90&&B<270,V=g.select(this);V.text(y.title.text).call(v.convertToTspans,u),O&&(D=(-v.lineCount(V)+h)*m*I-D),V.attr("transform",t(N.p[0],N.p[1])+r(N.angle)+t(0,D)).attr("text-anchor","middle").call(C.font,y.title.font)}),z.exit().remove()}},81e3:function(H,U,e){var g=e(24588),C=e(14952).findBin,i=e(30180),S=e(29056),x=e(26435),v=e(24464);H.exports=function(r){var t=r._a,a=r._b,n=t.length,f=a.length,c=r.aaxis,l=r.baxis,m=t[0],h=t[n-1],b=a[0],u=a[f-1],o=t[t.length-1]-t[0],d=a[a.length-1]-a[0],w=o*g.RELATIVE_CULL_TOLERANCE,A=d*g.RELATIVE_CULL_TOLERANCE;m-=w,h+=w,b-=A,u+=A,r.isVisible=function(_,y){return _>m&&_b&&yh||yu},r.setScale=function(){var _=r._x,y=r._y,E=i(r._xctrl,r._yctrl,_,y,c.smoothing,l.smoothing);r._xctrl=E[0],r._yctrl=E[1],r.evalxy=S([r._xctrl,r._yctrl],n,f,c.smoothing,l.smoothing),r.dxydi=x([r._xctrl,r._yctrl],c.smoothing,l.smoothing),r.dxydj=v([r._xctrl,r._yctrl],c.smoothing,l.smoothing)},r.i2a=function(_){var y=Math.max(0,Math.floor(_[0]),n-2),E=_[0]-y;return(1-E)*t[y]+E*t[y+1]},r.j2b=function(_){var y=Math.max(0,Math.floor(_[1]),n-2),E=_[1]-y;return(1-E)*a[y]+E*a[y+1]},r.ij2ab=function(_){return[r.i2a(_[0]),r.j2b(_[1])]},r.a2i=function(_){var y=Math.max(0,Math.min(C(_,t),n-2)),E=t[y],T=t[y+1];return Math.max(0,Math.min(n-1,y+(_-E)/(T-E)))},r.b2j=function(_){var y=Math.max(0,Math.min(C(_,a),f-2)),E=a[y],T=a[y+1];return Math.max(0,Math.min(f-1,y+(_-E)/(T-E)))},r.ab2ij=function(_){return[r.a2i(_[0]),r.b2j(_[1])]},r.i2c=function(_,y){return r.evalxy([],_,y)},r.ab2xy=function(_,y,E){if(!E&&(_t[n-1]|ya[f-1]))return[!1,!1];var T=r.a2i(_),s=r.b2j(y),L=r.evalxy([],T,s);if(E){var M=0,z=0,D=[],N,I,k,B;_t[n-1]?(N=n-2,I=1,M=(_-t[n-1])/(t[n-1]-t[n-2])):(N=Math.max(0,Math.min(n-2,Math.floor(T))),I=T-N),ya[f-1]?(k=f-2,B=1,z=(y-a[f-1])/(a[f-1]-a[f-2])):(k=Math.max(0,Math.min(f-2,Math.floor(s))),B=s-k),M&&(r.dxydi(D,N,k,I,B),L[0]+=D[0]*M,L[1]+=D[1]*M),z&&(r.dxydj(D,N,k,I,B),L[0]+=D[0]*z,L[1]+=D[1]*z)}return L},r.c2p=function(_,y,E){return[y.c2p(_[0]),E.c2p(_[1])]},r.p2x=function(_,y,E){return[y.p2c(_[0]),E.p2c(_[1])]},r.dadi=function(_){var y=Math.max(0,Math.min(t.length-2,_));return t[y+1]-t[y]},r.dbdj=function(_){var y=Math.max(0,Math.min(a.length-2,_));return a[y+1]-a[y]},r.dxyda=function(_,y,E,T){var s=r.dxydi(null,_,y,E,T),L=r.dadi(_,E);return[s[0]/L,s[1]/L]},r.dxydb=function(_,y,E,T){var s=r.dxydj(null,_,y,E,T),L=r.dbdj(y,T);return[s[0]/L,s[1]/L]},r.dxyda_rough=function(_,y,E){var T=o*(E||.1),s=r.ab2xy(_+T,y,!0),L=r.ab2xy(_-T,y,!0);return[(s[0]-L[0])*.5/T,(s[1]-L[1])*.5/T]},r.dxydb_rough=function(_,y,E){var T=d*(E||.1),s=r.ab2xy(_,y+T,!0),L=r.ab2xy(_,y-T,!0);return[(s[0]-L[0])*.5/T,(s[1]-L[1])*.5/T]},r.dpdx=function(_){return _._m},r.dpdy=function(_){return _._m}}},51512:function(H,U,e){var g=e(3400);H.exports=function(i,S,x){var v,p,r,t=[],a=[],n=i[0].length,f=i.length;function c(j,te){var ie=0,ue,J=0;return j>0&&(ue=i[te][j-1])!==void 0&&(J++,ie+=ue),j0&&(ue=i[te-1][j])!==void 0&&(J++,ie+=ue),te0&&p0&&vT);return g.log("Smoother converged to",s,"after",M,"iterations"),i}},86411:function(H,U,e){var g=e(3400).isArray1D;H.exports=function(i,S,x){var v=x("x"),p=v&&v.length,r=x("y"),t=r&&r.length;if(!p&&!t)return!1;if(S._cheater=!v,(!p||g(v))&&(!t||g(r))){var a=p?v.length:1/0;t&&(a=Math.min(a,r.length)),S.a&&S.a.length&&(a=Math.min(a,S.a.length)),S.b&&S.b.length&&(a=Math.min(a,S.b.length)),S._length=a}else S._length=null;return!0}},83372:function(H,U,e){var g=e(21776).Ks,C=e(6096),i=e(49084),S=e(45464),x=e(22548).defaultLine,v=e(92880).extendFlat,p=C.marker.line;H.exports=v({locations:{valType:"data_array",editType:"calc"},locationmode:C.locationmode,z:{valType:"data_array",editType:"calc"},geojson:v({},C.geojson,{}),featureidkey:C.featureidkey,text:v({},C.text,{}),hovertext:v({},C.hovertext,{}),marker:{line:{color:v({},p.color,{dflt:x}),width:v({},p.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:C.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:C.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:v({},S.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:g(),showlegend:v({},S.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},7924:function(H,U,e){var g=e(38248),C=e(39032).BADNUM,i=e(47128),S=e(20148),x=e(4500);function v(p){return p&&typeof p=="string"}H.exports=function(r,t){var a=t._length,n=new Array(a),f;t.geojson?f=function(b){return v(b)||g(b)}:f=v;for(var c=0;c")}}},54272:function(H,U,e){H.exports={attributes:e(83372),supplyDefaults:e(30972),colorbar:e(96288),calc:e(7924),calcGeoJSON:e(88364).calcGeoJSON,plot:e(88364).plot,style:e(7947).style,styleOnSelect:e(7947).styleOnSelect,hoverPoints:e(69224),eventData:e(52428),selectPoints:e(17328),moduleType:"trace",name:"choropleth",basePlotModule:e(10816),categories:["geo","noOpacity","showLegend"],meta:{}}},88364:function(H,U,e){var g=e(33428),C=e(3400),i=e(27144),S=e(59972).getTopojsonFeatures,x=e(19280).findExtremes,v=e(7947).style;function p(t,a,n){var f=a.layers.backplot.select(".choroplethlayer");C.makeTraceGroups(f,n,"trace choropleth").each(function(c){var l=g.select(this),m=l.selectAll("path.choroplethlocation").data(C.identity);m.enter().append("path").classed("choroplethlocation",!0),m.exit().remove(),v(t,c)})}function r(t,a){for(var n=t[0].trace,f=a[n.geo],c=f._subplot,l=n.locationmode,m=n._length,h=l==="geojson-id"?i.extractTraceFeature(t):S(n,c.topojson),b=[],u=[],o=0;o=0;S--){var x=i[S].id;if(typeof x=="string"&&x.indexOf("water")===0){for(var v=S+1;v=0;r--)v.removeLayer(p[r][1])},x.dispose=function(){var v=this.subplot.map;this._removeLayers(),v.removeSource(this.sourceId)},H.exports=function(p,r){var t=r[0].trace,a=new S(p,t.uid),n=a.sourceId,f=g(r),c=a.below=p.belowLookup["trace-"+t.uid];return p.map.addSource(n,{type:"geojson",data:f.geojson}),a._addLayers(f,c),r[0].trace._glTrace=a,a}},86040:function(H,U,e){var g=e(49084),C=e(29736).axisHoverFormat,i=e(21776).Ks,S=e(52948),x=e(45464),v=e(92880).extendFlat,p={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"},{keys:["norm"]}),uhoverformat:C("u",1),vhoverformat:C("v",1),whoverformat:C("w",1),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),showlegend:v({},x.showlegend,{dflt:!1})};v(p,g("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(t){p[t]=S[t]}),p.hoverinfo=v({},x.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),p.transforms=void 0,H.exports=p},83344:function(H,U,e){var g=e(47128);H.exports=function(i,S){for(var x=S.u,v=S.v,p=S.w,r=Math.min(S.x.length,S.y.length,S.z.length,x.length,v.length,p.length),t=-1/0,a=1/0,n=0;nx.level||x.starts.length&&S===x.level)}break;case"constraint":if(g.prefixBoundary=!1,g.edgepaths.length)return;var v=g.x.length,p=g.y.length,r=-1/0,t=1/0;for(i=0;i":a>r&&(g.prefixBoundary=!0);break;case"<":(ar||g.starts.length&&f===t)&&(g.prefixBoundary=!0);break;case"][":n=Math.min(a[0],a[1]),f=Math.max(a[0],a[1]),nr&&(g.prefixBoundary=!0);break}break}}},55296:function(H,U,e){var g=e(8932),C=e(41076),i=e(46960);function S(x,v,p){var r=v.contours,t=v.line,a=r.size||1,n=r.coloring,f=C(v,{isColorbar:!0});if(n==="heatmap"){var c=g.extractOpts(v);p._fillgradient=c.reversescale?g.flipScale(c.colorscale):c.colorscale,p._zrange=[c.min,c.max]}else n==="fill"&&(p._fillcolor=f);p._line={color:n==="lines"?f:t.color,width:r.showlines!==!1?t.width:0,dash:t.dash},p._levels={start:r.start,end:i(r),size:a}}H.exports={min:"zmin",max:"zmax",calc:S}},93252:function(H){H.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},95536:function(H,U,e){var g=e(38248),C=e(17428),i=e(76308),S=i.addOpacity,x=i.opacity,v=e(69104),p=e(3400).isArrayOrTypedArray,r=v.CONSTRAINT_REDUCTION,t=v.COMPARISON_OPS2;H.exports=function(f,c,l,m,h,b){var u=c.contours,o,d,w,A=l("contours.operation");if(u._operation=r[A],a(l,u),A==="="?o=u.showlines=!0:(o=l("contours.showlines"),w=l("fillcolor",S((f.line||{}).color||h,.5))),o){var _=w&&x(w)?S(c.fillcolor,1):h;d=l("line.color",_),l("line.width",2),l("line.dash")}l("line.smoothing"),C(l,m,d,b)};function a(n,f){var c;t.indexOf(f.operation)===-1?(n("contours.value",[0,1]),p(f.value)?f.value.length>2?f.value=f.value.slice(2):f.length===0?f.value=[0,1]:f.length<2?(c=parseFloat(f.value[0]),f.value=[c,c+1]):f.value=[parseFloat(f.value[0]),parseFloat(f.value[1])]:g(f.value)&&(c=parseFloat(f.value),f.value=[c,c+1])):(n("contours.value",0),g(f.value)||(p(f.value)?f.value=parseFloat(f.value[0]):f.value=0))}},3212:function(H,U,e){var g=e(69104),C=e(38248);H.exports={"[]":S("[]"),"][":S("]["),">":x(">"),"<":x("<"),"=":x("=")};function i(v,p){var r=Array.isArray(p),t;function a(n){return C(n)?+n:null}return g.COMPARISON_OPS2.indexOf(v)!==-1?t=a(r?p[0]:p):g.INTERVAL_OPS.indexOf(v)!==-1?t=r?[a(p[0]),a(p[1])]:[a(p),a(p)]:g.SET_OPS.indexOf(v)!==-1&&(t=r?p.map(a):[a(p)]),t}function S(v){return function(p){p=i(v,p);var r=Math.min(p[0],p[1]),t=Math.max(p[0],p[1]);return{start:r,end:t,size:t-r}}}function x(v){return function(p){return p=i(v,p),{start:p,end:1/0,size:1/0}}}},84952:function(H){H.exports=function(e,g,C,i){var S=i("contours.start"),x=i("contours.end"),v=S===!1||x===!1,p=C("contours.size"),r;v?r=g.autocontour=!0:r=C("autocontour",!1),(r||!p)&&C("ncontours")}},82172:function(H,U,e){var g=e(3400);H.exports=function(i,S){var x,v,p,r=function(n){return n.reverse()},t=function(n){return n};switch(S){case"=":case"<":return i;case">":for(i.length!==1&&g.warn("Contour data invalid for the specified inequality operation."),v=i[0],x=0;x1e3){g.warn("Too many contours, clipping at 1000",x);break}return a}},46960:function(H){H.exports=function(e){return e.end+e.size/1e6}},88748:function(H,U,e){var g=e(3400),C=e(93252);H.exports=function(t,a,n){var f,c,l,m,h;for(a=a||.01,n=n||.01,l=0;l20?(l=C.CHOOSESADDLE[l][(m[0]||m[1])<0?0:1],r.crossings[c]=C.SADDLEREMAINDER[l]):delete r.crossings[c],m=C.NEWDELTA[l],!m){g.log("Found bad marching index:",l,t,r.level);break}h.push(p(r,t,m)),t[0]+=m[0],t[1]+=m[1],c=t.join(","),i(h[h.length-1],h[h.length-2],n,f)&&h.pop();var A=m[0]&&(t[0]<0||t[0]>u-2)||m[1]&&(t[1]<0||t[1]>b-2),_=t[0]===o[0]&&t[1]===o[1]&&m[0]===d[0]&&m[1]===d[1];if(_||a&&A)break;l=r.crossings[c]}w===1e4&&g.log("Infinite loop in contour?");var y=i(h[0],h[h.length-1],n,f),E=0,T=.2*r.smoothing,s=[],L=0,M,z,D,N,I,k,B,O,V,Y,j;for(w=1;w=L;w--)if(M=s[w],M=L&&M+s[z]O&&V--,r.edgepaths[V]=j.concat(h,Y));break}J||(r.edgepaths[O]=h.concat(Y))}for(O=0;O20&&t?r===208||r===1114?n=a[0]===0?1:-1:f=a[1]===0?1:-1:C.BOTTOMSTART.indexOf(r)!==-1?f=1:C.LEFTSTART.indexOf(r)!==-1?n=1:C.TOPSTART.indexOf(r)!==-1?f=-1:n=-1,[n,f]}function p(r,t,a){var n=t[0]+Math.max(a[0],0),f=t[1]+Math.max(a[1],0),c=r.z[f][n],l=r.xaxis,m=r.yaxis;if(a[1]){var h=(r.level-c)/(r.z[f][n+1]-c),b=(h!==1?(1-h)*l.c2l(r.x[n]):0)+(h!==0?h*l.c2l(r.x[n+1]):0);return[l.c2p(l.l2c(b),!0),m.c2p(r.y[f],!0),n+h,f]}else{var u=(r.level-c)/(r.z[f+1][n]-c),o=(u!==1?(1-u)*m.c2l(r.y[f]):0)+(u!==0?u*m.c2l(r.y[f+1]):0);return[l.c2p(r.x[n],!0),m.c2p(m.l2c(o),!0),n,f+u]}}},38200:function(H,U,e){var g=e(76308),C=e(55512);H.exports=function(S,x,v,p,r){r||(r={}),r.isContour=!0;var t=C(S,x,v,p,r);return t&&t.forEach(function(a){var n=a.trace;n.contours.type==="constraint"&&(n.fillcolor&&g.opacity(n.fillcolor)?a.color=g.addOpacity(n.fillcolor,1):n.contours.showlines&&g.opacity(n.line.color)&&(a.color=g.addOpacity(n.line.color,1)))}),t}},66240:function(H,U,e){H.exports={attributes:e(67104),supplyDefaults:e(57004),calc:e(20688),plot:e(23676).plot,style:e(52440),colorbar:e(55296),hoverPoints:e(38200),moduleType:"trace",name:"contour",basePlotModule:e(57952),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},17428:function(H,U,e){var g=e(3400);H.exports=function(i,S,x,v){v||(v={});var p=i("contours.showlabels");if(p){var r=S.font;g.coerceFont(i,"contours.labelfont",{family:r.family,size:r.size,color:x}),i("contours.labelformat")}v.hasHover!==!1&&i("zhoverformat")}},41076:function(H,U,e){var g=e(33428),C=e(8932),i=e(46960);H.exports=function(x){var v=x.contours,p=v.start,r=i(v),t=v.size||1,a=Math.floor((r-p)/t)+1,n=v.coloring==="lines"?0:1,f=C.extractOpts(x);isFinite(t)||(t=1,a=1);var c=f.reversescale?C.flipScale(f.colorscale):f.colorscale,l=c.length,m=new Array(l),h=new Array(l),b,u,o=f.min,d=f.max;if(v.coloring==="heatmap"){for(u=0;u=d)&&(p<=o&&(p=o),r>=d&&(r=d),a=Math.floor((r-p)/t)+1,n=0),u=0;uo&&(m.unshift(o),h.unshift(h[0])),m[m.length-1]i?0:1)+(S[0][1]>i?0:2)+(S[1][1]>i?0:4)+(S[1][0]>i?0:8);if(x===5||x===10){var v=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return i>v?x===5?713:1114:x===5?104:208}return x===15?0:x}},23676:function(H,U,e){var g=e(33428),C=e(3400),i=e(43616),S=e(8932),x=e(72736),v=e(54460),p=e(78344),r=e(41420),t=e(72424),a=e(88748),n=e(61512),f=e(82172),c=e(56008),l=e(93252),m=l.LABELOPTIMIZER;U.plot=function(y,E,T,s){var L=E.xaxis,M=E.yaxis;C.makeTraceGroups(s,T,"contour").each(function(z){var D=g.select(this),N=z[0],I=N.trace,k=N.x,B=N.y,O=I.contours,V=n(O,E,N),Y=C.ensureSingle(D,"g","heatmapcoloring"),j=[];O.coloring==="heatmap"&&(j=[z]),r(y,E,j,Y),t(V),a(V);var te=L.c2p(k[0],!0),ie=L.c2p(k[k.length-1],!0),ue=M.c2p(B[0],!0),J=M.c2p(B[B.length-1],!0),X=[[te,J],[ie,J],[ie,ue],[te,ue]],ee=V;O.type==="constraint"&&(ee=f(V,O._operation)),h(D,X,O),b(D,ee,X,O),o(D,V,y,N,O),w(D,E,y,N,X)})};function h(_,y,E){var T=C.ensureSingle(_,"g","contourbg"),s=T.selectAll("path").data(E.coloring==="fill"?[0]:[]);s.enter().append("path"),s.exit().remove(),s.attr("d","M"+y.join("L")+"Z").style("stroke","none")}function b(_,y,E,T){var s=T.coloring==="fill"||T.type==="constraint"&&T._operation!=="=",L="M"+E.join("L")+"Z";s&&c(y,T);var M=C.ensureSingle(_,"g","contourfill"),z=M.selectAll("path").data(s?y:[]);z.enter().append("path"),z.exit().remove(),z.each(function(D){var N=(D.prefixBoundary?L:"")+u(D,E);N?g.select(this).attr("d",N).style("stroke","none"):g.select(this).remove()})}function u(_,y){var E="",T=0,s=_.edgepaths.map(function(te,ie){return ie}),L=!0,M,z,D,N,I,k;function B(te){return Math.abs(te[1]-y[0][1])<.01}function O(te){return Math.abs(te[1]-y[2][1])<.01}function V(te){return Math.abs(te[0]-y[0][0])<.01}function Y(te){return Math.abs(te[0]-y[2][0])<.01}for(;s.length;){for(k=i.smoothopen(_.edgepaths[T],_.smoothing),E+=L?k:k.replace(/^M/,"L"),s.splice(s.indexOf(T),1),M=_.edgepaths[T][_.edgepaths[T].length-1],N=-1,D=0;D<4;D++){if(!M){C.log("Missing end?",T,_);break}for(B(M)&&!Y(M)?z=y[1]:V(M)?z=y[0]:O(M)?z=y[3]:Y(M)&&(z=y[2]),I=0;I<_.edgepaths.length;I++){var j=_.edgepaths[I][0];Math.abs(M[0]-z[0])<.01?Math.abs(M[0]-j[0])<.01&&(j[1]-M[1])*(z[1]-j[1])>=0&&(z=j,N=I):Math.abs(M[1]-z[1])<.01?Math.abs(M[1]-j[1])<.01&&(j[0]-M[0])*(z[0]-j[0])>=0&&(z=j,N=I):C.log("endpt to newendpt is not vert. or horz.",M,z,j)}if(M=z,N>=0)break;E+="L"+z}if(N===_.edgepaths.length){C.log("unclosed perimeter path");break}T=N,L=s.indexOf(T)===-1,L&&(T=s[0],E+="Z")}for(T=0;T<_.paths.length;T++)E+=i.smoothclosed(_.paths[T],_.smoothing);return E}function o(_,y,E,T,s){var L=E._context.staticPlot,M=C.ensureSingle(_,"g","contourlines"),z=s.showlines!==!1,D=s.showlabels,N=z&&D,I=U.createLines(M,z||D,y,L),k=U.createLineClip(M,N,E,T.trace.uid),B=_.selectAll("g.contourlabels").data(D?[0]:[]);if(B.exit().remove(),B.enter().append("g").classed("contourlabels",!0),D){var O=[],V=[];C.clearLocationCache();var Y=U.labelFormatter(E,T),j=i.tester.append("text").attr("data-notex",1).call(i.font,s.labelfont),te=y[0].xaxis,ie=y[0].yaxis,ue=te._length,J=ie._length,X=te.range,ee=ie.range,G=C.aggNums(Math.min,null,T.x),Q=C.aggNums(Math.max,null,T.x),oe=C.aggNums(Math.min,null,T.y),$=C.aggNums(Math.max,null,T.y),Z=Math.max(te.c2p(G,!0),0),se=Math.min(te.c2p(Q,!0),ue),ne=Math.max(ie.c2p($,!0),0),ce=Math.min(ie.c2p(oe,!0),J),ge={};X[0]m.MAXCOST*2)break;B&&(z/=2),M=N-z/2,D=M+z*1.5}if(k<=m.MAXCOST)return I};function d(_,y,E,T){var s=y.width/2,L=y.height/2,M=_.x,z=_.y,D=_.theta,N=Math.cos(D)*s,I=Math.sin(D)*s,k=(M>T.center?T.right-M:M-T.left)/(N+Math.abs(Math.sin(D)*L)),B=(z>T.middle?T.bottom-z:z-T.top)/(Math.abs(I)+Math.cos(D)*L);if(k<1||B<1)return 1/0;var O=m.EDGECOST*(1/(k-1)+1/(B-1));O+=m.ANGLECOST*D*D;for(var V=M-N,Y=z-I,j=M+N,te=z+I,ie=0;iep.end&&(p.start=p.end=(p.start+p.end)/2),x._input.contours||(x._input.contours={}),C.extendFlat(x._input.contours,{start:p.start,end:p.end,size:p.size}),x._input.autocontour=!0}else if(p.type!=="constraint"){var n=p.start,f=p.end,c=x._input.contours;if(n>f&&(p.start=c.start=f,f=p.end=c.end=n,n=p.start),!(p.size>0)){var l;n===f?l=1:l=i(n,f,x.ncontours).dtick,c.size=p.size=l}}};function i(S,x,v){var p={type:"linear",range:[S,x]};return g.autoTicks(p,(x-S)/(v||15)),p}},52440:function(H,U,e){var g=e(33428),C=e(43616),i=e(41648),S=e(41076);H.exports=function(v){var p=g.select(v).selectAll("g.contour");p.style("opacity",function(r){return r[0].trace.opacity}),p.each(function(r){var t=g.select(this),a=r[0].trace,n=a.contours,f=a.line,c=n.size||1,l=n.start,m=n.type==="constraint",h=!m&&n.coloring==="lines",b=!m&&n.coloring==="fill",u=h||b?S(a):null;t.selectAll("g.contourlevel").each(function(w){g.select(this).selectAll("path").call(C.lineGroupStyle,f.width,h?u(w.level):f.color,f.dash)});var o=n.labelfont;if(t.selectAll("g.contourlabels text").each(function(w){C.font(g.select(this),{family:o.family,size:o.size,color:o.color||(h?u(w.level):f.color)})}),m)t.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(b){var d;t.selectAll("g.contourfill path").style("fill",function(w){return d===void 0&&(d=w.level),u(w.level+.5*c)}),d===void 0&&(d=l),t.selectAll("g.contourbg path").style("fill",u(d-.5*c))}}),i(v)}},97680:function(H,U,e){var g=e(27260),C=e(17428);H.exports=function(S,x,v,p,r){var t=v("contours.coloring"),a,n="";t==="fill"&&(a=v("contours.showlines")),a!==!1&&(t!=="lines"&&(n=v("line.color","#000")),v("line.width",.5),v("line.dash")),t!=="none"&&(S.showlegend!==!0&&(x.showlegend=!1),x._dfltShowLegend=!1,g(S,x,p,v,{prefix:"",cLetter:"z"})),v("line.smoothing"),C(v,p,n,r)}},37960:function(H,U,e){var g=e(83328),C=e(67104),i=e(49084),S=e(92880).extendFlat,x=C.contours;H.exports=S({carpet:{valType:"string",editType:"calc"},z:g.z,a:g.x,a0:g.x0,da:g.dx,b:g.y,b0:g.y0,db:g.dy,text:g.text,hovertext:g.hovertext,transpose:g.transpose,atype:g.xtype,btype:g.ytype,fillcolor:C.fillcolor,autocontour:C.autocontour,ncontours:C.ncontours,contours:{type:x.type,start:x.start,end:x.end,size:x.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:x.showlines,showlabels:x.showlabels,labelfont:x.labelfont,labelformat:x.labelformat,operation:x.operation,value:x.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:C.line.color,width:C.line.width,dash:C.line.dash,smoothing:C.line.smoothing,editType:"plot"},transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},30572:function(H,U,e){var g=e(47128),C=e(3400),i=e(2872),S=e(26136),x=e(70448),v=e(11240),p=e(35744),r=e(3252),t=e(50948),a=e(54444);H.exports=function(c,l){var m=l._carpetTrace=t(c,l);if(!(!m||!m.visible||m.visible==="legendonly")){if(!l.a||!l.b){var h=c.data[m.index],b=c.data[l.index];b.a||(b.a=h.a),b.b||(b.b=h.b),r(b,l,l._defaultColor,c._fullLayout)}var u=n(c,l);return a(l,l._z),u}};function n(f,c){var l=c._carpetTrace,m=l.aaxis,h=l.baxis,b,u,o,d,w,A,_;m._minDtick=0,h._minDtick=0,C.isArray1D(c.z)&&i(c,m,h,"a","b",["z"]),b=c._a=c._a||c.a,d=c._b=c._b||c.b,b=b?m.makeCalcdata(c,"_a"):[],d=d?h.makeCalcdata(c,"_b"):[],u=c.a0||0,o=c.da||1,w=c.b0||0,A=c.db||1,_=c._z=S(c._z||c.z,c.transpose),c._emptypoints=v(_),x(_,c._emptypoints);var y=C.maxRowLength(_),E=c.xtype==="scaled"?"":b,T=p(c,E,u,o,y,m),s=c.ytype==="scaled"?"":d,L=p(c,s,w,A,_.length,h),M={a:T,b:L,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&g(f,c,{vals:_,containerStr:"",cLetter:"z"}),[M]}},3252:function(H,U,e){var g=e(3400),C=e(51264),i=e(37960),S=e(95536),x=e(84952),v=e(97680);H.exports=function(r,t,a,n){function f(h,b){return g.coerce(r,t,i,h,b)}function c(h){return g.coerce2(r,t,i,h)}if(f("carpet"),r.a&&r.b){var l=C(r,t,f,n,"a","b");if(!l){t.visible=!1;return}f("text");var m=f("contours.type")==="constraint";m?S(r,t,f,n,a,{hasHover:!1}):(x(r,t,f,c),v(r,t,f,n,{hasHover:!1}))}else t._defaultColor=a,t._length=null}},40448:function(H,U,e){H.exports={attributes:e(37960),supplyDefaults:e(3252),colorbar:e(55296),calc:e(30572),plot:e(94440),style:e(52440),moduleType:"trace",name:"contourcarpet",basePlotModule:e(57952),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},94440:function(H,U,e){var g=e(33428),C=e(87072),i=e(53416),S=e(43616),x=e(3400),v=e(72424),p=e(88748),r=e(23676),t=e(93252),a=e(82172),n=e(61512),f=e(56008),c=e(50948),l=e(77712);H.exports=function(E,T,s,L){var M=T.xaxis,z=T.yaxis;x.makeTraceGroups(L,s,"contour").each(function(D){var N=g.select(this),I=D[0],k=I.trace,B=k._carpetTrace=c(E,k),O=E.calcdata[B.index][0];if(!B.visible||B.visible==="legendonly")return;var V=I.a,Y=I.b,j=k.contours,te=n(j,T,I),ie=j.type==="constraint",ue=j._operation,J=ie?ue==="="?"lines":"fill":j.coloring;function X(Te){var we=B.ab2xy(Te[0],Te[1],!0);return[M.c2p(we[0]),z.c2p(we[1])]}var ee=[[V[0],Y[Y.length-1]],[V[V.length-1],Y[Y.length-1]],[V[V.length-1],Y[0]],[V[0],Y[0]]];v(te);var G=(V[V.length-1]-V[0])*1e-8,Q=(Y[Y.length-1]-Y[0])*1e-8;p(te,G,Q);var oe=te;j.type==="constraint"&&(oe=a(te,ue)),m(te,X);var $,Z,se,ne,ce=[];for(ne=O.clipsegments.length-1;ne>=0;ne--)$=O.clipsegments[ne],Z=C([],$.x,M.c2p),se=C([],$.y,z.c2p),Z.reverse(),se.reverse(),ce.push(i(Z,se,$.bicubic));var ge="M"+ce.join("L")+"Z";w(N,O.clipsegments,M,z,ie,J),A(k,N,M,z,oe,ee,X,B,O,J,ge),h(N,te,E,I,j,T,B),S.setClipUrl(N,B._clipPathId,E)})};function m(y,E){var T,s,L,M,z,D,N,I,k;for(T=0;Tte&&(s.max=te),s.len=s.max-s.min}function u(y,E,T){var s=y.getPointAtLength(E),L=y.getPointAtLength(T),M=L.x-s.x,z=L.y-s.y,D=Math.sqrt(M*M+z*z);return[M/D,z/D]}function o(y){var E=Math.sqrt(y[0]*y[0]+y[1]*y[1]);return[y[0]/E,y[1]/E]}function d(y,E){var T=Math.abs(y[0]*E[0]+y[1]*E[1]),s=Math.sqrt(1-T*T);return s/T}function w(y,E,T,s,L,M){var z,D,N,I,k=x.ensureSingle(y,"g","contourbg"),B=k.selectAll("path").data(M==="fill"&&!L?[0]:[]);B.enter().append("path"),B.exit().remove();var O=[];for(I=0;I=0&&(V=Z,j=te):Math.abs(O[1]-V[1])=0&&(V=Z,j=te):x.log("endpt to newendpt is not vert. or horz.",O,V,Z)}if(j>=0)break;I+=oe(O,V),O=V}if(j===E.edgepaths.length){x.log("unclosed perimeter path");break}N=j,B=k.indexOf(N)===-1,B&&(N=k[0],I+=oe(O,V)+"Z",O=null)}for(N=0;N0?+h[l]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:w})}}var _=S.extractOpts(t),y=_.reversescale?S.flipScale(_.colorscale):_.colorscale,E=y[0][1],T=i.opacity(E)<1?E:i.addOpacity(E,0),s=["interpolate",["linear"],["heatmap-density"],0,T];for(l=1;l=0;p--)x.removeLayer(v[p][1])},S.dispose=function(){var x=this.subplot.map;this._removeLayers(),x.removeSource(this.sourceId)},H.exports=function(v,p){var r=p[0].trace,t=new i(v,r.uid),a=t.sourceId,n=g(p),f=t.below=v.belowLookup["trace-"+r.uid];return v.map.addSource(a,{type:"geojson",data:n.geojson}),t._addLayers(n,f),t}},74248:function(H,U,e){var g=e(3400);H.exports=function(i,S){for(var x=0;x"),n.color=S(c,h),[n]}};function S(x,v){var p=x.marker,r=v.mc||p.color,t=v.mlc||p.line.color,a=v.mlw||p.line.width;if(g(r))return r;if(g(t)&&a)return t}},94704:function(H,U,e){H.exports={attributes:e(20088),layoutAttributes:e(7076),supplyDefaults:e(45432).supplyDefaults,crossTraceDefaults:e(45432).crossTraceDefaults,supplyLayoutDefaults:e(11631),calc:e(23096),crossTraceCalc:e(4804),plot:e(42200),style:e(44544).style,hoverPoints:e(31488),eventData:e(34580),selectPoints:e(45784),moduleType:"trace",name:"funnel",basePlotModule:e(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(H){H.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},11631:function(H,U,e){var g=e(3400),C=e(7076);H.exports=function(i,S,x){var v=!1;function p(a,n){return g.coerce(i,S,C,a,n)}for(var r=0;r path").each(function(h){if(!h.isBlank){var b=m.marker;g.select(this).call(i.fill,h.mc||b.color).call(i.stroke,h.mlc||b.line.color).call(C.dashLine,b.line.dash,h.mlw||b.line.width).style("opacity",m.selectedpoints&&!h.selected?S:1)}}),p(l,m,t),l.selectAll(".regions").each(function(){g.select(this).selectAll("path").style("stroke-width",0).call(i.fill,m.connector.fillcolor)}),l.selectAll(".lines").each(function(){var h=m.connector.line;C.lineGroupStyle(g.select(this).selectAll("path"),h.width,h.color,h.dash)})})}H.exports={style:r}},22332:function(H,U,e){var g=e(74996),C=e(45464),i=e(86968).u,S=e(21776).Ks,x=e(21776).Gw,v=e(92880).extendFlat;H.exports={labels:g.labels,label0:g.label0,dlabel:g.dlabel,values:g.values,marker:{colors:g.marker.colors,line:{color:v({},g.marker.line.color,{dflt:null}),width:v({},g.marker.line.width,{dflt:1}),editType:"calc"},pattern:g.marker.pattern,editType:"calc"},text:g.text,hovertext:g.hovertext,scalegroup:v({},g.scalegroup,{}),textinfo:v({},g.textinfo,{flags:["label","text","value","percent"]}),texttemplate:x({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:v({},C.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),textposition:v({},g.textposition,{values:["inside","none"],dflt:"inside"}),textfont:g.textfont,insidetextfont:g.insidetextfont,title:{text:g.title.text,font:g.title.font,position:v({},g.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},91248:function(H,U,e){var g=e(7316);U.name="funnelarea",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},54e3:function(H,U,e){var g=e(45768);function C(S,x){return g.calc(S,x)}function i(S){g.crossTraceCalc(S,{type:"funnelarea"})}H.exports={calc:C,crossTraceCalc:i}},92688:function(H,U,e){var g=e(3400),C=e(22332),i=e(86968).Q,S=e(31508).handleText,x=e(74174).handleLabelsAndValues,v=e(74174).handleMarkerDefaults;H.exports=function(r,t,a,n){function f(A,_){return g.coerce(r,t,C,A,_)}var c=f("labels"),l=f("values"),m=x(c,l),h=m.len;if(t._hasLabels=m.hasLabels,t._hasValues=m.hasValues,!t._hasLabels&&t._hasValues&&(f("label0"),f("dlabel")),!h){t.visible=!1;return}t._length=h,v(r,t,n,f),f("scalegroup");var b=f("text"),u=f("texttemplate"),o;if(u||(o=f("textinfo",Array.isArray(b)?"text+percent":"percent")),f("hovertext"),f("hovertemplate"),u||o&&o!=="none"){var d=f("textposition");S(r,t,n,f,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else o==="none"&&f("textposition","none");i(t,n,f);var w=f("title.text");w&&(f("title.position"),g.coerceFont(f,"title.font",n.font)),f("aspectratio"),f("baseratio")}},62396:function(H,U,e){H.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e(91248),categories:["pie-like","funnelarea","showLegend"],attributes:e(22332),layoutAttributes:e(61280),supplyDefaults:e(92688),supplyLayoutDefaults:e(35384),calc:e(54e3).calc,crossTraceCalc:e(54e3).crossTraceCalc,plot:e(39472),style:e(62096),styleOne:e(10528),meta:{}}},61280:function(H,U,e){var g=e(85204).hiddenlabels;H.exports={hiddenlabels:g,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},35384:function(H,U,e){var g=e(3400),C=e(61280);H.exports=function(S,x){function v(p,r){return g.coerce(S,x,C,p,r)}v("hiddenlabels"),v("funnelareacolorway",x.colorway),v("extendfunnelareacolors")}},39472:function(H,U,e){var g=e(33428),C=e(43616),i=e(3400),S=i.strScale,x=i.strTranslate,v=e(72736),p=e(98184),r=p.toMoveInsideBar,t=e(82744),a=t.recordMinTextSize,n=t.clearMinTextSize,f=e(69656),c=e(37820),l=c.attachFxHandlers,m=c.determineInsideTextFont,h=c.layoutAreas,b=c.prerenderTitles,u=c.positionTitleOutside,o=c.formatSliceLabel;H.exports=function(y,E){var T=y._context.staticPlot,s=y._fullLayout;n("funnelarea",s),b(E,y),h(E,s._size),i.makeTraceGroups(s._funnelarealayer,E,"trace").each(function(L){var M=g.select(this),z=L[0],D=z.trace;A(L),M.each(function(){var N=g.select(this).selectAll("g.slice").data(L);N.enter().append("g").classed("slice",!0),N.exit().remove(),N.each(function(k,B){if(k.hidden){g.select(this).selectAll("path,g").remove();return}k.pointNumber=k.i,k.curveNumber=D.index;var O=z.cx,V=z.cy,Y=g.select(this),j=Y.selectAll("path.surface").data([k]);j.enter().append("path").classed("surface",!0).style({"pointer-events":T?"none":"all"}),Y.call(l,y,L);var te="M"+(O+k.TR[0])+","+(V+k.TR[1])+d(k.TR,k.BR)+d(k.BR,k.BL)+d(k.BL,k.TL)+"Z";j.attr("d",te),o(y,k,z);var ie=f.castOption(D.textposition,k.pts),ue=Y.selectAll("g.slicetext").data(k.text&&ie!=="none"?[0]:[]);ue.enter().append("g").classed("slicetext",!0),ue.exit().remove(),ue.each(function(){var J=i.ensureSingle(g.select(this),"text","",function(se){se.attr("data-notex",1)}),X=i.ensureUniformFontSize(y,m(D,k,s.font));J.text(k.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(C.font,X).call(v.convertToTspans,y);var ee=C.bBox(J.node()),G,Q,oe,$=Math.min(k.BL[1],k.BR[1])+V,Z=Math.max(k.TL[1],k.TR[1])+V;Q=Math.max(k.TL[0],k.BL[0])+O,oe=Math.min(k.TR[0],k.BR[0])+O,G=r(Q,oe,$,Z,ee,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),G.fontSize=X.size,a(D.type,G,s),L[B].transform=G,i.setTransormAndDisplay(J,G)})});var I=g.select(this).selectAll("g.titletext").data(D.title.text?[0]:[]);I.enter().append("g").classed("titletext",!0),I.exit().remove(),I.each(function(){var k=i.ensureSingle(g.select(this),"text","",function(V){V.attr("data-notex",1)}),B=D.title.text;D._meta&&(B=i.templateString(B,D._meta)),k.text(B).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(C.font,D.title.font).call(v.convertToTspans,y);var O=u(z,s._size);k.attr("transform",x(O.x,O.y)+S(Math.min(1,O.scale))+x(O.tx,O.ty))})})})};function d(_,y){var E=y[0]-_[0],T=y[1]-_[1];return"l"+E+","+T}function w(_,y){return[.5*(_[0]+y[0]),.5*(_[1]+y[1])]}function A(_){if(!_.length)return;var y=_[0],E=y.trace,T=E.aspectratio,s=E.baseratio;s>.999&&(s=.999);var L=Math.pow(s,2),M=y.vTotal,z=M*L/(1-L),D=M,N=z/M;function I(){var ne=Math.sqrt(N);return{x:ne,y:-ne}}function k(){var ne=I();return[ne.x,ne.y]}var B,O=[];O.push(k());var V,Y;for(V=_.length-1;V>-1;V--)if(Y=_[V],!Y.hidden){var j=Y.v/D;N+=j,O.push(k())}var te=1/0,ie=-1/0;for(V=0;V-1;V--)if(Y=_[V],!Y.hidden){$+=1;var Z=O[$][0],se=O[$][1];Y.TL=[-Z,se],Y.TR=[Z,se],Y.BL=Q,Y.BR=oe,Y.pxmid=w(Y.TR,Y.BR),Q=Y.TL,oe=Y.TR}}},62096:function(H,U,e){var g=e(33428),C=e(10528),i=e(82744).resizeText;H.exports=function(x){var v=x._fullLayout._funnelarealayer.selectAll(".trace");i(x,v,"funnelarea"),v.each(function(p){var r=p[0],t=r.trace,a=g.select(this);a.style({opacity:t.opacity}),a.selectAll("path.surface").each(function(n){g.select(this).call(C,n,t,x)})})}},83328:function(H,U,e){var g=e(52904),C=e(45464),i=e(25376),S=e(29736).axisHoverFormat,x=e(21776).Ks,v=e(21776).Gw,p=e(49084),r=e(92880).extendFlat;H.exports=r({z:{valType:"data_array",editType:"calc"},x:r({},g.x,{impliedEdits:{xtype:"array"}}),x0:r({},g.x0,{impliedEdits:{xtype:"scaled"}}),dx:r({},g.dx,{impliedEdits:{xtype:"scaled"}}),y:r({},g.y,{impliedEdits:{ytype:"array"}}),y0:r({},g.y0,{impliedEdits:{ytype:"scaled"}}),dy:r({},g.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:r({},g.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:r({},g.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:r({},g.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:r({},g.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:r({},g.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:r({},g.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:x(),texttemplate:v({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:i({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:r({},C.showlegend,{dflt:!1})},{transforms:void 0},p("",{cLetter:"z",autoColorDflt:!1}))},19512:function(H,U,e){var g=e(24040),C=e(3400),i=e(54460),S=e(1220),x=e(55480),v=e(47128),p=e(2872),r=e(26136),t=e(70448),a=e(11240),n=e(35744),f=e(39032).BADNUM;H.exports=function(h,b){var u=i.getFromId(h,b.xaxis||"x"),o=i.getFromId(h,b.yaxis||"y"),d=g.traceIs(b,"contour"),w=g.traceIs(b,"histogram"),A=g.traceIs(b,"gl2d"),_=d?"best":b.zsmooth,y,E,T,s,L,M,z,D,N,I,k;if(u._minDtick=0,o._minDtick=0,w)k=x(h,b),s=k.orig_x,y=k.x,E=k.x0,T=k.dx,D=k.orig_y,L=k.y,M=k.y0,z=k.dy,N=k.z;else{var B=b.z;C.isArray1D(B)?(p(b,u,o,"x","y",["z"]),y=b._x,L=b._y,B=b._z):(s=b.x?u.makeCalcdata(b,"x"):[],D=b.y?o.makeCalcdata(b,"y"):[],y=S(b,u,"x",s).vals,L=S(b,o,"y",D).vals,b._x=y,b._y=L),E=b.x0,T=b.dx,M=b.y0,z=b.dy,N=r(B,b,u,o)}(u.rangebreaks||o.rangebreaks)&&(N=l(y,L,N),w||(y=c(y),L=c(L),b._x=y,b._y=L)),!w&&(d||b.connectgaps)&&(b._emptypoints=a(N),t(N,b._emptypoints));function O(ee){_=b._input.zsmooth=b.zsmooth=!1,C.warn('cannot use zsmooth: "fast": '+ee)}function V(ee){if(ee.length>1){var G=(ee[ee.length-1]-ee[0])/(ee.length-1),Q=Math.abs(G/100);for(I=0;IQ)return!1}return!0}b._islinear=!1,u.type==="log"||o.type==="log"?_==="fast"&&O("log axis found"):V(y)?V(L)?b._islinear=!0:_==="fast"&&O("y scale is not linear"):_==="fast"&&O("x scale is not linear");var Y=C.maxRowLength(N),j=b.xtype==="scaled"?"":y,te=n(b,j,E,T,Y,u),ie=b.ytype==="scaled"?"":L,ue=n(b,ie,M,z,N.length,o);A||(b._extremes[u._id]=i.findExtremes(u,te),b._extremes[o._id]=i.findExtremes(o,ue));var J={x:te,y:ue,z:N,text:b._text||b.text,hovertext:b._hovertext||b.hovertext};if(b.xperiodalignment&&s&&(J.orig_x=s),b.yperiodalignment&&D&&(J.orig_y=D),j&&j.length===te.length-1&&(J.xCenter=j),ie&&ie.length===ue.length-1&&(J.yCenter=ie),w&&(J.xRanges=k.xRanges,J.yRanges=k.yRanges,J.pts=k.pts),d||v(h,b,{vals:N,cLetter:"z"}),d&&b.contours&&b.contours.coloring==="heatmap"){var X={type:b.type==="contour"?"heatmap":"histogram2d",xcalendar:b.xcalendar,ycalendar:b.ycalendar};J.xfill=n(X,j,E,T,Y,u),J.yfill=n(X,ie,M,z,N.length,o)}return[J]};function c(m){for(var h=[],b=m.length,u=0;u=0;m--)l=v[m],f=l[0],c=l[1],h=((x[[f-1,c]]||t)[2]+(x[[f+1,c]]||t)[2]+(x[[f,c-1]]||t)[2]+(x[[f,c+1]]||t)[2])/20,h&&(b[l]=[f,c,h],v.splice(m,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(l in b)x[l]=b[l],S.push(b[l])}return S.sort(function(o,d){return d[2]-o[2]})}},55512:function(H,U,e){var g=e(93024),C=e(3400),i=C.isArrayOrTypedArray,S=e(54460),x=e(8932).extractOpts;H.exports=function(p,r,t,a,n){n||(n={});var f=n.isContour,c=p.cd[0],l=c.trace,m=p.xa,h=p.ya,b=c.x,u=c.y,o=c.z,d=c.xCenter,w=c.yCenter,A=c.zmask,_=l.zhoverformat,y=b,E=u,T,s,L,M;if(p.index!==!1){try{L=Math.round(p.index[1]),M=Math.round(p.index[0])}catch{C.error("Error hovering on heatmap, pointNumber must be [row,col], found:",p.index);return}if(L<0||L>=o[0].length||M<0||M>o.length)return}else{if(g.inbox(r-b[0],r-b[b.length-1],0)>0||g.inbox(t-u[0],t-u[u.length-1],0)>0)return;if(f){var z;for(y=[2*b[0]-b[1]],z=1;zC;a++)t=x(p,r,S(t));return t>C&&g.log("interp2d didn't converge quickly",t),p};function x(v,p,r){var t=0,a,n,f,c,l,m,h,b,u,o,d,w,A;for(c=0;cw&&(t=Math.max(t,Math.abs(v[n][f]-d)/(A-w))))}return t}},39096:function(H,U,e){var g=e(3400);H.exports=function(i,S){i("texttemplate");var x=g.extendFlat({},S.font,{color:"auto",size:"auto"});g.coerceFont(i,"textfont",x)}},35744:function(H,U,e){var g=e(24040),C=e(3400).isArrayOrTypedArray;H.exports=function(S,x,v,p,r,t){var a=[],n=g.traceIs(S,"contour"),f=g.traceIs(S,"histogram"),c=g.traceIs(S,"gl2d"),l,m,h,b=C(x)&&x.length>1;if(b&&!f&&t.type!=="category"){var u=x.length;if(u<=r){if(n||c)a=Array.from(x).slice(0,r);else if(r===1)t.type==="log"?a=[.5*x[0],2*x[0]]:a=[x[0]-.5,x[0]+.5];else if(t.type==="log"){for(a=[Math.pow(x[0],1.5)/Math.pow(x[1],.5)],h=1;h0;)Q=s.c2p(O[se]),se--;for(Q0;)Z=L.c2p(V[se]),se--;Z<$&&(oe=$,$=Z,Z=oe,ee=!0),te&&(Y=O,j=V,O=D.xfill,V=D.yfill);var ge="default";if(ie?ge=ie==="best"?"smooth":"fast":N._islinear&&I===0&&k===0&&m()&&(ge="fast"),ge!=="fast"){var Te=ie==="best"?0:.5;G=Math.max(-Te*s._length,G),Q=Math.min((1+Te)*s._length,Q),$=Math.max(-Te*L._length,$),Z=Math.min((1+Te)*L._length,Z)}var we=Math.round(Q-G),Re=Math.round(Z-$),be=G>=s._length||Q<=0||$>=L._length||Z<=0;if(be){var Ae=z.selectAll("image").data([]);Ae.exit().remove(),o(z);return}var me,Le;ge==="fast"?(me=J,Le=ue):(me=we,Le=Re);var Ve=document.createElement("canvas");Ve.width=me,Ve.height=Le;var Ue=Ve.getContext("2d",{willReadFrequently:!0}),ke=n(N,{noNumericCheck:!0,returnArray:!0}),He,Ie;ge==="fast"?(He=X?function(an){return J-1-an}:v.identity,Ie=ee?function(an){return ue-1-an}:v.identity):(He=function(an){return v.constrain(Math.round(s.c2p(O[an])-G),0,we)},Ie=function(an){return v.constrain(Math.round(L.c2p(V[an])-$),0,Re)});var rt=Ie(0),Ke=[rt,rt],$e=X?0:1,lt=ee?0:1,ht=0,dt=0,xt=0,St=0,nt,ze,Ze,Je,We;function Fe(an,pn){if(an!==void 0){var gn=ke(an);return gn[0]=Math.round(gn[0]),gn[1]=Math.round(gn[1]),gn[2]=Math.round(gn[2]),ht+=pn,dt+=gn[0]*pn,xt+=gn[1]*pn,St+=gn[2]*pn,gn}return[0,0,0,0]}function xe(an,pn,gn,_n){var kn=an[gn.bin0];if(kn===void 0)return Fe(void 0,1);var ni=an[gn.bin1],ci=pn[gn.bin0],di=pn[gn.bin1],li=ni-kn||0,ri=ci-kn||0,wr;return ni===void 0?di===void 0?wr=0:ci===void 0?wr=2*(di-kn):wr=(2*di-ci-kn)*2/3:di===void 0?ci===void 0?wr=0:wr=(2*kn-ni-ci)*2/3:ci===void 0?wr=(2*di-ni-kn)*2/3:wr=di+kn-ni-ci,Fe(kn+gn.frac*li+_n.frac*(ri+gn.frac*wr))}if(ge!=="default"){var ye=0,Ee;try{Ee=new Uint8Array(me*Le*4)}catch{Ee=new Array(me*Le*4)}if(ge==="smooth"){var Me=Y||O,Ne=j||V,je=new Array(Me.length),it=new Array(Ne.length),mt=new Array(we),bt=Y?w:d,vt=j?w:d,Lt,ct,Tt;for(se=0;sevr||vr>L._length))for(ne=Ht;neGe||Ge>s._length)){var Nt=r({x:Ye,y:hr},N,_._fullLayout);Nt.x=Ye,Nt.y=hr;var Ot=D.z[se][ne];Ot===void 0?(Nt.z="",Nt.zLabel=""):(Nt.z=Ot,Nt.zLabel=x.tickText(At,Ot,"hover").text);var Qt=D.text&&D.text[se]&&D.text[se][ne];(Qt===void 0||Qt===!1)&&(Qt=""),Nt.text=Qt;var tr=v.texttemplateString(gt,Nt,_._fullLayout._d3locale,Nt,N._meta||{});if(tr){var fr=tr.split("
    "),rr=fr.length,Vt=0;for(ce=0;ce0&&(r=!0);for(var f=0;fv){var p=v-S[C];return S[C]=v,p}}else return S[C]=v,v;return 0},max:function(C,i,S,x){var v=x[i];if(g(v))if(v=Number(v),g(S[C])){if(S[C]E&&ES){var L=T===C?1:6,M=T===C?"M12":"M1";return function(z,D){var N=b.c2d(z,C,u),I=N.indexOf("-",L);I>0&&(N=N.substr(0,I));var k=b.d2c(N,0,u);if(kp?c>S?c>C*1.1?C:c>i*1.1?i:S:c>x?x:c>v?v:p:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function n(c,l,m,h,b,u){if(h&&c>S){var o=f(l,b,u),d=f(m,b,u),w=c===C?0:1;return o[w]!==d[w]}return Math.floor(m/c)-Math.floor(l/c)>.1}function f(c,l,m){var h=l.c2d(c,C,m).split("-");return h[0]===""&&(h.unshift(),h[0]="-"+h[0]),h}},35852:function(H,U,e){var g=e(38248),C=e(3400),i=e(24040),S=e(54460),x=e(84664),v=e(16964),p=e(10648),r=e(2e3),t=e(67712);function a(m,h){var b=[],u=[],o=h.orientation==="h",d=S.getFromId(m,o?h.yaxis:h.xaxis),w=o?"y":"x",A={x:"y",y:"x"}[w],_=h[w+"calendar"],y=h.cumulative,E,T=n(m,h,d,w),s=T[0],L=T[1],M=typeof s.size=="string",z=[],D=M?z:s,N=[],I=[],k=[],B=0,O=h.histnorm,V=h.histfunc,Y=O.indexOf("density")!==-1,j,te,ie;y.enabled&&Y&&(O=O.replace(/ ?density$/,""),Y=!1);var ue=V==="max"||V==="min",J=ue?null:0,X=v.count,ee=p[O],G=!1,Q=function(Ue){return d.r2c(Ue,0,_)},oe;for(C.isArrayOrTypedArray(h[A])&&V!=="count"&&(oe=h[A],G=V==="avg",X=v[V]),E=Q(s.start),te=Q(s.end)+(E-S.tickIncrement(E,s.size,!1,_))/1e6;E=0&&ie=me;E--)if(u[E]){Le=E;break}for(E=me;E<=Le;E++)if(g(b[E])&&g(u[E])){var Ve={p:b[E],s:u[E],b:0};y.enabled||(Ve.pts=k[E],ne?Ve.ph0=Ve.ph1=k[E].length?L[k[E][0]]:b[E]:(h._computePh=!0,Ve.ph0=Re(z[E]),Ve.ph1=Re(z[E+1],!0))),Ae.push(Ve)}return Ae.length===1&&(Ae[0].width1=S.tickIncrement(Ae[0].p,s.size,!1,_)-Ae[0].p),x(Ae,h),C.isArrayOrTypedArray(h.selectedpoints)&&C.tagSelected(Ae,h,Te),Ae}function n(m,h,b,u,o){var d=u+"bins",w=m._fullLayout,A=h["_"+u+"bingroup"],_=w._histogramBinOpts[A],y=w.barmode==="overlay",E,T,s,L,M,z,D,N=function(we){return b.r2c(we,0,L)},I=function(we){return b.c2r(we,0,L)},k=b.type==="date"?function(we){return we||we===0?C.cleanDate(we,null,L):null}:function(we){return g(we)?Number(we):null};function B(we,Re,be){Re[we+"Found"]?(Re[we]=k(Re[we]),Re[we]===null&&(Re[we]=be[we])):(z[we]=Re[we]=be[we],C.nestedProperty(T[0],d+"."+we).set(be[we]))}if(h["_"+u+"autoBinFinished"])delete h["_"+u+"autoBinFinished"];else{T=_.traces;var O=[],V=!0,Y=!1,j=!1;for(E=0;E"u"){if(o)return[ie,M,!0];ie=f(m,h,b,u,d)}D=s.cumulative||{},D.enabled&&D.currentbin!=="include"&&(D.direction==="decreasing"?ie.start=I(S.tickIncrement(N(ie.start),ie.size,!0,L)):ie.end=I(S.tickIncrement(N(ie.end),ie.size,!1,L))),_.size=ie.size,_.sizeFound||(z.size=ie.size,C.nestedProperty(T[0],d+".size").set(ie.size)),B("start",_,ie),B("end",_,ie)}M=h["_"+u+"pos0"],delete h["_"+u+"pos0"];var J=h._input[d]||{},X=C.extendFlat({},_),ee=_.start,G=b.r2l(J.start),Q=G!==void 0;if((_.startFound||Q)&&G!==b.r2l(ee)){var oe=Q?G:C.aggNums(Math.min,null,M),$={type:b.type==="category"||b.type==="multicategory"?"linear":b.type,r2l:b.r2l,dtick:_.size,tick0:ee,calendar:L,range:[oe,S.tickIncrement(oe,_.size,!1,L)].map(b.l2r)},Z=S.tickFirst($);Z>b.r2l(oe)&&(Z=S.tickIncrement(Z,_.size,!0,L)),X.start=b.l2r(Z),Q||C.nestedProperty(h,d+".start").set(X.start)}var se=_.end,ne=b.r2l(J.end),ce=ne!==void 0;if((_.endFound||ce)&&ne!==b.r2l(se)){var ge=ce?ne:C.aggNums(Math.max,null,M);X.end=b.l2r(ge),ce||C.nestedProperty(h,d+".start").set(X.end)}var Te="autobin"+u;return h._input[Te]===!1&&(h._input[d]=C.extendFlat({},h[d]||{}),delete h._input[Te],delete h[Te]),[X,M]}function f(m,h,b,u,o){var d=m._fullLayout,w=c(m,h),A=!1,_=1/0,y=[h],E,T,s;for(E=0;E=0;u--)A(u);else if(h==="increasing"){for(u=1;u=0;u--)m[u]+=m[u+1];b==="exclude"&&(m.push(0),m.shift())}}H.exports={calc:a,calcAllAutoBins:n}},73316:function(H){H.exports={eventDataKeys:["binNumber"]}},80536:function(H,U,e){var g=e(3400),C=e(79811),i=e(24040).traceIs,S=e(20011),x=e(31508).validateCornerradius,v=g.nestedProperty,p=e(71888).getAxisGroup,r=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],t=["x","y"];H.exports=function(n,f){var c=f._histogramBinOpts={},l=[],m={},h=[],b,u,o,d,w,A,_;function y(ie,ue){return g.coerce(b._input,b,b._module.attributes,ie,ue)}function E(ie){return ie.orientation==="v"?"x":"y"}function T(ie,ue){var J=C.getFromTrace({_fullLayout:f},ie,ue);return J.type}function s(ie,ue,J){var X=ie.uid+"__"+J;ue||(ue=X);var ee=T(ie,J),G=ie[J+"calendar"]||"",Q=c[ue],oe=!0;Q&&(ee===Q.axType&&G===Q.calendar?(oe=!1,Q.traces.push(ie),Q.dirs.push(J)):(ue=X,ee!==Q.axType&&g.warn(["Attempted to group the bins of trace",ie.index,"set on a","type:"+ee,"axis","with bins on","type:"+Q.axType,"axis."].join(" ")),G!==Q.calendar&&g.warn(["Attempted to group the bins of trace",ie.index,"set with a",G,"calendar","with bins",Q.calendar?"on a "+Q.calendar+" calendar":"w/o a set calendar"].join(" ")))),oe&&(c[ue]={traces:[ie],dirs:[J],axType:ee,calendar:ie[J+"calendar"]||""}),ie["_"+J+"bingroup"]=ue}for(w=0;wN&&L.splice(N,L.length-N),D.length>N&&D.splice(N,D.length-N);var I=[],k=[],B=[],O=typeof s.size=="string",V=typeof z.size=="string",Y=[],j=[],te=O?Y:s,ie=V?j:z,ue=0,J=[],X=[],ee=c.histnorm,G=c.histfunc,Q=ee.indexOf("density")!==-1,oe=G==="max"||G==="min",$=oe?null:0,Z=i.count,se=S[ee],ne=!1,ce=[],ge=[],Te="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Te&&G!=="count"&&(ne=G==="avg",Z=i[G]);var we=s.size,Re=u(s.start),be=u(s.end)+(Re-C.tickIncrement(Re,we,!1,h))/1e6;for(A=Re;A=0&&y=0&&E-1,flipY:k.tiling.flip.indexOf("y")>-1,orientation:k.tiling.orientation,pad:{inner:k.tiling.pad},maxDepth:k._maxDepth}),j=Y.descendants(),te=1/0,ie=-1/0;j.forEach(function(G){var Q=G.depth;Q>=k._maxDepth?(G.x0=G.x1=(G.x0+G.x1)/2,G.y0=G.y1=(G.y0+G.y1)/2):(te=Math.min(te,Q),ie=Math.max(ie,Q))}),h=h.data(j,r.getPtId),k._maxVisibleLayers=isFinite(ie)?ie-te+1:0,h.enter().append("g").classed("slice",!0),T(h,n,z,[u,o],A),h.order();var ue=null;if(E&&M){var J=r.getPtId(M);h.each(function(G){ue===null&&r.getPtId(G)===J&&(ue={x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1})})}var X=function(){return ue||{x0:0,x1:u,y0:0,y1:o}},ee=h;return E&&(ee=ee.transition().each("end",function(){var G=g.select(this);r.setSliceCursor(G,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),ee.each(function(G){G._x0=d(G.x0),G._x1=d(G.x1),G._y0=w(G.y0),G._y1=w(G.y1),G._hoverX=d(G.x1-k.tiling.pad),G._hoverY=w(V?G.y1-k.tiling.pad/2:G.y0+k.tiling.pad/2);var Q=g.select(this),oe=C.ensureSingle(Q,"path","surface",function(ne){ne.style("pointer-events",D?"none":"all")});E?oe.transition().attrTween("d",function(ne){var ce=s(ne,n,X(),[u,o],{orientation:k.tiling.orientation,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1});return function(ge){return A(ce(ge))}}):oe.attr("d",A),Q.call(t,m,c,l,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{isTransitioning:c._transitioning}),oe.call(v,G,k,c,{hovered:!1}),G.x0===G.x1||G.y0===G.y1?G._text="":G._text=a(G,m,k,l,N)||"";var $=C.ensureSingle(Q,"g","slicetext"),Z=C.ensureSingle($,"text","",function(ne){ne.attr("data-notex",1)}),se=C.ensureUniformFontSize(c,r.determineTextFont(k,G,N.font));Z.text(G._text||" ").classed("slicetext",!0).attr("text-anchor",O?"end":B?"start":"middle").call(i.font,se).call(S.convertToTspans,c),G.textBB=i.bBox(Z.node()),G.transform=_(G,{fontSize:se.size}),G.transform.fontSize=se.size,E?Z.transition().attrTween("transform",function(ne){var ce=L(ne,n,X(),[u,o]);return function(ge){return y(ce(ge))}}):Z.attr("transform",y(G))}),ue}},29044:function(H,U,e){H.exports={moduleType:"trace",name:"icicle",basePlotModule:e(59564),categories:[],animatable:!0,attributes:e(97376),layoutAttributes:e(90676),supplyDefaults:e(7045),supplyLayoutDefaults:e(4304),calc:e(73876).r,crossTraceCalc:e(73876).q,plot:e(38364),style:e(47192).style,colorbar:e(5528),meta:{}}},90676:function(H){H.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},4304:function(H,U,e){var g=e(3400),C=e(90676);H.exports=function(S,x){function v(p,r){return g.coerce(S,x,C,p,r)}v("iciclecolorway",x.colorway),v("extendiciclecolors")}},25132:function(H,U,e){var g=e(74148),C=e(83024);H.exports=function(S,x,v){var p=v.flipX,r=v.flipY,t=v.orientation==="h",a=v.maxDepth,n=x[0],f=x[1];a&&(n=(S.height+1)*x[0]/Math.min(S.height+1,a),f=(S.height+1)*x[1]/Math.min(S.height+1,a));var c=g.partition().padding(v.pad.inner).size(t?[x[1],n]:[x[0],f])(S);return(t||p||r)&&C(c,x,{swapXY:t,flipX:p,flipY:r}),c}},38364:function(H,U,e){var g=e(95808),C=e(67880);H.exports=function(S,x,v,p){return g(S,x,v,p,{type:"icicle",drawDescendants:C})}},47192:function(H,U,e){var g=e(33428),C=e(76308),i=e(3400),S=e(82744).resizeText,x=e(60404);function v(r){var t=r._fullLayout._iciclelayer.selectAll(".trace");S(r,t,"icicle"),t.each(function(a){var n=g.select(this),f=a[0],c=f.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(l){g.select(this).call(p,l,c,r)})})}function p(r,t,a,n){var f=t.data.data,c=!t.children,l=f.i,m=i.castOption(a,l,"marker.line.color")||C.defaultLine,h=i.castOption(a,l,"marker.line.width")||0;r.call(x,t,a,n).style("stroke-width",h).call(C.stroke,m).style("opacity",c?a.leaf.opacity:null)}H.exports={style:v,styleOne:p}},95188:function(H,U,e){for(var g=e(45464),C=e(21776).Ks,i=e(92880).extendFlat,S=e(47797).colormodel,x=["rgb","rgba","rgba256","hsl","hsla"],v=[],p=[],r=0;r0||g.inbox(r-t.y0,r-(t.y0+t.h*a.dy),0)>0)){var c=Math.floor((p-t.x0)/a.dx),l=Math.floor(Math.abs(r-t.y0)/a.dy),m;if(a._hasZ?m=t.z[l][c]:a._hasSource&&(m=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,l,1,1).data),!!m){var h=t.hi||a.hoverinfo,b;if(h){var u=h.split("+");u.indexOf("all")!==-1&&(u=["color"]),u.indexOf("color")!==-1&&(b=!0)}var o=S.colormodel[a.colormodel],d=o.colormodel||a.colormodel,w=d.length,A=a._scaler(m),_=o.suffix,y=[];(a.hovertemplate||b)&&(y.push("["+[A[0]+_[0],A[1]+_[1],A[2]+_[2]].join(", ")),w===4&&y.push(", "+A[3]+_[3]),y.push("]"),y=y.join(""),v.extraText=d.toUpperCase()+": "+y);var E;i(a.hovertext)&&i(a.hovertext[l])?E=a.hovertext[l][c]:i(a.text)&&i(a.text[l])&&(E=a.text[l][c]);var T=f.c2p(t.y0+(l+.5)*a.dy),s=t.x0+(c+.5)*a.dx,L=t.y0+(l+.5)*a.dy,M="["+m.slice(0,a.colormodel.length).join(", ")+"]";return[C.extendFlat(v,{index:[l,c],x0:n.c2p(t.x0+c*a.dx),x1:n.c2p(t.x0+(c+1)*a.dx),y0:T,y1:T,color:A,xVal:s,xLabelVal:s,yVal:L,yLabelVal:L,zLabelVal:M,text:E,hovertemplateLabels:{zLabel:M,colorLabel:y,"color[0]Label":A[0]+_[0],"color[1]Label":A[1]+_[1],"color[2]Label":A[2]+_[2],"color[3]Label":A[3]+_[3]}})]}}}},48928:function(H,U,e){H.exports={attributes:e(95188),supplyDefaults:e(13188),calc:e(93336),plot:e(63715),style:e(28576),hoverPoints:e(24892),eventData:e(79972),moduleType:"trace",name:"image",basePlotModule:e(57952),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},63715:function(H,U,e){var g=e(33428),C=e(3400),i=C.strTranslate,S=e(9616),x=e(47797),v=e(9188),p=e(2264).STYLE;H.exports=function(t,a,n,f){var c=a.xaxis,l=a.yaxis,m=!t._context._exportedPlot&&v();C.makeTraceGroups(f,n,"im").each(function(h){var b=g.select(this),u=h[0],o=u.trace,d=(o.zsmooth==="fast"||o.zsmooth===!1&&m)&&!o._hasZ&&o._hasSource&&c.type==="linear"&&l.type==="linear";o._realImage=d;var w=u.z,A=u.x0,_=u.y0,y=u.w,E=u.h,T=o.dx,s=o.dy,L,M,z,D,N,I;for(I=0;L===void 0&&I0;)M=c.c2p(A+I*T),I--;for(I=0;D===void 0&&I0;)N=l.c2p(_+I*s),I--;if(MJ[0];if(X||ee){var G=L+B/2,Q=D+O/2;ie+="transform:"+i(G+"px",Q+"px")+"scale("+(X?-1:1)+","+(ee?-1:1)+")"+i(-G+"px",-Q+"px")+";"}}te.attr("style",ie);var oe=new Promise(function($){if(o._hasZ)$();else if(o._hasSource)if(o._canvas&&o._canvas.el.width===y&&o._canvas.el.height===E&&o._canvas.source===o.source)$();else{var Z=document.createElement("canvas");Z.width=y,Z.height=E;var se=Z.getContext("2d",{willReadFrequently:!0});o._image=o._image||new Image;var ne=o._image;ne.onload=function(){se.drawImage(ne,0,0),o._canvas={el:Z,source:o.source},$()},ne.setAttribute("src",o.source)}}).then(function(){var $,Z;if(o._hasZ)Z=j(function(ce,ge){var Te=w[ge][ce];return C.isTypedArray(Te)&&(Te=Array.from(Te)),Te}),$=Z.toDataURL("image/png");else if(o._hasSource)if(d)$=o.source;else{var se=o._canvas.el.getContext("2d",{willReadFrequently:!0}),ne=se.getImageData(0,0,y,E).data;Z=j(function(ce,ge){var Te=4*(ge*y+ce);return[ne[Te],ne[Te+1],ne[Te+2],ne[Te+3]]}),$=Z.toDataURL("image/png")}te.attr({"xlink:href":$,height:O,width:B,x:L,y:D})});t._promises.push(oe)})}},28576:function(H,U,e){var g=e(33428);H.exports=function(i){g.select(i).selectAll(".im image").style("opacity",function(S){return S[0].trace.opacity})}},89864:function(H,U,e){var g=e(92880).extendFlat,C=e(92880).extendDeep,i=e(67824).overrideAll,S=e(25376),x=e(22548),v=e(86968).u,p=e(94724),r=e(31780).templatedArray,t=e(48164),a=e(29736).descriptionOnlyNumbers,n=S({editType:"plot",colorEditType:"plot"}),f={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:x.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},c={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},l=r("step",C({},f,{range:c}));H.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:v({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:g({},n,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:a("value")},font:g({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:a("value")},increasing:{symbol:{valType:"string",dflt:t.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:t.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:t.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:t.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:g({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:C({},f,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:x.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:i({range:c,visible:g({},p.visible,{dflt:!0}),tickmode:p.minor.tickmode,nticks:p.nticks,tick0:p.tick0,dtick:p.dtick,tickvals:p.tickvals,ticktext:p.ticktext,ticks:g({},p.ticks,{dflt:"outside"}),ticklen:p.ticklen,tickwidth:p.tickwidth,tickcolor:p.tickcolor,ticklabelstep:p.ticklabelstep,showticklabels:p.showticklabels,labelalias:p.labelalias,tickfont:S({}),tickangle:p.tickangle,tickformat:p.tickformat,tickformatstops:p.tickformatstops,tickprefix:p.tickprefix,showtickprefix:p.showtickprefix,ticksuffix:p.ticksuffix,showticksuffix:p.showticksuffix,separatethousands:p.separatethousands,exponentformat:p.exponentformat,minexponent:p.minexponent,showexponent:p.showexponent,editType:"plot"},"plot"),steps:l,threshold:{line:{color:g({},f.line.color,{}),width:g({},f.line.width,{dflt:1}),editType:"plot"},thickness:g({},f.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},92728:function(H,U,e){var g=e(7316);U.name="indicator",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},79136:function(H){function U(e,g){var C=[],i=g.value;typeof g._lastValue!="number"&&(g._lastValue=g.value);var S=g._lastValue,x=S;return g._hasDelta&&typeof g.delta.reference=="number"&&(x=g.delta.reference),C[0]={y:i,lastY:S,delta:i-x,relativeDelta:(i-x)/x},C}H.exports={calc:U}},12096:function(H){H.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},20424:function(H,U,e){var g=e(3400),C=e(89864),i=e(86968).Q,S=e(31780),x=e(51272),v=e(12096),p=e(26332),r=e(25404),t=e(95936),a=e(42568);function n(c,l,m,h){function b(N,I){return g.coerce(c,l,C,N,I)}i(l,h,b),b("mode"),l._hasNumber=l.mode.indexOf("number")!==-1,l._hasDelta=l.mode.indexOf("delta")!==-1,l._hasGauge=l.mode.indexOf("gauge")!==-1;var u=b("value");l._range=[0,typeof u=="number"?1.5*u:1];var o=new Array(2),d;l._hasNumber&&(b("number.valueformat"),b("number.font.color",h.font.color),b("number.font.family",h.font.family),b("number.font.size"),l.number.font.size===void 0&&(l.number.font.size=v.defaultNumberFontSize,o[0]=!0),b("number.prefix"),b("number.suffix"),d=l.number.font.size);var w;l._hasDelta&&(b("delta.font.color",h.font.color),b("delta.font.family",h.font.family),b("delta.font.size"),l.delta.font.size===void 0&&(l.delta.font.size=(l._hasNumber?.5:1)*(d||v.defaultNumberFontSize),o[1]=!0),b("delta.reference",l.value),b("delta.relative"),b("delta.valueformat",l.delta.relative?"2%":""),b("delta.increasing.symbol"),b("delta.increasing.color"),b("delta.decreasing.symbol"),b("delta.decreasing.color"),b("delta.position"),b("delta.prefix"),b("delta.suffix"),w=l.delta.font.size),l._scaleNumbers=(!l._hasNumber||o[0])&&(!l._hasDelta||o[1])||!1,b("title.font.color",h.font.color),b("title.font.family",h.font.family),b("title.font.size",.25*(d||w||v.defaultNumberFontSize)),b("title.text");var A,_,y,E;function T(N,I){return g.coerce(A,_,C.gauge,N,I)}function s(N,I){return g.coerce(y,E,C.gauge.axis,N,I)}if(l._hasGauge){A=c.gauge,A||(A={}),_=S.newContainer(l,"gauge"),T("shape");var L=l._isBullet=l.gauge.shape==="bullet";L||b("title.align","center");var M=l._isAngular=l.gauge.shape==="angular";M||b("align","center"),T("bgcolor",h.paper_bgcolor),T("borderwidth"),T("bordercolor"),T("bar.color"),T("bar.line.color"),T("bar.line.width");var z=v.valueThickness*(l.gauge.shape==="bullet"?.5:1);T("bar.thickness",z),x(A,_,{name:"steps",handleItemDefaults:f}),T("threshold.value"),T("threshold.thickness"),T("threshold.line.width"),T("threshold.line.color"),y={},A&&(y=A.axis||{}),E=S.newContainer(_,"axis"),s("visible"),l._range=s("range",l._range);var D={noAutotickangles:!0,outerTicks:!0};p(y,E,s,"linear"),a(y,E,s,"linear",D),t(y,E,s,"linear",D),r(y,E,s,D)}else b("title.align","center"),b("align","center"),l._isAngular=l._isBullet=!1;l._length=null}function f(c,l){function m(h,b){return g.coerce(c,l,C.gauge.steps,h,b)}m("color"),m("line.color"),m("line.width"),m("range"),m("thickness")}H.exports={supplyDefaults:n}},43480:function(H,U,e){H.exports={moduleType:"trace",name:"indicator",basePlotModule:e(92728),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:e(89864),supplyDefaults:e(20424).supplyDefaults,calc:e(79136).calc,plot:e(97864),meta:{}}},97864:function(H,U,e){var g=e(33428),C=e(67756).qy,i=e(67756).Gz,S=e(3400),x=S.strScale,v=S.strTranslate,p=S.rad2deg,r=e(84284).MID_SHIFT,t=e(43616),a=e(12096),n=e(72736),f=e(54460),c=e(28336),l=e(37668),m=e(94724),h=e(76308),b={left:"start",center:"middle",right:"end"},u={left:0,center:.5,right:1},o=/[yzafpnµmkMGTPEZY]/;function d(D){return D&&D.duration>0}H.exports=function(N,I,k,B){var O=N._fullLayout,V;d(k)&&B&&(V=B()),S.makeTraceGroups(O._indicatorlayer,I,"trace").each(function(Y){var j=Y[0],te=j.trace,ie=g.select(this),ue=te._hasGauge,J=te._isAngular,X=te._isBullet,ee=te.domain,G={w:O._size.w*(ee.x[1]-ee.x[0]),h:O._size.h*(ee.y[1]-ee.y[0]),l:O._size.l+O._size.w*ee.x[0],r:O._size.r+O._size.w*(1-ee.x[1]),t:O._size.t+O._size.h*(1-ee.y[1]),b:O._size.b+O._size.h*ee.y[0]},Q=G.l+G.w/2,oe=G.t+G.h/2,$=Math.min(G.w/2,G.h),Z=a.innerRadius*$,se,ne,ce,ge=te.align||"center";if(ne=oe,!ue)se=G.l+u[ge]*G.w,ce=function(ke){return s(ke,G.w,G.h)};else if(J&&(se=Q,ne=oe+$/2,ce=function(ke){return L(ke,.9*Z)}),X){var Te=a.bulletPadding,we=1-a.bulletNumberDomainSize+Te;se=G.l+(we+(1-we)*u[ge])*G.w,ce=function(ke){return s(ke,(a.bulletNumberDomainSize-Te)*G.w,G.h)}}_(N,ie,Y,{numbersX:se,numbersY:ne,numbersScaler:ce,transitionOpts:k,onComplete:V});var Re,be;ue&&(Re={range:te.gauge.axis.range,color:te.gauge.bgcolor,line:{color:te.gauge.bordercolor,width:0},thickness:1},be={range:te.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:te.gauge.bordercolor,width:te.gauge.borderwidth},thickness:1});var Ae=ie.selectAll("g.angular").data(J?Y:[]);Ae.exit().remove();var me=ie.selectAll("g.angularaxis").data(J?Y:[]);me.exit().remove(),J&&A(N,ie,Y,{radius:$,innerRadius:Z,gauge:Ae,layer:me,size:G,gaugeBg:Re,gaugeOutline:be,transitionOpts:k,onComplete:V});var Le=ie.selectAll("g.bullet").data(X?Y:[]);Le.exit().remove();var Ve=ie.selectAll("g.bulletaxis").data(X?Y:[]);Ve.exit().remove(),X&&w(N,ie,Y,{gauge:Le,layer:Ve,size:G,gaugeBg:Re,gaugeOutline:be,transitionOpts:k,onComplete:V});var Ue=ie.selectAll("text.title").data(Y);Ue.exit().remove(),Ue.enter().append("text").classed("title",!0),Ue.attr("text-anchor",function(){return X?b.right:b[te.title.align]}).text(te.title.text).call(t.font,te.title.font).call(n.convertToTspans,N),Ue.attr("transform",function(){var ke=G.l+G.w*u[te.title.align],He,Ie=a.titlePadding,rt=t.bBox(Ue.node());if(ue){if(J)if(te.gauge.axis.visible){var Ke=t.bBox(me.node());He=Ke.top-Ie-rt.bottom}else He=G.t+G.h/2-$/2-rt.bottom-Ie;X&&(He=ne-(rt.top+rt.bottom)/2,ke=G.l-a.bulletPadding*G.w)}else He=te._numbersTop-Ie-rt.bottom;return v(ke,He)})})};function w(D,N,I,k){var B=I[0].trace,O=k.gauge,V=k.layer,Y=k.gaugeBg,j=k.gaugeOutline,te=k.size,ie=B.domain,ue=k.transitionOpts,J=k.onComplete,X,ee,G,Q,oe;O.enter().append("g").classed("bullet",!0),O.attr("transform",v(te.l,te.t)),V.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),V.selectAll("g.xbulletaxistick,path,text").remove();var $=te.h,Z=B.gauge.bar.thickness*$,se=ie.x[0],ne=ie.x[0]+(ie.x[1]-ie.x[0])*(B._hasNumber||B._hasDelta?1-a.bulletNumberDomainSize:1);X=T(D,B.gauge.axis),X._id="xbulletaxis",X.domain=[se,ne],X.setScale(),ee=f.calcTicks(X),G=f.makeTransTickFn(X),Q=f.getTickSigns(X)[2],oe=te.t+te.h,X.visible&&(f.drawTicks(D,X,{vals:X.ticks==="inside"?f.clipEnds(X,ee):ee,layer:V,path:f.makeTickPath(X,oe,Q),transFn:G}),f.drawLabels(D,X,{vals:ee,layer:V,transFn:G,labelFns:f.makeLabelFns(X,oe)}));function ce(me){me.attr("width",function(Le){return Math.max(0,X.c2p(Le.range[1])-X.c2p(Le.range[0]))}).attr("x",function(Le){return X.c2p(Le.range[0])}).attr("y",function(Le){return .5*(1-Le.thickness)*$}).attr("height",function(Le){return Le.thickness*$})}var ge=[Y].concat(B.gauge.steps),Te=O.selectAll("g.bg-bullet").data(ge);Te.enter().append("g").classed("bg-bullet",!0).append("rect"),Te.select("rect").call(ce).call(y),Te.exit().remove();var we=O.selectAll("g.value-bullet").data([B.gauge.bar]);we.enter().append("g").classed("value-bullet",!0).append("rect"),we.select("rect").attr("height",Z).attr("y",($-Z)/2).call(y),d(ue)?we.select("rect").transition().duration(ue.duration).ease(ue.easing).each("end",function(){J&&J()}).each("interrupt",function(){J&&J()}).attr("width",Math.max(0,X.c2p(Math.min(B.gauge.axis.range[1],I[0].y)))):we.select("rect").attr("width",typeof I[0].y=="number"?Math.max(0,X.c2p(Math.min(B.gauge.axis.range[1],I[0].y))):0),we.exit().remove();var Re=I.filter(function(){return B.gauge.threshold.value||B.gauge.threshold.value===0}),be=O.selectAll("g.threshold-bullet").data(Re);be.enter().append("g").classed("threshold-bullet",!0).append("line"),be.select("line").attr("x1",X.c2p(B.gauge.threshold.value)).attr("x2",X.c2p(B.gauge.threshold.value)).attr("y1",(1-B.gauge.threshold.thickness)/2*$).attr("y2",(1-(1-B.gauge.threshold.thickness)/2)*$).call(h.stroke,B.gauge.threshold.line.color).style("stroke-width",B.gauge.threshold.line.width),be.exit().remove();var Ae=O.selectAll("g.gauge-outline").data([j]);Ae.enter().append("g").classed("gauge-outline",!0).append("rect"),Ae.select("rect").call(ce).call(y),Ae.exit().remove()}function A(D,N,I,k){var B=I[0].trace,O=k.size,V=k.radius,Y=k.innerRadius,j=k.gaugeBg,te=k.gaugeOutline,ie=[O.l+O.w/2,O.t+O.h/2+V/2],ue=k.gauge,J=k.layer,X=k.transitionOpts,ee=k.onComplete,G=Math.PI/2;function Q($e){var lt=B.gauge.axis.range[0],ht=B.gauge.axis.range[1],dt=($e-lt)/(ht-lt)*Math.PI-G;return dt<-G?-G:dt>G?G:dt}function oe($e){return g.svg.arc().innerRadius((Y+V)/2-$e/2*(V-Y)).outerRadius((Y+V)/2+$e/2*(V-Y)).startAngle(-G)}function $($e){$e.attr("d",function(lt){return oe(lt.thickness).startAngle(Q(lt.range[0])).endAngle(Q(lt.range[1]))()})}var Z,se,ne,ce;ue.enter().append("g").classed("angular",!0),ue.attr("transform",v(ie[0],ie[1])),J.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),J.selectAll("g.xangularaxistick,path,text").remove(),Z=T(D,B.gauge.axis),Z.type="linear",Z.range=B.gauge.axis.range,Z._id="xangularaxis",Z.ticklabeloverflow="allow",Z.setScale();var ge=function($e){return(Z.range[0]-$e.x)/(Z.range[1]-Z.range[0])*Math.PI+Math.PI},Te={},we=f.makeLabelFns(Z,0),Re=we.labelStandoff;Te.xFn=function($e){var lt=ge($e);return Math.cos(lt)*Re},Te.yFn=function($e){var lt=ge($e),ht=Math.sin(lt)>0?.2:1;return-Math.sin(lt)*(Re+$e.fontSize*ht)+Math.abs(Math.cos(lt))*($e.fontSize*r)},Te.anchorFn=function($e){var lt=ge($e),ht=Math.cos(lt);return Math.abs(ht)<.1?"middle":ht>0?"start":"end"},Te.heightFn=function($e,lt,ht){var dt=ge($e);return-.5*(1+Math.sin(dt))*ht};var be=function($e){return v(ie[0]+V*Math.cos($e),ie[1]-V*Math.sin($e))};ne=function($e){return be(ge($e))};var Ae=function($e){var lt=ge($e);return be(lt)+"rotate("+-p(lt)+")"};if(se=f.calcTicks(Z),ce=f.getTickSigns(Z)[2],Z.visible){ce=Z.ticks==="inside"?-1:1;var me=(Z.linewidth||1)/2;f.drawTicks(D,Z,{vals:se,layer:J,path:"M"+ce*me+",0h"+ce*Z.ticklen,transFn:Ae}),f.drawLabels(D,Z,{vals:se,layer:J,transFn:ne,labelFns:Te})}var Le=[j].concat(B.gauge.steps),Ve=ue.selectAll("g.bg-arc").data(Le);Ve.enter().append("g").classed("bg-arc",!0).append("path"),Ve.select("path").call($).call(y),Ve.exit().remove();var Ue=oe(B.gauge.bar.thickness),ke=ue.selectAll("g.value-arc").data([B.gauge.bar]);ke.enter().append("g").classed("value-arc",!0).append("path");var He=ke.select("path");d(X)?(He.transition().duration(X.duration).ease(X.easing).each("end",function(){ee&&ee()}).each("interrupt",function(){ee&&ee()}).attrTween("d",E(Ue,Q(I[0].lastY),Q(I[0].y))),B._lastValue=I[0].y):He.attr("d",typeof I[0].y=="number"?Ue.endAngle(Q(I[0].y)):"M0,0Z"),He.call(y),ke.exit().remove(),Le=[];var Ie=B.gauge.threshold.value;(Ie||Ie===0)&&Le.push({range:[Ie,Ie],color:B.gauge.threshold.color,line:{color:B.gauge.threshold.line.color,width:B.gauge.threshold.line.width},thickness:B.gauge.threshold.thickness});var rt=ue.selectAll("g.threshold-arc").data(Le);rt.enter().append("g").classed("threshold-arc",!0).append("path"),rt.select("path").call($).call(y),rt.exit().remove();var Ke=ue.selectAll("g.gauge-outline").data([te]);Ke.enter().append("g").classed("gauge-outline",!0).append("path"),Ke.select("path").call($).call(y),Ke.exit().remove()}function _(D,N,I,k){var B=I[0].trace,O=k.numbersX,V=k.numbersY,Y=B.align||"center",j=b[Y],te=k.transitionOpts,ie=k.onComplete,ue=S.ensureSingle(N,"g","numbers"),J,X,ee,G=[];B._hasNumber&&G.push("number"),B._hasDelta&&(G.push("delta"),B.delta.position==="left"&&G.reverse());var Q=ue.selectAll("text").data(G);Q.enter().append("text"),Q.attr("text-anchor",function(){return j}).attr("class",function(be){return be}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Q.exit().remove();function oe(be,Ae,me,Le){if(be.match("s")&&me>=0!=Le>=0&&!Ae(me).slice(-1).match(o)&&!Ae(Le).slice(-1).match(o)){var Ve=be.slice().replace("s","f").replace(/\d+/,function(ke){return parseInt(ke)-1}),Ue=T(D,{tickformat:Ve});return function(ke){return Math.abs(ke)<1?f.tickText(Ue,ke).text:Ae(ke)}}else return Ae}function $(){var be=T(D,{tickformat:B.number.valueformat},B._range);be.setScale(),f.prepTicks(be);var Ae=function(ke){return f.tickText(be,ke).text},me=B.number.suffix,Le=B.number.prefix,Ve=ue.select("text.number");function Ue(){var ke=typeof I[0].y=="number"?Le+Ae(I[0].y)+me:"-";Ve.text(ke).call(t.font,B.number.font).call(n.convertToTspans,D)}return d(te)?Ve.transition().duration(te.duration).ease(te.easing).each("end",function(){Ue(),ie&&ie()}).each("interrupt",function(){Ue(),ie&&ie()}).attrTween("text",function(){var ke=g.select(this),He=i(I[0].lastY,I[0].y);B._lastValue=I[0].y;var Ie=oe(B.number.valueformat,Ae,I[0].lastY,I[0].y);return function(rt){ke.text(Le+Ie(He(rt))+me)}}):Ue(),J=M(Le+Ae(I[0].y)+me,B.number.font,j,D),Ve}function Z(){var be=T(D,{tickformat:B.delta.valueformat},B._range);be.setScale(),f.prepTicks(be);var Ae=function(rt){return f.tickText(be,rt).text},me=B.delta.suffix,Le=B.delta.prefix,Ve=function(rt){var Ke=B.delta.relative?rt.relativeDelta:rt.delta;return Ke},Ue=function(rt,Ke){return rt===0||typeof rt!="number"||isNaN(rt)?"-":(rt>0?B.delta.increasing.symbol:B.delta.decreasing.symbol)+Le+Ke(rt)+me},ke=function(rt){return rt.delta>=0?B.delta.increasing.color:B.delta.decreasing.color};B._deltaLastValue===void 0&&(B._deltaLastValue=Ve(I[0]));var He=ue.select("text.delta");He.call(t.font,B.delta.font).call(h.fill,ke({delta:B._deltaLastValue}));function Ie(){He.text(Ue(Ve(I[0]),Ae)).call(h.fill,ke(I[0])).call(n.convertToTspans,D)}return d(te)?He.transition().duration(te.duration).ease(te.easing).tween("text",function(){var rt=g.select(this),Ke=Ve(I[0]),$e=B._deltaLastValue,lt=oe(B.delta.valueformat,Ae,$e,Ke),ht=i($e,Ke);return B._deltaLastValue=Ke,function(dt){rt.text(Ue(ht(dt),lt)),rt.call(h.fill,ke({delta:ht(dt)}))}}).each("end",function(){Ie(),ie&&ie()}).each("interrupt",function(){Ie(),ie&&ie()}):Ie(),X=M(Ue(Ve(I[0]),Ae),B.delta.font,j,D),He}var se=B.mode+B.align,ne;if(B._hasDelta&&(ne=Z(),se+=B.delta.position+B.delta.font.size+B.delta.font.family+B.delta.valueformat,se+=B.delta.increasing.symbol+B.delta.decreasing.symbol,ee=X),B._hasNumber&&($(),se+=B.number.font.size+B.number.font.family+B.number.valueformat+B.number.suffix+B.number.prefix,ee=J),B._hasDelta&&B._hasNumber){var ce=[(J.left+J.right)/2,(J.top+J.bottom)/2],ge=[(X.left+X.right)/2,(X.top+X.bottom)/2],Te,we,Re=.75*B.delta.font.size;B.delta.position==="left"&&(Te=z(B,"deltaPos",0,-1*(J.width*u[B.align]+X.width*(1-u[B.align])+Re),se,Math.min),we=ce[1]-ge[1],ee={width:J.width+X.width+Re,height:Math.max(J.height,X.height),left:X.left+Te,right:J.right,top:Math.min(J.top,X.top+we),bottom:Math.max(J.bottom,X.bottom+we)}),B.delta.position==="right"&&(Te=z(B,"deltaPos",0,J.width*(1-u[B.align])+X.width*u[B.align]+Re,se,Math.max),we=ce[1]-ge[1],ee={width:J.width+X.width+Re,height:Math.max(J.height,X.height),left:J.left,right:X.right+Te,top:Math.min(J.top,X.top+we),bottom:Math.max(J.bottom,X.bottom+we)}),B.delta.position==="bottom"&&(Te=null,we=X.height,ee={width:Math.max(J.width,X.width),height:J.height+X.height,left:Math.min(J.left,X.left),right:Math.max(J.right,X.right),top:J.bottom-J.height,bottom:J.bottom+X.height}),B.delta.position==="top"&&(Te=null,we=J.top,ee={width:Math.max(J.width,X.width),height:J.height+X.height,left:Math.min(J.left,X.left),right:Math.max(J.right,X.right),top:J.bottom-J.height-X.height,bottom:J.bottom}),ne.attr({dx:Te,dy:we})}(B._hasNumber||B._hasDelta)&&ue.attr("transform",function(){var be=k.numbersScaler(ee);se+=be[2];var Ae=z(B,"numbersScale",1,be[0],se,Math.min),me;B._scaleNumbers||(Ae=1),B._isAngular?me=V-Ae*ee.bottom:me=V-Ae*(ee.top+ee.bottom)/2,B._numbersTop=Ae*ee.top+me;var Le=ee[Y];Y==="center"&&(Le=(ee.left+ee.right)/2);var Ve=O-Ae*Le;return Ve=z(B,"numbersTranslate",0,Ve,se,Math.max),v(Ve,me)+x(Ae)})}function y(D){D.each(function(N){h.stroke(g.select(this),N.line.color)}).each(function(N){h.fill(g.select(this),N.color)}).style("stroke-width",function(N){return N.line.width})}function E(D,N,I){return function(){var k=C(N,I);return function(B){return D.endAngle(k(B))()}}}function T(D,N,I){var k=D._fullLayout,B=S.extendFlat({type:"linear",ticks:"outside",range:I,showline:!0},N),O={type:"linear",_id:"x"+N._id},V={letter:"x",font:k.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function Y(j,te){return S.coerce(B,O,m,j,te)}return c(B,O,Y,V,k),l(B,O,Y,V),O}function s(D,N,I){var k=Math.min(N/D.width,I/D.height);return[k,D,N+"x"+I]}function L(D,N){var I=Math.sqrt(D.width/2*(D.width/2)+D.height*D.height),k=N/I;return[k,D,N]}function M(D,N,I,k){var B=document.createElementNS("http://www.w3.org/2000/svg","text"),O=g.select(B);return O.text(D).attr("x",0).attr("y",0).attr("text-anchor",I).attr("data-unformatted",D).call(n.convertToTspans,k).call(t.font,N),t.bBox(O.node())}function z(D,N,I,k,B,O){var V="_cache"+N;D[V]&&D[V].key===B||(D[V]={key:B,value:I});var Y=S.aggNums(O,null,[D[V].value,k],2);return D[V].value=Y,Y}},50048:function(H,U,e){var g=e(49084),C=e(29736).axisHoverFormat,i=e(21776).Ks,S=e(52948),x=e(45464),v=e(92880).extendFlat,p=e(67824).overrideAll;function r(n){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function t(n){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var a=H.exports=p(v({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:r(),y:r(),z:r()},caps:{x:t(),y:t(),z:t()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:i(),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),valuehoverformat:C("value",1),showlegend:v({},x.showlegend,{dflt:!1})},g("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:S.opacity,lightposition:S.lightposition,lighting:S.lighting,flatshading:S.flatshading,contour:S.contour,hoverinfo:v({},x.hoverinfo)}),"calc","nested");a.flatshading.dflt=!0,a.lighting.facenormalsepsilon.dflt=0,a.x.editType=a.y.editType=a.z.editType=a.value.editType="calc+clearAxisTypes",a.transforms=void 0},62624:function(H,U,e){var g=e(47128),C=e(3832).processGrid,i=e(3832).filter;H.exports=function(x,v){v._len=Math.min(v.x.length,v.y.length,v.z.length,v.value.length),v._x=i(v.x,v._len),v._y=i(v.y,v._len),v._z=i(v.z,v._len),v._value=i(v.value,v._len);var p=C(v);v._gridFill=p.fill,v._Xs=p.Xs,v._Ys=p.Ys,v._Zs=p.Zs,v._len=p.len;for(var r=1/0,t=-1/0,a=0;a0;m--){var h=Math.min(l[m],l[m-1]),b=Math.max(l[m],l[m-1]);if(b>h&&h-1}function Z(Je,We){return Je===null?We:Je}function se(Je,We,Fe){te();var xe=[We],ye=[Fe];if(G>=1)xe=[We],ye=[Fe];else if(G>0){var Ee=oe(We,Fe);xe=Ee.xyzv,ye=Ee.abc}for(var Me=0;Me-1?Fe[je]:j(it,mt,bt);Lt>-1?Ne[je]=Lt:Ne[je]=ue(it,mt,bt,Z(Je,vt))}J(Ne[0],Ne[1],Ne[2])}}function ne(Je,We,Fe){var xe=function(ye,Ee,Me){se(Je,[We[ye],We[Ee],We[Me]],[Fe[ye],Fe[Ee],Fe[Me]])};xe(0,1,2),xe(2,3,0)}function ce(Je,We,Fe){var xe=function(ye,Ee,Me){se(Je,[We[ye],We[Ee],We[Me]],[Fe[ye],Fe[Ee],Fe[Me]])};xe(0,1,2),xe(3,0,1),xe(2,3,0),xe(1,2,3)}function ge(Je,We,Fe,xe){var ye=Je[3];yexe&&(ye=xe);for(var Ee=(Je[3]-ye)/(Je[3]-We[3]+1e-9),Me=[],Ne=0;Ne<4;Ne++)Me[Ne]=(1-Ee)*Je[Ne]+Ee*We[Ne];return Me}function Te(Je,We,Fe){return Je>=We&&Je<=Fe}function we(Je){var We=.001*(k-I);return Je>=I-We&&Je<=k+We}function Re(Je){for(var We=[],Fe=0;Fe<4;Fe++){var xe=Je[Fe];We.push([c._x[xe],c._y[xe],c._z[xe],c._value[xe]])}return We}var be=3;function Ae(Je,We,Fe,xe,ye,Ee){Ee||(Ee=1),Fe=[-1,-1,-1];var Me=!1,Ne=[Te(We[0][3],xe,ye),Te(We[1][3],xe,ye),Te(We[2][3],xe,ye)];if(!Ne[0]&&!Ne[1]&&!Ne[2])return!1;var je=function(mt,bt,vt){return we(bt[0][3])&&we(bt[1][3])&&we(bt[2][3])?(se(mt,bt,vt),!0):EeNe?[D,Ee]:[Ee,N];ht(We,je[0],je[1])}}var it=[[Math.min(I,N),Math.max(I,N)],[Math.min(D,k),Math.max(D,k)]];["x","y","z"].forEach(function(mt){for(var bt=[],vt=0;vt0&&(pt.push(or.id),mt==="x"?Xt.push([or.distRatio,0,0]):mt==="y"?Xt.push([0,or.distRatio,0]):Xt.push([0,0,or.distRatio]))}else mt==="x"?ir=nt(1,T-1):mt==="y"?ir=nt(1,s-1):ir=nt(1,L-1);pt.length>0&&(mt==="x"?bt[Lt]=dt(Je,pt,ct,Tt,Xt,bt[Lt]):mt==="y"?bt[Lt]=xt(Je,pt,ct,Tt,Xt,bt[Lt]):bt[Lt]=St(Je,pt,ct,Tt,Xt,bt[Lt]),Lt++),ir.length>0&&(mt==="x"?bt[Lt]=Ie(Je,ir,ct,Tt,bt[Lt]):mt==="y"?bt[Lt]=rt(Je,ir,ct,Tt,bt[Lt]):bt[Lt]=Ke(Je,ir,ct,Tt,bt[Lt]),Lt++)}var $t=c.caps[mt];$t.show&&$t.fill&&(Q($t.fill),mt==="x"?bt[Lt]=Ie(Je,[0,T-1],ct,Tt,bt[Lt]):mt==="y"?bt[Lt]=rt(Je,[0,s-1],ct,Tt,bt[Lt]):bt[Lt]=Ke(Je,[0,L-1],ct,Tt,bt[Lt]),Lt++)}}),d===0&&ie(),c._meshX=B,c._meshY=O,c._meshZ=V,c._meshIntensity=Y,c._Xs=_,c._Ys=y,c._Zs=E}return Ze(),c}function f(c,l){var m=c.glplot.gl,h=g({gl:m}),b=new r(c,h,l.uid);return h._trace=b,b.update(l),c.glplot.add(h),b}H.exports={findNearestOnAxis:p,generateIsoMeshes:n,createIsosurfaceTrace:f}},70548:function(H,U,e){var g=e(3400),C=e(24040),i=e(50048),S=e(27260);function x(p,r,t,a){function n(f,c){return g.coerce(p,r,i,f,c)}v(p,r,t,a,n)}function v(p,r,t,a,n){var f=n("isomin"),c=n("isomax");c!=null&&f!==void 0&&f!==null&&f>c&&(r.isomin=null,r.isomax=null);var l=n("x"),m=n("y"),h=n("z"),b=n("value");if(!l||!l.length||!m||!m.length||!h||!h.length||!b||!b.length){r.visible=!1;return}var u=C.getComponentMethod("calendars","handleTraceDefaults");u(p,r,["x","y","z"],a),n("valuehoverformat"),["x","y","z"].forEach(function(A){n(A+"hoverformat");var _="caps."+A,y=n(_+".show");y&&n(_+".fill");var E="slices."+A,T=n(E+".show");T&&(n(E+".fill"),n(E+".locations"))});var o=n("spaceframe.show");o&&n("spaceframe.fill");var d=n("surface.show");d&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var w=n("contour.show");w&&(n("contour.color"),n("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(A){n(A)}),S(p,r,a,n,{prefix:"",cLetter:"c"}),r._length=null}H.exports={supplyDefaults:x,supplyIsoDefaults:v}},6296:function(H,U,e){H.exports={attributes:e(50048),supplyDefaults:e(70548).supplyDefaults,calc:e(62624),colorbar:{min:"cmin",max:"cmax"},plot:e(31460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e(12536),categories:["gl3d","showLegend"],meta:{}}},52948:function(H,U,e){var g=e(49084),C=e(29736).axisHoverFormat,i=e(21776).Ks,S=e(16716),x=e(45464),v=e(92880).extendFlat;H.exports=v({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"}),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},g("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:S.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:v({},S.contours.x.show,{}),color:S.contours.x.color,width:S.contours.x.width,editType:"calc"},lightposition:{x:v({},S.lightposition.x,{dflt:1e5}),y:v({},S.lightposition.y,{dflt:1e5}),z:v({},S.lightposition.z,{dflt:0}),editType:"calc"},lighting:v({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},S.lighting),hoverinfo:v({},x.hoverinfo,{editType:"calc"}),showlegend:v({},x.showlegend,{dflt:!1})})},1876:function(H,U,e){var g=e(47128);H.exports=function(i,S){S.intensity&&g(i,S,{vals:S.intensity,containerStr:"",cLetter:"c"})}},576:function(H,U,e){var g=e(67792).gl_mesh3d,C=e(67792).delaunay_triangulate,i=e(67792).alpha_shape,S=e(67792).convex_hull,x=e(33040).parseColorScale,v=e(3400).isArrayOrTypedArray,p=e(43080),r=e(8932).extractOpts,t=e(52094);function a(u,o,d){this.scene=u,this.uid=d,this.mesh=o,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var n=a.prototype;n.handlePick=function(u){if(u.object===this.mesh){var o=u.index=u.data.index;u.data._cellCenter?u.traceCoordinate=u.data.dataCoordinate:u.traceCoordinate=[this.data.x[o],this.data.y[o],this.data.z[o]];var d=this.data.hovertext||this.data.text;return v(d)&&d[o]!==void 0?u.textLabel=d[o]:d&&(u.textLabel=d),!0}};function f(u){for(var o=[],d=u.length,w=0;w=o-.5)return!1;return!0}n.update=function(u){var o=this.scene,d=o.fullSceneLayout;this.data=u;var w=u.x.length,A=t(c(d.xaxis,u.x,o.dataScale[0],u.xcalendar),c(d.yaxis,u.y,o.dataScale[1],u.ycalendar),c(d.zaxis,u.z,o.dataScale[2],u.zcalendar)),_;if(u.i&&u.j&&u.k){if(u.i.length!==u.j.length||u.j.length!==u.k.length||!h(u.i,w)||!h(u.j,w)||!h(u.k,w))return;_=t(l(u.i),l(u.j),l(u.k))}else u.alphahull===0?_=S(A):u.alphahull>0?_=i(u.alphahull,A):_=m(u.delaunayaxis,A);var y={positions:A,cells:_,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,contourEnable:u.contour.show,contourColor:p(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading};if(u.intensity){var E=r(u);this.color="#fff";var T=u.intensitymode;y[T+"Intensity"]=u.intensity,y[T+"IntensityBounds"]=[E.min,E.max],y.colormap=x(u)}else u.vertexcolor?(this.color=u.vertexcolor[0],y.vertexColors=f(u.vertexcolor)):u.facecolor?(this.color=u.facecolor[0],y.cellColors=f(u.facecolor)):(this.color=u.color,y.meshColor=p(u.color));this.mesh.update(y)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function b(u,o){var d=u.glplot.gl,w=g({gl:d}),A=new a(u,w,o.uid);return w._trace=A,A.update(o),u.glplot.add(w),A}H.exports=b},74212:function(H,U,e){var g=e(24040),C=e(3400),i=e(27260),S=e(52948);H.exports=function(v,p,r,t){function a(m,h){return C.coerce(v,p,S,m,h)}function n(m){var h=m.map(function(b){var u=a(b);return u&&C.isArrayOrTypedArray(u)?u:null});return h.every(function(b){return b&&b.length===h[0].length})&&h}var f=n(["x","y","z"]);if(!f){p.visible=!1;return}if(n(["i","j","k"]),p.i&&(!p.j||!p.k)||p.j&&(!p.k||!p.i)||p.k&&(!p.i||!p.j)){p.visible=!1;return}var c=g.getComponentMethod("calendars","handleTraceDefaults");c(v,p,["x","y","z"],t),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(m){a(m)});var l=a("contour.show");l&&(a("contour.color"),a("contour.width")),"intensity"in v?(a("intensity"),a("intensitymode"),i(v,p,t,a,{prefix:"",cLetter:"c"})):(p.showscale=!1,"facecolor"in v?a("facecolor"):"vertexcolor"in v?a("vertexcolor"):a("color",r)),a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),p._length=null}},7404:function(H,U,e){H.exports={attributes:e(52948),supplyDefaults:e(74212),calc:e(1876),colorbar:{min:"cmin",max:"cmax"},plot:e(576),moduleType:"trace",name:"mesh3d",basePlotModule:e(12536),categories:["gl3d","showLegend"],meta:{}}},20279:function(H,U,e){var g=e(3400).extendFlat,C=e(52904),i=e(29736).axisHoverFormat,S=e(98192).u,x=e(55756),v=e(48164),p=v.INCREASING.COLOR,r=v.DECREASING.COLOR,t=C.line;function a(n){return{line:{color:g({},t.color,{dflt:n}),width:t.width,dash:S,editType:"style"},editType:"style"}}H.exports={xperiod:C.xperiod,xperiod0:C.xperiod0,xperiodalignment:C.xperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:g({},t.width,{}),dash:g({},S,{}),editType:"style"},increasing:a(p),decreasing:a(r),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:g({},x.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},42812:function(H,U,e){var g=e(3400),C=g._,i=e(54460),S=e(1220),x=e(39032).BADNUM;function v(a,n){var f=i.getFromId(a,n.xaxis),c=i.getFromId(a,n.yaxis),l=t(a,f,n),m=n._minDiff;n._minDiff=null;var h=n._origX;n._origX=null;var b=n._xcalc;n._xcalc=null;var u=r(a,n,h,b,c,p);return n._extremes[f._id]=i.findExtremes(f,b,{vpad:m/2}),u.length?(g.extendFlat(u[0].t,{wHover:m/2,tickLen:l}),u):[{t:{empty:!0}}]}function p(a,n,f,c){return{o:a,h:n,l:f,c}}function r(a,n,f,c,l,m){for(var h=l.makeCalcdata(n,"open"),b=l.makeCalcdata(n,"high"),u=l.makeCalcdata(n,"low"),o=l.makeCalcdata(n,"close"),d=g.isArrayOrTypedArray(n.text),w=g.isArrayOrTypedArray(n.hovertext),A=!0,_=null,y=!!n.xperiodalignment,E=[],T=0;T_):A=D>L,_=D;var N=m(L,M,z,D);N.pos=s,N.yc=(L+D)/2,N.i=T,N.dir=A?"increasing":"decreasing",N.x=N.pos,N.y=[z,M],y&&(N.orig_p=f[T]),d&&(N.tx=n.text[T]),w&&(N.htx=n.hovertext[T]),E.push(N)}else E.push({pos:s,empty:!0})}return n._extremes[l._id]=i.findExtremes(l,g.concat(u,b),{padded:!0}),E.length&&(E[0].t={labels:{open:C(a,"open:")+" ",high:C(a,"high:")+" ",low:C(a,"low:")+" ",close:C(a,"close:")+" "}}),E}function t(a,n,f){var c=f._minDiff;if(!c){var l=a._fullData,m=[];c=1/0;var h;for(h=0;h"+o.labels[D]+g.hoverLabelText(b,N,u.yhoverformat)):(k=C.extendFlat({},w),k.y0=k.y1=I,k.yLabelVal=N,k.yLabel=o.labels[D]+g.hoverLabelText(b,N,u.yhoverformat),k.name="",d.push(k),M[N]=k)}return d}function n(f,c,l,m){var h=f.cd,b=f.ya,u=h[0].trace,o=h[0].t,d=t(f,c,l,m);if(!d)return[];var w=d.index,A=h[w],_=d.index=A.i,y=A.dir;function E(N){return o.labels[N]+g.hoverLabelText(b,u[N][_],u.yhoverformat)}var T=A.hi||u.hoverinfo,s=T.split("+"),L=T==="all",M=L||s.indexOf("y")!==-1,z=L||s.indexOf("text")!==-1,D=M?[E("open"),E("high"),E("low"),E("close")+" "+p[y]]:[];return z&&x(A,u,D),d.extraText=D.join("
    "),d.y0=d.y1=b.c2p(A.yc,!0),[d]}H.exports={hoverPoints:r,hoverSplit:a,hoverOnPoints:n}},65456:function(H,U,e){H.exports={moduleType:"trace",name:"ohlc",basePlotModule:e(57952),categories:["cartesian","svg","showLegend"],meta:{},attributes:e(20279),supplyDefaults:e(23860),calc:e(42812).calc,plot:e(36664),style:e(14008),hoverPoints:e(18720).hoverPoints,selectPoints:e(97384)}},52744:function(H,U,e){var g=e(24040),C=e(3400);H.exports=function(S,x,v,p){var r=v("x"),t=v("open"),a=v("high"),n=v("low"),f=v("close");v("hoverlabel.split");var c=g.getComponentMethod("calendars","handleTraceDefaults");if(c(S,x,["x"],p),!!(t&&a&&n&&f)){var l=Math.min(t.length,a.length,n.length,f.length);return r&&(l=Math.min(l,C.minRowLength(r))),x._length=l,l}}},36664:function(H,U,e){var g=e(33428),C=e(3400);H.exports=function(S,x,v,p){var r=x.yaxis,t=x.xaxis,a=!!t.rangebreaks;C.makeTraceGroups(p,v,"trace ohlc").each(function(n){var f=g.select(this),c=n[0],l=c.t,m=c.trace;if(m.visible!==!0||l.empty){f.remove();return}var h=l.tickLen,b=f.selectAll("path").data(C.identity);b.enter().append("path"),b.exit().remove(),b.attr("d",function(u){if(u.empty)return"M0,0Z";var o=t.c2p(u.pos-h,!0),d=t.c2p(u.pos+h,!0),w=a?(o+d)/2:t.c2p(u.pos,!0),A=r.c2p(u.o,!0),_=r.c2p(u.h,!0),y=r.c2p(u.l,!0),E=r.c2p(u.c,!0);return"M"+o+","+A+"H"+w+"M"+w+","+_+"V"+y+"M"+d+","+E+"H"+w})})}},97384:function(H){H.exports=function(e,g){var C=e.cd,i=e.xaxis,S=e.yaxis,x=[],v,p=C[0].t.bPos||0;if(g===!1)for(v=0;v=u.length||o[u[d]]!==void 0)return!1;o[u[d]]=!0}return!0}},76671:function(H,U,e){var g=e(3400),C=e(94288).hasColorscale,i=e(27260),S=e(86968).Q,x=e(51272),v=e(72140),p=e(26284),r=e(38116).isTypedArraySpec;function t(n,f,c,l,m){m("line.shape"),m("line.hovertemplate");var h=m("line.color",l.colorway[0]);if(C(n,"line")&&g.isArrayOrTypedArray(h)){if(h.length)return m("line.colorscale"),i(n,f,l,m,{prefix:"line.",cLetter:"c"}),h.length;f.line.color=c}return 1/0}function a(n,f){function c(d,w){return g.coerce(n,f,v.dimensions,d,w)}var l=c("values"),m=c("visible");if(l&&l.length||(m=f.visible=!1),m){c("label"),c("displayindex",f._index);var h=n.categoryarray,b=g.isArrayOrTypedArray(h)&&h.length>0||r(h),u;b&&(u="array");var o=c("categoryorder",u);o==="array"?(c("categoryarray"),c("ticktext")):(delete n.categoryarray,delete n.ticktext),!b&&o==="array"&&(f.categoryorder="trace")}}H.exports=function(f,c,l,m){function h(w,A){return g.coerce(f,c,v,w,A)}var b=x(f,c,{name:"dimensions",handleItemDefaults:a}),u=t(f,c,l,m,h);S(c,m,h),(!Array.isArray(b)||!b.length)&&(c.visible=!1),p(c,b,"values",u),h("hoveron"),h("hovertemplate"),h("arrangement"),h("bundlecolors"),h("sortpaths"),h("counts");var o={family:m.font.family,size:Math.round(m.font.size),color:m.font.color};g.coerceFont(h,"labelfont",o);var d={family:m.font.family,size:Math.round(m.font.size/1.2),color:m.font.color};g.coerceFont(h,"tickfont",d)}},22020:function(H,U,e){H.exports={attributes:e(72140),supplyDefaults:e(76671),calc:e(69136),plot:e(60268),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e(91800),categories:["noOpacity"],meta:{}}},51036:function(H,U,e){var g=e(33428),C=e(67756).Gz,i=e(36424),S=e(93024),x=e(3400),v=x.strTranslate,p=e(43616),r=e(49760),t=e(72736);function a(G,Q,oe,$){var Z=Q._context.staticPlot,se=G.map(ie.bind(0,Q,oe)),ne=$.selectAll("g.parcatslayer").data([null]);ne.enter().append("g").attr("class","parcatslayer").style("pointer-events",Z?"none":"all");var ce=ne.selectAll("g.trace.parcats").data(se,n),ge=ce.enter().append("g").attr("class","trace parcats");ce.attr("transform",function(He){return v(He.x,He.y)}),ge.append("g").attr("class","paths");var Te=ce.select("g.paths"),we=Te.selectAll("path.path").data(function(He){return He.paths},n);we.attr("fill",function(He){return He.model.color});var Re=we.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(He){return He.model.color}).attr("fill-opacity",0);o(Re),we.attr("d",function(He){return He.svgD}),Re.empty()||we.sort(c),we.exit().remove(),we.on("mouseover",l).on("mouseout",m).on("click",u),ge.append("g").attr("class","dimensions");var be=ce.select("g.dimensions"),Ae=be.selectAll("g.dimension").data(function(He){return He.dimensions},n);Ae.enter().append("g").attr("class","dimension"),Ae.attr("transform",function(He){return v(He.x,0)}),Ae.exit().remove();var me=Ae.selectAll("g.category").data(function(He){return He.categories},n),Le=me.enter().append("g").attr("class","category");me.attr("transform",function(He){return v(0,He.y)}),Le.append("rect").attr("class","catrect").attr("pointer-events","none"),me.select("rect.catrect").attr("fill","none").attr("width",function(He){return He.width}).attr("height",function(He){return He.height}),A(Le);var Ve=me.selectAll("rect.bandrect").data(function(He){return He.bands},n);Ve.each(function(){x.raiseToTop(this)}),Ve.attr("fill",function(He){return He.color});var Ue=Ve.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(He){return He.color}).attr("fill-opacity",0);Ve.attr("fill",function(He){return He.color}).attr("width",function(He){return He.width}).attr("height",function(He){return He.height}).attr("y",function(He){return He.y}).attr("cursor",function(He){return He.parcatsViewModel.arrangement==="fixed"?"default":He.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),y(Ue),Ve.exit().remove(),Le.append("text").attr("class","catlabel").attr("pointer-events","none");var ke=Q._fullLayout.paper_bgcolor;me.select("text.catlabel").attr("text-anchor",function(He){return f(He)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",t.makeTextShadow(ke)).style("fill","rgb(0, 0, 0)").attr("x",function(He){return f(He)?He.width+5:-5}).attr("y",function(He){return He.height/2}).text(function(He){return He.model.categoryLabel}).each(function(He){p.font(g.select(this),He.parcatsViewModel.categorylabelfont),t.convertToTspans(g.select(this),Q)}),Le.append("text").attr("class","dimlabel"),me.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(He){return He.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(He){return He.width/2}).attr("y",-5).text(function(He,Ie){return Ie===0?He.parcatsViewModel.model.dimensions[He.model.dimensionInd].dimensionLabel:null}).each(function(He){p.font(g.select(this),He.parcatsViewModel.labelfont)}),me.selectAll("rect.bandrect").on("mouseover",I).on("mouseout",k),me.exit().remove(),Ae.call(g.behavior.drag().origin(function(He){return{x:He.x,y:0}}).on("dragstart",B).on("drag",O).on("dragend",V)),ce.each(function(He){He.traceSelection=g.select(this),He.pathSelection=g.select(this).selectAll("g.paths").selectAll("path.path"),He.dimensionSelection=g.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),ce.exit().remove()}H.exports=function(G,Q,oe,$){a(oe,G,$,Q)};function n(G){return G.key}function f(G){var Q=G.parcatsViewModel.dimensions.length,oe=G.parcatsViewModel.dimensions[Q-1].model.dimensionInd;return G.model.dimensionInd===oe}function c(G,Q){return G.model.rawColor>Q.model.rawColor?1:G.model.rawColor"),Ke=g.mouse(Z)[0];S.loneHover({trace:se,x:me-ce.left+ge.left,y:Le-ce.top+ge.top,text:rt,color:G.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Ve,idealAlign:Ke1&&Te.displayInd===ge.dimensions.length-1?(be=ne.left,Ae="left"):(be=ne.left+ne.width,Ae="right");var me=ce.model.count,Le=ce.model.categoryLabel,Ve=me/ce.parcatsViewModel.model.count,Ue={countLabel:me,categoryLabel:Le,probabilityLabel:Ve.toFixed(3)},ke=[];ce.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ke.push(["Count:",Ue.countLabel].join(" ")),ce.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ke.push(["P("+Ue.categoryLabel+"):",Ue.probabilityLabel].join(" "));var He=ke.join("
    ");return{trace:we,x:$*(be-Q.left),y:Z*(Re-Q.top),text:He,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:Ae,hovertemplate:we.hovertemplate,hovertemplateLabels:Ue,eventData:[{data:we._input,fullData:we,count:me,category:Le,probability:Ve}]}}function D(G,Q,oe){var $=[];return g.select(oe.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Z=this;$.push(z(G,Q,Z))}),$}function N(G,Q,oe){G._fullLayout._calcInverseTransform(G);var $=G._fullLayout._invScaleX,Z=G._fullLayout._invScaleY,se=oe.getBoundingClientRect(),ne=g.select(oe).datum(),ce=ne.categoryViewModel,ge=ce.parcatsViewModel,Te=ge.model.dimensions[ce.model.dimensionInd],we=ge.trace,Re=se.y+se.height/2,be,Ae;ge.dimensions.length>1&&Te.displayInd===ge.dimensions.length-1?(be=se.left,Ae="left"):(be=se.left+se.width,Ae="right");var me=ce.model.categoryLabel,Le=ne.parcatsViewModel.model.count,Ve=0;ne.categoryViewModel.bands.forEach(function(dt){dt.color===ne.color&&(Ve+=dt.count)});var Ue=ce.model.count,ke=0;ge.pathSelection.each(function(dt){dt.model.color===ne.color&&(ke+=dt.model.count)});var He=Ve/Le,Ie=Ve/ke,rt=Ve/Ue,Ke={countLabel:Le,categoryLabel:me,probabilityLabel:He.toFixed(3)},$e=[];ce.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&$e.push(["Count:",Ke.countLabel].join(" ")),ce.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&($e.push("P(color ∩ "+me+"): "+Ke.probabilityLabel),$e.push("P("+me+" | color): "+Ie.toFixed(3)),$e.push("P(color | "+me+"): "+rt.toFixed(3)));var lt=$e.join("
    "),ht=r.mostReadable(ne.color,["black","white"]);return{trace:we,x:$*(be-Q.left),y:Z*(Re-Q.top),text:lt,color:ne.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:ht,fontSize:10,idealAlign:Ae,hovertemplate:we.hovertemplate,hovertemplateLabels:Ke,eventData:[{data:we._input,fullData:we,category:me,count:Le,probability:He,categorycount:Ue,colorcount:ke,bandcolorcount:Ve}]}}function I(G){if(!G.parcatsViewModel.dragDimension&&G.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var Q=g.mouse(this)[1];if(Q<-1)return;var oe=G.parcatsViewModel.graphDiv,$=oe._fullLayout,Z=$._paperdiv.node().getBoundingClientRect(),se=G.parcatsViewModel.hoveron,ne=this;if(se==="color"?(s(ne),M(ne,"plotly_hover",g.event)):(T(ne),L(ne,"plotly_hover",g.event)),G.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ce;se==="category"?ce=z(oe,Z,ne):se==="color"?ce=N(oe,Z,ne):se==="dimension"&&(ce=D(oe,Z,ne)),ce&&S.loneHover(ce,{container:$._hoverlayer.node(),outerContainer:$._paper.node(),gd:oe})}}}function k(G){var Q=G.parcatsViewModel;if(!Q.dragDimension&&(o(Q.pathSelection),A(Q.dimensionSelection.selectAll("g.category")),y(Q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),S.loneUnhover(Q.graphDiv._fullLayout._hoverlayer.node()),Q.pathSelection.sort(c),Q.hoverinfoItems.indexOf("skip")===-1)){var oe=G.parcatsViewModel.hoveron,$=this;oe==="color"?M($,"plotly_unhover",g.event):L($,"plotly_unhover",g.event)}}function B(G){G.parcatsViewModel.arrangement!=="fixed"&&(G.dragDimensionDisplayInd=G.model.displayInd,G.initialDragDimensionDisplayInds=G.parcatsViewModel.model.dimensions.map(function(Q){return Q.displayInd}),G.dragHasMoved=!1,G.dragCategoryDisplayInd=null,g.select(this).selectAll("g.category").select("rect.catrect").each(function(Q){var oe=g.mouse(this)[0],$=g.mouse(this)[1];-2<=oe&&oe<=Q.width+2&&-2<=$&&$<=Q.height+2&&(G.dragCategoryDisplayInd=Q.model.displayInd,G.initialDragCategoryDisplayInds=G.model.categories.map(function(Z){return Z.displayInd}),Q.model.dragY=Q.y,x.raiseToTop(this.parentNode),g.select(this.parentNode).selectAll("rect.bandrect").each(function(Z){Z.y<$&&$<=Z.y+Z.height&&(G.potentialClickBand=this)}))}),G.parcatsViewModel.dragDimension=G,S.loneUnhover(G.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function O(G){if(G.parcatsViewModel.arrangement!=="fixed"&&(G.dragHasMoved=!0,G.dragDimensionDisplayInd!==null)){var Q=G.dragDimensionDisplayInd,oe=Q-1,$=Q+1,Z=G.parcatsViewModel.dimensions[Q];if(G.dragCategoryDisplayInd!==null){var se=Z.categories[G.dragCategoryDisplayInd];se.model.dragY+=g.event.dy;var ne=se.model.dragY,ce=se.model.displayInd,ge=Z.categories,Te=ge[ce-1],we=ge[ce+1];Te!==void 0&&newe.y+we.height/2&&(se.model.displayInd=we.model.displayInd,we.model.displayInd=ce),G.dragCategoryDisplayInd=se.model.displayInd}if(G.dragCategoryDisplayInd===null||G.parcatsViewModel.arrangement==="freeform"){Z.model.dragX=g.event.x;var Re=G.parcatsViewModel.dimensions[oe],be=G.parcatsViewModel.dimensions[$];Re!==void 0&&Z.model.dragXbe.x&&(Z.model.displayInd=be.model.displayInd,be.model.displayInd=G.dragDimensionDisplayInd),G.dragDimensionDisplayInd=Z.model.displayInd}X(G.parcatsViewModel),J(G.parcatsViewModel),te(G.parcatsViewModel),j(G.parcatsViewModel)}}function V(G){if(G.parcatsViewModel.arrangement!=="fixed"&&G.dragDimensionDisplayInd!==null){g.select(this).selectAll("text").attr("font-weight","normal");var Q={},oe=Y(G.parcatsViewModel),$=G.parcatsViewModel.model.dimensions.map(function(be){return be.displayInd}),Z=G.initialDragDimensionDisplayInds.some(function(be,Ae){return be!==$[Ae]});Z&&$.forEach(function(be,Ae){var me=G.parcatsViewModel.model.dimensions[Ae].containerInd;Q["dimensions["+me+"].displayindex"]=be});var se=!1;if(G.dragCategoryDisplayInd!==null){var ne=G.model.categories.map(function(be){return be.displayInd});if(se=G.initialDragCategoryDisplayInds.some(function(be,Ae){return be!==ne[Ae]}),se){var ce=G.model.categories.slice().sort(function(be,Ae){return be.displayInd-Ae.displayInd}),ge=ce.map(function(be){return be.categoryValue}),Te=ce.map(function(be){return be.categoryLabel});Q["dimensions["+G.model.containerInd+"].categoryarray"]=[ge],Q["dimensions["+G.model.containerInd+"].ticktext"]=[Te],Q["dimensions["+G.model.containerInd+"].categoryorder"]="array"}}if(G.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!G.dragHasMoved&&G.potentialClickBand&&(G.parcatsViewModel.hoveron==="color"?M(G.potentialClickBand,"plotly_click",g.event.sourceEvent):L(G.potentialClickBand,"plotly_click",g.event.sourceEvent)),G.model.dragX=null,G.dragCategoryDisplayInd!==null){var we=G.parcatsViewModel.dimensions[G.dragDimensionDisplayInd].categories[G.dragCategoryDisplayInd];we.model.dragY=null,G.dragCategoryDisplayInd=null}G.dragDimensionDisplayInd=null,G.parcatsViewModel.dragDimension=null,G.dragHasMoved=null,G.potentialClickBand=null,X(G.parcatsViewModel),J(G.parcatsViewModel);var Re=g.transition().duration(300).ease("cubic-in-out");Re.each(function(){te(G.parcatsViewModel,!0),j(G.parcatsViewModel,!0)}).each("end",function(){(Z||se)&&i.restyle(G.parcatsViewModel.graphDiv,Q,[oe])})}}function Y(G){for(var Q,oe=G.graphDiv._fullData,$=0;$=0;ge--)Te+="C"+ne[ge]+","+(Q[ge+1]+$)+" "+se[ge]+","+(Q[ge]+$)+" "+(G[ge]+oe[ge])+","+(Q[ge]+$),Te+="l-"+oe[ge]+",0 ";return Te+="Z",Te}function J(G){var Q=G.dimensions,oe=G.model,$=Q.map(function(nt){return nt.categories.map(function(ze){return ze.y})}),Z=G.model.dimensions.map(function(nt){return nt.categories.map(function(ze){return ze.displayInd})}),se=G.model.dimensions.map(function(nt){return nt.displayInd}),ne=G.dimensions.map(function(nt){return nt.model.dimensionInd}),ce=Q.map(function(nt){return nt.x}),ge=Q.map(function(nt){return nt.width}),Te=[];for(var we in oe.paths)oe.paths.hasOwnProperty(we)&&Te.push(oe.paths[we]);function Re(nt){var ze=nt.categoryInds.map(function(Je,We){return Z[We][Je]}),Ze=ne.map(function(Je){return ze[Je]});return Ze}Te.sort(function(nt,ze){var Ze=Re(nt),Je=Re(ze);return G.sortpaths==="backward"&&(Ze.reverse(),Je.reverse()),Ze.push(nt.valueInds[0]),Je.push(ze.valueInds[0]),G.bundlecolors&&(Ze.unshift(nt.rawColor),Je.unshift(ze.rawColor)),ZeJe?1:0});for(var be=new Array(Te.length),Ae=Q[0].model.count,me=Q[0].categories.map(function(nt){return nt.height}).reduce(function(nt,ze){return nt+ze}),Le=0;Le0?Ue=me*(Ve.count/Ae):Ue=0;for(var ke=new Array($.length),He=0;He1?ne=(G.width-2*oe-$)/(Z-1):ne=0,ce=oe,ge=ce+ne*se;var Te=[],we=G.model.maxCats,Re=Q.categories.length,be=8,Ae=Q.count,me=G.height-be*(we-1),Le,Ve,Ue,ke,He,Ie=(we-Re)*be/2,rt=Q.categories.map(function(Ke){return{displayInd:Ke.displayInd,categoryInd:Ke.categoryInd}});for(rt.sort(function(Ke,$e){return Ke.displayInd-$e.displayInd}),He=0;He0?Le=Ve.count/Ae*me:Le=0,Ue={key:Ve.valueInds[0],model:Ve,width:$,height:Le,y:Ve.dragY!==null?Ve.dragY:Ie,bands:[],parcatsViewModel:G},Ie=Ie+Le+be,Te.push(Ue);return{key:Q.dimensionInd,x:Q.dragX!==null?Q.dragX:ge,y:0,width:$,model:Q,categories:Te,parcatsViewModel:G,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}},60268:function(H,U,e){var g=e(51036);H.exports=function(i,S,x,v){var p=i._fullLayout,r=p._paper,t=p._size;g(i,r,S,{width:t.w,height:t.h,margin:{t:t.t,r:t.r,b:t.b,l:t.l}},x,v)}},82296:function(H,U,e){var g=e(49084),C=e(94724),i=e(25376),S=e(86968).u,x=e(92880).extendFlat,v=e(31780).templatedArray;H.exports={domain:S({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:i({editType:"plot"}),tickfont:i({editType:"plot"}),rangefont:i({editType:"plot"}),dimensions:v("dimension",{label:{valType:"string",editType:"plot"},tickvals:x({},C.tickvals,{editType:"plot"}),ticktext:x({},C.ticktext,{editType:"plot"}),tickformat:x({},C.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:x({editType:"calc"},g("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(H,U,e){var g=e(30140),C=e(33428),i=e(71688).keyFun,S=e(71688).repeat,x=e(3400).sorterAsc,v=e(3400).strTranslate,p=g.bar.snapRatio;function r(V,Y){return V*(1-p)+Y*p}var t=g.bar.snapClose;function a(V,Y){return V*(1-t)+Y*t}function n(V,Y,j,te){if(f(j,te))return j;var ie=V?-1:1,ue=0,J=Y.length-1;if(ie<0){var X=ue;ue=J,J=X}for(var ee=Y[ue],G=ee,Q=ue;ie*Q=Y[j][0]&&V<=Y[j][1])return!0;return!1}function c(V){V.attr("x",-g.bar.captureWidth/2).attr("width",g.bar.captureWidth)}function l(V){V.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(V){if(!V.brush.filterSpecified)return"0,"+V.height;for(var Y=h(V.brush.filter.getConsolidated(),V.height),j=[0],te,ie,ue,J=Y.length?Y[0][0]:null,X=0;XV[1]+j||Y=.9*V[1]+.1*V[0]?"n":Y<=.9*V[0]+.1*V[1]?"s":"ns"}function u(){C.select(document.body).style("cursor",null)}function o(V){V.attr("stroke-dasharray",m)}function d(V,Y){var j=C.select(V).selectAll(".highlight, .highlight-shadow"),te=Y?j.transition().duration(g.bar.snapDuration).each("end",Y):j;o(te)}function w(V,Y){var j=V.brush,te=j.filterSpecified,ie=NaN,ue={},J;if(te){var X=V.height,ee=j.filter.getConsolidated(),G=h(ee,X),Q=NaN,oe=NaN,$=NaN;for(J=0;J<=G.length;J++){var Z=G[J];if(Z&&Z[0]<=Y&&Y<=Z[1]){Q=J;break}else if(oe=J?J-1:NaN,Z&&Z[0]>Y){$=J;break}}if(ie=Q,isNaN(ie)&&(isNaN(oe)||isNaN($)?ie=isNaN(oe)?$:oe:ie=Y-G[oe][1]=Te[0]&&ge<=Te[1]){ue.clickableOrdinalRange=Te;break}}}return ue}function A(V,Y){C.event.sourceEvent.stopPropagation();var j=Y.height-C.mouse(V)[1]-2*g.verticalPadding,te=Y.unitToPaddedPx.invert(j),ie=Y.brush,ue=w(Y,j),J=ue.interval,X=ie.svgBrush;if(X.wasDragged=!1,X.grabbingBar=ue.region==="ns",X.grabbingBar){var ee=J.map(Y.unitToPaddedPx);X.grabPoint=j-ee[0]-g.verticalPadding,X.barLength=ee[1]-ee[0]}X.clickableOrdinalRange=ue.clickableOrdinalRange,X.stayingIntervals=Y.multiselect&&ie.filterSpecified?ie.filter.getConsolidated():[],J&&(X.stayingIntervals=X.stayingIntervals.filter(function(G){return G[0]!==J[0]&&G[1]!==J[1]})),X.startExtent=ue.region?J[ue.region==="s"?1:0]:te,Y.parent.inBrushDrag=!0,X.brushStartCallback()}function _(V,Y){C.event.sourceEvent.stopPropagation();var j=Y.height-C.mouse(V)[1]-2*g.verticalPadding,te=Y.brush.svgBrush;te.wasDragged=!0,te._dragging=!0,te.grabbingBar?te.newExtent=[j-te.grabPoint,j+te.barLength-te.grabPoint].map(Y.unitToPaddedPx.invert):te.newExtent=[te.startExtent,Y.unitToPaddedPx.invert(j)].sort(x),Y.brush.filterSpecified=!0,te.extent=te.stayingIntervals.concat([te.newExtent]),te.brushCallback(Y),d(V.parentNode)}function y(V,Y){var j=Y.brush,te=j.filter,ie=j.svgBrush;ie._dragging||(E(V,Y),_(V,Y),Y.brush.svgBrush.wasDragged=!1),ie._dragging=!1;var ue=C.event;ue.sourceEvent.stopPropagation();var J=ie.grabbingBar;if(ie.grabbingBar=!1,ie.grabLocation=void 0,Y.parent.inBrushDrag=!1,u(),!ie.wasDragged){ie.wasDragged=void 0,ie.clickableOrdinalRange?j.filterSpecified&&Y.multiselect?ie.extent.push(ie.clickableOrdinalRange):(ie.extent=[ie.clickableOrdinalRange],j.filterSpecified=!0):J?(ie.extent=ie.stayingIntervals,ie.extent.length===0&&D(j)):D(j),ie.brushCallback(Y),d(V.parentNode),ie.brushEndCallback(j.filterSpecified?te.getConsolidated():[]);return}var X=function(){te.set(te.getConsolidated())};if(Y.ordinal){var ee=Y.unitTickvals;ee[ee.length-1]ie.newExtent[0];ie.extent=ie.stayingIntervals.concat(G?[ie.newExtent]:[]),ie.extent.length||D(j),ie.brushCallback(Y),G?d(V.parentNode,X):(X(),d(V.parentNode))}else X();ie.brushEndCallback(j.filterSpecified?te.getConsolidated():[])}function E(V,Y){var j=Y.height-C.mouse(V)[1]-2*g.verticalPadding,te=w(Y,j),ie="crosshair";te.clickableOrdinalRange?ie="pointer":te.region&&(ie=te.region+"-resize"),C.select(document.body).style("cursor",ie)}function T(V){V.on("mousemove",function(Y){C.event.preventDefault(),Y.parent.inBrushDrag||E(this,Y)}).on("mouseleave",function(Y){Y.parent.inBrushDrag||u()}).call(C.behavior.drag().on("dragstart",function(Y){A(this,Y)}).on("drag",function(Y){_(this,Y)}).on("dragend",function(Y){y(this,Y)}))}function s(V,Y){return V[0]-Y[0]}function L(V,Y,j){var te=j._context.staticPlot,ie=V.selectAll(".background").data(S);ie.enter().append("rect").classed("background",!0).call(c).call(l).style("pointer-events",te?"none":"auto").attr("transform",v(0,g.verticalPadding)),ie.call(T).attr("height",function(X){return X.height-g.verticalPadding});var ue=V.selectAll(".highlight-shadow").data(S);ue.enter().append("line").classed("highlight-shadow",!0).attr("x",-g.bar.width/2).attr("stroke-width",g.bar.width+g.bar.strokeWidth).attr("stroke",Y).attr("opacity",g.bar.strokeOpacity).attr("stroke-linecap","butt"),ue.attr("y1",function(X){return X.height}).call(o);var J=V.selectAll(".highlight").data(S);J.enter().append("line").classed("highlight",!0).attr("x",-g.bar.width/2).attr("stroke-width",g.bar.width-g.bar.strokeWidth).attr("stroke",g.bar.fillColor).attr("opacity",g.bar.fillOpacity).attr("stroke-linecap","butt"),J.attr("y1",function(X){return X.height}).call(o)}function M(V,Y,j){var te=V.selectAll("."+g.cn.axisBrush).data(S,i);te.enter().append("g").classed(g.cn.axisBrush,!0),L(te,Y,j)}function z(V){return V.svgBrush.extent.map(function(Y){return Y.slice()})}function D(V){V.filterSpecified=!1,V.svgBrush.extent=[[-1/0,1/0]]}function N(V){return function(j){var te=j.brush,ie=z(te),ue=ie.slice();te.filter.set(ue),V()}}function I(V){for(var Y=V.slice(),j=[],te,ie=Y.shift();ie;){for(te=ie.slice();(ie=Y.shift())&&ie[0]<=te[1];)te[1]=Math.max(te[1],ie[1]);j.push(te)}return j.length===1&&j[0][0]>j[0][1]&&(j=[]),j}function k(){var V=[],Y,j;return{set:function(te){V=te.map(function(ie){return ie.slice().sort(x)}).sort(s),V.length===1&&V[0][0]===-1/0&&V[0][1]===1/0&&(V=[[0,-1]]),Y=I(V),j=V.reduce(function(ie,ue){return[Math.min(ie[0],ue[0]),Math.max(ie[1],ue[1])]},[1/0,-1/0])},get:function(){return V.slice()},getConsolidated:function(){return Y},getBounds:function(){return j}}}function B(V,Y,j,te,ie,ue){var J=k();return J.set(j),{filter:J,filterSpecified:Y,svgBrush:{extent:[],brushStartCallback:te,brushCallback:N(ie),brushEndCallback:ue}}}function O(V,Y){if(Array.isArray(V[0])?(V=V.map(function(te){return te.sort(x)}),Y.multiselect?V=I(V.sort(s)):V=[V[0]]):V=[V.sort(x)],Y.tickvals){var j=Y.tickvals.slice().sort(x);if(V=V.map(function(te){var ie=[n(0,j,te[0],[]),n(1,j,te[1],[])];if(ie[1]>ie[0])return ie}).filter(function(te){return te}),!V.length)return}return V.length>1?V:V[0]}H.exports={makeBrush:B,ensureAxisBrush:M,cleanRanges:O}},61664:function(H,U,e){H.exports={attributes:e(82296),supplyDefaults:e(60664),calc:e(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(H,U,e){var g=e(33428),C=e(84888)._M,i=e(24196),S=e(9616);U.name="parcoords",U.plot=function(x){var v=C(x.calcdata,"parcoords")[0];v.length&&i(x,v)},U.clean=function(x,v,p,r){var t=r._has&&r._has("parcoords"),a=v._has&&v._has("parcoords");t&&!a&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},U.toSVG=function(x){var v=x._fullLayout._glimages,p=g.select(x).selectAll(".svg-container"),r=p.filter(function(a,n){return n===p.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function t(){var a=this,n=a.toDataURL("image/png"),f=v.append("svg:image");f.attr({xmlns:S.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}r.each(t),window.setTimeout(function(){g.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},95044:function(H,U,e){var g=e(3400).isArrayOrTypedArray,C=e(8932),i=e(71688).wrap;H.exports=function(v,p){var r,t;return C.hasColorscale(p,"line")&&g(p.line.color)?(r=p.line.color,t=C.extractOpts(p.line).colorscale,C.calc(v,p,{vals:r,containerStr:"line",cLetter:"c"})):(r=S(p._length),t=[[0,p.line.color],[1,p.line.color]]),i({lineColor:r,cscale:t})};function S(x){for(var v=new Array(x),p=0;pt&&(g.log("parcoords traces support up to "+t+" dimensions at the moment"),o.splice(t));var d=x(l,m,{name:"dimensions",layout:b,handleItemDefaults:f}),w=n(l,m,h,b,u);S(m,b,u),(!Array.isArray(d)||!d.length)&&(m.visible=!1),a(m,d,"values",w);var A={family:b.font.family,size:Math.round(b.font.size/1.2),color:b.font.color};g.coerceFont(u,"labelfont",A),g.coerceFont(u,"tickfont",A),g.coerceFont(u,"rangefont",A),u("labelangle"),u("labelside"),u("unselected.line.color"),u("unselected.line.opacity")}},95724:function(H,U,e){var g=e(3400).isTypedArray;U.convertTypedArray=function(C){return g(C)?Array.prototype.slice.call(C):C},U.isOrdinal=function(C){return!!C.tickvals},U.isVisible=function(C){return C.visible||!("visible"in C)}},29928:function(H,U,e){var g=e(61664);g.plot=e(24196),H.exports=g},51352:function(H,U,e){var g=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}},89032:function(G,U,t){var g=t(3400);G.exports=function(i,S){var x=i.split(" "),v=x[0],p=x[1],r=g.isArrayOrTypedArray(S)?g.mean(S):S,e=.5+r/100,a=1.5+r/100,n=["",""],f=[0,0];switch(v){case"top":n[0]="top",f[1]=-a;break;case"bottom":n[0]="bottom",f[1]=a;break}switch(p){case"left":n[1]="right",f[0]=-e;break;case"right":n[1]="left",f[0]=e;break}var c;return n[0]&&n[1]?c=n.join("-"):n[0]?c=n[0]:n[1]?c=n[1]:c="center",{anchor:c,offset:f}}},33688:function(G,U,t){var g=t(3480),C=t(3400),i=C.strTranslate,S=C.strScale,x=t(84888).KY,v=t(9616),p=t(33428),r=t(43616),e=t(72736),a=t(14440),n="mapbox",f=U.constants=t(47552);U.name=n,U.attr="subplot",U.idRoot=n,U.idRegex=U.attrRegex=C.counterRegex(n),U.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},U.layoutAttributes=t(5232),U.supplyLayoutDefaults=t(5976),U.plot=function(h){var b=h._fullLayout,u=h.calcdata,o=b._subplots[n];if(g.version!==f.requiredVersion)throw new Error(f.wrongVersionErrorMsg);var d=c(h,o);g.accessToken=d;for(var w=0;wN/2){var I=L.split("|").join("
    ");z.text(I).attr("data-unformatted",I).call(e.convertToTspans,m),D=r.bBox(z.node())}z.attr("transform",i(-3,-D.height+8)),M.insert("rect",".static-attribution").attr({x:-D.width-6,y:-D.height-3,width:D.width+6,height:D.height+3,fill:"rgba(255, 255, 255, 0.75)"});var k=1;D.width+6>N&&(k=N/(D.width+6));var B=[u.l+u.w*w.x[1],u.t+u.h*(1-w.y[0])];M.attr("transform",i(B[0],B[1])+S(k))}};function c(m,h){var b=m._fullLayout,u=m._context;if(u.mapboxAccessToken==="")return"";for(var o=[],d=[],w=!1,A=!1,_=0;_1&&C.warn(f.multipleTokensErrorMsg),o[0]):(d.length&&C.log(["Listed mapbox access token(s)",d.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function l(m){return typeof m=="string"&&(f.styleValuesMapbox.indexOf(m)!==-1||m.indexOf("mapbox://")===0||m.indexOf("stamen")===0)}U.updateFx=function(m){for(var h=m._fullLayout,b=h._subplots[n],u=0;u0){for(var f=0;f0}function r(a){var n={},f={};switch(a.type){case"circle":g.extendFlat(f,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":g.extendFlat(f,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":g.extendFlat(f,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,l=i(c.textposition,c.iconsize);g.extendFlat(n,{"icon-image":c.icon+"-15","icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":l.anchor,"text-offset":l.offset,"symbol-placement":c.placement}),g.extendFlat(f,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":g.extendFlat(f,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:n,paint:f}}function e(a){var n=a.sourcetype,f=a.source,c={type:n},l;return n==="geojson"?l="data":n==="vector"?l=typeof f=="string"?"url":"tiles":n==="raster"?(l="tiles",c.tileSize=256):n==="image"&&(l="url",c.coordinates=a.coordinates),c[l]=f,a.sourceattribution&&(c.attribution=C(a.sourceattribution)),c}G.exports=function(n,f,c){var l=new x(n,f);return l.update(c),l}},5232:function(G,U,t){var g=t(3400),C=t(76308).defaultLine,i=t(86968).u,S=t(25376),x=t(52904).textposition,v=t(67824).overrideAll,p=t(31780).templatedArray,r=t(47552),e=S({});e.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=G.exports=v({_arrayAttrRegexps:[g.counterRegex("mapbox",".layers",!0)],domain:i({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:r.styleValuesMapbox.concat(r.styleValuesNonMapbox),dflt:r.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:p("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:C},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:C}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:e,textposition:g.extendFlat({},x,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}},5976:function(G,U,t){var g=t(3400),C=t(168),i=t(51272),S=t(5232);G.exports=function(r,e,a){C(r,e,a,{type:"mapbox",attributes:S,handleDefaults:x,partition:"y",accessToken:e._mapboxAccessToken})};function x(p,r,e,a){e("accesstoken",a.accessToken),e("style"),e("center.lon"),e("center.lat"),e("zoom"),e("bearing"),e("pitch");var n=e("bounds.west"),f=e("bounds.east"),c=e("bounds.south"),l=e("bounds.north");(n===void 0||f===void 0||c===void 0||l===void 0)&&delete r.bounds,i(p,r,{name:"layers",handleItemDefaults:v}),r._input=p}function v(p,r){function e(m,h){return g.coerce(p,r,S.layers,m,h)}var a=e("visible");if(a){var n=e("sourcetype"),f=n==="raster"||n==="image";e("source"),e("sourceattribution"),n==="vector"&&e("sourcelayer"),n==="image"&&e("coordinates");var c;f&&(c="raster");var l=e("type",c);f&&l!=="raster"&&(l=r.type="raster",g.log("Source types *raster* and *image* must drawn *raster* layer type.")),e("below"),e("color"),e("opacity"),e("minzoom"),e("maxzoom"),l==="circle"&&e("circle.radius"),l==="line"&&(e("line.width"),e("line.dash")),l==="fill"&&e("fill.outlinecolor"),l==="symbol"&&(e("symbol.icon"),e("symbol.iconsize"),e("symbol.text"),g.coerceFont(e,"symbol.textfont"),e("symbol.textposition"),e("symbol.placement"))}}},14440:function(G,U,t){var g=t(3480),C=t(3400),i=t(27144),S=t(24040),x=t(54460),v=t(86476),p=t(93024),r=t(72760),e=r.drawMode,a=r.selectMode,n=t(22676).prepSelect,f=t(22676).clearOutline,c=t(22676).clearSelectionsCache,l=t(22676).selectOnClick,m=t(47552),h=t(22360);function b(_,y){this.id=y,this.gd=_;var E=_._fullLayout,T=_._context;this.container=E._glcontainer.node(),this.isStatic=T.staticPlot,this.uid=E._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(E),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var u=b.prototype;u.plot=function(_,y,E){var T=this,s=y[T.id];T.map&&s.accesstoken!==T.accessToken&&(T.map.remove(),T.map=null,T.styleObj=null,T.traceHash={},T.layerList=[]);var L;T.map?L=new Promise(function(M,z){T.updateMap(_,y,M,z)}):L=new Promise(function(M,z){T.createMap(_,y,M,z)}),E.push(L)},u.createMap=function(_,y,E,T){var s=this,L=y[s.id],M=s.styleObj=d(L.style,y);s.accessToken=L.accesstoken;var z=L.bounds,D=z?[[z.west,z.south],[z.east,z.north]]:null,N=s.map=new g.Map({container:s.div,style:M.style,center:A(L.center),zoom:L.zoom,bearing:L.bearing,pitch:L.pitch,maxBounds:D,interactive:!s.isStatic,preserveDrawingBuffer:s.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new g.AttributionControl({compact:!0}));N._canvas.style.left="0px",N._canvas.style.top="0px",s.rejectOnError(T),s.isStatic||s.initFx(_,y);var I=[];I.push(new Promise(function(k){N.once("load",k)})),I=I.concat(i.fetchTraceGeoData(_)),Promise.all(I).then(function(){s.fillBelowLookup(_,y),s.updateData(_),s.updateLayout(y),s.resolveOnRender(E)}).catch(T)},u.updateMap=function(_,y,E,T){var s=this,L=s.map,M=y[this.id];s.rejectOnError(T);var z=[],D=d(M.style,y);JSON.stringify(s.styleObj)!==JSON.stringify(D)&&(s.styleObj=D,L.setStyle(D.style),s.traceHash={},z.push(new Promise(function(N){L.once("styledata",N)}))),z=z.concat(i.fetchTraceGeoData(_)),Promise.all(z).then(function(){s.fillBelowLookup(_,y),s.updateData(_),s.updateLayout(y),s.resolveOnRender(E)}).catch(T)},u.fillBelowLookup=function(_,y){var E=y[this.id],T=E.layers,s,L,M=this.belowLookup={},z=!1;for(s=0;s<_.length;s++){var D=_[s][0].trace,N=D._module;typeof D.below=="string"?L=D.below:N.getBelow&&(L=N.getBelow(D,this)),L===""&&(z=!0),M["trace-"+D.uid]=L||""}for(s=0;s1)for(s=0;s-1&&l(D.originalEvent,T,[E.xaxis],[E.yaxis],E.id,z),N.indexOf("event")>-1&&p.click(T,D.originalEvent)}}},u.updateFx=function(_){var y=this,E=y.map,T=y.gd;if(y.isStatic)return;function s(D){var N=y.map.unproject(D);return[N.lng,N.lat]}var L=_.dragmode,M;M=function(D,N){if(N.isRect){var I=D.range={};I[y.id]=[s([N.xmin,N.ymin]),s([N.xmax,N.ymax])]}else{var k=D.lassoPoints={};k[y.id]=N.map(s)}};var z=y.dragOptions;y.dragOptions=C.extendDeep(z||{},{dragmode:_.dragmode,element:y.div,gd:T,plotinfo:{id:y.id,domain:_[y.id].domain,xaxis:y.xaxis,yaxis:y.yaxis,fillRangeItems:M},xaxes:[y.xaxis],yaxes:[y.yaxis],subplot:y.id}),E.off("click",y.onClickInPanHandler),a(L)||e(L)?(E.dragPan.disable(),E.on("zoomstart",y.clearOutline),y.dragOptions.prepFn=function(D,N,I){n(D,N,I,y.dragOptions,L)},v.init(y.dragOptions)):(E.dragPan.enable(),E.off("zoomstart",y.clearOutline),y.div.onmousedown=null,y.div.ontouchstart=null,y.div.removeEventListener("touchstart",y.div._ontouchstart),y.onClickInPanHandler=y.onClickInPanFn(y.dragOptions),E.on("click",y.onClickInPanHandler))},u.updateFramework=function(_){var y=_[this.id].domain,E=_._size,T=this.div.style;T.width=E.w*(y.x[1]-y.x[0])+"px",T.height=E.h*(y.y[1]-y.y[0])+"px",T.left=E.l+y.x[0]*E.w+"px",T.top=E.t+(1-y.y[1])*E.h+"px",this.xaxis._offset=E.l+y.x[0]*E.w,this.xaxis._length=E.w*(y.x[1]-y.x[0]),this.yaxis._offset=E.t+(1-y.y[1])*E.h,this.yaxis._length=E.h*(y.y[1]-y.y[0])},u.updateLayers=function(_){var y=_[this.id],E=y.layers,T=this.layerList,s;if(E.length!==T.length){for(s=0;s=Q.width-20?(Z["text-anchor"]="start",Z.x=5):(Z["text-anchor"]="end",Z.x=Q._paper.attr("width")-7),ot.attr(Z);var st=ot.select(".js-link-to-tool"),nt=ot.select(".js-link-spacer"),ct=ot.select(".js-sourcelinks");V._context.showSources&&V._context.showSources(V),V._context.showLink&&_(V,st),nt.text(st.text()&&ct.text()?" - ":"")}};function _(V,Q){Q.text("");var ot=Q.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(V._context.linkText+" »");if(V._context.sendData)ot.on("click",function(){d.sendDataToCloud(V)});else{var $=window.location.pathname.split("/"),Z=window.location.search;ot.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+$[2].split(".")[0]+"/"+$[1]+Z})}}d.sendDataToCloud=function(V){var Q=(window.PLOTLYENV||{}).BASE_URL||V._context.plotlyServerURL;if(Q){V.emit("plotly_beforeexport");var ot=g.select(V).append("div").attr("id","hiddenform").style("display","none"),$=ot.append("form").attr({action:Q+"/external",method:"post",target:"_blank"}),Z=$.append("input").attr({type:"text",name:"data"});return Z.node().value=d.graphJson(V,!1,"keepdata"),$.node().submit(),ot.remove(),V.emit("plotly_afterexport"),!1}};var y=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],E=["year","month","dayMonth","dayMonthYear"];d.supplyDefaults=function(V,Q){var ot=Q&&Q.skipUpdateCalc,$=V._fullLayout||{};if($._skipDefaults){delete $._skipDefaults;return}var Z=V._fullLayout={},st=V.layout||{},nt=V._fullData||[],ct=V._fullData=[],gt=V.data||[],Tt=V.calcdata||[],wt=V._context||{},Rt;V._transitionData||d.createTransitionData(V),Z._dfltTitle={plot:o(V,"Click to enter Plot title"),x:o(V,"Click to enter X axis title"),y:o(V,"Click to enter Y axis title"),colorbar:o(V,"Click to enter Colorscale title"),annotation:o(V,"new text")},Z._traceWord=o(V,"trace");var bt=L(V,y);if(Z._mapboxAccessToken=wt.mapboxAccessToken,$._initialAutoSizeIsDone){var At=$.width,mt=$.height;d.supplyLayoutGlobalDefaults(st,Z,bt),st.width||(Z.width=At),st.height||(Z.height=mt),d.sanitizeMargins(Z)}else{d.supplyLayoutGlobalDefaults(st,Z,bt);var Lt=!st.width||!st.height,Ht=Z.autosize,Ut=wt.autosizable,kt=Lt&&(Ht||Ut);kt?d.plotAutoSize(V,st,Z):Lt&&d.sanitizeMargins(Z),!Ht&&Lt&&(st.width=Z.width,st.height=Z.height)}Z._d3locale=M(bt,Z.separators),Z._extraFormat=L(V,E),Z._initialAutoSizeIsDone=!0,Z._dataLength=gt.length,Z._modules=[],Z._visibleModules=[],Z._basePlotModules=[];var Vt=Z._subplots=s(),It=Z._splomAxes={x:{},y:{}},re=Z._splomSubplots={};Z._splomGridDflt={},Z._scatterStackOpts={},Z._firstScatter={},Z._alignmentOpts={},Z._colorAxes={},Z._requestRangeslider={},Z._traceUids=T(nt,gt),Z._globalTransforms=(V._context||{}).globalTransforms,d.supplyDataDefaults(gt,ct,st,Z);var Kt=Object.keys(It.x),$t=Object.keys(It.y);if(Kt.length>1&&$t.length>1){for(v.getComponentMethod("grid","sizeDefaults")(st,Z),Rt=0;Rt15&&$t.length>15&&Z.shapes.length===0&&Z.images.length===0,d.linkSubplots(ct,Z,nt,$),d.cleanPlot(ct,Z,nt,$);var Se=!!($._has&&$._has("gl2d")),ne=!!(Z._has&&Z._has("gl2d")),zt=!!($._has&&$._has("cartesian")),Xt=!!(Z._has&&Z._has("cartesian")),Jt=zt||Se,Wt=Xt||ne;Jt&&!Wt?$._bgLayer.remove():Wt&&!Jt&&(Z._shouldCreateBgLayer=!0),$._zoomlayer&&!V._dragging&&c({_fullLayout:$}),z(ct,Z),u(Z,$),v.getComponentMethod("colorscale","crossTraceDefaults")(ct,Z),Z._preGUI||(Z._preGUI={}),Z._tracePreGUI||(Z._tracePreGUI={});var Ft=Z._tracePreGUI,xt={},yt;for(yt in Ft)xt[yt]="old";for(Rt=0;Rt0){var wt=1-2*st;nt=Math.round(wt*nt),ct=Math.round(wt*ct)}}var Rt=d.layoutAttributes.width.min,bt=d.layoutAttributes.height.min;nt1,mt=!ot.height&&Math.abs($.height-ct)>1;(mt||At)&&(At&&($.width=nt),mt&&($.height=ct)),Q._initialAutoSize||(Q._initialAutoSize={width:nt,height:ct}),d.sanitizeMargins($)},d.supplyLayoutModuleDefaults=function(V,Q,ot,$){var Z=v.componentsRegistry,st=Q._basePlotModules,nt,ct,gt,Tt=v.subplotsRegistry.cartesian;for(nt in Z)gt=Z[nt],gt.includeBasePlot&>.includeBasePlot(V,Q);st.length||st.push(Tt),Q._has("cartesian")&&(v.getComponentMethod("grid","contentDefaults")(V,Q),Tt.finalizeSubplots(V,Q));for(var wt in Q._subplots)Q._subplots[wt].sort(e.subplotSort);for(ct=0;ct1&&(ot.l/=Ht,ot.r/=Ht)}if(bt){var Ut=(ot.t+ot.b)/bt;Ut>1&&(ot.t/=Ut,ot.b/=Ut)}var kt=ot.xl!==void 0?ot.xl:ot.x,Vt=ot.xr!==void 0?ot.xr:ot.x,It=ot.yt!==void 0?ot.yt:ot.y,re=ot.yb!==void 0?ot.yb:ot.y;At[Q]={l:{val:kt,size:ot.l+Lt},r:{val:Vt,size:ot.r+Lt},b:{val:re,size:ot.b+Lt},t:{val:It,size:ot.t+Lt}},mt[Q]=1}if(!$._replotting)return d.doAutoMargin(V)}};function Y(V){if("_redrawFromAutoMarginCount"in V._fullLayout)return!1;var Q=f.list(V,"",!0);for(var ot in Q)if(Q[ot].autoshift||Q[ot].shift)return!0;return!1}d.doAutoMargin=function(V){var Q=V._fullLayout,ot=Q.width,$=Q.height;Q._size||(Q._size={}),B(Q);var Z=Q._size,st=Q.margin,nt={t:0,b:0,l:0,r:0},ct=e.extendFlat({},Z),gt=st.l,Tt=st.r,wt=st.t,Rt=st.b,bt=Q._pushmargin,At=Q._pushmarginIds,mt=Q.minreducedwidth,Lt=Q.minreducedheight;if(st.autoexpand!==!1){for(var Ht in bt)At[Ht]||delete bt[Ht];var Ut=V._fullLayout._reservedMargin;for(var kt in Ut)for(var Vt in Ut[kt]){var It=Ut[kt][Vt];nt[Vt]=Math.max(nt[Vt],It)}bt.base={l:{val:0,size:gt},r:{val:1,size:Tt},t:{val:1,size:wt},b:{val:0,size:Rt}};for(var re in nt){var Kt=0;for(var $t in bt)$t!=="base"&&S(bt[$t][re].size)&&(Kt=bt[$t][re].size>Kt?bt[$t][re].size:Kt);var le=Math.max(0,st[re]-Kt);nt[re]=Math.max(0,nt[re]-le)}for(var he in bt){var de=bt[he].l||{},xe=bt[he].b||{},Se=de.val,ne=de.size,zt=xe.val,Xt=xe.size,Jt=ot-nt.r-nt.l,Wt=$-nt.t-nt.b;for(var Ft in bt){if(S(ne)&&bt[Ft].r){var xt=bt[Ft].r.val,yt=bt[Ft].r.size;if(xt>Se){var Et=(ne*xt+(yt-Jt)*Se)/(xt-Se),Mt=(yt*(1-Se)+(ne-Jt)*(1-xt))/(xt-Se);Et+Mt>gt+Tt&&(gt=Et,Tt=Mt)}}if(S(Xt)&&bt[Ft].t){var Nt=bt[Ft].t.val,jt=bt[Ft].t.size;if(Nt>zt){var ie=(Xt*Nt+(jt-Wt)*zt)/(Nt-zt),me=(jt*(1-zt)+(Xt-Wt)*(1-Nt))/(Nt-zt);ie+me>Rt+wt&&(Rt=ie,wt=me)}}}}}var be=e.constrain(ot-st.l-st.r,O,mt),ve=e.constrain($-st.t-st.b,H,Lt),Le=Math.max(0,ot-be),ce=Math.max(0,$-ve);if(Le){var Te=(gt+Tt)/Le;Te>1&&(gt/=Te,Tt/=Te)}if(ce){var Be=(Rt+wt)/ce;Be>1&&(Rt/=Be,wt/=Be)}if(Z.l=Math.round(gt)+nt.l,Z.r=Math.round(Tt)+nt.r,Z.t=Math.round(wt)+nt.t,Z.b=Math.round(Rt)+nt.b,Z.p=Math.round(st.pad),Z.w=Math.round(ot)-Z.l-Z.r,Z.h=Math.round($)-Z.t-Z.b,!Q._replotting&&(d.didMarginChange(ct,Z)||Y(V))){"_redrawFromAutoMarginCount"in Q?Q._redrawFromAutoMarginCount++:Q._redrawFromAutoMarginCount=1;var ir=3*(1+Object.keys(At).length);if(Q._redrawFromAutoMarginCount1)return!0}return!1},d.graphJson=function(V,Q,ot,$,Z,st){(Z&&Q&&!V._fullData||Z&&!Q&&!V._fullLayout)&&d.supplyDefaults(V);var nt=Z?V._fullData:V.data,ct=Z?V._fullLayout:V.layout,gt=(V._transitionData||{})._frames;function Tt(bt,At){if(typeof bt=="function")return At?"_function_":null;if(e.isPlainObject(bt)){var mt={},Lt;return Object.keys(bt).sort().forEach(function(Vt){if(["_","["].indexOf(Vt.charAt(0))===-1){if(typeof bt[Vt]=="function"){At&&(mt[Vt]="_function");return}if(ot==="keepdata"){if(Vt.substr(Vt.length-3)==="src")return}else if(ot==="keepstream"){if(Lt=bt[Vt+"src"],typeof Lt=="string"&&Lt.indexOf(":")>0&&!e.isPlainObject(bt.stream))return}else if(ot!=="keepall"&&(Lt=bt[Vt+"src"],typeof Lt=="string"&&Lt.indexOf(":")>0))return;mt[Vt]=Tt(bt[Vt],At)}}),mt}var Ht=Array.isArray(bt),Ut=e.isTypedArray(bt);if((Ht||Ut)&&bt.dtype&&bt.shape){var kt=bt.bdata;return Tt({dtype:bt.dtype,shape:bt.shape,bdata:e.isArrayBuffer(kt)?x.encode(kt):kt},At)}return Ht?bt.map(function(Vt){return Tt(Vt,At)}):Ut?e.simpleMap(bt,e.identity):e.isJSDate(bt)?e.ms2DateTimeLocal(+bt):bt}var wt={data:(nt||[]).map(function(bt){var At=Tt(bt);return Q&&delete At.fit,At})};if(!Q&&(wt.layout=Tt(ct),Z)){var Rt=ct._size;wt.layout.computed={margin:{b:Rt.b,l:Rt.l,r:Rt.r,t:Rt.t}}}return gt&&(wt.frames=Tt(gt)),st&&(wt.config=Tt(V._context,!0)),$==="object"?wt:JSON.stringify(wt)},d.modifyFrames=function(V,Q){var ot,$,Z,st=V._transitionData._frames,nt=V._transitionData._frameHash;for(ot=0;ot0&&(V._transitioningWithDuration=!0),V._transitionData._interruptCallbacks.push(function(){$=!0}),ot.redraw&&V._transitionData._interruptCallbacks.push(function(){return v.call("redraw",V)}),V._transitionData._interruptCallbacks.push(function(){V.emit("plotly_transitioninterrupted",[])});var bt=0,At=0;function mt(){return bt++,function(){At++,!$&&At===bt&&ct(Rt)}}ot.runFn(mt),setTimeout(mt())})}function ct(Rt){if(V._transitionData)return st(V._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ot.redraw)return v.call("redraw",V)}).then(function(){V._transitioning=!1,V._transitioningWithDuration=!1,V.emit("plotly_transitioned",[])}).then(Rt)}function gt(){if(V._transitionData)return V._transitioning=!1,Z(V._transitionData._interruptCallbacks)}var Tt=[d.previousPromises,gt,ot.prepareFn,d.rehover,d.reselect,nt],wt=e.syncOrAsync(Tt,V);return(!wt||!wt.then)&&(wt=Promise.resolve()),wt.then(function(){return V})}d.doCalcdata=function(V,Q){var ot=f.list(V),$=V._fullData,Z=V._fullLayout,st,nt,ct,gt,Tt=new Array($.length),wt=(V.calcdata||[]).slice();for(V.calcdata=Tt,Z._numBoxes=0,Z._numViolins=0,Z._violinScaleGroupStats={},V._hmpixcount=0,V._hmlumcount=0,Z._piecolormap={},Z._sunburstcolormap={},Z._treemapcolormap={},Z._iciclecolormap={},Z._funnelareacolormap={},ct=0;ct<$.length;ct++)if(Array.isArray(Q)&&Q.indexOf(ct)===-1){Tt[ct]=wt[ct];continue}for(ct=0;ct<$.length;ct++)st=$[ct],st._arrayAttrs=p.findArrayAttributes(st),st._extremes={};var Rt=Z._subplots.polar||[];for(ct=0;ct=0;gt--)if(re[gt].enabled){st._indexToPoints=re[gt]._indexToPoints;break}nt&&nt.calc&&(It=nt.calc(V,st))}(!Array.isArray(It)||!It[0])&&(It=[{x:n,y:n}]),It[0].t||(It[0].t={}),It[0].trace=st,Tt[kt]=It}}for(X(ot,$,Z),ct=0;ct<$.length;ct++)Ht(ct,!0);for(ct=0;ct<$.length;ct++)Lt(ct);for(mt&&X(ot,$,Z),ct=0;ct<$.length;ct++)Ht(ct,!0);for(ct=0;ct<$.length;ct++)Ht(ct,!1);tt(V);var Ut=J(ot,V);if(Ut.length){for(Z._numBoxes=0,Z._numViolins=0,ct=0;ct0?E:1/0},A=i(d,w),_=g.mod(A+1,d.length);return[d[A],d[_]]}function m(o){return Math.abs(o)>1e-10?o:0}function h(o,d,w){d=d||0,w=w||0;for(var A=o.length,_=new Array(A),y=0;ybt?(At=st,mt=st*bt,Ut=(nt-mt)/V.h/2,Lt=[$[0],$[1]],Ht=[Z[0]+Ut,Z[1]-Ut]):(At=nt/bt,mt=nt,Ut=(st-At)/V.w/2,Lt=[$[0]+Ut,$[1]-Ut],Ht=[Z[0],Z[1]]),X.xLength2=At,X.yLength2=mt,X.xDomain2=Lt,X.yDomain2=Ht;var kt=X.xOffset2=V.l+V.w*Lt[0],Vt=X.yOffset2=V.t+V.h*(1-Ht[1]),It=X.radius=At/Tt,re=X.innerRadius=X.getHole(J)*It,Kt=X.cx=kt-It*gt[0],$t=X.cy=Vt+It*gt[3],le=X.cxx=Kt-kt,he=X.cyy=$t-Vt,de=Q.side,xe;de==="counterclockwise"?(xe=de,de="top"):de==="clockwise"&&(xe=de,de="bottom"),X.radialAxis=X.mockAxis(ut,J,Q,{_id:"x",side:de,_trueSide:xe,domain:[re/V.w,It/V.w]}),X.angularAxis=X.mockAxis(ut,J,ot,{side:"right",domain:[0,Math.PI],autorange:!1}),X.doAutoRange(ut,J),X.updateAngularAxis(ut,J),X.updateRadialAxis(ut,J),X.updateRadialAxisTitle(ut,J),X.xaxis=X.mockCartesianAxis(ut,J,{_id:"x",domain:Lt}),X.yaxis=X.mockCartesianAxis(ut,J,{_id:"y",domain:Ht});var Se=X.pathSubplot();X.clipPaths.forTraces.select("path").attr("d",Se).attr("transform",v(le,he)),tt.frontplot.attr("transform",v(kt,Vt)).call(r.setClipUrl,X._hasClipOnAxisFalse?null:X.clipIds.forTraces,X.gd),tt.bg.attr("d",Se).attr("transform",v(Kt,$t)).call(p.fill,J.bgcolor)},H.mockAxis=function(ut,J,X,tt){var V=S.extendFlat({},X,tt);return f(V,J,ut),V},H.mockCartesianAxis=function(ut,J,X){var tt=this,V=tt.isSmith,Q=X._id,ot=S.extendFlat({type:"linear"},X);n(ot,ut);var $={x:[0,2],y:[1,3]};return ot.setRange=function(){var Z=tt.sectorBBox,st=$[Q],nt=tt.radialAxis._rl,ct=(nt[1]-nt[0])/(1-tt.getHole(J));ot.range=[Z[st[0]]*ct,Z[st[1]]*ct]},ot.isPtWithinRange=Q==="x"&&!V?function(Z){return tt.isPtInside(Z)}:function(){return!0},ot.setRange(),ot.setScale(),ot},H.doAutoRange=function(ut,J){var X=this,tt=X.gd,V=X.radialAxis,Q=X.getRadial(J);c(tt,V);var ot=V.range;if(Q.range=ot.slice(),Q._input.range=ot.slice(),V._rl=[V.r2l(ot[0],null,"gregorian"),V.r2l(ot[1],null,"gregorian")],V.minallowed!==void 0){var $=V.r2l(V.minallowed);V._rl[0]>V._rl[1]?V._rl[1]=Math.max(V._rl[1],$):V._rl[0]=Math.max(V._rl[0],$)}if(V.maxallowed!==void 0){var Z=V.r2l(V.maxallowed);V._rl[0]90&&nt<=270&&(ct.tickangle=180);var wt=Tt?function(It){var re=D(X,L([It.x,0]));return v(re[0]-$,re[1]-Z)}:function(It){return v(ct.l2p(It.x)+ot,0)},Rt=Tt?function(It){return z(X,It.x,-1/0,1/0)}:function(It){return X.pathArc(ct.r2p(It.x)+ot)},bt=Y(st);if(X.radialTickLayout!==bt&&(V["radial-axis"].selectAll(".xtick").remove(),X.radialTickLayout=bt),gt){ct.setScale();var At=0,mt=Tt?(ct.tickvals||[]).filter(function(It){return It>=0}).map(function(It){return a.tickText(ct,It,!0,!1)}):a.calcTicks(ct),Lt=Tt?mt:a.clipEnds(ct,mt),Ht=a.getTickSigns(ct)[2];Tt&&((ct.ticks==="top"&&ct.side==="bottom"||ct.ticks==="bottom"&&ct.side==="top")&&(Ht=-Ht),ct.ticks==="top"&&ct.side==="top"&&(At=-ct.ticklen),ct.ticks==="bottom"&&ct.side==="bottom"&&(At=ct.ticklen)),a.drawTicks(tt,ct,{vals:mt,layer:V["radial-axis"],path:a.makeTickPath(ct,0,Ht),transFn:wt,crisp:!1}),a.drawGrid(tt,ct,{vals:Lt,layer:V["radial-grid"],path:Rt,transFn:S.noop,crisp:!1}),a.drawLabels(tt,ct,{vals:mt,layer:V["radial-axis"],transFn:wt,labelFns:a.makeLabelFns(ct,At)})}var Ut=X.radialAxisAngle=X.vangles?B(et(k(st.angle),X.vangles)):st.angle,kt=v($,Z),Vt=kt+x(-Ut);it(V["radial-axis"],gt&&(st.showticklabels||st.ticks),{transform:Vt}),it(V["radial-grid"],gt&&st.showgrid,{transform:Tt?"":kt}),it(V["radial-line"].select("line"),gt&&st.showline,{x1:Tt?-Q:ot,y1:0,x2:Q,y2:0,transform:Vt}).attr("stroke-width",st.linewidth).call(p.stroke,st.linecolor)},H.updateRadialAxisTitle=function(ut,J,X){if(!this.isSmith){var tt=this,V=tt.gd,Q=tt.radius,ot=tt.cx,$=tt.cy,Z=tt.getRadial(J),st=tt.id+"title",nt=0;if(Z.title){var ct=r.bBox(tt.layers["radial-axis"].node()).height,gt=Z.title.font.size,Tt=Z.side;nt=Tt==="top"?gt:Tt==="counterclockwise"?-(ct+gt*.4):ct+gt*.8}var wt=X!==void 0?X:tt.radialAxisAngle,Rt=k(wt),bt=Math.cos(Rt),At=Math.sin(Rt),mt=ot+Q/2*bt+nt*At,Lt=$-Q/2*At+nt*bt;tt.layers["radial-axis-title"]=b.draw(V,st,{propContainer:Z,propName:tt.id+".radialaxis.title",placeholder:N(V,"Click to enter radial axis title"),attributes:{x:mt,y:Lt,"text-anchor":"middle"},transform:{rotate:-wt}})}},H.updateAngularAxis=function(ut,J){var X=this,tt=X.gd,V=X.layers,Q=X.radius,ot=X.innerRadius,$=X.cx,Z=X.cy,st=X.getAngular(J),nt=X.angularAxis,ct=X.isSmith;ct||(X.fillViewInitialKey("angularaxis.rotation",st.rotation),nt.setGeometry(),nt.setScale());var gt=ct?function(re){var Kt=D(X,L([0,re.x]));return Math.atan2(Kt[0]-$,Kt[1]-Z)-Math.PI/2}:function(re){return nt.t2g(re.x)};nt.type==="linear"&&nt.thetaunit==="radians"&&(nt.tick0=B(nt.tick0),nt.dtick=B(nt.dtick));var Tt=function(re){return v($+Q*Math.cos(re),Z-Q*Math.sin(re))},wt=ct?function(re){var Kt=D(X,L([0,re.x]));return v(Kt[0],Kt[1])}:function(re){return Tt(gt(re))},Rt=ct?function(re){var Kt=D(X,L([0,re.x])),$t=Math.atan2(Kt[0]-$,Kt[1]-Z)-Math.PI/2;return v(Kt[0],Kt[1])+x(-B($t))}:function(re){var Kt=gt(re);return Tt(Kt)+x(-B(Kt))},bt=ct?function(re){return M(X,re.x,0,1/0)}:function(re){var Kt=gt(re),$t=Math.cos(Kt),le=Math.sin(Kt);return"M"+[$+ot*$t,Z-ot*le]+"L"+[$+Q*$t,Z-Q*le]},At=a.makeLabelFns(nt,0),mt=At.labelStandoff,Lt={};Lt.xFn=function(re){var Kt=gt(re);return Math.cos(Kt)*mt},Lt.yFn=function(re){var Kt=gt(re),$t=Math.sin(Kt)>0?.2:1;return-Math.sin(Kt)*(mt+re.fontSize*$t)+Math.abs(Math.cos(Kt))*(re.fontSize*y)},Lt.anchorFn=function(re){var Kt=gt(re),$t=Math.cos(Kt);return Math.abs($t)<.1?"middle":$t>0?"start":"end"},Lt.heightFn=function(re,Kt,$t){var le=gt(re);return-.5*(1+Math.sin(le))*$t};var Ht=Y(st);X.angularTickLayout!==Ht&&(V["angular-axis"].selectAll("."+nt._id+"tick").remove(),X.angularTickLayout=Ht);var Ut=ct?[1/0].concat(nt.tickvals||[]).map(function(re){return a.tickText(nt,re,!0,!1)}):a.calcTicks(nt);ct&&(Ut[0].text="∞",Ut[0].fontSize*=1.75);var kt;if(J.gridshape==="linear"?(kt=Ut.map(gt),S.angleDelta(kt[0],kt[1])<0&&(kt=kt.slice().reverse())):kt=null,X.vangles=kt,nt.type==="category"&&(Ut=Ut.filter(function(re){return S.isAngleInsideSector(gt(re),X.sectorInRad)})),nt.visible){var Vt=nt.ticks==="inside"?-1:1,It=(nt.linewidth||1)/2;a.drawTicks(tt,nt,{vals:Ut,layer:V["angular-axis"],path:"M"+Vt*It+",0h"+Vt*nt.ticklen,transFn:Rt,crisp:!1}),a.drawGrid(tt,nt,{vals:Ut,layer:V["angular-grid"],path:bt,transFn:S.noop,crisp:!1}),a.drawLabels(tt,nt,{vals:Ut,layer:V["angular-axis"],repositionOnUpdate:!0,transFn:wt,labelFns:Lt})}it(V["angular-line"].select("path"),st.showline,{d:X.pathSubplot(),transform:v($,Z)}).attr("stroke-width",st.linewidth).call(p.stroke,st.linecolor)},H.updateFx=function(ut,J){if(!this.gd._context.staticPlot){var X=!this.isSmith;X&&(this.updateAngularDrag(ut),this.updateRadialDrag(ut,J,0),this.updateRadialDrag(ut,J,1)),this.updateHoverAndMainDrag(ut)}},H.updateHoverAndMainDrag=function(ut){var J=this,X=J.isSmith,tt=J.gd,V=J.layers,Q=ut._zoomlayer,ot=E.MINZOOM,$=E.OFFEDGE,Z=J.radius,st=J.innerRadius,nt=J.cx,ct=J.cy,gt=J.cxx,Tt=J.cyy,wt=J.sectorInRad,Rt=J.vangles,bt=J.radialAxis,At=T.clampTiny,mt=T.findXYatLength,Lt=T.findEnclosingVertexAngles,Ht=E.cornerHalfWidth,Ut=E.cornerLen/2,kt,Vt,It=l.makeDragger(V,"path","maindrag",ut.dragmode===!1?"none":"crosshair");g.select(It).attr("d",J.pathSubplot()).attr("transform",v(nt,ct)),It.onmousemove=function(ce){h.hover(tt,ce,J.id),tt._fullLayout._lasthover=It,tt._fullLayout._hoversubplot=J.id},It.onmouseout=function(ce){tt._dragging||m.unhover(tt,ce)};var re={element:It,gd:tt,subplot:J.id,plotinfo:{id:J.id,xaxis:J.xaxis,yaxis:J.yaxis},xaxes:[J.xaxis],yaxes:[J.yaxis]},Kt,$t,le,he,de,xe,Se,ne,zt;function Xt(ce,Te){return Math.sqrt(ce*ce+Te*Te)}function Jt(ce,Te){return Xt(ce-gt,Te-Tt)}function Wt(ce,Te){return Math.atan2(Tt-Te,ce-gt)}function Ft(ce,Te){return[ce*Math.cos(Te),ce*Math.sin(-Te)]}function xt(ce,Te){if(ce===0)return J.pathSector(2*Ht);var Be=Ut/ce,ir=Te-Be,pe=Te+Be,Xe=Math.max(0,Math.min(ce,Z)),Ke=Xe-Ht,or=Xe+Ht;return"M"+Ft(Ke,ir)+"A"+[Ke,Ke]+" 0,0,0 "+Ft(Ke,pe)+"L"+Ft(or,pe)+"A"+[or,or]+" 0,0,1 "+Ft(or,ir)+"Z"}function yt(ce,Te,Be){if(ce===0)return J.pathSector(2*Ht);var ir=Ft(ce,Te),pe=Ft(ce,Be),Xe=At((ir[0]+pe[0])/2),Ke=At((ir[1]+pe[1])/2),or,$e;if(Xe&&Ke){var ge=Ke/Xe,se=-1/ge,Ae=mt(Ht,ge,Xe,Ke);or=mt(Ut,se,Ae[0][0],Ae[0][1]),$e=mt(Ut,se,Ae[1][0],Ae[1][1])}else{var Ce,Ie;Ke?(Ce=Ut,Ie=Ht):(Ce=Ht,Ie=Ut),or=[[Xe-Ce,Ke-Ie],[Xe+Ce,Ke-Ie]],$e=[[Xe-Ce,Ke+Ie],[Xe+Ce,Ke+Ie]]}return"M"+or.join("L")+"L"+$e.reverse().join("L")+"Z"}function Et(){le=null,he=null,de=J.pathSubplot(),xe=!1;var ce=tt._fullLayout[J.id];Se=C(ce.bgcolor).getLuminance(),ne=l.makeZoombox(Q,Se,nt,ct,de),ne.attr("fill-rule","evenodd"),zt=l.makeCorners(Q,nt,ct),d(tt)}function Mt(ce,Te){return Te=Math.max(Math.min(Te,Z),st),ce<$?ce=0:Z-ce<$?ce=Z:Te<$?Te=0:Z-Te<$&&(Te=Z),Math.abs(Te-ce)>ot?(ce-1&&ce===1&&o(Te,tt,[J.xaxis],[J.yaxis],J.id,re),Be.indexOf("event")>-1&&h.click(tt,Te,J.id)}re.prepFn=function(ce,Te,Be){var ir=tt._fullLayout.dragmode,pe=It.getBoundingClientRect();tt._fullLayout._calcInverseTransform(tt);var Xe=tt._fullLayout._invTransform;kt=tt._fullLayout._invScaleX,Vt=tt._fullLayout._invScaleY;var Ke=S.apply3DTransform(Xe)(Te-pe.left,Be-pe.top);if(Kt=Ke[0],$t=Ke[1],Rt){var or=T.findPolygonOffset(Z,wt[0],wt[1],Rt);Kt+=gt+or[0],$t+=Tt+or[1]}switch(ir){case"zoom":re.clickFn=Le,X||(Rt?re.moveFn=me:re.moveFn=jt,re.doneFn=be,Et());break;case"select":case"lasso":u(ce,Te,Be,re,ir);break}},m.init(re)},H.updateRadialDrag=function(ut,J,X){var tt=this,V=tt.gd,Q=tt.layers,ot=tt.radius,$=tt.innerRadius,Z=tt.cx,st=tt.cy,nt=tt.radialAxis,ct=E.radialDragBoxSize,gt=ct/2;if(!nt.visible)return;var Tt=k(tt.radialAxisAngle),wt=nt._rl,Rt=wt[0],bt=wt[1],At=wt[X],mt=.75*(wt[1]-wt[0])/(1-tt.getHole(J))/ot,Lt,Ht,Ut;X?(Lt=Z+(ot+gt)*Math.cos(Tt),Ht=st-(ot+gt)*Math.sin(Tt),Ut="radialdrag"):(Lt=Z+($-gt)*Math.cos(Tt),Ht=st-($-gt)*Math.sin(Tt),Ut="radialdrag-inner");var kt=l.makeRectDragger(Q,Ut,"crosshair",-gt,-gt,ct,ct),Vt={element:kt,gd:V};ut.dragmode===!1&&(Vt.dragmode=!1),it(g.select(kt),nt.visible&&$0!=(X?Kt>Rt:Kt=90||V>90&&Q>=450?Tt=1:$<=0&&st<=0?Tt=0:Tt=Math.max($,st),V<=180&&Q>=180||V>180&&Q>=540?nt=-1:ot>=0&&Z>=0?nt=0:nt=Math.min(ot,Z),V<=270&&Q>=270||V>270&&Q>=630?ct=-1:$>=0&&st>=0?ct=0:ct=Math.min($,st),Q>=360?gt=1:ot<=0&&Z<=0?gt=0:gt=Math.max(ot,Z),[nt,ct,gt,Tt]}function et(ut,J){var X=function(V){return S.angleDist(ut,V)},tt=S.findIndexOfMin(J,X);return J[tt]}function it(ut,J,X){return J?(ut.attr("display",null),ut.attr(X)):ut&&ut.attr("display","none"),ut}},57696:function(G,U,t){var g=t(3400),C=t(78344),i=g.deg2rad,S=g.rad2deg;G.exports=function(a,n,f){switch(C(a,f),a._id){case"x":case"radialaxis":x(a,n);break;case"angularaxis":r(a,n);break}};function x(e,a){var n=a._subplot;e.setGeometry=function(){var f=e._rl[0],c=e._rl[1],l=n.innerRadius,m=(n.radius-l)/(c-f),h=l/m,b=f>c?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var o=e.c2l(u)-f;return(b(o)?o:0)+h},e.g2c=function(u){return e.l2c(u+f-h)},e.g2p=function(u){return u*m},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function v(e,a){return a==="degrees"?i(e):e}function p(e,a){return a==="degrees"?S(e):e}function r(e,a){var n=e.type;if(n==="linear"){var f=e.d2c,c=e.c2d;e.d2c=function(l,m){return v(f(l),m)},e.c2d=function(l,m){return c(p(l,m))}}e.makeCalcdata=function(l,m){var h=l[m],b=l._length,u,o,d=function(E){return e.d2c(E,l.thetaunit)};if(h)for(u=new Array(b),o=0;o0?1:0}function t(x){var v=x[0],p=x[1];if(!isFinite(v)||!isFinite(p))return[1,0];var r=(v+1)*(v+1)+p*p;return[(v*v+p*p-1)/r,2*p/r]}function g(x,v){var p=v[0],r=v[1];return[p*x.radius+x.cx,-r*x.radius+x.cy]}function C(x,v){return v*x.radius}function i(x,v,p,r){var e=g(x,t([p,v])),a=e[0],n=e[1],f=g(x,t([r,v])),c=f[0],l=f[1];if(v===0)return["M"+a+","+n,"L"+c+","+l].join(" ");var m=C(x,1/Math.abs(v));return["M"+a+","+n,"A"+m+","+m+" 0 0,"+(v<0?1:0)+" "+c+","+l].join(" ")}function S(x,v,p,r){var e=C(x,1/(v+1)),a=g(x,t([v,p])),n=a[0],f=a[1],c=g(x,t([v,r])),l=c[0],m=c[1];if(U(p)!==U(r)){var h=g(x,t([v,0])),b=h[0],u=h[1];return["M"+n+","+f,"A"+e+","+e+" 0 0,"+(00){for(var v=[],p=0;p=o&&(y.min=0,E.min=0,T.min=0,l.aaxis&&delete l.aaxis.min,l.baxis&&delete l.baxis.min,l.caxis&&delete l.caxis.min)}function c(l,m,h,b){var u=a[m._name];function o(s,L){return i.coerce(l,m,u,s,L)}o("uirevision",b.uirevision),m.type="linear";var d=o("color"),w=d!==u.color.dflt?d:h.font.color,A=m._name,_=A.charAt(0).toUpperCase(),y="Component "+_,E=o("title.text",y);m._hovertitle=E===y?E:_,i.coerceFont(o,"title.font",{family:h.font.family,size:i.bigFont(h.font.size),color:w}),o("min"),r(l,m,o,"linear"),v(l,m,o,"linear"),x(l,m,o,"linear",{noAutotickangles:!0}),p(l,m,o,{outerTicks:!0});var T=o("showticklabels");T&&(i.coerceFont(o,"tickfont",{family:h.font.family,size:h.font.size,color:w}),o("tickangle"),o("tickformat")),e(l,m,o,{dfltColor:d,bgColor:h.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:u}),o("hoverformat"),o("layer")}},24696:function(G,U,t){var g=t(33428),C=t(49760),i=t(24040),S=t(3400),x=S.strTranslate,v=S._,p=t(76308),r=t(43616),e=t(78344),a=t(92880).extendFlat,n=t(7316),f=t(54460),c=t(86476),l=t(93024),m=t(72760),h=m.freeMode,b=m.rectMode,u=t(81668),o=t(22676).prepSelect,d=t(22676).selectOnClick,w=t(22676).clearOutline,A=t(22676).clearSelectionsCache,_=t(33816);function y(B,O){this.id=B.id,this.graphDiv=B.graphDiv,this.init(O),this.makeFramework(O),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}G.exports=y;var E=y.prototype;E.init=function(B){this.container=B._ternarylayer,this.defs=B._defs,this.layoutId=B._uid,this.traceHash={},this.layers={}},E.plot=function(B,O){var H=this,Y=O[H.id],j=O._size;H._hasClipOnAxisFalse=!1;for(var et=0;etT*X?(nt=X,st=nt*T):(st=J,nt=st/T),ct=it*st/J,gt=ut*nt/X,$=O.l+O.w*j-st/2,Z=O.t+O.h*(1-et)-nt/2,H.x0=$,H.y0=Z,H.w=st,H.h=nt,H.sum=tt,H.xaxis={type:"linear",range:[V+2*ot-tt,tt-V-2*Q],domain:[j-ct/2,j+ct/2],_id:"x"},e(H.xaxis,H.graphDiv._fullLayout),H.xaxis.setScale(),H.xaxis.isPtWithinRange=function(Vt){return Vt.a>=H.aaxis.range[0]&&Vt.a<=H.aaxis.range[1]&&Vt.b>=H.baxis.range[1]&&Vt.b<=H.baxis.range[0]&&Vt.c>=H.caxis.range[1]&&Vt.c<=H.caxis.range[0]},H.yaxis={type:"linear",range:[V,tt-Q-ot],domain:[et-gt/2,et+gt/2],_id:"y"},e(H.yaxis,H.graphDiv._fullLayout),H.yaxis.setScale(),H.yaxis.isPtWithinRange=function(){return!0};var Tt=H.yaxis.domain[0],wt=H.aaxis=a({},B.aaxis,{range:[V,tt-Q-ot],side:"left",tickangle:(+B.aaxis.tickangle||0)-30,domain:[Tt,Tt+gt*T],anchor:"free",position:0,_id:"y",_length:st});e(wt,H.graphDiv._fullLayout),wt.setScale();var Rt=H.baxis=a({},B.baxis,{range:[tt-V-ot,Q],side:"bottom",domain:H.xaxis.domain,anchor:"free",position:0,_id:"x",_length:st});e(Rt,H.graphDiv._fullLayout),Rt.setScale();var bt=H.caxis=a({},B.caxis,{range:[tt-V-Q,ot],side:"right",tickangle:(+B.caxis.tickangle||0)+30,domain:[Tt,Tt+gt*T],anchor:"free",position:0,_id:"y",_length:st});e(bt,H.graphDiv._fullLayout),bt.setScale();var At="M"+$+","+(Z+nt)+"h"+st+"l-"+st/2+",-"+nt+"Z";H.clipDef.select("path").attr("d",At),H.layers.plotbg.select("path").attr("d",At);var mt="M0,"+nt+"h"+st+"l-"+st/2+",-"+nt+"Z";H.clipDefRelative.select("path").attr("d",mt);var Lt=x($,Z);H.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Lt),H.clipDefRelative.select("path").attr("transform",null);var Ht=x($-Rt._offset,Z+nt);H.layers.baxis.attr("transform",Ht),H.layers.bgrid.attr("transform",Ht);var Ut=x($+st/2,Z)+"rotate(30)"+x(0,-wt._offset);H.layers.aaxis.attr("transform",Ut),H.layers.agrid.attr("transform",Ut);var kt=x($+st/2,Z)+"rotate(-30)"+x(0,-bt._offset);H.layers.caxis.attr("transform",kt),H.layers.cgrid.attr("transform",kt),H.drawAxes(!0),H.layers.aline.select("path").attr("d",wt.showline?"M"+$+","+(Z+nt)+"l"+st/2+",-"+nt:"M0,0").call(p.stroke,wt.linecolor||"#000").style("stroke-width",(wt.linewidth||0)+"px"),H.layers.bline.select("path").attr("d",Rt.showline?"M"+$+","+(Z+nt)+"h"+st:"M0,0").call(p.stroke,Rt.linecolor||"#000").style("stroke-width",(Rt.linewidth||0)+"px"),H.layers.cline.select("path").attr("d",bt.showline?"M"+($+st/2)+","+Z+"l"+st/2+","+nt:"M0,0").call(p.stroke,bt.linecolor||"#000").style("stroke-width",(bt.linewidth||0)+"px"),H.graphDiv._context.staticPlot||H.initInteractions(),r.setClipUrl(H.layers.frontplot,H._hasClipOnAxisFalse?null:H.clipId,H.graphDiv)},E.drawAxes=function(B){var O=this,H=O.graphDiv,Y=O.id.substr(7)+"title",j=O.layers,et=O.aaxis,it=O.baxis,ut=O.caxis;if(O.drawAx(et),O.drawAx(it),O.drawAx(ut),B){var J=Math.max(et.showticklabels?et.tickfont.size/2:0,(ut.showticklabels?ut.tickfont.size*.75:0)+(ut.ticks==="outside"?ut.ticklen*.87:0)),X=(it.showticklabels?it.tickfont.size:0)+(it.ticks==="outside"?it.ticklen:0)+3;j["a-title"]=u.draw(H,"a"+Y,{propContainer:et,propName:O.id+".aaxis.title",placeholder:v(H,"Click to enter Component A title"),attributes:{x:O.x0+O.w/2,y:O.y0-et.title.font.size/3-J,"text-anchor":"middle"}}),j["b-title"]=u.draw(H,"b"+Y,{propContainer:it,propName:O.id+".baxis.title",placeholder:v(H,"Click to enter Component B title"),attributes:{x:O.x0-X,y:O.y0+O.h+it.title.font.size*.83+X,"text-anchor":"middle"}}),j["c-title"]=u.draw(H,"c"+Y,{propContainer:ut,propName:O.id+".caxis.title",placeholder:v(H,"Click to enter Component C title"),attributes:{x:O.x0+O.w+X,y:O.y0+O.h+ut.title.font.size*.83+X,"text-anchor":"middle"}})}},E.drawAx=function(B){var O=this,H=O.graphDiv,Y=B._name,j=Y.charAt(0),et=B._id,it=O.layers[Y],ut=30,J=j+"tickLayout",X=s(B);O[J]!==X&&(it.selectAll("."+et+"tick").remove(),O[J]=X),B.setScale();var tt=f.calcTicks(B),V=f.clipEnds(B,tt),Q=f.makeTransTickFn(B),ot=f.getTickSigns(B)[2],$=S.deg2rad(ut),Z=ot*(B.linewidth||1)/2,st=ot*B.ticklen,nt=O.w,ct=O.h,gt=j==="b"?"M0,"+Z+"l"+Math.sin($)*st+","+Math.cos($)*st:"M"+Z+",0l"+Math.cos($)*st+","+-Math.sin($)*st,Tt={a:"M0,0l"+ct+",-"+nt/2,b:"M0,0l-"+nt/2+",-"+ct,c:"M0,0l-"+ct+","+nt/2}[j];f.drawTicks(H,B,{vals:B.ticks==="inside"?V:tt,layer:it,path:gt,transFn:Q,crisp:!1}),f.drawGrid(H,B,{vals:V,layer:O.layers[j+"grid"],path:Tt,transFn:Q,crisp:!1}),f.drawLabels(H,B,{vals:tt,layer:it,transFn:Q,labelFns:f.makeLabelFns(B,0,ut)})};function s(B){return B.ticks+String(B.ticklen)+String(B.showticklabels)}var L=_.MINZOOM/2+.87,M="m-0.87,.5h"+L+"v3h-"+(L+5.2)+"l"+(L/2+2.6)+",-"+(L*.87+4.5)+"l2.6,1.5l-"+L/2+","+L*.87+"Z",z="m0.87,.5h-"+L+"v3h"+(L+5.2)+"l-"+(L/2+2.6)+",-"+(L*.87+4.5)+"l-2.6,1.5l"+L/2+","+L*.87+"Z",D="m0,1l"+L/2+","+L*.87+"l2.6,-1.5l-"+(L/2+2.6)+",-"+(L*.87+4.5)+"l-"+(L/2+2.6)+","+(L*.87+4.5)+"l2.6,1.5l"+L/2+",-"+L*.87+"Z",N="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",I=!0;E.clearOutline=function(){A(this.dragOptions),w(this.dragOptions.gd)},E.initInteractions=function(){var B=this,O=B.layers.plotbg.select("path").node(),H=B.graphDiv,Y=H._fullLayout._zoomlayer,j,et;this.dragOptions={element:O,gd:H,plotinfo:{id:B.id,domain:H._fullLayout[B.id].domain,xaxis:B.xaxis,yaxis:B.yaxis},subplot:B.id,prepFn:function(Ht,Ut,kt){B.dragOptions.xaxes=[B.xaxis],B.dragOptions.yaxes=[B.yaxis],j=H._fullLayout._invScaleX,et=H._fullLayout._invScaleY;var Vt=B.dragOptions.dragmode=H._fullLayout.dragmode;h(Vt)?B.dragOptions.minDrag=1:B.dragOptions.minDrag=void 0,Vt==="zoom"?(B.dragOptions.moveFn=Rt,B.dragOptions.clickFn=nt,B.dragOptions.doneFn=bt,ct(Ht,Ut,kt)):Vt==="pan"?(B.dragOptions.moveFn=mt,B.dragOptions.clickFn=nt,B.dragOptions.doneFn=Lt,At(),B.clearOutline(H)):(b(Vt)||h(Vt))&&o(Ht,Ut,kt,B.dragOptions,Vt)}};var it,ut,J,X,tt,V,Q,ot,$,Z;function st(Ht){var Ut={};return Ut[B.id+".aaxis.min"]=Ht.a,Ut[B.id+".baxis.min"]=Ht.b,Ut[B.id+".caxis.min"]=Ht.c,Ut}function nt(Ht,Ut){var kt=H._fullLayout.clickmode;k(H),Ht===2&&(H.emit("plotly_doubleclick",null),i.call("_guiRelayout",H,st({a:0,b:0,c:0}))),kt.indexOf("select")>-1&&Ht===1&&d(Ut,H,[B.xaxis],[B.yaxis],B.id,B.dragOptions),kt.indexOf("event")>-1&&l.click(H,Ut,B.id)}function ct(Ht,Ut,kt){var Vt=O.getBoundingClientRect();it=Ut-Vt.left,ut=kt-Vt.top,H._fullLayout._calcInverseTransform(H);var It=H._fullLayout._invTransform,re=S.apply3DTransform(It)(it,ut);it=re[0],ut=re[1],J={a:B.aaxis.range[0],b:B.baxis.range[1],c:B.caxis.range[1]},tt=J,X=B.aaxis.range[1]-J.a,V=C(B.graphDiv._fullLayout[B.id].bgcolor).getLuminance(),Q="M0,"+B.h+"L"+B.w/2+", 0L"+B.w+","+B.h+"Z",ot=!1,$=Y.append("path").attr("class","zoombox").attr("transform",x(B.x0,B.y0)).style({fill:V>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",Q),Z=Y.append("path").attr("class","zoombox-corners").attr("transform",x(B.x0,B.y0)).style({fill:p.background,stroke:p.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),B.clearOutline(H)}function gt(Ht,Ut){return 1-Ut/B.h}function Tt(Ht,Ut){return 1-(Ht+(B.h-Ut)/Math.sqrt(3))/B.w}function wt(Ht,Ut){return(Ht-(B.h-Ut)/Math.sqrt(3))/B.w}function Rt(Ht,Ut){var kt=it+Ht*j,Vt=ut+Ut*et,It=Math.max(0,Math.min(1,gt(it,ut),gt(kt,Vt))),re=Math.max(0,Math.min(1,Tt(it,ut),Tt(kt,Vt))),Kt=Math.max(0,Math.min(1,wt(it,ut),wt(kt,Vt))),$t=(It/2+Kt)*B.w,le=(1-It/2-re)*B.w,he=($t+le)/2,de=le-$t,xe=(1-It)*B.h,Se=xe-de/T;de<_.MINZOOM?(tt=J,$.attr("d",Q),Z.attr("d","M0,0Z")):(tt={a:J.a+It*X,b:J.b+re*X,c:J.c+Kt*X},$.attr("d",Q+"M"+$t+","+xe+"H"+le+"L"+he+","+Se+"L"+$t+","+xe+"Z"),Z.attr("d","M"+it+","+ut+N+"M"+$t+","+xe+M+"M"+le+","+xe+z+"M"+he+","+Se+D)),ot||($.transition().style("fill",V>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Z.transition().style("opacity",1).duration(200),ot=!0),H.emit("plotly_relayouting",st(tt))}function bt(){k(H),tt!==J&&(i.call("_guiRelayout",H,st(tt)),I&&H.data&&H._context.showTips&&(S.notifier(v(H,"Double-click to zoom back out"),"long"),I=!1))}function At(){J={a:B.aaxis.range[0],b:B.baxis.range[1],c:B.caxis.range[1]},tt=J}function mt(Ht,Ut){var kt=Ht/B.xaxis._m,Vt=Ut/B.yaxis._m;tt={a:J.a-Vt,b:J.b+(kt+Vt)/2,c:J.c-(kt-Vt)/2};var It=[tt.a,tt.b,tt.c].sort(S.sorterAsc),re={a:It.indexOf(tt.a),b:It.indexOf(tt.b),c:It.indexOf(tt.c)};It[0]<0&&(It[1]+It[0]/2<0?(It[2]+=It[0]+It[1],It[0]=It[1]=0):(It[2]+=It[0]/2,It[1]+=It[0]/2,It[0]=0),tt={a:It[re.a],b:It[re.b],c:It[re.c]},Ut=(J.a-tt.a)*B.yaxis._m,Ht=(J.c-tt.c-J.b+tt.b)*B.xaxis._m);var Kt=x(B.x0+Ht,B.y0+Ut);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Kt);var $t=x(-Ht,-Ut);B.clipDefRelative.select("path").attr("transform",$t),B.aaxis.range=[tt.a,B.sum-tt.b-tt.c],B.baxis.range=[B.sum-tt.a-tt.c,tt.b],B.caxis.range=[B.sum-tt.a-tt.b,tt.c],B.drawAxes(!1),B._hasClipOnAxisFalse&&B.plotContainer.select(".scatterlayer").selectAll(".trace").call(r.hideOutsideRangePoints,B),H.emit("plotly_relayouting",st(tt))}function Lt(){i.call("_guiRelayout",H,st(tt))}O.onmousemove=function(Ht){l.hover(H,Ht,B.id),H._fullLayout._lasthover=O,H._fullLayout._hoversubplot=B.id},O.onmouseout=function(Ht){H._dragging||c.unhover(H,Ht)},c.init(this.dragOptions)};function k(B){g.select(B).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}},24040:function(G,U,t){var g=t(24248),C=t(16628),i=t(52416),S=t(63620),x=t(52200).addStyleRule,v=t(92880),p=t(45464),r=t(64859),e=v.extendFlat,a=v.extendDeepAll;U.modules={},U.allCategories={},U.allTypes=[],U.subplotsRegistry={},U.transformsRegistry={},U.componentsRegistry={},U.layoutArrayContainers=[],U.layoutArrayRegexes=[],U.traceLayoutAttributes={},U.localeRegistry={},U.apiMethodRegistry={},U.collectableSubplotTypes=null,U.register=function(A){if(U.collectableSubplotTypes=null,A)A&&!Array.isArray(A)&&(A=[A]);else throw new Error("No argument passed to Plotly.register.");for(var _=0;_-1}G.exports=function(r,e){var a,n=r.data,f=r.layout,c=S([],n),l=S({},f,x(e.tileClass)),m=r._context||{};if(e.width&&(l.width=e.width),e.height&&(l.height=e.height),e.tileClass==="thumbnail"||e.tileClass==="themes__thumb"){l.annotations=[];var h=Object.keys(l);for(a=0;a")!==-1?"":f.html(l).text()});return f.remove(),c}function a(n){return n.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}G.exports=function(f,c,l){var m=f._fullLayout,h=m._paper,b=m._toppaper,u=m.width,o=m.height,d;h.insert("rect",":first-child").call(i.setRect,0,0,u,o).call(S.fill,m.paper_bgcolor);var w=m._basePlotModules||[];for(d=0;dH+B||!g(O))}for(var j=0;j=0)return m}else if(typeof m=="string"&&(m=m.trim(),m.slice(-1)==="%"&&g(m.slice(0,-1))&&(m=+m.slice(0,-1),m>=0)))return m+"%"}function l(m,h,b,u,o,d){d=d||{};var w=d.moduleHasSelected!==!1,A=d.moduleHasUnselected!==!1,_=d.moduleHasConstrain!==!1,y=d.moduleHasCliponaxis!==!1,E=d.moduleHasTextangle!==!1,T=d.moduleHasInsideanchor!==!1,s=!!d.hasPathbar,L=Array.isArray(o)||o==="auto",M=L||o==="inside",z=L||o==="outside";if(M||z){var D=a(u,"textfont",b.font),N=C.extendFlat({},D),I=m.textfont&&m.textfont.color,k=!I;if(k&&delete N.color,a(u,"insidetextfont",N),s){var B=C.extendFlat({},D);k&&delete B.color,a(u,"pathbar.textfont",B)}z&&a(u,"outsidetextfont",D),w&&u("selected.textfont.color"),A&&u("unselected.textfont.color"),_&&u("constraintext"),y&&u("cliponaxis"),E&&u("textangle"),u("texttemplate")}M&&T&&u("insidetextanchor")}G.exports={supplyDefaults:n,crossTraceDefaults:f,handleText:l,validateCornerradius:c}},52160:function(G){G.exports=function(t,g,C){return t.x="xVal"in g?g.xVal:g.x,t.y="yVal"in g?g.yVal:g.y,g.xa&&(t.xaxis=g.xa),g.ya&&(t.yaxis=g.ya),C.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}},60444:function(G,U,t){var g=t(38248),C=t(49760),i=t(3400).isArrayOrTypedArray;U.coerceString=function(S,x,v){if(typeof x=="string"){if(x||!S.noBlank)return x}else if((typeof x=="number"||x===!0)&&!S.strict)return String(x);return v!==void 0?v:S.dflt},U.coerceNumber=function(S,x,v){if(g(x)){x=+x;var p=S.min,r=S.max,e=p!==void 0&&xr;if(!e)return x}return v!==void 0?v:S.dflt},U.coerceColor=function(S,x,v){return C(x).isValid()?x:v!==void 0?v:S.dflt},U.coerceEnumerated=function(S,x,v){return S.coerceNumber&&(x=+x),S.values.indexOf(x)!==-1?x:v!==void 0?v:S.dflt},U.getValue=function(S,x){var v;return i(S)?x0?gt+=Tt:y<0&&(gt-=Tt)}return gt}function ut(ct){var gt=y,Tt=ct.b,wt=it(ct);return g.inbox(Tt-gt,wt-gt,w+(wt-gt)/(wt-Tt)-1)}function J(ct){var gt=y,Tt=ct.b,wt=it(ct);return g.inbox(Tt-gt,wt-gt,A+(wt-gt)/(wt-Tt)-1)}var X=n[E+"a"],tt=n[T+"a"];M=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function V(ct){return(s(ct)+L(ct))/2}var Q=g.getDistanceFunction(l,s,L,V);if(g.getClosest(h,Q,n),n.index!==!1&&h[n.index].p!==p){D||(O=function(ct){return Math.min(N(ct),ct.p-u.bargroupwidth/2)},H=function(ct){return Math.max(I(ct),ct.p+u.bargroupwidth/2)});var ot=n.index,$=h[ot],Z=b.base?$.b+$.s:$.s;n[T+"0"]=n[T+"1"]=tt.c2p($[T],!0),n[T+"LabelVal"]=Z;var st=u.extents[u.extents.round($.p)];n[E+"0"]=X.c2p(o?O($):st[0],!0),n[E+"1"]=X.c2p(o?H($):st[1],!0);var nt=$.orig_p!==void 0;return n[E+"LabelVal"]=nt?$.orig_p:$.p,n.labelLabel=v(X,n[E+"LabelVal"],b[E+"hoverformat"]),n.valueLabel=v(tt,n[T+"LabelVal"],b[T+"hoverformat"]),n.baseLabel=v(tt,$.b,b[T+"hoverformat"]),n.spikeDistance=(J($)+et($))/2,n[E+"Spike"]=X.c2p($.p,!0),S($,b,n),n.hovertemplate=b.hovertemplate,n}}function a(n,f){var c=f.mcc||n.marker.color,l=f.mlcc||n.marker.line.color,m=x(n,f);if(i.opacity(c))return c;if(i.opacity(l)&&m)return l}G.exports={hoverPoints:r,hoverOnBars:e,getTraceColor:a}},51132:function(G,U,t){G.exports={attributes:t(20832),layoutAttributes:t(39324),supplyDefaults:t(31508).supplyDefaults,crossTraceDefaults:t(31508).crossTraceDefaults,supplyLayoutDefaults:t(37156),calc:t(71820),crossTraceCalc:t(96376).crossTraceCalc,colorbar:t(5528),arraysToCalcdata:t(84664),plot:t(98184).plot,style:t(60100).style,styleOnSelect:t(60100).styleOnSelect,hoverPoints:t(63400).hoverPoints,eventData:t(52160),selectPoints:t(45784),moduleType:"trace",name:"bar",basePlotModule:t(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(G){G.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(G,U,t){var g=t(24040),C=t(54460),i=t(3400),S=t(39324),x=t(31508).validateCornerradius;G.exports=function(v,p,r){function e(d,w){return i.coerce(v,p,S,d,w)}for(var a=!1,n=!1,f=!1,c={},l=e("barmode"),m=0;m0)-(j<0)}function _(j,et){return j0}function s(j,et,it,ut,J,X){var tt=et.xaxis,V=et.yaxis,Q=j._fullLayout,ot=j._context.staticPlot;J||(J={mode:Q.barmode,norm:Q.barmode,gap:Q.bargap,groupgap:Q.bargroupgap},n("bar",Q));var $=i.makeTraceGroups(ut,it,"trace bars").each(function(Z){var st=g.select(this),nt=Z[0].trace,ct=Z[0].t,gt=nt.type==="waterfall",Tt=nt.type==="funnel",wt=nt.type==="histogram",Rt=nt.type==="bar",bt=Rt||Tt,At=0;gt&&nt.connector.visible&&nt.connector.mode==="between"&&(At=nt.connector.line.width/2);var mt=nt.orientation==="h",Lt=T(J),Ht=i.ensureSingle(st,"g","points"),Ut=w(nt),kt=Ht.selectAll("g.point").data(i.identity,Ut);kt.enter().append("g").classed("point",!0),kt.exit().remove(),kt.each(function(It,re){var Kt=g.select(this),$t=y(It,tt,V,mt),le=$t[0][0],he=$t[0][1],de=$t[1][0],xe=$t[1][1],Se=(mt?he-le:xe-de)===0;Se&&bt&&c.getLineWidth(nt,It)&&(Se=!1),Se||(Se=!C(le)||!C(he)||!C(de)||!C(xe)),It.isBlank=Se,Se&&(mt?he=le:xe=de),At&&!Se&&(mt?(le-=_(le,he)*At,he+=_(le,he)*At):(de-=_(de,xe)*At,xe+=_(de,xe)*At));var ne,zt;if(nt.type==="waterfall"){if(!Se){var Xt=nt[It.dir].marker;ne=Xt.line.width,zt=Xt.color}}else ne=c.getLineWidth(nt,It),zt=It.mc||nt.marker.color;function Jt(se){var Ae=g.round(ne/2%1,2);return J.gap===0&&J.groupgap===0?g.round(Math.round(se)-Ae,2):se}function Wt(se,Ae,Ce){return Ce&&se===Ae?se:Math.abs(se-Ae)>=2?Jt(se):se>Ae?Math.ceil(se):Math.floor(se)}var Ft=x.opacity(zt),xt=Ft<1||ne>.01?Jt:Wt;j._context.staticPlot||(le=xt(le,he,mt),he=xt(he,le,mt),de=xt(de,xe,!mt),xe=xt(xe,de,!mt));var yt=mt?tt.c2p:V.c2p,Et;It.s0>0?Et=It._sMax:It.s0<0?Et=It._sMin:Et=It.s1>0?It._sMax:It._sMin;function Mt(se,Ae){if(!se)return 0;var Ce=Math.abs(mt?xe-de:he-le),Ie=Math.abs(mt?he-le:xe-de),Pe=xt(Math.abs(yt(Et,!0)-yt(0,!0))),ke=It.hasB?Math.min(Ce/2,Ie/2):Math.min(Ce/2,Pe),Ve;if(Ae==="%"){var Je=Math.min(50,se);Ve=Ce*(Je/100)}else Ve=se;return xt(Math.max(Math.min(Ve,ke),0))}var Nt=Rt||wt?Mt(ct.cornerradiusvalue,ct.cornerradiusform):0,jt,ie,me="M"+le+","+de+"V"+xe+"H"+he+"V"+de+"Z",be=0;if(Nt&&It.s){var ve=A(It.s0)===0||A(It.s)===A(It.s0)?It.s1:It.s0;if(be=xt(It.hasB?0:Math.abs(yt(Et,!0)-yt(ve,!0))),be0?Math.sqrt(be*(2*Nt-be)):0,pe=Le>0?Math.max:Math.min;jt="M"+le+","+de+"V"+(xe-Be*ce)+"H"+pe(he-(Nt-be)*Le,le)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+he+","+(xe-Nt*ce-ir)+"V"+(de+Nt*ce+ir)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+pe(he-(Nt-be)*Le,le)+","+(de+Be*ce)+"Z"}else if(It.hasB)jt="M"+(le+Nt*Le)+","+de+"A "+Nt+","+Nt+" 0 0 "+Te+" "+le+","+(de+Nt*ce)+"V"+(xe-Nt*ce)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(le+Nt*Le)+","+xe+"H"+(he-Nt*Le)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+he+","+(xe-Nt*ce)+"V"+(de+Nt*ce)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(he-Nt*Le)+","+de+"Z";else{ie=Math.abs(xe-de)+be;var Xe=ie0?Math.sqrt(be*(2*Nt-be)):0,or=ce>0?Math.max:Math.min;jt="M"+(le+Xe*Le)+","+de+"V"+or(xe-(Nt-be)*ce,de)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(le+Nt*Le-Ke)+","+xe+"H"+(he-Nt*Le+Ke)+"A "+Nt+","+Nt+" 0 0 "+Te+" "+(he-Xe*Le)+","+or(xe-(Nt-be)*ce,de)+"V"+de+"Z"}}else jt=me}else jt=me;var $e=E(i.ensureSingle(Kt,"path"),Q,J,X);if($e.style("vector-effect",ot?"none":"non-scaling-stroke").attr("d",isNaN((he-le)*(xe-de))||Se&&j._context.staticPlot?"M0,0Z":jt).call(v.setClipUrl,et.layerClipId,j),!Q.uniformtext.mode&&Lt){var ge=v.makePointStyleFns(nt);v.singlePointStyle(It,$e,nt,ge,j)}L(j,et,Kt,Z,re,le,he,de,xe,Nt,be,J,X),et.layerClipId&&v.hideOutsideRangePoint(It,Kt.select("text"),tt,V,nt.xcalendar,nt.ycalendar)});var Vt=nt.cliponaxis===!1;v.setClipUrl(st,Vt?null:et.layerClipId,j)});p.getComponentMethod("errorbars","plot")(j,$,et,J)}function L(j,et,it,ut,J,X,tt,V,Q,ot,$,Z,st){var nt=et.xaxis,ct=et.yaxis,gt=j._fullLayout,Tt;function wt(ie,me,be){var ve=i.ensureSingle(ie,"text").text(me).attr({class:"bartext bartext-"+Tt,"text-anchor":"middle","data-notex":1}).call(v.font,be).call(S.convertToTspans,j);return ve}var Rt=ut[0].trace,bt=Rt.orientation==="h",At=B(gt,ut,J,nt,ct);Tt=O(Rt,J);var mt=Z.mode==="stack"||Z.mode==="relative",Lt=ut[J],Ht=!mt||Lt._outmost,Ut=Lt.hasB,kt=ot&&ot-$>o;if(!At||Tt==="none"||(Lt.isBlank||X===tt||V===Q)&&(Tt==="auto"||Tt==="inside")){it.select("text").remove();return}var Vt=gt.font,It=f.getBarColor(ut[J],Rt),re=f.getInsideTextFont(Rt,J,Vt,It),Kt=f.getOutsideTextFont(Rt,J,Vt),$t=Rt.insidetextanchor||"end",le=it.datum();bt?nt.type==="log"&&le.s0<=0&&(nt.range[0]0&&Jt>0,xt;kt?Ut?xt=M(xe-2*ot,Se,Xt,Jt,bt)||M(xe,Se-2*ot,Xt,Jt,bt):bt?xt=M(xe-(ot-$),Se,Xt,Jt,bt)||M(xe,Se-2*(ot-$),Xt,Jt,bt):xt=M(xe,Se-(ot-$),Xt,Jt,bt)||M(xe-2*(ot-$),Se,Xt,Jt,bt):xt=M(xe,Se,Xt,Jt,bt),Ft&&xt?Tt="inside":(Tt="outside",ne.remove(),ne=null)}else Tt="inside";if(!ne){Wt=i.ensureUniformFontSize(j,Tt==="outside"?Kt:re),ne=wt(it,At,Wt);var yt=ne.attr("transform");if(ne.attr("transform",""),zt=v.bBox(ne.node()),Xt=zt.width,Jt=zt.height,ne.attr("transform",yt),Xt<=0||Jt<=0){ne.remove();return}}var Et=Rt.textangle,Mt,Nt;Tt==="outside"?(Nt=Rt.constraintext==="both"||Rt.constraintext==="outside",Mt=k(X,tt,V,Q,zt,{isHorizontal:bt,constrained:Nt,angle:Et})):(Nt=Rt.constraintext==="both"||Rt.constraintext==="inside",Mt=N(X,tt,V,Q,zt,{isHorizontal:bt,constrained:Nt,angle:Et,anchor:$t,hasB:Ut,r:ot,overhead:$})),Mt.fontSize=Wt.size,a(Rt.type==="histogram"?"bar":Rt.type,Mt,gt),Lt.transform=Mt;var jt=E(ne,gt,Z,st);i.setTransormAndDisplay(jt,Mt)}function M(j,et,it,ut,J){if(j<0||et<0)return!1;var X=it<=j&&ut<=et,tt=it<=et&&ut<=j,V=J?j>=it*(et/ut):et>=ut*(j/it);return X||tt||V}function z(j){return j==="auto"?0:j}function D(j,et){var it=Math.PI/180*et,ut=Math.abs(Math.sin(it)),J=Math.abs(Math.cos(it));return{x:j.width*J+j.height*ut,y:j.width*ut+j.height*J}}function N(j,et,it,ut,J,X){var tt=!!X.isHorizontal,V=!!X.constrained,Q=X.angle||0,ot=X.anchor,$=ot==="end",Z=ot==="start",st=X.leftToRight||0,nt=(st+1)/2,ct=1-nt,gt=X.hasB,Tt=X.r,wt=X.overhead,Rt=J.width,bt=J.height,At=Math.abs(et-j),mt=Math.abs(ut-it),Lt=At>2*o&&mt>2*o?o:0;At-=2*Lt,mt-=2*Lt;var Ht=z(Q);Q==="auto"&&!(Rt<=At&&bt<=mt)&&(Rt>At||bt>mt)&&(!(Rt>mt||bt>At)||Rto){var It=I(j,et,it,ut,Ut,Tt,wt,tt,gt);kt=It.scale,Vt=It.pad}else kt=1,V&&(kt=Math.min(1,At/Ut.x,mt/Ut.y)),Vt=0;var re=J.left*ct+J.right*nt,Kt=(J.top+J.bottom)/2,$t=(j+o)*ct+(et-o)*nt,le=(it+ut)/2,he=0,de=0;if(Z||$){var xe=(tt?Ut.x:Ut.y)/2;Tt&&($||gt)&&(Lt+=Vt);var Se=tt?_(j,et):_(it,ut);tt?Z?($t=j+Se*Lt,he=-Se*xe):($t=et-Se*Lt,he=Se*xe):Z?(le=it+Se*Lt,de=-Se*xe):(le=ut-Se*Lt,de=Se*xe)}return{textX:re,textY:Kt,targetX:$t,targetY:le,anchorX:he,anchorY:de,scale:kt,rotate:Ht}}function I(j,et,it,ut,J,X,tt,V,Q){var ot=Math.max(0,Math.abs(et-j)-2*o),$=Math.max(0,Math.abs(ut-it)-2*o),Z=X-o,st=tt?Z-Math.sqrt(Z*Z-(Z-tt)*(Z-tt)):Z,nt=Q?Z*2:V?Z-tt:2*st,ct=Q?Z*2:V?2*st:Z-tt,gt,Tt,wt,Rt,bt;return J.y/J.x>=$/(ot-nt)?Rt=$/J.y:J.y/J.x<=($-ct)/ot?Rt=ot/J.x:!Q&&V?(gt=J.x*J.x+J.y*J.y/4,Tt=-2*J.x*(ot-Z)-J.y*($/2-Z),wt=(ot-Z)*(ot-Z)+($/2-Z)*($/2-Z)-Z*Z,Rt=(-Tt+Math.sqrt(Tt*Tt-4*gt*wt))/(2*gt)):Q?(gt=(J.x*J.x+J.y*J.y)/4,Tt=-J.x*(ot/2-Z)-J.y*($/2-Z),wt=(ot/2-Z)*(ot/2-Z)+($/2-Z)*($/2-Z)-Z*Z,Rt=(-Tt+Math.sqrt(Tt*Tt-4*gt*wt))/(2*gt)):(gt=J.x*J.x/4+J.y*J.y,Tt=-J.x*(ot/2-Z)-2*J.y*($-Z),wt=(ot/2-Z)*(ot/2-Z)+($-Z)*($-Z)-Z*Z,Rt=(-Tt+Math.sqrt(Tt*Tt-4*gt*wt))/(2*gt)),Rt=Math.min(1,Rt),V?bt=Math.max(0,Z-Math.sqrt(Math.max(0,Z*Z-(Z-($-J.y*Rt)/2)*(Z-($-J.y*Rt)/2)))-tt):bt=Math.max(0,Z-Math.sqrt(Math.max(0,Z*Z-(Z-(ot-J.x*Rt)/2)*(Z-(ot-J.x*Rt)/2)))-tt),{scale:Rt,pad:bt}}function k(j,et,it,ut,J,X){var tt=!!X.isHorizontal,V=!!X.constrained,Q=X.angle||0,ot=J.width,$=J.height,Z=Math.abs(et-j),st=Math.abs(ut-it),nt;tt?nt=st>2*o?o:0:nt=Z>2*o?o:0;var ct=1;V&&(ct=tt?Math.min(1,st/$):Math.min(1,Z/ot));var gt=z(Q),Tt=D(J,gt),wt=(tt?Tt.x:Tt.y)/2,Rt=(J.left+J.right)/2,bt=(J.top+J.bottom)/2,At=(j+et)/2,mt=(it+ut)/2,Lt=0,Ht=0,Ut=tt?_(et,j):_(it,ut);return tt?(At=et-Ut*nt,Lt=Ut*wt):(mt=ut+Ut*nt,Ht=-Ut*wt),{textX:Rt,textY:bt,targetX:At,targetY:mt,anchorX:Lt,anchorY:Ht,scale:ct,rotate:gt}}function B(j,et,it,ut,J){var X=et[0].trace,tt=X.texttemplate,V;return tt?V=H(j,et,it,ut,J):X.textinfo?V=Y(et,it,ut,J):V=c.getValue(X.text,it),c.coerceString(h,V)}function O(j,et){var it=c.getValue(j.textposition,et);return c.coerceEnumerated(b,it)}function H(j,et,it,ut,J){var X=et[0].trace,tt=i.castOption(X,it,"texttemplate");if(!tt)return"";var V=X.type==="histogram",Q=X.type==="waterfall",ot=X.type==="funnel",$=X.orientation==="h",Z,st,nt,ct;$?(Z="y",st=J,nt="x",ct=ut):(Z="x",st=ut,nt="y",ct=J);function gt(Lt){return r(st,st.c2l(Lt),!0).text}function Tt(Lt){return r(ct,ct.c2l(Lt),!0).text}var wt=et[it],Rt={};Rt.label=wt.p,Rt.labelLabel=Rt[Z+"Label"]=gt(wt.p);var bt=i.castOption(X,wt.i,"text");(bt===0||bt)&&(Rt.text=bt),Rt.value=wt.s,Rt.valueLabel=Rt[nt+"Label"]=Tt(wt.s);var At={};u(At,X,wt.i),(V||At.x===void 0)&&(At.x=$?Rt.value:Rt.label),(V||At.y===void 0)&&(At.y=$?Rt.label:Rt.value),(V||At.xLabel===void 0)&&(At.xLabel=$?Rt.valueLabel:Rt.labelLabel),(V||At.yLabel===void 0)&&(At.yLabel=$?Rt.labelLabel:Rt.valueLabel),Q&&(Rt.delta=+wt.rawS||wt.s,Rt.deltaLabel=Tt(Rt.delta),Rt.final=wt.v,Rt.finalLabel=Tt(Rt.final),Rt.initial=Rt.final-Rt.delta,Rt.initialLabel=Tt(Rt.initial)),ot&&(Rt.value=wt.s,Rt.valueLabel=Tt(Rt.value),Rt.percentInitial=wt.begR,Rt.percentInitialLabel=i.formatPercent(wt.begR),Rt.percentPrevious=wt.difR,Rt.percentPreviousLabel=i.formatPercent(wt.difR),Rt.percentTotal=wt.sumR,Rt.percenTotalLabel=i.formatPercent(wt.sumR));var mt=i.castOption(X,wt.i,"customdata");return mt&&(Rt.customdata=mt),i.texttemplateString(tt,Rt,j._d3locale,At,Rt,X._meta||{})}function Y(j,et,it,ut){var J=j[0].trace,X=J.orientation==="h",tt=J.type==="waterfall",V=J.type==="funnel";function Q(mt){var Lt=X?ut:it;return r(Lt,mt,!0).text}function ot(mt){var Lt=X?it:ut;return r(Lt,+mt,!0).text}var $=J.textinfo,Z=j[et],st=$.split("+"),nt=[],ct,gt=function(mt){return st.indexOf(mt)!==-1};if(gt("label")&&nt.push(Q(j[et].p)),gt("text")&&(ct=i.castOption(J,Z.i,"text"),(ct===0||ct)&&nt.push(ct)),tt){var Tt=+Z.rawS||Z.s,wt=Z.v,Rt=wt-Tt;gt("initial")&&nt.push(ot(Rt)),gt("delta")&&nt.push(ot(Tt)),gt("final")&&nt.push(ot(wt))}if(V){gt("value")&&nt.push(ot(Z.s));var bt=0;gt("percent initial")&&bt++,gt("percent previous")&&bt++,gt("percent total")&&bt++;var At=bt>1;gt("percent initial")&&(ct=i.formatPercent(Z.begR),At&&(ct+=" of initial"),nt.push(ct)),gt("percent previous")&&(ct=i.formatPercent(Z.difR),At&&(ct+=" of previous"),nt.push(ct)),gt("percent total")&&(ct=i.formatPercent(Z.sumR),At&&(ct+=" of total"),nt.push(ct))}return nt.join("
    ")}G.exports={plot:s,toMoveInsideBar:N}},45784:function(G){G.exports=function(g,C){var i=g.cd,S=g.xaxis,x=g.yaxis,v=i[0].trace,p=v.type==="funnel",r=v.orientation==="h",e=[],a;if(C===!1)for(a=0;a1||s.bargap===0&&s.bargroupgap===0&&!L[0].trace.marker.line.width)&&g.select(this).attr("shape-rendering","crispEdges")}),E.selectAll("g.points").each(function(L){var M=g.select(this),z=L[0].trace;c(M,z,y)}),x.getComponentMethod("errorbars","style")(E)}function c(y,E,T){i.pointStyle(y.selectAll("path"),E,T),l(y,E,T)}function l(y,E,T){y.selectAll("text").each(function(s){var L=g.select(this),M=S.ensureUniformFontSize(T,u(L,s,E,T));i.font(L,M)})}function m(y,E,T){var s=E[0].trace;s.selectedpoints?h(T,s,y):(c(T,s,y),x.getComponentMethod("errorbars","style")(T))}function h(y,E,T){i.selectedPointStyle(y.selectAll("path"),E),b(y.selectAll("text"),E,T)}function b(y,E,T){y.each(function(s){var L=g.select(this),M;if(s.selected){M=S.ensureUniformFontSize(T,u(L,s,E,T));var z=E.selected.textfont&&E.selected.textfont.color;z&&(M.color=z),i.font(L,M)}else i.selectedTextStyle(L,E)})}function u(y,E,T,s){var L=s._fullLayout.font,M=T.textfont;if(y.classed("bartext-inside")){var z=_(E,T);M=d(T,E.i,L,z)}else y.classed("bartext-outside")&&(M=w(T,E.i,L));return M}function o(y,E,T){return A(r,y.textfont,E,T)}function d(y,E,T,s){var L=o(y,E,T),M=y._input.textfont===void 0||y._input.textfont.color===void 0||Array.isArray(y.textfont.color)&&y.textfont.color[E]===void 0;return M&&(L={color:C.contrast(s),family:L.family,size:L.size}),A(e,y.insidetextfont,E,L)}function w(y,E,T){var s=o(y,E,T);return A(a,y.outsidetextfont,E,s)}function A(y,E,T,s){E=E||{};var L=n.getValue(E.family,T),M=n.getValue(E.size,T),z=n.getValue(E.color,T);return{family:n.coerceString(y.family,L,s.family),size:n.coerceNumber(y.size,M,s.size),color:n.coerceColor(y.color,z,s.color)}}function _(y,E){return E.type==="waterfall"?E[y.dir].marker.color:y.mcc||y.mc||E.marker.color}G.exports={style:f,styleTextPoints:l,styleOnSelect:m,getInsideTextFont:d,getOutsideTextFont:w,getBarColor:_,resizeText:v}},55592:function(G,U,t){var g=t(76308),C=t(94288).hasColorscale,i=t(27260),S=t(3400).coercePattern;G.exports=function(v,p,r,e,a){var n=r("marker.color",e),f=C(v,"marker");f&&i(v,p,a,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",g.defaultLine),C(v,"marker.line")&&i(v,p,a,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),S(r,"marker.pattern",n,f),r("selected.marker.color"),r("unselected.marker.color")}},82744:function(G,U,t){var g=t(33428),C=t(3400);function i(p,r,e){var a=p._fullLayout,n=a["_"+e+"Text_minsize"];if(n){var f=a.uniformtext.mode==="hide",c;switch(e){case"funnelarea":case"pie":case"sunburst":c="g.slice";break;case"treemap":case"icicle":c="g.slice, g.pathbar";break;default:c="g.points > g.point"}r.selectAll(c).each(function(l){var m=l.transform;if(m){m.scale=f&&m.hide?0:n/m.fontSize;var h=g.select(this).select("text");C.setTransormAndDisplay(h,m)}})}}function S(p,r,e){if(e.uniformtext.mode){var a=v(p),n=e.uniformtext.minsize,f=r.scale*r.fontSize;r.hide=fl.range[1]&&(w+=Math.PI);var A=function(T){return b(d,w,[T.rp0,T.rp1],[T.thetag0,T.thetag1],h)?u+Math.min(1,Math.abs(T.thetag1-T.thetag0)/o)-1+(T.rp1-d)/(T.rp1-T.rp0)-1:1/0};if(g.getClosest(n,A,r),r.index!==!1){var _=r.index,y=n[_];r.x0=r.x1=y.ct[0],r.y0=r.y1=y.ct[1];var E=C.extendFlat({},y,{r:y.s,theta:y.p});return S(y,f,r),x(E,f,c,r),r.hovertemplate=f.hovertemplate,r.color=i(f,y),r.xLabelVal=r.yLabelVal=void 0,y.s<0&&(r.idealAlign="left"),[r]}}},94456:function(G,U,t){G.exports={moduleType:"trace",name:"barpolar",basePlotModule:t(40872),categories:["polar","bar","showLegend"],attributes:t(78100),layoutAttributes:t(9320),supplyDefaults:t(70384),supplyLayoutDefaults:t(89580),calc:t(47056).calc,crossTraceCalc:t(47056).crossTraceCalc,plot:t(42040),colorbar:t(5528),formatLabels:t(22852),style:t(60100).style,styleOnSelect:t(60100).styleOnSelect,hoverPoints:t(68896),selectPoints:t(45784),meta:{}}},9320:function(G){G.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(G,U,t){var g=t(3400),C=t(9320);G.exports=function(i,S,x){var v={},p;function r(n,f){return g.coerce(i[p]||{},S[p],C,n,f)}for(var e=0;e0?(l=f,m=c):(l=c,m=f);var h=x.findEnclosingVertexAngles(l,p.vangles)[0],b=x.findEnclosingVertexAngles(m,p.vangles)[1],u=[h,(l+m)/2,b];return x.pathPolygonAnnulus(a,n,l,m,u,r,e)}:function(a,n,f,c){return i.pathAnnulus(a,n,f,c,r,e)}}},63188:function(G,U,t){var g=t(98304),C=t(52904),i=t(20832),S=t(22548),x=t(29736).axisHoverFormat,v=t(21776).Ks,p=t(92880).extendFlat,r=C.marker,e=r.line;G.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:C.xperiod,yperiod:C.yperiod,xperiod0:C.xperiod0,yperiod0:C.yperiod0,xperiodalignment:C.xperiodalignment,yperiodalignment:C.yperiodalignment,xhoverformat:x("x"),yhoverformat:x("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:p({},r.symbol,{arrayOk:!1,editType:"plot"}),opacity:p({},r.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:p({},r.angle,{arrayOk:!1,editType:"calc"}),size:p({},r.size,{arrayOk:!1,editType:"calc"}),color:p({},r.color,{arrayOk:!1,editType:"style"}),line:{color:p({},e.color,{arrayOk:!1,dflt:S.defaultLine,editType:"style"}),width:p({},e.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:g(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:C.selected.marker,editType:"style"},unselected:{marker:C.unselected.marker,editType:"style"},text:p({},C.text,{}),hovertext:p({},C.hovertext,{}),hovertemplate:v({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},62555:function(G,U,t){var g=t(38248),C=t(54460),i=t(1220),S=t(3400),x=t(39032).BADNUM,v=S._;G.exports=function(w,A){var _=w._fullLayout,y=C.getFromId(w,A.xaxis||"x"),E=C.getFromId(w,A.yaxis||"y"),T=[],s=A.type==="violin"?"_numViolins":"_numBoxes",L,M,z,D,N,I,k;A.orientation==="h"?(z=y,D="x",N=E,I="y",k=!!A.yperiodalignment):(z=E,D="y",N=y,I="x",k=!!A.xperiodalignment);var B=p(A,I,N,_[s]),O=B[0],H=B[1],Y=S.distinctVals(O,N),j=Y.vals,et=Y.minDiff/2,it,ut,J,X,tt,V,Q=(A.boxpoints||A.points)==="all"?S.identity:function(Se){return Se.vit.uf};if(A._hasPreCompStats){var ot=A[D],$=function(Se){return z.d2c((A[Se]||[])[L])},Z=1/0,st=-1/0;for(L=0;L=it.q1&&it.q3>=it.med){var ct=$("lowerfence");it.lf=ct!==x&&ct<=it.q1?ct:m(it,J,X);var gt=$("upperfence");it.uf=gt!==x&>>=it.q3?gt:h(it,J,X);var Tt=$("mean");it.mean=Tt!==x?Tt:X?S.mean(J,X):(it.q1+it.q3)/2;var wt=$("sd");it.sd=Tt!==x&&wt>=0?wt:X?S.stdev(J,X,it.mean):it.q3-it.q1,it.lo=b(it),it.uo=u(it);var Rt=$("notchspan");Rt=Rt!==x&&Rt>0?Rt:o(it,X),it.ln=it.med-Rt,it.un=it.med+Rt;var bt=it.lf,At=it.uf;A.boxpoints&&J.length&&(bt=Math.min(bt,J[0]),At=Math.max(At,J[X-1])),A.notched&&(bt=Math.min(bt,it.ln),At=Math.max(At,it.un)),it.min=bt,it.max=At}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+it.q1,"median = "+it.med,"q3 = "+it.q3].join(` +`));var mt;it.med!==x?mt=it.med:it.q1!==x?it.q3!==x?mt=(it.q1+it.q3)/2:mt=it.q1:it.q3!==x?mt=it.q3:mt=0,it.med=mt,it.q1=it.q3=mt,it.lf=it.uf=mt,it.mean=it.sd=mt,it.ln=it.un=mt,it.min=it.max=mt}Z=Math.min(Z,it.min),st=Math.max(st,it.max),it.pts2=ut.filter(Q),T.push(it)}}A._extremes[z._id]=C.findExtremes(z,[Z,st],{padded:!0})}else{var Lt=z.makeCalcdata(A,D),Ht=r(j,et),Ut=j.length,kt=e(Ut);for(L=0;L=0&&Vt0){if(it={},it.pos=it[I]=j[L],ut=it.pts=kt[L].sort(c),J=it[D]=ut.map(l),X=J.length,it.min=J[0],it.max=J[X-1],it.mean=S.mean(J,X),it.sd=S.stdev(J,X,it.mean)*A.sdmultiple,it.med=S.interp(J,.5),X%2&&($t||le)){var he,de;$t?(he=J.slice(0,X/2),de=J.slice(X/2+1)):le&&(he=J.slice(0,X/2+1),de=J.slice(X/2)),it.q1=S.interp(he,.5),it.q3=S.interp(de,.5)}else it.q1=S.interp(J,.25),it.q3=S.interp(J,.75);it.lf=m(it,J,X),it.uf=h(it,J,X),it.lo=b(it),it.uo=u(it);var xe=o(it,X);it.ln=it.med-xe,it.un=it.med+xe,It=Math.min(It,it.ln),re=Math.max(re,it.un),it.pts2=ut.filter(Q),T.push(it)}A.notched&&S.isTypedArray(Lt)&&(Lt=Array.from(Lt)),A._extremes[z._id]=C.findExtremes(z,A.notched?Lt.concat([It,re]):Lt,{padded:!0})}return f(T,A),T.length>0?(T[0].t={num:_[s],dPos:et,posLetter:I,valLetter:D,labels:{med:v(w,"median:"),min:v(w,"min:"),q1:v(w,"q1:"),q3:v(w,"q3:"),max:v(w,"max:"),mean:A.boxmean==="sd"||A.sizemode==="sd"?v(w,"mean ± σ:").replace("σ",A.sdmultiple===1?"σ":A.sdmultiple+"σ"):v(w,"mean:"),lf:v(w,"lower fence:"),uf:v(w,"upper fence:")}},_[s]++,T):[{t:{empty:!0}}]};function p(d,w,A,_){var y=w in d,E=w+"0"in d,T="d"+w in d;if(y||E&&T){var s=A.makeCalcdata(d,w),L=i(d,A,w,s).vals;return[L,s]}var M;E?M=d[w+"0"]:"name"in d&&(A.type==="category"||g(d.name)&&["linear","log"].indexOf(A.type)!==-1||S.isDateTime(d.name)&&A.type==="date")?M=d.name:M=_;for(var z=A.type==="multicategory"?A.r2c_just_indices(M):A.d2c(M,0,d[w+"calendar"]),D=d._length,N=new Array(D),I=0;I1,E=1-f[p+"gap"],T=1-f[p+"groupgap"];for(m=0;m0;if(z==="positive"?(it=D*(M?1:.5),X=J,ut=X=I):z==="negative"?(it=X=I,ut=D*(M?1:.5),tt=J):(it=ut=D,X=tt=J),st){var nt=s.pointpos,ct=s.jitter,gt=s.marker.size/2,Tt=0;nt+ct>=0&&(Tt=J*(nt+ct),Tt>it?(Z=!0,ot=gt,V=Tt):Tt>X&&(ot=gt,V=it)),Tt<=it&&(V=it);var wt=0;nt-ct<=0&&(wt=-J*(nt-ct),wt>ut?(Z=!0,$=gt,Q=wt):wt>tt&&($=gt,Q=ut)),wt<=ut&&(Q=ut)}else V=it,Q=ut;var Rt=new Array(b.length);for(h=0;h0?(z="v",E>0?D=Math.min(s,T):D=Math.min(T)):E>0?(z="h",D=Math.min(s)):D=0;if(!D){c.visible=!1;return}c._length=D;var O=l("orientation",z);c._hasPreCompStats?O==="v"&&E===0?(l("x0",0),l("dx",1)):O==="h"&&y===0&&(l("y0",0),l("dy",1)):O==="v"&&E===0?l("x0"):O==="h"&&y===0&&l("y0");var H=C.getComponentMethod("calendars","handleTraceDefaults");H(f,c,["x","y"],m)}function a(f,c,l,m){var h=m.prefix,b=g.coerce2(f,c,p,"marker.outliercolor"),u=l("marker.line.outliercolor"),o="outliers";c._hasPreCompStats?o="all":(b||u)&&(o="suspectedoutliers");var d=l(h+"points",o);d?(l("jitter",d==="all"?.3:0),l("pointpos",d==="all"?-1.5:0),l("marker.symbol"),l("marker.opacity"),l("marker.size"),l("marker.angle"),l("marker.color",c.line.color),l("marker.line.color"),l("marker.line.width"),d==="suspectedoutliers"&&(l("marker.line.outliercolor",c.marker.color),l("marker.line.outlierwidth")),l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size"),l("text"),l("hovertext")):delete c.marker;var w=l("hoveron");(w==="all"||w.indexOf("points")!==-1)&&l("hovertemplate"),g.coerceSelectionMarkerOpacity(c,l)}function n(f,c){var l,m;function h(o){return g.coerce(m._input,m,p,o)}for(var b=0;bA.lo&&(O.so=!0)}return y});w.enter().append("path").classed("point",!0),w.exit().remove(),w.call(i.translatePoints,l,m)}function e(a,n,f,c){var l=n.val,m=n.pos,h=!!m.rangebreaks,b=c.bPos,u=c.bPosPxOffset||0,o=f.boxmean||(f.meanline||{}).visible,d,w;Array.isArray(c.bdPos)?(d=c.bdPos[0],w=c.bdPos[1]):(d=c.bdPos,w=c.bdPos);var A=a.selectAll("path.mean").data(f.type==="box"&&f.boxmean||f.type==="violin"&&f.box.visible&&f.meanline.visible?C.identity:[]);A.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),A.exit().remove(),A.each(function(_){var y=m.c2l(_.pos+b,!0),E=m.l2p(y-d)+u,T=m.l2p(y+w)+u,s=h?(E+T)/2:m.l2p(y)+u,L=l.c2p(_.mean,!0),M=l.c2p(_.mean-_.sd,!0),z=l.c2p(_.mean+_.sd,!0);f.orientation==="h"?g.select(this).attr("d","M"+L+","+E+"V"+T+(o==="sd"?"m0,0L"+M+","+s+"L"+L+","+E+"L"+z+","+s+"Z":"")):g.select(this).attr("d","M"+E+","+L+"H"+T+(o==="sd"?"m0,0L"+s+","+M+"L"+E+","+L+"L"+s+","+z+"Z":""))})}G.exports={plot:v,plotBoxAndWhiskers:p,plotPoints:r,plotBoxMean:e}},8264:function(G){G.exports=function(t,g){var C=t.cd,i=t.xaxis,S=t.yaxis,x=[],v,p;if(g===!1)for(v=0;v=10)return null;for(var x=1/0,v=-1/0,p=i.length,r=0;r0?Math.floor:Math.ceil,k=D>0?Math.ceil:Math.floor,B=D>0?Math.min:Math.max,O=D>0?Math.max:Math.min,H=I(M+N),Y=k(z-N);f=L(M);var j=[[f]];for(v=H;v*D=0;S--)x[a-S]=t[n][S],v[a-S]=g[n][S];for(p.push({x,y:v,bicubic:r}),S=n,x=[],v=[];S>=0;S--)x[n-S]=t[S][0],v[n-S]=g[S][0];return p.push({x,y:v,bicubic:e}),p}},19216:function(G,U,t){var g=t(54460),C=t(92880).extendFlat;G.exports=function(S,x,v){var p,r,e,a,n,f,c,l,m,h,b,u,o,d,w=S["_"+x],A=S[x+"axis"],_=A._gridlines=[],y=A._minorgridlines=[],E=A._boundarylines=[],T=S["_"+v],s=S[v+"axis"];A.tickmode==="array"&&(A.tickvals=w.slice());var L=S._xctrl,M=S._yctrl,z=L[0].length,D=L.length,N=S._a.length,I=S._b.length;g.prepTicks(A),A.tickmode==="array"&&delete A.tickvals;var k=A.smoothing?3:1;function B(H){var Y,j,et,it,ut,J,X,tt,V,Q,ot,$,Z=[],st=[],nt={};if(x==="b")for(j=S.b2j(H),et=Math.floor(Math.max(0,Math.min(I-2,j))),it=j-et,nt.length=I,nt.crossLength=N,nt.xy=function(ct){return S.evalxy([],ct,j)},nt.dxy=function(ct,gt){return S.dxydi([],ct,et,gt,it)},Y=0;Y0&&(V=S.dxydi([],Y-1,et,0,it),Z.push(ut[0]+V[0]/3),st.push(ut[1]+V[1]/3),Q=S.dxydi([],Y-1,et,1,it),Z.push(tt[0]-Q[0]/3),st.push(tt[1]-Q[1]/3)),Z.push(tt[0]),st.push(tt[1]),ut=tt;else for(Y=S.a2i(H),J=Math.floor(Math.max(0,Math.min(N-2,Y))),X=Y-J,nt.length=N,nt.crossLength=I,nt.xy=function(ct){return S.evalxy([],Y,ct)},nt.dxy=function(ct,gt){return S.dxydj([],J,ct,X,gt)},j=0;j0&&(ot=S.dxydj([],J,j-1,X,0),Z.push(ut[0]+ot[0]/3),st.push(ut[1]+ot[1]/3),$=S.dxydj([],J,j-1,X,1),Z.push(tt[0]-$[0]/3),st.push(tt[1]-$[1]/3)),Z.push(tt[0]),st.push(tt[1]),ut=tt;return nt.axisLetter=x,nt.axis=A,nt.crossAxis=s,nt.value=H,nt.constvar=v,nt.index=l,nt.x=Z,nt.y=st,nt.smoothing=s.smoothing,nt}function O(H){var Y,j,et,it,ut,J=[],X=[],tt={};if(tt.length=w.length,tt.crossLength=T.length,x==="b")for(et=Math.max(0,Math.min(I-2,H)),ut=Math.min(1,Math.max(0,H-et)),tt.xy=function(V){return S.evalxy([],V,H)},tt.dxy=function(V,Q){return S.dxydi([],V,et,Q,ut)},Y=0;Yw.length-1)&&_.push(C(O(r),{color:A.gridcolor,width:A.gridwidth,dash:A.griddash}));for(l=f;lw.length-1)&&!(b<0||b>w.length-1))for(u=w[e],o=w[b],p=0;pw[w.length-1])&&y.push(C(B(h),{color:A.minorgridcolor,width:A.minorgridwidth,dash:A.minorgriddash})));A.startline&&E.push(C(O(0),{color:A.startlinecolor,width:A.startlinewidth})),A.endline&&E.push(C(O(w.length-1),{color:A.endlinecolor,width:A.endlinewidth}))}else{for(a=5e-15,n=[Math.floor((w[w.length-1]-A.tick0)/A.dtick*(1+a)),Math.ceil((w[0]-A.tick0)/A.dtick/(1+a))].sort(function(H,Y){return H-Y}),f=n[0],c=n[1],l=f;l<=c;l++)m=A.tick0+A.dtick*l,_.push(C(B(m),{color:A.gridcolor,width:A.gridwidth,dash:A.griddash}));for(l=f-1;lw[w.length-1])&&y.push(C(B(h),{color:A.minorgridcolor,width:A.minorgridwidth,dash:A.minorgriddash}));A.startline&&E.push(C(B(w[0]),{color:A.startlinecolor,width:A.startlinewidth})),A.endline&&E.push(C(B(w[w.length-1]),{color:A.endlinecolor,width:A.endlinewidth}))}}},14724:function(G,U,t){var g=t(54460),C=t(92880).extendFlat;G.exports=function(S,x){var v,p,r,e,a,n=x._labels=[],f=x._gridlines;for(v=0;vS.length&&(i=i.slice(0,S.length)):i=[],v=0;v90&&(c-=180,r=-r),{angle:c,flip:r,p:t.c2p(i,g,C),offsetMultplier:e}}},164:function(G,U,t){var g=t(33428),C=t(43616),i=t(87072),S=t(53416),x=t(15584),v=t(72736),p=t(3400),r=p.strRotate,e=p.strTranslate,a=t(84284);G.exports=function(o,d,w,A){var _=o._context.staticPlot,y=d.xaxis,E=d.yaxis,T=o._fullLayout,s=T._clips;p.makeTraceGroups(A,w,"trace").each(function(L){var M=g.select(this),z=L[0],D=z.trace,N=D.aaxis,I=D.baxis,k=p.ensureSingle(M,"g","minorlayer"),B=p.ensureSingle(M,"g","majorlayer"),O=p.ensureSingle(M,"g","boundarylayer"),H=p.ensureSingle(M,"g","labellayer");M.style("opacity",D.opacity),f(y,E,B,N,"a",N._gridlines,!0),f(y,E,B,I,"b",I._gridlines,!0),f(y,E,k,N,"a",N._minorgridlines,!0),f(y,E,k,I,"b",I._minorgridlines,!0),f(y,E,O,N,"a-boundary",N._boundarylines,_),f(y,E,O,I,"b-boundary",I._boundarylines,_);var Y=c(o,y,E,D,z,H,N._labels,"a-label"),j=c(o,y,E,D,z,H,I._labels,"b-label");l(o,H,D,z,y,E,Y,j),n(D,z,s,y,E)})};function n(u,o,d,w,A){var _,y,E,T,s=d.select("#"+u._clipPathId);s.size()||(s=d.append("clipPath").classed("carpetclip",!0));var L=p.ensureSingle(s,"path","carpetboundary"),M=o.clipsegments,z=[];for(T=0;T0?"start":"end","data-notex":1}).call(C.font,M.font).text(M.text).call(v.convertToTspans,u),B=C.bBox(this);k.attr("transform",e(D.p[0],D.p[1])+r(D.angle)+e(M.axis.labelpadding*I,B.height*.3)),s=Math.max(s,B.width+M.axis.labelpadding)}),T.exit().remove(),L.maxExtent=s,L}function l(u,o,d,w,A,_,y,E){var T,s,L,M,z=p.aggNums(Math.min,null,d.a),D=p.aggNums(Math.max,null,d.a),N=p.aggNums(Math.min,null,d.b),I=p.aggNums(Math.max,null,d.b);T=.5*(z+D),s=N,L=d.ab2xy(T,s,!0),M=d.dxyda_rough(T,s),y.angle===void 0&&p.extendFlat(y,x(d,A,_,L,d.dxydb_rough(T,s))),b(u,o,d,w,L,M,d.aaxis,A,_,y,"a-title"),T=z,s=.5*(N+I),L=d.ab2xy(T,s,!0),M=d.dxydb_rough(T,s),E.angle===void 0&&p.extendFlat(E,x(d,A,_,L,d.dxyda_rough(T,s))),b(u,o,d,w,L,M,d.baxis,A,_,E,"b-title")}var m=a.LINE_SPACING,h=(1-a.MID_SHIFT)/m+1;function b(u,o,d,w,A,_,y,E,T,s,L){var M=[];y.title.text&&M.push(y.title.text);var z=o.selectAll("text."+L).data(M),D=s.maxExtent;z.enter().append("text").classed(L,!0),z.each(function(){var N=x(d,E,T,A,_);["start","both"].indexOf(y.showticklabels)===-1&&(D=0);var I=y.title.font.size;D+=I+y.title.offset;var k=s.angle+(s.flip<0?180:0),B=(k-N.angle+450)%360,O=B>90&&B<270,H=g.select(this);H.text(y.title.text).call(v.convertToTspans,u),O&&(D=(-v.lineCount(H)+h)*m*I-D),H.attr("transform",e(N.p[0],N.p[1])+r(N.angle)+e(0,D)).attr("text-anchor","middle").call(C.font,y.title.font)}),z.exit().remove()}},81e3:function(G,U,t){var g=t(24588),C=t(14952).findBin,i=t(30180),S=t(29056),x=t(26435),v=t(24464);G.exports=function(r){var e=r._a,a=r._b,n=e.length,f=a.length,c=r.aaxis,l=r.baxis,m=e[0],h=e[n-1],b=a[0],u=a[f-1],o=e[e.length-1]-e[0],d=a[a.length-1]-a[0],w=o*g.RELATIVE_CULL_TOLERANCE,A=d*g.RELATIVE_CULL_TOLERANCE;m-=w,h+=w,b-=A,u+=A,r.isVisible=function(_,y){return _>m&&_b&&yh||yu},r.setScale=function(){var _=r._x,y=r._y,E=i(r._xctrl,r._yctrl,_,y,c.smoothing,l.smoothing);r._xctrl=E[0],r._yctrl=E[1],r.evalxy=S([r._xctrl,r._yctrl],n,f,c.smoothing,l.smoothing),r.dxydi=x([r._xctrl,r._yctrl],c.smoothing,l.smoothing),r.dxydj=v([r._xctrl,r._yctrl],c.smoothing,l.smoothing)},r.i2a=function(_){var y=Math.max(0,Math.floor(_[0]),n-2),E=_[0]-y;return(1-E)*e[y]+E*e[y+1]},r.j2b=function(_){var y=Math.max(0,Math.floor(_[1]),n-2),E=_[1]-y;return(1-E)*a[y]+E*a[y+1]},r.ij2ab=function(_){return[r.i2a(_[0]),r.j2b(_[1])]},r.a2i=function(_){var y=Math.max(0,Math.min(C(_,e),n-2)),E=e[y],T=e[y+1];return Math.max(0,Math.min(n-1,y+(_-E)/(T-E)))},r.b2j=function(_){var y=Math.max(0,Math.min(C(_,a),f-2)),E=a[y],T=a[y+1];return Math.max(0,Math.min(f-1,y+(_-E)/(T-E)))},r.ab2ij=function(_){return[r.a2i(_[0]),r.b2j(_[1])]},r.i2c=function(_,y){return r.evalxy([],_,y)},r.ab2xy=function(_,y,E){if(!E&&(_e[n-1]|ya[f-1]))return[!1,!1];var T=r.a2i(_),s=r.b2j(y),L=r.evalxy([],T,s);if(E){var M=0,z=0,D=[],N,I,k,B;_e[n-1]?(N=n-2,I=1,M=(_-e[n-1])/(e[n-1]-e[n-2])):(N=Math.max(0,Math.min(n-2,Math.floor(T))),I=T-N),ya[f-1]?(k=f-2,B=1,z=(y-a[f-1])/(a[f-1]-a[f-2])):(k=Math.max(0,Math.min(f-2,Math.floor(s))),B=s-k),M&&(r.dxydi(D,N,k,I,B),L[0]+=D[0]*M,L[1]+=D[1]*M),z&&(r.dxydj(D,N,k,I,B),L[0]+=D[0]*z,L[1]+=D[1]*z)}return L},r.c2p=function(_,y,E){return[y.c2p(_[0]),E.c2p(_[1])]},r.p2x=function(_,y,E){return[y.p2c(_[0]),E.p2c(_[1])]},r.dadi=function(_){var y=Math.max(0,Math.min(e.length-2,_));return e[y+1]-e[y]},r.dbdj=function(_){var y=Math.max(0,Math.min(a.length-2,_));return a[y+1]-a[y]},r.dxyda=function(_,y,E,T){var s=r.dxydi(null,_,y,E,T),L=r.dadi(_,E);return[s[0]/L,s[1]/L]},r.dxydb=function(_,y,E,T){var s=r.dxydj(null,_,y,E,T),L=r.dbdj(y,T);return[s[0]/L,s[1]/L]},r.dxyda_rough=function(_,y,E){var T=o*(E||.1),s=r.ab2xy(_+T,y,!0),L=r.ab2xy(_-T,y,!0);return[(s[0]-L[0])*.5/T,(s[1]-L[1])*.5/T]},r.dxydb_rough=function(_,y,E){var T=d*(E||.1),s=r.ab2xy(_,y+T,!0),L=r.ab2xy(_,y-T,!0);return[(s[0]-L[0])*.5/T,(s[1]-L[1])*.5/T]},r.dpdx=function(_){return _._m},r.dpdy=function(_){return _._m}}},51512:function(G,U,t){var g=t(3400);G.exports=function(i,S,x){var v,p,r,e=[],a=[],n=i[0].length,f=i.length;function c(j,et){var it=0,ut,J=0;return j>0&&(ut=i[et][j-1])!==void 0&&(J++,it+=ut),j0&&(ut=i[et-1][j])!==void 0&&(J++,it+=ut),et0&&p0&&vT);return g.log("Smoother converged to",s,"after",M,"iterations"),i}},86411:function(G,U,t){var g=t(3400).isArray1D;G.exports=function(i,S,x){var v=x("x"),p=v&&v.length,r=x("y"),e=r&&r.length;if(!p&&!e)return!1;if(S._cheater=!v,(!p||g(v))&&(!e||g(r))){var a=p?v.length:1/0;e&&(a=Math.min(a,r.length)),S.a&&S.a.length&&(a=Math.min(a,S.a.length)),S.b&&S.b.length&&(a=Math.min(a,S.b.length)),S._length=a}else S._length=null;return!0}},83372:function(G,U,t){var g=t(21776).Ks,C=t(6096),i=t(49084),S=t(45464),x=t(22548).defaultLine,v=t(92880).extendFlat,p=C.marker.line;G.exports=v({locations:{valType:"data_array",editType:"calc"},locationmode:C.locationmode,z:{valType:"data_array",editType:"calc"},geojson:v({},C.geojson,{}),featureidkey:C.featureidkey,text:v({},C.text,{}),hovertext:v({},C.hovertext,{}),marker:{line:{color:v({},p.color,{dflt:x}),width:v({},p.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:C.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:C.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:v({},S.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:g(),showlegend:v({},S.showlegend,{dflt:!1})},i("",{cLetter:"z",editTypeOverride:"calc"}))},7924:function(G,U,t){var g=t(38248),C=t(39032).BADNUM,i=t(47128),S=t(20148),x=t(4500);function v(p){return p&&typeof p=="string"}G.exports=function(r,e){var a=e._length,n=new Array(a),f;e.geojson?f=function(b){return v(b)||g(b)}:f=v;for(var c=0;c")}}},54272:function(G,U,t){G.exports={attributes:t(83372),supplyDefaults:t(30972),colorbar:t(96288),calc:t(7924),calcGeoJSON:t(88364).calcGeoJSON,plot:t(88364).plot,style:t(7947).style,styleOnSelect:t(7947).styleOnSelect,hoverPoints:t(69224),eventData:t(52428),selectPoints:t(17328),moduleType:"trace",name:"choropleth",basePlotModule:t(10816),categories:["geo","noOpacity","showLegend"],meta:{}}},88364:function(G,U,t){var g=t(33428),C=t(3400),i=t(27144),S=t(59972).getTopojsonFeatures,x=t(19280).findExtremes,v=t(7947).style;function p(e,a,n){var f=a.layers.backplot.select(".choroplethlayer");C.makeTraceGroups(f,n,"trace choropleth").each(function(c){var l=g.select(this),m=l.selectAll("path.choroplethlocation").data(C.identity);m.enter().append("path").classed("choroplethlocation",!0),m.exit().remove(),v(e,c)})}function r(e,a){for(var n=e[0].trace,f=a[n.geo],c=f._subplot,l=n.locationmode,m=n._length,h=l==="geojson-id"?i.extractTraceFeature(e):S(n,c.topojson),b=[],u=[],o=0;o=0;S--){var x=i[S].id;if(typeof x=="string"&&x.indexOf("water")===0){for(var v=S+1;v=0;r--)v.removeLayer(p[r][1])},x.dispose=function(){var v=this.subplot.map;this._removeLayers(),v.removeSource(this.sourceId)},G.exports=function(p,r){var e=r[0].trace,a=new S(p,e.uid),n=a.sourceId,f=g(r),c=a.below=p.belowLookup["trace-"+e.uid];return p.map.addSource(n,{type:"geojson",data:f.geojson}),a._addLayers(f,c),r[0].trace._glTrace=a,a}},86040:function(G,U,t){var g=t(49084),C=t(29736).axisHoverFormat,i=t(21776).Ks,S=t(52948),x=t(45464),v=t(92880).extendFlat,p={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"},{keys:["norm"]}),uhoverformat:C("u",1),vhoverformat:C("v",1),whoverformat:C("w",1),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),showlegend:v({},x.showlegend,{dflt:!1})};v(p,g("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(e){p[e]=S[e]}),p.hoverinfo=v({},x.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),p.transforms=void 0,G.exports=p},83344:function(G,U,t){var g=t(47128);G.exports=function(i,S){for(var x=S.u,v=S.v,p=S.w,r=Math.min(S.x.length,S.y.length,S.z.length,x.length,v.length,p.length),e=-1/0,a=1/0,n=0;nx.level||x.starts.length&&S===x.level)}break;case"constraint":if(g.prefixBoundary=!1,g.edgepaths.length)return;var v=g.x.length,p=g.y.length,r=-1/0,e=1/0;for(i=0;i":a>r&&(g.prefixBoundary=!0);break;case"<":(ar||g.starts.length&&f===e)&&(g.prefixBoundary=!0);break;case"][":n=Math.min(a[0],a[1]),f=Math.max(a[0],a[1]),nr&&(g.prefixBoundary=!0);break}break}}},55296:function(G,U,t){var g=t(8932),C=t(41076),i=t(46960);function S(x,v,p){var r=v.contours,e=v.line,a=r.size||1,n=r.coloring,f=C(v,{isColorbar:!0});if(n==="heatmap"){var c=g.extractOpts(v);p._fillgradient=c.reversescale?g.flipScale(c.colorscale):c.colorscale,p._zrange=[c.min,c.max]}else n==="fill"&&(p._fillcolor=f);p._line={color:n==="lines"?f:e.color,width:r.showlines!==!1?e.width:0,dash:e.dash},p._levels={start:r.start,end:i(r),size:a}}G.exports={min:"zmin",max:"zmax",calc:S}},93252:function(G){G.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},95536:function(G,U,t){var g=t(38248),C=t(17428),i=t(76308),S=i.addOpacity,x=i.opacity,v=t(69104),p=t(3400).isArrayOrTypedArray,r=v.CONSTRAINT_REDUCTION,e=v.COMPARISON_OPS2;G.exports=function(f,c,l,m,h,b){var u=c.contours,o,d,w,A=l("contours.operation");if(u._operation=r[A],a(l,u),A==="="?o=u.showlines=!0:(o=l("contours.showlines"),w=l("fillcolor",S((f.line||{}).color||h,.5))),o){var _=w&&x(w)?S(c.fillcolor,1):h;d=l("line.color",_),l("line.width",2),l("line.dash")}l("line.smoothing"),C(l,m,d,b)};function a(n,f){var c;e.indexOf(f.operation)===-1?(n("contours.value",[0,1]),p(f.value)?f.value.length>2?f.value=f.value.slice(2):f.length===0?f.value=[0,1]:f.length<2?(c=parseFloat(f.value[0]),f.value=[c,c+1]):f.value=[parseFloat(f.value[0]),parseFloat(f.value[1])]:g(f.value)&&(c=parseFloat(f.value),f.value=[c,c+1])):(n("contours.value",0),g(f.value)||(p(f.value)?f.value=parseFloat(f.value[0]):f.value=0))}},3212:function(G,U,t){var g=t(69104),C=t(38248);G.exports={"[]":S("[]"),"][":S("]["),">":x(">"),"<":x("<"),"=":x("=")};function i(v,p){var r=Array.isArray(p),e;function a(n){return C(n)?+n:null}return g.COMPARISON_OPS2.indexOf(v)!==-1?e=a(r?p[0]:p):g.INTERVAL_OPS.indexOf(v)!==-1?e=r?[a(p[0]),a(p[1])]:[a(p),a(p)]:g.SET_OPS.indexOf(v)!==-1&&(e=r?p.map(a):[a(p)]),e}function S(v){return function(p){p=i(v,p);var r=Math.min(p[0],p[1]),e=Math.max(p[0],p[1]);return{start:r,end:e,size:e-r}}}function x(v){return function(p){return p=i(v,p),{start:p,end:1/0,size:1/0}}}},84952:function(G){G.exports=function(t,g,C,i){var S=i("contours.start"),x=i("contours.end"),v=S===!1||x===!1,p=C("contours.size"),r;v?r=g.autocontour=!0:r=C("autocontour",!1),(r||!p)&&C("ncontours")}},82172:function(G,U,t){var g=t(3400);G.exports=function(i,S){var x,v,p,r=function(n){return n.reverse()},e=function(n){return n};switch(S){case"=":case"<":return i;case">":for(i.length!==1&&g.warn("Contour data invalid for the specified inequality operation."),v=i[0],x=0;x1e3){g.warn("Too many contours, clipping at 1000",x);break}return a}},46960:function(G){G.exports=function(t){return t.end+t.size/1e6}},88748:function(G,U,t){var g=t(3400),C=t(93252);G.exports=function(e,a,n){var f,c,l,m,h;for(a=a||.01,n=n||.01,l=0;l20?(l=C.CHOOSESADDLE[l][(m[0]||m[1])<0?0:1],r.crossings[c]=C.SADDLEREMAINDER[l]):delete r.crossings[c],m=C.NEWDELTA[l],!m){g.log("Found bad marching index:",l,e,r.level);break}h.push(p(r,e,m)),e[0]+=m[0],e[1]+=m[1],c=e.join(","),i(h[h.length-1],h[h.length-2],n,f)&&h.pop();var A=m[0]&&(e[0]<0||e[0]>u-2)||m[1]&&(e[1]<0||e[1]>b-2),_=e[0]===o[0]&&e[1]===o[1]&&m[0]===d[0]&&m[1]===d[1];if(_||a&&A)break;l=r.crossings[c]}w===1e4&&g.log("Infinite loop in contour?");var y=i(h[0],h[h.length-1],n,f),E=0,T=.2*r.smoothing,s=[],L=0,M,z,D,N,I,k,B,O,H,Y,j;for(w=1;w=L;w--)if(M=s[w],M=L&&M+s[z]O&&H--,r.edgepaths[H]=j.concat(h,Y));break}J||(r.edgepaths[O]=h.concat(Y))}for(O=0;O20&&e?r===208||r===1114?n=a[0]===0?1:-1:f=a[1]===0?1:-1:C.BOTTOMSTART.indexOf(r)!==-1?f=1:C.LEFTSTART.indexOf(r)!==-1?n=1:C.TOPSTART.indexOf(r)!==-1?f=-1:n=-1,[n,f]}function p(r,e,a){var n=e[0]+Math.max(a[0],0),f=e[1]+Math.max(a[1],0),c=r.z[f][n],l=r.xaxis,m=r.yaxis;if(a[1]){var h=(r.level-c)/(r.z[f][n+1]-c),b=(h!==1?(1-h)*l.c2l(r.x[n]):0)+(h!==0?h*l.c2l(r.x[n+1]):0);return[l.c2p(l.l2c(b),!0),m.c2p(r.y[f],!0),n+h,f]}else{var u=(r.level-c)/(r.z[f+1][n]-c),o=(u!==1?(1-u)*m.c2l(r.y[f]):0)+(u!==0?u*m.c2l(r.y[f+1]):0);return[l.c2p(r.x[n],!0),m.c2p(m.l2c(o),!0),n,f+u]}}},38200:function(G,U,t){var g=t(76308),C=t(55512);G.exports=function(S,x,v,p,r){r||(r={}),r.isContour=!0;var e=C(S,x,v,p,r);return e&&e.forEach(function(a){var n=a.trace;n.contours.type==="constraint"&&(n.fillcolor&&g.opacity(n.fillcolor)?a.color=g.addOpacity(n.fillcolor,1):n.contours.showlines&&g.opacity(n.line.color)&&(a.color=g.addOpacity(n.line.color,1)))}),e}},66240:function(G,U,t){G.exports={attributes:t(67104),supplyDefaults:t(57004),calc:t(20688),plot:t(23676).plot,style:t(52440),colorbar:t(55296),hoverPoints:t(38200),moduleType:"trace",name:"contour",basePlotModule:t(57952),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},17428:function(G,U,t){var g=t(3400);G.exports=function(i,S,x,v){v||(v={});var p=i("contours.showlabels");if(p){var r=S.font;g.coerceFont(i,"contours.labelfont",{family:r.family,size:r.size,color:x}),i("contours.labelformat")}v.hasHover!==!1&&i("zhoverformat")}},41076:function(G,U,t){var g=t(33428),C=t(8932),i=t(46960);G.exports=function(x){var v=x.contours,p=v.start,r=i(v),e=v.size||1,a=Math.floor((r-p)/e)+1,n=v.coloring==="lines"?0:1,f=C.extractOpts(x);isFinite(e)||(e=1,a=1);var c=f.reversescale?C.flipScale(f.colorscale):f.colorscale,l=c.length,m=new Array(l),h=new Array(l),b,u,o=f.min,d=f.max;if(v.coloring==="heatmap"){for(u=0;u=d)&&(p<=o&&(p=o),r>=d&&(r=d),a=Math.floor((r-p)/e)+1,n=0),u=0;uo&&(m.unshift(o),h.unshift(h[0])),m[m.length-1]i?0:1)+(S[0][1]>i?0:2)+(S[1][1]>i?0:4)+(S[1][0]>i?0:8);if(x===5||x===10){var v=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return i>v?x===5?713:1114:x===5?104:208}return x===15?0:x}},23676:function(G,U,t){var g=t(33428),C=t(3400),i=t(43616),S=t(8932),x=t(72736),v=t(54460),p=t(78344),r=t(41420),e=t(72424),a=t(88748),n=t(61512),f=t(82172),c=t(56008),l=t(93252),m=l.LABELOPTIMIZER;U.plot=function(y,E,T,s){var L=E.xaxis,M=E.yaxis;C.makeTraceGroups(s,T,"contour").each(function(z){var D=g.select(this),N=z[0],I=N.trace,k=N.x,B=N.y,O=I.contours,H=n(O,E,N),Y=C.ensureSingle(D,"g","heatmapcoloring"),j=[];O.coloring==="heatmap"&&(j=[z]),r(y,E,j,Y),e(H),a(H);var et=L.c2p(k[0],!0),it=L.c2p(k[k.length-1],!0),ut=M.c2p(B[0],!0),J=M.c2p(B[B.length-1],!0),X=[[et,J],[it,J],[it,ut],[et,ut]],tt=H;O.type==="constraint"&&(tt=f(H,O._operation)),h(D,X,O),b(D,tt,X,O),o(D,H,y,N,O),w(D,E,y,N,X)})};function h(_,y,E){var T=C.ensureSingle(_,"g","contourbg"),s=T.selectAll("path").data(E.coloring==="fill"?[0]:[]);s.enter().append("path"),s.exit().remove(),s.attr("d","M"+y.join("L")+"Z").style("stroke","none")}function b(_,y,E,T){var s=T.coloring==="fill"||T.type==="constraint"&&T._operation!=="=",L="M"+E.join("L")+"Z";s&&c(y,T);var M=C.ensureSingle(_,"g","contourfill"),z=M.selectAll("path").data(s?y:[]);z.enter().append("path"),z.exit().remove(),z.each(function(D){var N=(D.prefixBoundary?L:"")+u(D,E);N?g.select(this).attr("d",N).style("stroke","none"):g.select(this).remove()})}function u(_,y){var E="",T=0,s=_.edgepaths.map(function(et,it){return it}),L=!0,M,z,D,N,I,k;function B(et){return Math.abs(et[1]-y[0][1])<.01}function O(et){return Math.abs(et[1]-y[2][1])<.01}function H(et){return Math.abs(et[0]-y[0][0])<.01}function Y(et){return Math.abs(et[0]-y[2][0])<.01}for(;s.length;){for(k=i.smoothopen(_.edgepaths[T],_.smoothing),E+=L?k:k.replace(/^M/,"L"),s.splice(s.indexOf(T),1),M=_.edgepaths[T][_.edgepaths[T].length-1],N=-1,D=0;D<4;D++){if(!M){C.log("Missing end?",T,_);break}for(B(M)&&!Y(M)?z=y[1]:H(M)?z=y[0]:O(M)?z=y[3]:Y(M)&&(z=y[2]),I=0;I<_.edgepaths.length;I++){var j=_.edgepaths[I][0];Math.abs(M[0]-z[0])<.01?Math.abs(M[0]-j[0])<.01&&(j[1]-M[1])*(z[1]-j[1])>=0&&(z=j,N=I):Math.abs(M[1]-z[1])<.01?Math.abs(M[1]-j[1])<.01&&(j[0]-M[0])*(z[0]-j[0])>=0&&(z=j,N=I):C.log("endpt to newendpt is not vert. or horz.",M,z,j)}if(M=z,N>=0)break;E+="L"+z}if(N===_.edgepaths.length){C.log("unclosed perimeter path");break}T=N,L=s.indexOf(T)===-1,L&&(T=s[0],E+="Z")}for(T=0;T<_.paths.length;T++)E+=i.smoothclosed(_.paths[T],_.smoothing);return E}function o(_,y,E,T,s){var L=E._context.staticPlot,M=C.ensureSingle(_,"g","contourlines"),z=s.showlines!==!1,D=s.showlabels,N=z&&D,I=U.createLines(M,z||D,y,L),k=U.createLineClip(M,N,E,T.trace.uid),B=_.selectAll("g.contourlabels").data(D?[0]:[]);if(B.exit().remove(),B.enter().append("g").classed("contourlabels",!0),D){var O=[],H=[];C.clearLocationCache();var Y=U.labelFormatter(E,T),j=i.tester.append("text").attr("data-notex",1).call(i.font,s.labelfont),et=y[0].xaxis,it=y[0].yaxis,ut=et._length,J=it._length,X=et.range,tt=it.range,V=C.aggNums(Math.min,null,T.x),Q=C.aggNums(Math.max,null,T.x),ot=C.aggNums(Math.min,null,T.y),$=C.aggNums(Math.max,null,T.y),Z=Math.max(et.c2p(V,!0),0),st=Math.min(et.c2p(Q,!0),ut),nt=Math.max(it.c2p($,!0),0),ct=Math.min(it.c2p(ot,!0),J),gt={};X[0]m.MAXCOST*2)break;B&&(z/=2),M=N-z/2,D=M+z*1.5}if(k<=m.MAXCOST)return I};function d(_,y,E,T){var s=y.width/2,L=y.height/2,M=_.x,z=_.y,D=_.theta,N=Math.cos(D)*s,I=Math.sin(D)*s,k=(M>T.center?T.right-M:M-T.left)/(N+Math.abs(Math.sin(D)*L)),B=(z>T.middle?T.bottom-z:z-T.top)/(Math.abs(I)+Math.cos(D)*L);if(k<1||B<1)return 1/0;var O=m.EDGECOST*(1/(k-1)+1/(B-1));O+=m.ANGLECOST*D*D;for(var H=M-N,Y=z-I,j=M+N,et=z+I,it=0;itp.end&&(p.start=p.end=(p.start+p.end)/2),x._input.contours||(x._input.contours={}),C.extendFlat(x._input.contours,{start:p.start,end:p.end,size:p.size}),x._input.autocontour=!0}else if(p.type!=="constraint"){var n=p.start,f=p.end,c=x._input.contours;if(n>f&&(p.start=c.start=f,f=p.end=c.end=n,n=p.start),!(p.size>0)){var l;n===f?l=1:l=i(n,f,x.ncontours).dtick,c.size=p.size=l}}};function i(S,x,v){var p={type:"linear",range:[S,x]};return g.autoTicks(p,(x-S)/(v||15)),p}},52440:function(G,U,t){var g=t(33428),C=t(43616),i=t(41648),S=t(41076);G.exports=function(v){var p=g.select(v).selectAll("g.contour");p.style("opacity",function(r){return r[0].trace.opacity}),p.each(function(r){var e=g.select(this),a=r[0].trace,n=a.contours,f=a.line,c=n.size||1,l=n.start,m=n.type==="constraint",h=!m&&n.coloring==="lines",b=!m&&n.coloring==="fill",u=h||b?S(a):null;e.selectAll("g.contourlevel").each(function(w){g.select(this).selectAll("path").call(C.lineGroupStyle,f.width,h?u(w.level):f.color,f.dash)});var o=n.labelfont;if(e.selectAll("g.contourlabels text").each(function(w){C.font(g.select(this),{family:o.family,size:o.size,color:o.color||(h?u(w.level):f.color)})}),m)e.selectAll("g.contourfill path").style("fill",a.fillcolor);else if(b){var d;e.selectAll("g.contourfill path").style("fill",function(w){return d===void 0&&(d=w.level),u(w.level+.5*c)}),d===void 0&&(d=l),e.selectAll("g.contourbg path").style("fill",u(d-.5*c))}}),i(v)}},97680:function(G,U,t){var g=t(27260),C=t(17428);G.exports=function(S,x,v,p,r){var e=v("contours.coloring"),a,n="";e==="fill"&&(a=v("contours.showlines")),a!==!1&&(e!=="lines"&&(n=v("line.color","#000")),v("line.width",.5),v("line.dash")),e!=="none"&&(S.showlegend!==!0&&(x.showlegend=!1),x._dfltShowLegend=!1,g(S,x,p,v,{prefix:"",cLetter:"z"})),v("line.smoothing"),C(v,p,n,r)}},37960:function(G,U,t){var g=t(83328),C=t(67104),i=t(49084),S=t(92880).extendFlat,x=C.contours;G.exports=S({carpet:{valType:"string",editType:"calc"},z:g.z,a:g.x,a0:g.x0,da:g.dx,b:g.y,b0:g.y0,db:g.dy,text:g.text,hovertext:g.hovertext,transpose:g.transpose,atype:g.xtype,btype:g.ytype,fillcolor:C.fillcolor,autocontour:C.autocontour,ncontours:C.ncontours,contours:{type:x.type,start:x.start,end:x.end,size:x.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:x.showlines,showlabels:x.showlabels,labelfont:x.labelfont,labelformat:x.labelformat,operation:x.operation,value:x.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:C.line.color,width:C.line.width,dash:C.line.dash,smoothing:C.line.smoothing,editType:"plot"},transforms:void 0},i("",{cLetter:"z",autoColorDflt:!1}))},30572:function(G,U,t){var g=t(47128),C=t(3400),i=t(2872),S=t(26136),x=t(70448),v=t(11240),p=t(35744),r=t(3252),e=t(50948),a=t(54444);G.exports=function(c,l){var m=l._carpetTrace=e(c,l);if(!(!m||!m.visible||m.visible==="legendonly")){if(!l.a||!l.b){var h=c.data[m.index],b=c.data[l.index];b.a||(b.a=h.a),b.b||(b.b=h.b),r(b,l,l._defaultColor,c._fullLayout)}var u=n(c,l);return a(l,l._z),u}};function n(f,c){var l=c._carpetTrace,m=l.aaxis,h=l.baxis,b,u,o,d,w,A,_;m._minDtick=0,h._minDtick=0,C.isArray1D(c.z)&&i(c,m,h,"a","b",["z"]),b=c._a=c._a||c.a,d=c._b=c._b||c.b,b=b?m.makeCalcdata(c,"_a"):[],d=d?h.makeCalcdata(c,"_b"):[],u=c.a0||0,o=c.da||1,w=c.b0||0,A=c.db||1,_=c._z=S(c._z||c.z,c.transpose),c._emptypoints=v(_),x(_,c._emptypoints);var y=C.maxRowLength(_),E=c.xtype==="scaled"?"":b,T=p(c,E,u,o,y,m),s=c.ytype==="scaled"?"":d,L=p(c,s,w,A,_.length,h),M={a:T,b:L,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&g(f,c,{vals:_,containerStr:"",cLetter:"z"}),[M]}},3252:function(G,U,t){var g=t(3400),C=t(51264),i=t(37960),S=t(95536),x=t(84952),v=t(97680);G.exports=function(r,e,a,n){function f(h,b){return g.coerce(r,e,i,h,b)}function c(h){return g.coerce2(r,e,i,h)}if(f("carpet"),r.a&&r.b){var l=C(r,e,f,n,"a","b");if(!l){e.visible=!1;return}f("text");var m=f("contours.type")==="constraint";m?S(r,e,f,n,a,{hasHover:!1}):(x(r,e,f,c),v(r,e,f,n,{hasHover:!1}))}else e._defaultColor=a,e._length=null}},40448:function(G,U,t){G.exports={attributes:t(37960),supplyDefaults:t(3252),colorbar:t(55296),calc:t(30572),plot:t(94440),style:t(52440),moduleType:"trace",name:"contourcarpet",basePlotModule:t(57952),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},94440:function(G,U,t){var g=t(33428),C=t(87072),i=t(53416),S=t(43616),x=t(3400),v=t(72424),p=t(88748),r=t(23676),e=t(93252),a=t(82172),n=t(61512),f=t(56008),c=t(50948),l=t(77712);G.exports=function(E,T,s,L){var M=T.xaxis,z=T.yaxis;x.makeTraceGroups(L,s,"contour").each(function(D){var N=g.select(this),I=D[0],k=I.trace,B=k._carpetTrace=c(E,k),O=E.calcdata[B.index][0];if(!B.visible||B.visible==="legendonly")return;var H=I.a,Y=I.b,j=k.contours,et=n(j,T,I),it=j.type==="constraint",ut=j._operation,J=it?ut==="="?"lines":"fill":j.coloring;function X(Tt){var wt=B.ab2xy(Tt[0],Tt[1],!0);return[M.c2p(wt[0]),z.c2p(wt[1])]}var tt=[[H[0],Y[Y.length-1]],[H[H.length-1],Y[Y.length-1]],[H[H.length-1],Y[0]],[H[0],Y[0]]];v(et);var V=(H[H.length-1]-H[0])*1e-8,Q=(Y[Y.length-1]-Y[0])*1e-8;p(et,V,Q);var ot=et;j.type==="constraint"&&(ot=a(et,ut)),m(et,X);var $,Z,st,nt,ct=[];for(nt=O.clipsegments.length-1;nt>=0;nt--)$=O.clipsegments[nt],Z=C([],$.x,M.c2p),st=C([],$.y,z.c2p),Z.reverse(),st.reverse(),ct.push(i(Z,st,$.bicubic));var gt="M"+ct.join("L")+"Z";w(N,O.clipsegments,M,z,it,J),A(k,N,M,z,ot,tt,X,B,O,J,gt),h(N,et,E,I,j,T,B),S.setClipUrl(N,B._clipPathId,E)})};function m(y,E){var T,s,L,M,z,D,N,I,k;for(T=0;Tet&&(s.max=et),s.len=s.max-s.min}function u(y,E,T){var s=y.getPointAtLength(E),L=y.getPointAtLength(T),M=L.x-s.x,z=L.y-s.y,D=Math.sqrt(M*M+z*z);return[M/D,z/D]}function o(y){var E=Math.sqrt(y[0]*y[0]+y[1]*y[1]);return[y[0]/E,y[1]/E]}function d(y,E){var T=Math.abs(y[0]*E[0]+y[1]*E[1]),s=Math.sqrt(1-T*T);return s/T}function w(y,E,T,s,L,M){var z,D,N,I,k=x.ensureSingle(y,"g","contourbg"),B=k.selectAll("path").data(M==="fill"&&!L?[0]:[]);B.enter().append("path"),B.exit().remove();var O=[];for(I=0;I=0&&(H=Z,j=et):Math.abs(O[1]-H[1])=0&&(H=Z,j=et):x.log("endpt to newendpt is not vert. or horz.",O,H,Z)}if(j>=0)break;I+=ot(O,H),O=H}if(j===E.edgepaths.length){x.log("unclosed perimeter path");break}N=j,B=k.indexOf(N)===-1,B&&(N=k[0],I+=ot(O,H)+"Z",O=null)}for(N=0;N0?+h[l]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:d},properties:w})}}var _=S.extractOpts(e),y=_.reversescale?S.flipScale(_.colorscale):_.colorscale,E=y[0][1],T=i.opacity(E)<1?E:i.addOpacity(E,0),s=["interpolate",["linear"],["heatmap-density"],0,T];for(l=1;l=0;p--)x.removeLayer(v[p][1])},S.dispose=function(){var x=this.subplot.map;this._removeLayers(),x.removeSource(this.sourceId)},G.exports=function(v,p){var r=p[0].trace,e=new i(v,r.uid),a=e.sourceId,n=g(p),f=e.below=v.belowLookup["trace-"+r.uid];return v.map.addSource(a,{type:"geojson",data:n.geojson}),e._addLayers(n,f),e}},74248:function(G,U,t){var g=t(3400);G.exports=function(i,S){for(var x=0;x"),n.color=S(c,h),[n]}};function S(x,v){var p=x.marker,r=v.mc||p.color,e=v.mlc||p.line.color,a=v.mlw||p.line.width;if(g(r))return r;if(g(e)&&a)return e}},94704:function(G,U,t){G.exports={attributes:t(20088),layoutAttributes:t(7076),supplyDefaults:t(45432).supplyDefaults,crossTraceDefaults:t(45432).crossTraceDefaults,supplyLayoutDefaults:t(11631),calc:t(23096),crossTraceCalc:t(4804),plot:t(42200),style:t(44544).style,hoverPoints:t(31488),eventData:t(34580),selectPoints:t(45784),moduleType:"trace",name:"funnel",basePlotModule:t(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(G){G.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},11631:function(G,U,t){var g=t(3400),C=t(7076);G.exports=function(i,S,x){var v=!1;function p(a,n){return g.coerce(i,S,C,a,n)}for(var r=0;r path").each(function(h){if(!h.isBlank){var b=m.marker;g.select(this).call(i.fill,h.mc||b.color).call(i.stroke,h.mlc||b.line.color).call(C.dashLine,b.line.dash,h.mlw||b.line.width).style("opacity",m.selectedpoints&&!h.selected?S:1)}}),p(l,m,e),l.selectAll(".regions").each(function(){g.select(this).selectAll("path").style("stroke-width",0).call(i.fill,m.connector.fillcolor)}),l.selectAll(".lines").each(function(){var h=m.connector.line;C.lineGroupStyle(g.select(this).selectAll("path"),h.width,h.color,h.dash)})})}G.exports={style:r}},22332:function(G,U,t){var g=t(74996),C=t(45464),i=t(86968).u,S=t(21776).Ks,x=t(21776).Gw,v=t(92880).extendFlat;G.exports={labels:g.labels,label0:g.label0,dlabel:g.dlabel,values:g.values,marker:{colors:g.marker.colors,line:{color:v({},g.marker.line.color,{dflt:null}),width:v({},g.marker.line.width,{dflt:1}),editType:"calc"},pattern:g.marker.pattern,editType:"calc"},text:g.text,hovertext:g.hovertext,scalegroup:v({},g.scalegroup,{}),textinfo:v({},g.textinfo,{flags:["label","text","value","percent"]}),texttemplate:x({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:v({},C.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),textposition:v({},g.textposition,{values:["inside","none"],dflt:"inside"}),textfont:g.textfont,insidetextfont:g.insidetextfont,title:{text:g.title.text,font:g.title.font,position:v({},g.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:i({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},91248:function(G,U,t){var g=t(7316);U.name="funnelarea",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},54e3:function(G,U,t){var g=t(45768);function C(S,x){return g.calc(S,x)}function i(S){g.crossTraceCalc(S,{type:"funnelarea"})}G.exports={calc:C,crossTraceCalc:i}},92688:function(G,U,t){var g=t(3400),C=t(22332),i=t(86968).Q,S=t(31508).handleText,x=t(74174).handleLabelsAndValues,v=t(74174).handleMarkerDefaults;G.exports=function(r,e,a,n){function f(A,_){return g.coerce(r,e,C,A,_)}var c=f("labels"),l=f("values"),m=x(c,l),h=m.len;if(e._hasLabels=m.hasLabels,e._hasValues=m.hasValues,!e._hasLabels&&e._hasValues&&(f("label0"),f("dlabel")),!h){e.visible=!1;return}e._length=h,v(r,e,n,f),f("scalegroup");var b=f("text"),u=f("texttemplate"),o;if(u||(o=f("textinfo",Array.isArray(b)?"text+percent":"percent")),f("hovertext"),f("hovertemplate"),u||o&&o!=="none"){var d=f("textposition");S(r,e,n,f,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else o==="none"&&f("textposition","none");i(e,n,f);var w=f("title.text");w&&(f("title.position"),g.coerceFont(f,"title.font",n.font)),f("aspectratio"),f("baseratio")}},62396:function(G,U,t){G.exports={moduleType:"trace",name:"funnelarea",basePlotModule:t(91248),categories:["pie-like","funnelarea","showLegend"],attributes:t(22332),layoutAttributes:t(61280),supplyDefaults:t(92688),supplyLayoutDefaults:t(35384),calc:t(54e3).calc,crossTraceCalc:t(54e3).crossTraceCalc,plot:t(39472),style:t(62096),styleOne:t(10528),meta:{}}},61280:function(G,U,t){var g=t(85204).hiddenlabels;G.exports={hiddenlabels:g,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},35384:function(G,U,t){var g=t(3400),C=t(61280);G.exports=function(S,x){function v(p,r){return g.coerce(S,x,C,p,r)}v("hiddenlabels"),v("funnelareacolorway",x.colorway),v("extendfunnelareacolors")}},39472:function(G,U,t){var g=t(33428),C=t(43616),i=t(3400),S=i.strScale,x=i.strTranslate,v=t(72736),p=t(98184),r=p.toMoveInsideBar,e=t(82744),a=e.recordMinTextSize,n=e.clearMinTextSize,f=t(69656),c=t(37820),l=c.attachFxHandlers,m=c.determineInsideTextFont,h=c.layoutAreas,b=c.prerenderTitles,u=c.positionTitleOutside,o=c.formatSliceLabel;G.exports=function(y,E){var T=y._context.staticPlot,s=y._fullLayout;n("funnelarea",s),b(E,y),h(E,s._size),i.makeTraceGroups(s._funnelarealayer,E,"trace").each(function(L){var M=g.select(this),z=L[0],D=z.trace;A(L),M.each(function(){var N=g.select(this).selectAll("g.slice").data(L);N.enter().append("g").classed("slice",!0),N.exit().remove(),N.each(function(k,B){if(k.hidden){g.select(this).selectAll("path,g").remove();return}k.pointNumber=k.i,k.curveNumber=D.index;var O=z.cx,H=z.cy,Y=g.select(this),j=Y.selectAll("path.surface").data([k]);j.enter().append("path").classed("surface",!0).style({"pointer-events":T?"none":"all"}),Y.call(l,y,L);var et="M"+(O+k.TR[0])+","+(H+k.TR[1])+d(k.TR,k.BR)+d(k.BR,k.BL)+d(k.BL,k.TL)+"Z";j.attr("d",et),o(y,k,z);var it=f.castOption(D.textposition,k.pts),ut=Y.selectAll("g.slicetext").data(k.text&&it!=="none"?[0]:[]);ut.enter().append("g").classed("slicetext",!0),ut.exit().remove(),ut.each(function(){var J=i.ensureSingle(g.select(this),"text","",function(st){st.attr("data-notex",1)}),X=i.ensureUniformFontSize(y,m(D,k,s.font));J.text(k.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(C.font,X).call(v.convertToTspans,y);var tt=C.bBox(J.node()),V,Q,ot,$=Math.min(k.BL[1],k.BR[1])+H,Z=Math.max(k.TL[1],k.TR[1])+H;Q=Math.max(k.TL[0],k.BL[0])+O,ot=Math.min(k.TR[0],k.BR[0])+O,V=r(Q,ot,$,Z,tt,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),V.fontSize=X.size,a(D.type,V,s),L[B].transform=V,i.setTransormAndDisplay(J,V)})});var I=g.select(this).selectAll("g.titletext").data(D.title.text?[0]:[]);I.enter().append("g").classed("titletext",!0),I.exit().remove(),I.each(function(){var k=i.ensureSingle(g.select(this),"text","",function(H){H.attr("data-notex",1)}),B=D.title.text;D._meta&&(B=i.templateString(B,D._meta)),k.text(B).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(C.font,D.title.font).call(v.convertToTspans,y);var O=u(z,s._size);k.attr("transform",x(O.x,O.y)+S(Math.min(1,O.scale))+x(O.tx,O.ty))})})})};function d(_,y){var E=y[0]-_[0],T=y[1]-_[1];return"l"+E+","+T}function w(_,y){return[.5*(_[0]+y[0]),.5*(_[1]+y[1])]}function A(_){if(!_.length)return;var y=_[0],E=y.trace,T=E.aspectratio,s=E.baseratio;s>.999&&(s=.999);var L=Math.pow(s,2),M=y.vTotal,z=M*L/(1-L),D=M,N=z/M;function I(){var nt=Math.sqrt(N);return{x:nt,y:-nt}}function k(){var nt=I();return[nt.x,nt.y]}var B,O=[];O.push(k());var H,Y;for(H=_.length-1;H>-1;H--)if(Y=_[H],!Y.hidden){var j=Y.v/D;N+=j,O.push(k())}var et=1/0,it=-1/0;for(H=0;H-1;H--)if(Y=_[H],!Y.hidden){$+=1;var Z=O[$][0],st=O[$][1];Y.TL=[-Z,st],Y.TR=[Z,st],Y.BL=Q,Y.BR=ot,Y.pxmid=w(Y.TR,Y.BR),Q=Y.TL,ot=Y.TR}}},62096:function(G,U,t){var g=t(33428),C=t(10528),i=t(82744).resizeText;G.exports=function(x){var v=x._fullLayout._funnelarealayer.selectAll(".trace");i(x,v,"funnelarea"),v.each(function(p){var r=p[0],e=r.trace,a=g.select(this);a.style({opacity:e.opacity}),a.selectAll("path.surface").each(function(n){g.select(this).call(C,n,e,x)})})}},83328:function(G,U,t){var g=t(52904),C=t(45464),i=t(25376),S=t(29736).axisHoverFormat,x=t(21776).Ks,v=t(21776).Gw,p=t(49084),r=t(92880).extendFlat;G.exports=r({z:{valType:"data_array",editType:"calc"},x:r({},g.x,{impliedEdits:{xtype:"array"}}),x0:r({},g.x0,{impliedEdits:{xtype:"scaled"}}),dx:r({},g.dx,{impliedEdits:{xtype:"scaled"}}),y:r({},g.y,{impliedEdits:{ytype:"array"}}),y0:r({},g.y0,{impliedEdits:{ytype:"scaled"}}),dy:r({},g.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:r({},g.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:r({},g.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:r({},g.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:r({},g.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:r({},g.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:r({},g.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:x(),texttemplate:v({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:i({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:r({},C.showlegend,{dflt:!1})},{transforms:void 0},p("",{cLetter:"z",autoColorDflt:!1}))},19512:function(G,U,t){var g=t(24040),C=t(3400),i=t(54460),S=t(1220),x=t(55480),v=t(47128),p=t(2872),r=t(26136),e=t(70448),a=t(11240),n=t(35744),f=t(39032).BADNUM;G.exports=function(h,b){var u=i.getFromId(h,b.xaxis||"x"),o=i.getFromId(h,b.yaxis||"y"),d=g.traceIs(b,"contour"),w=g.traceIs(b,"histogram"),A=g.traceIs(b,"gl2d"),_=d?"best":b.zsmooth,y,E,T,s,L,M,z,D,N,I,k;if(u._minDtick=0,o._minDtick=0,w)k=x(h,b),s=k.orig_x,y=k.x,E=k.x0,T=k.dx,D=k.orig_y,L=k.y,M=k.y0,z=k.dy,N=k.z;else{var B=b.z;C.isArray1D(B)?(p(b,u,o,"x","y",["z"]),y=b._x,L=b._y,B=b._z):(s=b.x?u.makeCalcdata(b,"x"):[],D=b.y?o.makeCalcdata(b,"y"):[],y=S(b,u,"x",s).vals,L=S(b,o,"y",D).vals,b._x=y,b._y=L),E=b.x0,T=b.dx,M=b.y0,z=b.dy,N=r(B,b,u,o)}(u.rangebreaks||o.rangebreaks)&&(N=l(y,L,N),w||(y=c(y),L=c(L),b._x=y,b._y=L)),!w&&(d||b.connectgaps)&&(b._emptypoints=a(N),e(N,b._emptypoints));function O(tt){_=b._input.zsmooth=b.zsmooth=!1,C.warn('cannot use zsmooth: "fast": '+tt)}function H(tt){if(tt.length>1){var V=(tt[tt.length-1]-tt[0])/(tt.length-1),Q=Math.abs(V/100);for(I=0;IQ)return!1}return!0}b._islinear=!1,u.type==="log"||o.type==="log"?_==="fast"&&O("log axis found"):H(y)?H(L)?b._islinear=!0:_==="fast"&&O("y scale is not linear"):_==="fast"&&O("x scale is not linear");var Y=C.maxRowLength(N),j=b.xtype==="scaled"?"":y,et=n(b,j,E,T,Y,u),it=b.ytype==="scaled"?"":L,ut=n(b,it,M,z,N.length,o);A||(b._extremes[u._id]=i.findExtremes(u,et),b._extremes[o._id]=i.findExtremes(o,ut));var J={x:et,y:ut,z:N,text:b._text||b.text,hovertext:b._hovertext||b.hovertext};if(b.xperiodalignment&&s&&(J.orig_x=s),b.yperiodalignment&&D&&(J.orig_y=D),j&&j.length===et.length-1&&(J.xCenter=j),it&&it.length===ut.length-1&&(J.yCenter=it),w&&(J.xRanges=k.xRanges,J.yRanges=k.yRanges,J.pts=k.pts),d||v(h,b,{vals:N,cLetter:"z"}),d&&b.contours&&b.contours.coloring==="heatmap"){var X={type:b.type==="contour"?"heatmap":"histogram2d",xcalendar:b.xcalendar,ycalendar:b.ycalendar};J.xfill=n(X,j,E,T,Y,u),J.yfill=n(X,it,M,z,N.length,o)}return[J]};function c(m){for(var h=[],b=m.length,u=0;u=0;m--)l=v[m],f=l[0],c=l[1],h=((x[[f-1,c]]||e)[2]+(x[[f+1,c]]||e)[2]+(x[[f,c-1]]||e)[2]+(x[[f,c+1]]||e)[2])/20,h&&(b[l]=[f,c,h],v.splice(m,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(l in b)x[l]=b[l],S.push(b[l])}return S.sort(function(o,d){return d[2]-o[2]})}},55512:function(G,U,t){var g=t(93024),C=t(3400),i=C.isArrayOrTypedArray,S=t(54460),x=t(8932).extractOpts;G.exports=function(p,r,e,a,n){n||(n={});var f=n.isContour,c=p.cd[0],l=c.trace,m=p.xa,h=p.ya,b=c.x,u=c.y,o=c.z,d=c.xCenter,w=c.yCenter,A=c.zmask,_=l.zhoverformat,y=b,E=u,T,s,L,M;if(p.index!==!1){try{L=Math.round(p.index[1]),M=Math.round(p.index[0])}catch{C.error("Error hovering on heatmap, pointNumber must be [row,col], found:",p.index);return}if(L<0||L>=o[0].length||M<0||M>o.length)return}else{if(g.inbox(r-b[0],r-b[b.length-1],0)>0||g.inbox(e-u[0],e-u[u.length-1],0)>0)return;if(f){var z;for(y=[2*b[0]-b[1]],z=1;zC;a++)e=x(p,r,S(e));return e>C&&g.log("interp2d didn't converge quickly",e),p};function x(v,p,r){var e=0,a,n,f,c,l,m,h,b,u,o,d,w,A;for(c=0;cw&&(e=Math.max(e,Math.abs(v[n][f]-d)/(A-w))))}return e}},39096:function(G,U,t){var g=t(3400);G.exports=function(i,S){i("texttemplate");var x=g.extendFlat({},S.font,{color:"auto",size:"auto"});g.coerceFont(i,"textfont",x)}},35744:function(G,U,t){var g=t(24040),C=t(3400).isArrayOrTypedArray;G.exports=function(S,x,v,p,r,e){var a=[],n=g.traceIs(S,"contour"),f=g.traceIs(S,"histogram"),c=g.traceIs(S,"gl2d"),l,m,h,b=C(x)&&x.length>1;if(b&&!f&&e.type!=="category"){var u=x.length;if(u<=r){if(n||c)a=Array.from(x).slice(0,r);else if(r===1)e.type==="log"?a=[.5*x[0],2*x[0]]:a=[x[0]-.5,x[0]+.5];else if(e.type==="log"){for(a=[Math.pow(x[0],1.5)/Math.pow(x[1],.5)],h=1;h0;)Q=s.c2p(O[st]),st--;for(Q0;)Z=L.c2p(H[st]),st--;Z<$&&(ot=$,$=Z,Z=ot,tt=!0),et&&(Y=O,j=H,O=D.xfill,H=D.yfill);var gt="default";if(it?gt=it==="best"?"smooth":"fast":N._islinear&&I===0&&k===0&&m()&&(gt="fast"),gt!=="fast"){var Tt=it==="best"?0:.5;V=Math.max(-Tt*s._length,V),Q=Math.min((1+Tt)*s._length,Q),$=Math.max(-Tt*L._length,$),Z=Math.min((1+Tt)*L._length,Z)}var wt=Math.round(Q-V),Rt=Math.round(Z-$),bt=V>=s._length||Q<=0||$>=L._length||Z<=0;if(bt){var At=z.selectAll("image").data([]);At.exit().remove(),o(z);return}var mt,Lt;gt==="fast"?(mt=J,Lt=ut):(mt=wt,Lt=Rt);var Ht=document.createElement("canvas");Ht.width=mt,Ht.height=Lt;var Ut=Ht.getContext("2d",{willReadFrequently:!0}),kt=n(N,{noNumericCheck:!0,returnArray:!0}),Vt,It;gt==="fast"?(Vt=X?function(an){return J-1-an}:v.identity,It=tt?function(an){return ut-1-an}:v.identity):(Vt=function(an){return v.constrain(Math.round(s.c2p(O[an])-V),0,wt)},It=function(an){return v.constrain(Math.round(L.c2p(H[an])-$),0,Rt)});var re=It(0),Kt=[re,re],$t=X?0:1,le=tt?0:1,he=0,de=0,xe=0,Se=0,ne,zt,Xt,Jt,Wt;function Ft(an,pn){if(an!==void 0){var gn=kt(an);return gn[0]=Math.round(gn[0]),gn[1]=Math.round(gn[1]),gn[2]=Math.round(gn[2]),he+=pn,de+=gn[0]*pn,xe+=gn[1]*pn,Se+=gn[2]*pn,gn}return[0,0,0,0]}function xt(an,pn,gn,_n){var kn=an[gn.bin0];if(kn===void 0)return Ft(void 0,1);var ni=an[gn.bin1],ci=pn[gn.bin0],di=pn[gn.bin1],li=ni-kn||0,ri=ci-kn||0,wr;return ni===void 0?di===void 0?wr=0:ci===void 0?wr=2*(di-kn):wr=(2*di-ci-kn)*2/3:di===void 0?ci===void 0?wr=0:wr=(2*kn-ni-ci)*2/3:ci===void 0?wr=(2*di-ni-kn)*2/3:wr=di+kn-ni-ci,Ft(kn+gn.frac*li+_n.frac*(ri+gn.frac*wr))}if(gt!=="default"){var yt=0,Et;try{Et=new Uint8Array(mt*Lt*4)}catch{Et=new Array(mt*Lt*4)}if(gt==="smooth"){var Mt=Y||O,Nt=j||H,jt=new Array(Mt.length),ie=new Array(Nt.length),me=new Array(wt),be=Y?w:d,ve=j?w:d,Le,ce,Te;for(st=0;stvr||vr>L._length))for(nt=Ve;ntGt||Gt>s._length)){var Ne=r({x:Yt,y:hr},N,_._fullLayout);Ne.x=Yt,Ne.y=hr;var Oe=D.z[st][nt];Oe===void 0?(Ne.z="",Ne.zLabel=""):(Ne.z=Oe,Ne.zLabel=x.tickText(Ae,Oe,"hover").text);var Qe=D.text&&D.text[st]&&D.text[st][nt];(Qe===void 0||Qe===!1)&&(Qe=""),Ne.text=Qe;var er=v.texttemplateString(ge,Ne,_._fullLayout._d3locale,Ne,N._meta||{});if(er){var fr=er.split("
    "),rr=fr.length,He=0;for(ct=0;ct0&&(r=!0);for(var f=0;fv){var p=v-S[C];return S[C]=v,p}}else return S[C]=v,v;return 0},max:function(C,i,S,x){var v=x[i];if(g(v))if(v=Number(v),g(S[C])){if(S[C]E&&ES){var L=T===C?1:6,M=T===C?"M12":"M1";return function(z,D){var N=b.c2d(z,C,u),I=N.indexOf("-",L);I>0&&(N=N.substr(0,I));var k=b.d2c(N,0,u);if(kp?c>S?c>C*1.1?C:c>i*1.1?i:S:c>x?x:c>v?v:p:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function n(c,l,m,h,b,u){if(h&&c>S){var o=f(l,b,u),d=f(m,b,u),w=c===C?0:1;return o[w]!==d[w]}return Math.floor(m/c)-Math.floor(l/c)>.1}function f(c,l,m){var h=l.c2d(c,C,m).split("-");return h[0]===""&&(h.unshift(),h[0]="-"+h[0]),h}},35852:function(G,U,t){var g=t(38248),C=t(3400),i=t(24040),S=t(54460),x=t(84664),v=t(16964),p=t(10648),r=t(2e3),e=t(67712);function a(m,h){var b=[],u=[],o=h.orientation==="h",d=S.getFromId(m,o?h.yaxis:h.xaxis),w=o?"y":"x",A={x:"y",y:"x"}[w],_=h[w+"calendar"],y=h.cumulative,E,T=n(m,h,d,w),s=T[0],L=T[1],M=typeof s.size=="string",z=[],D=M?z:s,N=[],I=[],k=[],B=0,O=h.histnorm,H=h.histfunc,Y=O.indexOf("density")!==-1,j,et,it;y.enabled&&Y&&(O=O.replace(/ ?density$/,""),Y=!1);var ut=H==="max"||H==="min",J=ut?null:0,X=v.count,tt=p[O],V=!1,Q=function(Ut){return d.r2c(Ut,0,_)},ot;for(C.isArrayOrTypedArray(h[A])&&H!=="count"&&(ot=h[A],V=H==="avg",X=v[H]),E=Q(s.start),et=Q(s.end)+(E-S.tickIncrement(E,s.size,!1,_))/1e6;E=0&&it=mt;E--)if(u[E]){Lt=E;break}for(E=mt;E<=Lt;E++)if(g(b[E])&&g(u[E])){var Ht={p:b[E],s:u[E],b:0};y.enabled||(Ht.pts=k[E],nt?Ht.ph0=Ht.ph1=k[E].length?L[k[E][0]]:b[E]:(h._computePh=!0,Ht.ph0=Rt(z[E]),Ht.ph1=Rt(z[E+1],!0))),At.push(Ht)}return At.length===1&&(At[0].width1=S.tickIncrement(At[0].p,s.size,!1,_)-At[0].p),x(At,h),C.isArrayOrTypedArray(h.selectedpoints)&&C.tagSelected(At,h,Tt),At}function n(m,h,b,u,o){var d=u+"bins",w=m._fullLayout,A=h["_"+u+"bingroup"],_=w._histogramBinOpts[A],y=w.barmode==="overlay",E,T,s,L,M,z,D,N=function(wt){return b.r2c(wt,0,L)},I=function(wt){return b.c2r(wt,0,L)},k=b.type==="date"?function(wt){return wt||wt===0?C.cleanDate(wt,null,L):null}:function(wt){return g(wt)?Number(wt):null};function B(wt,Rt,bt){Rt[wt+"Found"]?(Rt[wt]=k(Rt[wt]),Rt[wt]===null&&(Rt[wt]=bt[wt])):(z[wt]=Rt[wt]=bt[wt],C.nestedProperty(T[0],d+"."+wt).set(bt[wt]))}if(h["_"+u+"autoBinFinished"])delete h["_"+u+"autoBinFinished"];else{T=_.traces;var O=[],H=!0,Y=!1,j=!1;for(E=0;E"u"){if(o)return[it,M,!0];it=f(m,h,b,u,d)}D=s.cumulative||{},D.enabled&&D.currentbin!=="include"&&(D.direction==="decreasing"?it.start=I(S.tickIncrement(N(it.start),it.size,!0,L)):it.end=I(S.tickIncrement(N(it.end),it.size,!1,L))),_.size=it.size,_.sizeFound||(z.size=it.size,C.nestedProperty(T[0],d+".size").set(it.size)),B("start",_,it),B("end",_,it)}M=h["_"+u+"pos0"],delete h["_"+u+"pos0"];var J=h._input[d]||{},X=C.extendFlat({},_),tt=_.start,V=b.r2l(J.start),Q=V!==void 0;if((_.startFound||Q)&&V!==b.r2l(tt)){var ot=Q?V:C.aggNums(Math.min,null,M),$={type:b.type==="category"||b.type==="multicategory"?"linear":b.type,r2l:b.r2l,dtick:_.size,tick0:tt,calendar:L,range:[ot,S.tickIncrement(ot,_.size,!1,L)].map(b.l2r)},Z=S.tickFirst($);Z>b.r2l(ot)&&(Z=S.tickIncrement(Z,_.size,!0,L)),X.start=b.l2r(Z),Q||C.nestedProperty(h,d+".start").set(X.start)}var st=_.end,nt=b.r2l(J.end),ct=nt!==void 0;if((_.endFound||ct)&&nt!==b.r2l(st)){var gt=ct?nt:C.aggNums(Math.max,null,M);X.end=b.l2r(gt),ct||C.nestedProperty(h,d+".start").set(X.end)}var Tt="autobin"+u;return h._input[Tt]===!1&&(h._input[d]=C.extendFlat({},h[d]||{}),delete h._input[Tt],delete h[Tt]),[X,M]}function f(m,h,b,u,o){var d=m._fullLayout,w=c(m,h),A=!1,_=1/0,y=[h],E,T,s;for(E=0;E=0;u--)A(u);else if(h==="increasing"){for(u=1;u=0;u--)m[u]+=m[u+1];b==="exclude"&&(m.push(0),m.shift())}}G.exports={calc:a,calcAllAutoBins:n}},73316:function(G){G.exports={eventDataKeys:["binNumber"]}},80536:function(G,U,t){var g=t(3400),C=t(79811),i=t(24040).traceIs,S=t(20011),x=t(31508).validateCornerradius,v=g.nestedProperty,p=t(71888).getAxisGroup,r=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],e=["x","y"];G.exports=function(n,f){var c=f._histogramBinOpts={},l=[],m={},h=[],b,u,o,d,w,A,_;function y(it,ut){return g.coerce(b._input,b,b._module.attributes,it,ut)}function E(it){return it.orientation==="v"?"x":"y"}function T(it,ut){var J=C.getFromTrace({_fullLayout:f},it,ut);return J.type}function s(it,ut,J){var X=it.uid+"__"+J;ut||(ut=X);var tt=T(it,J),V=it[J+"calendar"]||"",Q=c[ut],ot=!0;Q&&(tt===Q.axType&&V===Q.calendar?(ot=!1,Q.traces.push(it),Q.dirs.push(J)):(ut=X,tt!==Q.axType&&g.warn(["Attempted to group the bins of trace",it.index,"set on a","type:"+tt,"axis","with bins on","type:"+Q.axType,"axis."].join(" ")),V!==Q.calendar&&g.warn(["Attempted to group the bins of trace",it.index,"set with a",V,"calendar","with bins",Q.calendar?"on a "+Q.calendar+" calendar":"w/o a set calendar"].join(" ")))),ot&&(c[ut]={traces:[it],dirs:[J],axType:tt,calendar:it[J+"calendar"]||""}),it["_"+J+"bingroup"]=ut}for(w=0;wN&&L.splice(N,L.length-N),D.length>N&&D.splice(N,D.length-N);var I=[],k=[],B=[],O=typeof s.size=="string",H=typeof z.size=="string",Y=[],j=[],et=O?Y:s,it=H?j:z,ut=0,J=[],X=[],tt=c.histnorm,V=c.histfunc,Q=tt.indexOf("density")!==-1,ot=V==="max"||V==="min",$=ot?null:0,Z=i.count,st=S[tt],nt=!1,ct=[],gt=[],Tt="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Tt&&V!=="count"&&(nt=V==="avg",Z=i[V]);var wt=s.size,Rt=u(s.start),bt=u(s.end)+(Rt-C.tickIncrement(Rt,wt,!1,h))/1e6;for(A=Rt;A=0&&y=0&&E-1,flipY:k.tiling.flip.indexOf("y")>-1,orientation:k.tiling.orientation,pad:{inner:k.tiling.pad},maxDepth:k._maxDepth}),j=Y.descendants(),et=1/0,it=-1/0;j.forEach(function(V){var Q=V.depth;Q>=k._maxDepth?(V.x0=V.x1=(V.x0+V.x1)/2,V.y0=V.y1=(V.y0+V.y1)/2):(et=Math.min(et,Q),it=Math.max(it,Q))}),h=h.data(j,r.getPtId),k._maxVisibleLayers=isFinite(it)?it-et+1:0,h.enter().append("g").classed("slice",!0),T(h,n,z,[u,o],A),h.order();var ut=null;if(E&&M){var J=r.getPtId(M);h.each(function(V){ut===null&&r.getPtId(V)===J&&(ut={x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1})})}var X=function(){return ut||{x0:0,x1:u,y0:0,y1:o}},tt=h;return E&&(tt=tt.transition().each("end",function(){var V=g.select(this);r.setSliceCursor(V,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),tt.each(function(V){V._x0=d(V.x0),V._x1=d(V.x1),V._y0=w(V.y0),V._y1=w(V.y1),V._hoverX=d(V.x1-k.tiling.pad),V._hoverY=w(H?V.y1-k.tiling.pad/2:V.y0+k.tiling.pad/2);var Q=g.select(this),ot=C.ensureSingle(Q,"path","surface",function(nt){nt.style("pointer-events",D?"none":"all")});E?ot.transition().attrTween("d",function(nt){var ct=s(nt,n,X(),[u,o],{orientation:k.tiling.orientation,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1});return function(gt){return A(ct(gt))}}):ot.attr("d",A),Q.call(e,m,c,l,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{isTransitioning:c._transitioning}),ot.call(v,V,k,c,{hovered:!1}),V.x0===V.x1||V.y0===V.y1?V._text="":V._text=a(V,m,k,l,N)||"";var $=C.ensureSingle(Q,"g","slicetext"),Z=C.ensureSingle($,"text","",function(nt){nt.attr("data-notex",1)}),st=C.ensureUniformFontSize(c,r.determineTextFont(k,V,N.font));Z.text(V._text||" ").classed("slicetext",!0).attr("text-anchor",O?"end":B?"start":"middle").call(i.font,st).call(S.convertToTspans,c),V.textBB=i.bBox(Z.node()),V.transform=_(V,{fontSize:st.size}),V.transform.fontSize=st.size,E?Z.transition().attrTween("transform",function(nt){var ct=L(nt,n,X(),[u,o]);return function(gt){return y(ct(gt))}}):Z.attr("transform",y(V))}),ut}},29044:function(G,U,t){G.exports={moduleType:"trace",name:"icicle",basePlotModule:t(59564),categories:[],animatable:!0,attributes:t(97376),layoutAttributes:t(90676),supplyDefaults:t(7045),supplyLayoutDefaults:t(4304),calc:t(73876).r,crossTraceCalc:t(73876).q,plot:t(38364),style:t(47192).style,colorbar:t(5528),meta:{}}},90676:function(G){G.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},4304:function(G,U,t){var g=t(3400),C=t(90676);G.exports=function(S,x){function v(p,r){return g.coerce(S,x,C,p,r)}v("iciclecolorway",x.colorway),v("extendiciclecolors")}},25132:function(G,U,t){var g=t(74148),C=t(83024);G.exports=function(S,x,v){var p=v.flipX,r=v.flipY,e=v.orientation==="h",a=v.maxDepth,n=x[0],f=x[1];a&&(n=(S.height+1)*x[0]/Math.min(S.height+1,a),f=(S.height+1)*x[1]/Math.min(S.height+1,a));var c=g.partition().padding(v.pad.inner).size(e?[x[1],n]:[x[0],f])(S);return(e||p||r)&&C(c,x,{swapXY:e,flipX:p,flipY:r}),c}},38364:function(G,U,t){var g=t(95808),C=t(67880);G.exports=function(S,x,v,p){return g(S,x,v,p,{type:"icicle",drawDescendants:C})}},47192:function(G,U,t){var g=t(33428),C=t(76308),i=t(3400),S=t(82744).resizeText,x=t(60404);function v(r){var e=r._fullLayout._iciclelayer.selectAll(".trace");S(r,e,"icicle"),e.each(function(a){var n=g.select(this),f=a[0],c=f.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(l){g.select(this).call(p,l,c,r)})})}function p(r,e,a,n){var f=e.data.data,c=!e.children,l=f.i,m=i.castOption(a,l,"marker.line.color")||C.defaultLine,h=i.castOption(a,l,"marker.line.width")||0;r.call(x,e,a,n).style("stroke-width",h).call(C.stroke,m).style("opacity",c?a.leaf.opacity:null)}G.exports={style:v,styleOne:p}},95188:function(G,U,t){for(var g=t(45464),C=t(21776).Ks,i=t(92880).extendFlat,S=t(47797).colormodel,x=["rgb","rgba","rgba256","hsl","hsla"],v=[],p=[],r=0;r0||g.inbox(r-e.y0,r-(e.y0+e.h*a.dy),0)>0)){var c=Math.floor((p-e.x0)/a.dx),l=Math.floor(Math.abs(r-e.y0)/a.dy),m;if(a._hasZ?m=e.z[l][c]:a._hasSource&&(m=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,l,1,1).data),!!m){var h=e.hi||a.hoverinfo,b;if(h){var u=h.split("+");u.indexOf("all")!==-1&&(u=["color"]),u.indexOf("color")!==-1&&(b=!0)}var o=S.colormodel[a.colormodel],d=o.colormodel||a.colormodel,w=d.length,A=a._scaler(m),_=o.suffix,y=[];(a.hovertemplate||b)&&(y.push("["+[A[0]+_[0],A[1]+_[1],A[2]+_[2]].join(", ")),w===4&&y.push(", "+A[3]+_[3]),y.push("]"),y=y.join(""),v.extraText=d.toUpperCase()+": "+y);var E;i(a.hovertext)&&i(a.hovertext[l])?E=a.hovertext[l][c]:i(a.text)&&i(a.text[l])&&(E=a.text[l][c]);var T=f.c2p(e.y0+(l+.5)*a.dy),s=e.x0+(c+.5)*a.dx,L=e.y0+(l+.5)*a.dy,M="["+m.slice(0,a.colormodel.length).join(", ")+"]";return[C.extendFlat(v,{index:[l,c],x0:n.c2p(e.x0+c*a.dx),x1:n.c2p(e.x0+(c+1)*a.dx),y0:T,y1:T,color:A,xVal:s,xLabelVal:s,yVal:L,yLabelVal:L,zLabelVal:M,text:E,hovertemplateLabels:{zLabel:M,colorLabel:y,"color[0]Label":A[0]+_[0],"color[1]Label":A[1]+_[1],"color[2]Label":A[2]+_[2],"color[3]Label":A[3]+_[3]}})]}}}},48928:function(G,U,t){G.exports={attributes:t(95188),supplyDefaults:t(13188),calc:t(93336),plot:t(63715),style:t(28576),hoverPoints:t(24892),eventData:t(79972),moduleType:"trace",name:"image",basePlotModule:t(57952),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},63715:function(G,U,t){var g=t(33428),C=t(3400),i=C.strTranslate,S=t(9616),x=t(47797),v=t(9188),p=t(2264).STYLE;G.exports=function(e,a,n,f){var c=a.xaxis,l=a.yaxis,m=!e._context._exportedPlot&&v();C.makeTraceGroups(f,n,"im").each(function(h){var b=g.select(this),u=h[0],o=u.trace,d=(o.zsmooth==="fast"||o.zsmooth===!1&&m)&&!o._hasZ&&o._hasSource&&c.type==="linear"&&l.type==="linear";o._realImage=d;var w=u.z,A=u.x0,_=u.y0,y=u.w,E=u.h,T=o.dx,s=o.dy,L,M,z,D,N,I;for(I=0;L===void 0&&I0;)M=c.c2p(A+I*T),I--;for(I=0;D===void 0&&I0;)N=l.c2p(_+I*s),I--;if(MJ[0];if(X||tt){var V=L+B/2,Q=D+O/2;it+="transform:"+i(V+"px",Q+"px")+"scale("+(X?-1:1)+","+(tt?-1:1)+")"+i(-V+"px",-Q+"px")+";"}}et.attr("style",it);var ot=new Promise(function($){if(o._hasZ)$();else if(o._hasSource)if(o._canvas&&o._canvas.el.width===y&&o._canvas.el.height===E&&o._canvas.source===o.source)$();else{var Z=document.createElement("canvas");Z.width=y,Z.height=E;var st=Z.getContext("2d",{willReadFrequently:!0});o._image=o._image||new Image;var nt=o._image;nt.onload=function(){st.drawImage(nt,0,0),o._canvas={el:Z,source:o.source},$()},nt.setAttribute("src",o.source)}}).then(function(){var $,Z;if(o._hasZ)Z=j(function(ct,gt){var Tt=w[gt][ct];return C.isTypedArray(Tt)&&(Tt=Array.from(Tt)),Tt}),$=Z.toDataURL("image/png");else if(o._hasSource)if(d)$=o.source;else{var st=o._canvas.el.getContext("2d",{willReadFrequently:!0}),nt=st.getImageData(0,0,y,E).data;Z=j(function(ct,gt){var Tt=4*(gt*y+ct);return[nt[Tt],nt[Tt+1],nt[Tt+2],nt[Tt+3]]}),$=Z.toDataURL("image/png")}et.attr({"xlink:href":$,height:O,width:B,x:L,y:D})});e._promises.push(ot)})}},28576:function(G,U,t){var g=t(33428);G.exports=function(i){g.select(i).selectAll(".im image").style("opacity",function(S){return S[0].trace.opacity})}},89864:function(G,U,t){var g=t(92880).extendFlat,C=t(92880).extendDeep,i=t(67824).overrideAll,S=t(25376),x=t(22548),v=t(86968).u,p=t(94724),r=t(31780).templatedArray,e=t(48164),a=t(29736).descriptionOnlyNumbers,n=S({editType:"plot",colorEditType:"plot"}),f={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:x.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},c={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},l=r("step",C({},f,{range:c}));G.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:v({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:g({},n,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:a("value")},font:g({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:a("value")},increasing:{symbol:{valType:"string",dflt:e.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:e.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:e.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:e.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:g({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:C({},f,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:x.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:i({range:c,visible:g({},p.visible,{dflt:!0}),tickmode:p.minor.tickmode,nticks:p.nticks,tick0:p.tick0,dtick:p.dtick,tickvals:p.tickvals,ticktext:p.ticktext,ticks:g({},p.ticks,{dflt:"outside"}),ticklen:p.ticklen,tickwidth:p.tickwidth,tickcolor:p.tickcolor,ticklabelstep:p.ticklabelstep,showticklabels:p.showticklabels,labelalias:p.labelalias,tickfont:S({}),tickangle:p.tickangle,tickformat:p.tickformat,tickformatstops:p.tickformatstops,tickprefix:p.tickprefix,showtickprefix:p.showtickprefix,ticksuffix:p.ticksuffix,showticksuffix:p.showticksuffix,separatethousands:p.separatethousands,exponentformat:p.exponentformat,minexponent:p.minexponent,showexponent:p.showexponent,editType:"plot"},"plot"),steps:l,threshold:{line:{color:g({},f.line.color,{}),width:g({},f.line.width,{dflt:1}),editType:"plot"},thickness:g({},f.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},92728:function(G,U,t){var g=t(7316);U.name="indicator",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},79136:function(G){function U(t,g){var C=[],i=g.value;typeof g._lastValue!="number"&&(g._lastValue=g.value);var S=g._lastValue,x=S;return g._hasDelta&&typeof g.delta.reference=="number"&&(x=g.delta.reference),C[0]={y:i,lastY:S,delta:i-x,relativeDelta:(i-x)/x},C}G.exports={calc:U}},12096:function(G){G.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},20424:function(G,U,t){var g=t(3400),C=t(89864),i=t(86968).Q,S=t(31780),x=t(51272),v=t(12096),p=t(26332),r=t(25404),e=t(95936),a=t(42568);function n(c,l,m,h){function b(N,I){return g.coerce(c,l,C,N,I)}i(l,h,b),b("mode"),l._hasNumber=l.mode.indexOf("number")!==-1,l._hasDelta=l.mode.indexOf("delta")!==-1,l._hasGauge=l.mode.indexOf("gauge")!==-1;var u=b("value");l._range=[0,typeof u=="number"?1.5*u:1];var o=new Array(2),d;l._hasNumber&&(b("number.valueformat"),b("number.font.color",h.font.color),b("number.font.family",h.font.family),b("number.font.size"),l.number.font.size===void 0&&(l.number.font.size=v.defaultNumberFontSize,o[0]=!0),b("number.prefix"),b("number.suffix"),d=l.number.font.size);var w;l._hasDelta&&(b("delta.font.color",h.font.color),b("delta.font.family",h.font.family),b("delta.font.size"),l.delta.font.size===void 0&&(l.delta.font.size=(l._hasNumber?.5:1)*(d||v.defaultNumberFontSize),o[1]=!0),b("delta.reference",l.value),b("delta.relative"),b("delta.valueformat",l.delta.relative?"2%":""),b("delta.increasing.symbol"),b("delta.increasing.color"),b("delta.decreasing.symbol"),b("delta.decreasing.color"),b("delta.position"),b("delta.prefix"),b("delta.suffix"),w=l.delta.font.size),l._scaleNumbers=(!l._hasNumber||o[0])&&(!l._hasDelta||o[1])||!1,b("title.font.color",h.font.color),b("title.font.family",h.font.family),b("title.font.size",.25*(d||w||v.defaultNumberFontSize)),b("title.text");var A,_,y,E;function T(N,I){return g.coerce(A,_,C.gauge,N,I)}function s(N,I){return g.coerce(y,E,C.gauge.axis,N,I)}if(l._hasGauge){A=c.gauge,A||(A={}),_=S.newContainer(l,"gauge"),T("shape");var L=l._isBullet=l.gauge.shape==="bullet";L||b("title.align","center");var M=l._isAngular=l.gauge.shape==="angular";M||b("align","center"),T("bgcolor",h.paper_bgcolor),T("borderwidth"),T("bordercolor"),T("bar.color"),T("bar.line.color"),T("bar.line.width");var z=v.valueThickness*(l.gauge.shape==="bullet"?.5:1);T("bar.thickness",z),x(A,_,{name:"steps",handleItemDefaults:f}),T("threshold.value"),T("threshold.thickness"),T("threshold.line.width"),T("threshold.line.color"),y={},A&&(y=A.axis||{}),E=S.newContainer(_,"axis"),s("visible"),l._range=s("range",l._range);var D={noAutotickangles:!0,outerTicks:!0};p(y,E,s,"linear"),a(y,E,s,"linear",D),e(y,E,s,"linear",D),r(y,E,s,D)}else b("title.align","center"),b("align","center"),l._isAngular=l._isBullet=!1;l._length=null}function f(c,l){function m(h,b){return g.coerce(c,l,C.gauge.steps,h,b)}m("color"),m("line.color"),m("line.width"),m("range"),m("thickness")}G.exports={supplyDefaults:n}},43480:function(G,U,t){G.exports={moduleType:"trace",name:"indicator",basePlotModule:t(92728),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:t(89864),supplyDefaults:t(20424).supplyDefaults,calc:t(79136).calc,plot:t(97864),meta:{}}},97864:function(G,U,t){var g=t(33428),C=t(67756).qy,i=t(67756).Gz,S=t(3400),x=S.strScale,v=S.strTranslate,p=S.rad2deg,r=t(84284).MID_SHIFT,e=t(43616),a=t(12096),n=t(72736),f=t(54460),c=t(28336),l=t(37668),m=t(94724),h=t(76308),b={left:"start",center:"middle",right:"end"},u={left:0,center:.5,right:1},o=/[yzafpnµmkMGTPEZY]/;function d(D){return D&&D.duration>0}G.exports=function(N,I,k,B){var O=N._fullLayout,H;d(k)&&B&&(H=B()),S.makeTraceGroups(O._indicatorlayer,I,"trace").each(function(Y){var j=Y[0],et=j.trace,it=g.select(this),ut=et._hasGauge,J=et._isAngular,X=et._isBullet,tt=et.domain,V={w:O._size.w*(tt.x[1]-tt.x[0]),h:O._size.h*(tt.y[1]-tt.y[0]),l:O._size.l+O._size.w*tt.x[0],r:O._size.r+O._size.w*(1-tt.x[1]),t:O._size.t+O._size.h*(1-tt.y[1]),b:O._size.b+O._size.h*tt.y[0]},Q=V.l+V.w/2,ot=V.t+V.h/2,$=Math.min(V.w/2,V.h),Z=a.innerRadius*$,st,nt,ct,gt=et.align||"center";if(nt=ot,!ut)st=V.l+u[gt]*V.w,ct=function(kt){return s(kt,V.w,V.h)};else if(J&&(st=Q,nt=ot+$/2,ct=function(kt){return L(kt,.9*Z)}),X){var Tt=a.bulletPadding,wt=1-a.bulletNumberDomainSize+Tt;st=V.l+(wt+(1-wt)*u[gt])*V.w,ct=function(kt){return s(kt,(a.bulletNumberDomainSize-Tt)*V.w,V.h)}}_(N,it,Y,{numbersX:st,numbersY:nt,numbersScaler:ct,transitionOpts:k,onComplete:H});var Rt,bt;ut&&(Rt={range:et.gauge.axis.range,color:et.gauge.bgcolor,line:{color:et.gauge.bordercolor,width:0},thickness:1},bt={range:et.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:et.gauge.bordercolor,width:et.gauge.borderwidth},thickness:1});var At=it.selectAll("g.angular").data(J?Y:[]);At.exit().remove();var mt=it.selectAll("g.angularaxis").data(J?Y:[]);mt.exit().remove(),J&&A(N,it,Y,{radius:$,innerRadius:Z,gauge:At,layer:mt,size:V,gaugeBg:Rt,gaugeOutline:bt,transitionOpts:k,onComplete:H});var Lt=it.selectAll("g.bullet").data(X?Y:[]);Lt.exit().remove();var Ht=it.selectAll("g.bulletaxis").data(X?Y:[]);Ht.exit().remove(),X&&w(N,it,Y,{gauge:Lt,layer:Ht,size:V,gaugeBg:Rt,gaugeOutline:bt,transitionOpts:k,onComplete:H});var Ut=it.selectAll("text.title").data(Y);Ut.exit().remove(),Ut.enter().append("text").classed("title",!0),Ut.attr("text-anchor",function(){return X?b.right:b[et.title.align]}).text(et.title.text).call(e.font,et.title.font).call(n.convertToTspans,N),Ut.attr("transform",function(){var kt=V.l+V.w*u[et.title.align],Vt,It=a.titlePadding,re=e.bBox(Ut.node());if(ut){if(J)if(et.gauge.axis.visible){var Kt=e.bBox(mt.node());Vt=Kt.top-It-re.bottom}else Vt=V.t+V.h/2-$/2-re.bottom-It;X&&(Vt=nt-(re.top+re.bottom)/2,kt=V.l-a.bulletPadding*V.w)}else Vt=et._numbersTop-It-re.bottom;return v(kt,Vt)})})};function w(D,N,I,k){var B=I[0].trace,O=k.gauge,H=k.layer,Y=k.gaugeBg,j=k.gaugeOutline,et=k.size,it=B.domain,ut=k.transitionOpts,J=k.onComplete,X,tt,V,Q,ot;O.enter().append("g").classed("bullet",!0),O.attr("transform",v(et.l,et.t)),H.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),H.selectAll("g.xbulletaxistick,path,text").remove();var $=et.h,Z=B.gauge.bar.thickness*$,st=it.x[0],nt=it.x[0]+(it.x[1]-it.x[0])*(B._hasNumber||B._hasDelta?1-a.bulletNumberDomainSize:1);X=T(D,B.gauge.axis),X._id="xbulletaxis",X.domain=[st,nt],X.setScale(),tt=f.calcTicks(X),V=f.makeTransTickFn(X),Q=f.getTickSigns(X)[2],ot=et.t+et.h,X.visible&&(f.drawTicks(D,X,{vals:X.ticks==="inside"?f.clipEnds(X,tt):tt,layer:H,path:f.makeTickPath(X,ot,Q),transFn:V}),f.drawLabels(D,X,{vals:tt,layer:H,transFn:V,labelFns:f.makeLabelFns(X,ot)}));function ct(mt){mt.attr("width",function(Lt){return Math.max(0,X.c2p(Lt.range[1])-X.c2p(Lt.range[0]))}).attr("x",function(Lt){return X.c2p(Lt.range[0])}).attr("y",function(Lt){return .5*(1-Lt.thickness)*$}).attr("height",function(Lt){return Lt.thickness*$})}var gt=[Y].concat(B.gauge.steps),Tt=O.selectAll("g.bg-bullet").data(gt);Tt.enter().append("g").classed("bg-bullet",!0).append("rect"),Tt.select("rect").call(ct).call(y),Tt.exit().remove();var wt=O.selectAll("g.value-bullet").data([B.gauge.bar]);wt.enter().append("g").classed("value-bullet",!0).append("rect"),wt.select("rect").attr("height",Z).attr("y",($-Z)/2).call(y),d(ut)?wt.select("rect").transition().duration(ut.duration).ease(ut.easing).each("end",function(){J&&J()}).each("interrupt",function(){J&&J()}).attr("width",Math.max(0,X.c2p(Math.min(B.gauge.axis.range[1],I[0].y)))):wt.select("rect").attr("width",typeof I[0].y=="number"?Math.max(0,X.c2p(Math.min(B.gauge.axis.range[1],I[0].y))):0),wt.exit().remove();var Rt=I.filter(function(){return B.gauge.threshold.value||B.gauge.threshold.value===0}),bt=O.selectAll("g.threshold-bullet").data(Rt);bt.enter().append("g").classed("threshold-bullet",!0).append("line"),bt.select("line").attr("x1",X.c2p(B.gauge.threshold.value)).attr("x2",X.c2p(B.gauge.threshold.value)).attr("y1",(1-B.gauge.threshold.thickness)/2*$).attr("y2",(1-(1-B.gauge.threshold.thickness)/2)*$).call(h.stroke,B.gauge.threshold.line.color).style("stroke-width",B.gauge.threshold.line.width),bt.exit().remove();var At=O.selectAll("g.gauge-outline").data([j]);At.enter().append("g").classed("gauge-outline",!0).append("rect"),At.select("rect").call(ct).call(y),At.exit().remove()}function A(D,N,I,k){var B=I[0].trace,O=k.size,H=k.radius,Y=k.innerRadius,j=k.gaugeBg,et=k.gaugeOutline,it=[O.l+O.w/2,O.t+O.h/2+H/2],ut=k.gauge,J=k.layer,X=k.transitionOpts,tt=k.onComplete,V=Math.PI/2;function Q($t){var le=B.gauge.axis.range[0],he=B.gauge.axis.range[1],de=($t-le)/(he-le)*Math.PI-V;return de<-V?-V:de>V?V:de}function ot($t){return g.svg.arc().innerRadius((Y+H)/2-$t/2*(H-Y)).outerRadius((Y+H)/2+$t/2*(H-Y)).startAngle(-V)}function $($t){$t.attr("d",function(le){return ot(le.thickness).startAngle(Q(le.range[0])).endAngle(Q(le.range[1]))()})}var Z,st,nt,ct;ut.enter().append("g").classed("angular",!0),ut.attr("transform",v(it[0],it[1])),J.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),J.selectAll("g.xangularaxistick,path,text").remove(),Z=T(D,B.gauge.axis),Z.type="linear",Z.range=B.gauge.axis.range,Z._id="xangularaxis",Z.ticklabeloverflow="allow",Z.setScale();var gt=function($t){return(Z.range[0]-$t.x)/(Z.range[1]-Z.range[0])*Math.PI+Math.PI},Tt={},wt=f.makeLabelFns(Z,0),Rt=wt.labelStandoff;Tt.xFn=function($t){var le=gt($t);return Math.cos(le)*Rt},Tt.yFn=function($t){var le=gt($t),he=Math.sin(le)>0?.2:1;return-Math.sin(le)*(Rt+$t.fontSize*he)+Math.abs(Math.cos(le))*($t.fontSize*r)},Tt.anchorFn=function($t){var le=gt($t),he=Math.cos(le);return Math.abs(he)<.1?"middle":he>0?"start":"end"},Tt.heightFn=function($t,le,he){var de=gt($t);return-.5*(1+Math.sin(de))*he};var bt=function($t){return v(it[0]+H*Math.cos($t),it[1]-H*Math.sin($t))};nt=function($t){return bt(gt($t))};var At=function($t){var le=gt($t);return bt(le)+"rotate("+-p(le)+")"};if(st=f.calcTicks(Z),ct=f.getTickSigns(Z)[2],Z.visible){ct=Z.ticks==="inside"?-1:1;var mt=(Z.linewidth||1)/2;f.drawTicks(D,Z,{vals:st,layer:J,path:"M"+ct*mt+",0h"+ct*Z.ticklen,transFn:At}),f.drawLabels(D,Z,{vals:st,layer:J,transFn:nt,labelFns:Tt})}var Lt=[j].concat(B.gauge.steps),Ht=ut.selectAll("g.bg-arc").data(Lt);Ht.enter().append("g").classed("bg-arc",!0).append("path"),Ht.select("path").call($).call(y),Ht.exit().remove();var Ut=ot(B.gauge.bar.thickness),kt=ut.selectAll("g.value-arc").data([B.gauge.bar]);kt.enter().append("g").classed("value-arc",!0).append("path");var Vt=kt.select("path");d(X)?(Vt.transition().duration(X.duration).ease(X.easing).each("end",function(){tt&&tt()}).each("interrupt",function(){tt&&tt()}).attrTween("d",E(Ut,Q(I[0].lastY),Q(I[0].y))),B._lastValue=I[0].y):Vt.attr("d",typeof I[0].y=="number"?Ut.endAngle(Q(I[0].y)):"M0,0Z"),Vt.call(y),kt.exit().remove(),Lt=[];var It=B.gauge.threshold.value;(It||It===0)&&Lt.push({range:[It,It],color:B.gauge.threshold.color,line:{color:B.gauge.threshold.line.color,width:B.gauge.threshold.line.width},thickness:B.gauge.threshold.thickness});var re=ut.selectAll("g.threshold-arc").data(Lt);re.enter().append("g").classed("threshold-arc",!0).append("path"),re.select("path").call($).call(y),re.exit().remove();var Kt=ut.selectAll("g.gauge-outline").data([et]);Kt.enter().append("g").classed("gauge-outline",!0).append("path"),Kt.select("path").call($).call(y),Kt.exit().remove()}function _(D,N,I,k){var B=I[0].trace,O=k.numbersX,H=k.numbersY,Y=B.align||"center",j=b[Y],et=k.transitionOpts,it=k.onComplete,ut=S.ensureSingle(N,"g","numbers"),J,X,tt,V=[];B._hasNumber&&V.push("number"),B._hasDelta&&(V.push("delta"),B.delta.position==="left"&&V.reverse());var Q=ut.selectAll("text").data(V);Q.enter().append("text"),Q.attr("text-anchor",function(){return j}).attr("class",function(bt){return bt}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Q.exit().remove();function ot(bt,At,mt,Lt){if(bt.match("s")&&mt>=0!=Lt>=0&&!At(mt).slice(-1).match(o)&&!At(Lt).slice(-1).match(o)){var Ht=bt.slice().replace("s","f").replace(/\d+/,function(kt){return parseInt(kt)-1}),Ut=T(D,{tickformat:Ht});return function(kt){return Math.abs(kt)<1?f.tickText(Ut,kt).text:At(kt)}}else return At}function $(){var bt=T(D,{tickformat:B.number.valueformat},B._range);bt.setScale(),f.prepTicks(bt);var At=function(kt){return f.tickText(bt,kt).text},mt=B.number.suffix,Lt=B.number.prefix,Ht=ut.select("text.number");function Ut(){var kt=typeof I[0].y=="number"?Lt+At(I[0].y)+mt:"-";Ht.text(kt).call(e.font,B.number.font).call(n.convertToTspans,D)}return d(et)?Ht.transition().duration(et.duration).ease(et.easing).each("end",function(){Ut(),it&&it()}).each("interrupt",function(){Ut(),it&&it()}).attrTween("text",function(){var kt=g.select(this),Vt=i(I[0].lastY,I[0].y);B._lastValue=I[0].y;var It=ot(B.number.valueformat,At,I[0].lastY,I[0].y);return function(re){kt.text(Lt+It(Vt(re))+mt)}}):Ut(),J=M(Lt+At(I[0].y)+mt,B.number.font,j,D),Ht}function Z(){var bt=T(D,{tickformat:B.delta.valueformat},B._range);bt.setScale(),f.prepTicks(bt);var At=function(re){return f.tickText(bt,re).text},mt=B.delta.suffix,Lt=B.delta.prefix,Ht=function(re){var Kt=B.delta.relative?re.relativeDelta:re.delta;return Kt},Ut=function(re,Kt){return re===0||typeof re!="number"||isNaN(re)?"-":(re>0?B.delta.increasing.symbol:B.delta.decreasing.symbol)+Lt+Kt(re)+mt},kt=function(re){return re.delta>=0?B.delta.increasing.color:B.delta.decreasing.color};B._deltaLastValue===void 0&&(B._deltaLastValue=Ht(I[0]));var Vt=ut.select("text.delta");Vt.call(e.font,B.delta.font).call(h.fill,kt({delta:B._deltaLastValue}));function It(){Vt.text(Ut(Ht(I[0]),At)).call(h.fill,kt(I[0])).call(n.convertToTspans,D)}return d(et)?Vt.transition().duration(et.duration).ease(et.easing).tween("text",function(){var re=g.select(this),Kt=Ht(I[0]),$t=B._deltaLastValue,le=ot(B.delta.valueformat,At,$t,Kt),he=i($t,Kt);return B._deltaLastValue=Kt,function(de){re.text(Ut(he(de),le)),re.call(h.fill,kt({delta:he(de)}))}}).each("end",function(){It(),it&&it()}).each("interrupt",function(){It(),it&&it()}):It(),X=M(Ut(Ht(I[0]),At),B.delta.font,j,D),Vt}var st=B.mode+B.align,nt;if(B._hasDelta&&(nt=Z(),st+=B.delta.position+B.delta.font.size+B.delta.font.family+B.delta.valueformat,st+=B.delta.increasing.symbol+B.delta.decreasing.symbol,tt=X),B._hasNumber&&($(),st+=B.number.font.size+B.number.font.family+B.number.valueformat+B.number.suffix+B.number.prefix,tt=J),B._hasDelta&&B._hasNumber){var ct=[(J.left+J.right)/2,(J.top+J.bottom)/2],gt=[(X.left+X.right)/2,(X.top+X.bottom)/2],Tt,wt,Rt=.75*B.delta.font.size;B.delta.position==="left"&&(Tt=z(B,"deltaPos",0,-1*(J.width*u[B.align]+X.width*(1-u[B.align])+Rt),st,Math.min),wt=ct[1]-gt[1],tt={width:J.width+X.width+Rt,height:Math.max(J.height,X.height),left:X.left+Tt,right:J.right,top:Math.min(J.top,X.top+wt),bottom:Math.max(J.bottom,X.bottom+wt)}),B.delta.position==="right"&&(Tt=z(B,"deltaPos",0,J.width*(1-u[B.align])+X.width*u[B.align]+Rt,st,Math.max),wt=ct[1]-gt[1],tt={width:J.width+X.width+Rt,height:Math.max(J.height,X.height),left:J.left,right:X.right+Tt,top:Math.min(J.top,X.top+wt),bottom:Math.max(J.bottom,X.bottom+wt)}),B.delta.position==="bottom"&&(Tt=null,wt=X.height,tt={width:Math.max(J.width,X.width),height:J.height+X.height,left:Math.min(J.left,X.left),right:Math.max(J.right,X.right),top:J.bottom-J.height,bottom:J.bottom+X.height}),B.delta.position==="top"&&(Tt=null,wt=J.top,tt={width:Math.max(J.width,X.width),height:J.height+X.height,left:Math.min(J.left,X.left),right:Math.max(J.right,X.right),top:J.bottom-J.height-X.height,bottom:J.bottom}),nt.attr({dx:Tt,dy:wt})}(B._hasNumber||B._hasDelta)&&ut.attr("transform",function(){var bt=k.numbersScaler(tt);st+=bt[2];var At=z(B,"numbersScale",1,bt[0],st,Math.min),mt;B._scaleNumbers||(At=1),B._isAngular?mt=H-At*tt.bottom:mt=H-At*(tt.top+tt.bottom)/2,B._numbersTop=At*tt.top+mt;var Lt=tt[Y];Y==="center"&&(Lt=(tt.left+tt.right)/2);var Ht=O-At*Lt;return Ht=z(B,"numbersTranslate",0,Ht,st,Math.max),v(Ht,mt)+x(At)})}function y(D){D.each(function(N){h.stroke(g.select(this),N.line.color)}).each(function(N){h.fill(g.select(this),N.color)}).style("stroke-width",function(N){return N.line.width})}function E(D,N,I){return function(){var k=C(N,I);return function(B){return D.endAngle(k(B))()}}}function T(D,N,I){var k=D._fullLayout,B=S.extendFlat({type:"linear",ticks:"outside",range:I,showline:!0},N),O={type:"linear",_id:"x"+N._id},H={letter:"x",font:k.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function Y(j,et){return S.coerce(B,O,m,j,et)}return c(B,O,Y,H,k),l(B,O,Y,H),O}function s(D,N,I){var k=Math.min(N/D.width,I/D.height);return[k,D,N+"x"+I]}function L(D,N){var I=Math.sqrt(D.width/2*(D.width/2)+D.height*D.height),k=N/I;return[k,D,N]}function M(D,N,I,k){var B=document.createElementNS("http://www.w3.org/2000/svg","text"),O=g.select(B);return O.text(D).attr("x",0).attr("y",0).attr("text-anchor",I).attr("data-unformatted",D).call(n.convertToTspans,k).call(e.font,N),e.bBox(O.node())}function z(D,N,I,k,B,O){var H="_cache"+N;D[H]&&D[H].key===B||(D[H]={key:B,value:I});var Y=S.aggNums(O,null,[D[H].value,k],2);return D[H].value=Y,Y}},50048:function(G,U,t){var g=t(49084),C=t(29736).axisHoverFormat,i=t(21776).Ks,S=t(52948),x=t(45464),v=t(92880).extendFlat,p=t(67824).overrideAll;function r(n){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function e(n){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var a=G.exports=p(v({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:r(),y:r(),z:r()},caps:{x:e(),y:e(),z:e()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:i(),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),valuehoverformat:C("value",1),showlegend:v({},x.showlegend,{dflt:!1})},g("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:S.opacity,lightposition:S.lightposition,lighting:S.lighting,flatshading:S.flatshading,contour:S.contour,hoverinfo:v({},x.hoverinfo)}),"calc","nested");a.flatshading.dflt=!0,a.lighting.facenormalsepsilon.dflt=0,a.x.editType=a.y.editType=a.z.editType=a.value.editType="calc+clearAxisTypes",a.transforms=void 0},62624:function(G,U,t){var g=t(47128),C=t(3832).processGrid,i=t(3832).filter;G.exports=function(x,v){v._len=Math.min(v.x.length,v.y.length,v.z.length,v.value.length),v._x=i(v.x,v._len),v._y=i(v.y,v._len),v._z=i(v.z,v._len),v._value=i(v.value,v._len);var p=C(v);v._gridFill=p.fill,v._Xs=p.Xs,v._Ys=p.Ys,v._Zs=p.Zs,v._len=p.len;for(var r=1/0,e=-1/0,a=0;a0;m--){var h=Math.min(l[m],l[m-1]),b=Math.max(l[m],l[m-1]);if(b>h&&h-1}function Z(Jt,Wt){return Jt===null?Wt:Jt}function st(Jt,Wt,Ft){et();var xt=[Wt],yt=[Ft];if(V>=1)xt=[Wt],yt=[Ft];else if(V>0){var Et=ot(Wt,Ft);xt=Et.xyzv,yt=Et.abc}for(var Mt=0;Mt-1?Ft[jt]:j(ie,me,be);Le>-1?Nt[jt]=Le:Nt[jt]=ut(ie,me,be,Z(Jt,ve))}J(Nt[0],Nt[1],Nt[2])}}function nt(Jt,Wt,Ft){var xt=function(yt,Et,Mt){st(Jt,[Wt[yt],Wt[Et],Wt[Mt]],[Ft[yt],Ft[Et],Ft[Mt]])};xt(0,1,2),xt(2,3,0)}function ct(Jt,Wt,Ft){var xt=function(yt,Et,Mt){st(Jt,[Wt[yt],Wt[Et],Wt[Mt]],[Ft[yt],Ft[Et],Ft[Mt]])};xt(0,1,2),xt(3,0,1),xt(2,3,0),xt(1,2,3)}function gt(Jt,Wt,Ft,xt){var yt=Jt[3];ytxt&&(yt=xt);for(var Et=(Jt[3]-yt)/(Jt[3]-Wt[3]+1e-9),Mt=[],Nt=0;Nt<4;Nt++)Mt[Nt]=(1-Et)*Jt[Nt]+Et*Wt[Nt];return Mt}function Tt(Jt,Wt,Ft){return Jt>=Wt&&Jt<=Ft}function wt(Jt){var Wt=.001*(k-I);return Jt>=I-Wt&&Jt<=k+Wt}function Rt(Jt){for(var Wt=[],Ft=0;Ft<4;Ft++){var xt=Jt[Ft];Wt.push([c._x[xt],c._y[xt],c._z[xt],c._value[xt]])}return Wt}var bt=3;function At(Jt,Wt,Ft,xt,yt,Et){Et||(Et=1),Ft=[-1,-1,-1];var Mt=!1,Nt=[Tt(Wt[0][3],xt,yt),Tt(Wt[1][3],xt,yt),Tt(Wt[2][3],xt,yt)];if(!Nt[0]&&!Nt[1]&&!Nt[2])return!1;var jt=function(me,be,ve){return wt(be[0][3])&&wt(be[1][3])&&wt(be[2][3])?(st(me,be,ve),!0):EtNt?[D,Et]:[Et,N];he(Wt,jt[0],jt[1])}}var ie=[[Math.min(I,N),Math.max(I,N)],[Math.min(D,k),Math.max(D,k)]];["x","y","z"].forEach(function(me){for(var be=[],ve=0;ve0&&(pe.push(or.id),me==="x"?Xe.push([or.distRatio,0,0]):me==="y"?Xe.push([0,or.distRatio,0]):Xe.push([0,0,or.distRatio]))}else me==="x"?ir=ne(1,T-1):me==="y"?ir=ne(1,s-1):ir=ne(1,L-1);pe.length>0&&(me==="x"?be[Le]=de(Jt,pe,ce,Te,Xe,be[Le]):me==="y"?be[Le]=xe(Jt,pe,ce,Te,Xe,be[Le]):be[Le]=Se(Jt,pe,ce,Te,Xe,be[Le]),Le++),ir.length>0&&(me==="x"?be[Le]=It(Jt,ir,ce,Te,be[Le]):me==="y"?be[Le]=re(Jt,ir,ce,Te,be[Le]):be[Le]=Kt(Jt,ir,ce,Te,be[Le]),Le++)}var $e=c.caps[me];$e.show&&$e.fill&&(Q($e.fill),me==="x"?be[Le]=It(Jt,[0,T-1],ce,Te,be[Le]):me==="y"?be[Le]=re(Jt,[0,s-1],ce,Te,be[Le]):be[Le]=Kt(Jt,[0,L-1],ce,Te,be[Le]),Le++)}}),d===0&&it(),c._meshX=B,c._meshY=O,c._meshZ=H,c._meshIntensity=Y,c._Xs=_,c._Ys=y,c._Zs=E}return Xt(),c}function f(c,l){var m=c.glplot.gl,h=g({gl:m}),b=new r(c,h,l.uid);return h._trace=b,b.update(l),c.glplot.add(h),b}G.exports={findNearestOnAxis:p,generateIsoMeshes:n,createIsosurfaceTrace:f}},70548:function(G,U,t){var g=t(3400),C=t(24040),i=t(50048),S=t(27260);function x(p,r,e,a){function n(f,c){return g.coerce(p,r,i,f,c)}v(p,r,e,a,n)}function v(p,r,e,a,n){var f=n("isomin"),c=n("isomax");c!=null&&f!==void 0&&f!==null&&f>c&&(r.isomin=null,r.isomax=null);var l=n("x"),m=n("y"),h=n("z"),b=n("value");if(!l||!l.length||!m||!m.length||!h||!h.length||!b||!b.length){r.visible=!1;return}var u=C.getComponentMethod("calendars","handleTraceDefaults");u(p,r,["x","y","z"],a),n("valuehoverformat"),["x","y","z"].forEach(function(A){n(A+"hoverformat");var _="caps."+A,y=n(_+".show");y&&n(_+".fill");var E="slices."+A,T=n(E+".show");T&&(n(E+".fill"),n(E+".locations"))});var o=n("spaceframe.show");o&&n("spaceframe.fill");var d=n("surface.show");d&&(n("surface.count"),n("surface.fill"),n("surface.pattern"));var w=n("contour.show");w&&(n("contour.color"),n("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(A){n(A)}),S(p,r,a,n,{prefix:"",cLetter:"c"}),r._length=null}G.exports={supplyDefaults:x,supplyIsoDefaults:v}},6296:function(G,U,t){G.exports={attributes:t(50048),supplyDefaults:t(70548).supplyDefaults,calc:t(62624),colorbar:{min:"cmin",max:"cmax"},plot:t(31460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:t(12536),categories:["gl3d","showLegend"],meta:{}}},52948:function(G,U,t){var g=t(49084),C=t(29736).axisHoverFormat,i=t(21776).Ks,S=t(16716),x=t(45464),v=t(92880).extendFlat;G.exports=v({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"}),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},g("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:S.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:v({},S.contours.x.show,{}),color:S.contours.x.color,width:S.contours.x.width,editType:"calc"},lightposition:{x:v({},S.lightposition.x,{dflt:1e5}),y:v({},S.lightposition.y,{dflt:1e5}),z:v({},S.lightposition.z,{dflt:0}),editType:"calc"},lighting:v({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},S.lighting),hoverinfo:v({},x.hoverinfo,{editType:"calc"}),showlegend:v({},x.showlegend,{dflt:!1})})},1876:function(G,U,t){var g=t(47128);G.exports=function(i,S){S.intensity&&g(i,S,{vals:S.intensity,containerStr:"",cLetter:"c"})}},576:function(G,U,t){var g=t(67792).gl_mesh3d,C=t(67792).delaunay_triangulate,i=t(67792).alpha_shape,S=t(67792).convex_hull,x=t(33040).parseColorScale,v=t(3400).isArrayOrTypedArray,p=t(43080),r=t(8932).extractOpts,e=t(52094);function a(u,o,d){this.scene=u,this.uid=d,this.mesh=o,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var n=a.prototype;n.handlePick=function(u){if(u.object===this.mesh){var o=u.index=u.data.index;u.data._cellCenter?u.traceCoordinate=u.data.dataCoordinate:u.traceCoordinate=[this.data.x[o],this.data.y[o],this.data.z[o]];var d=this.data.hovertext||this.data.text;return v(d)&&d[o]!==void 0?u.textLabel=d[o]:d&&(u.textLabel=d),!0}};function f(u){for(var o=[],d=u.length,w=0;w=o-.5)return!1;return!0}n.update=function(u){var o=this.scene,d=o.fullSceneLayout;this.data=u;var w=u.x.length,A=e(c(d.xaxis,u.x,o.dataScale[0],u.xcalendar),c(d.yaxis,u.y,o.dataScale[1],u.ycalendar),c(d.zaxis,u.z,o.dataScale[2],u.zcalendar)),_;if(u.i&&u.j&&u.k){if(u.i.length!==u.j.length||u.j.length!==u.k.length||!h(u.i,w)||!h(u.j,w)||!h(u.k,w))return;_=e(l(u.i),l(u.j),l(u.k))}else u.alphahull===0?_=S(A):u.alphahull>0?_=i(u.alphahull,A):_=m(u.delaunayaxis,A);var y={positions:A,cells:_,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,contourEnable:u.contour.show,contourColor:p(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading};if(u.intensity){var E=r(u);this.color="#fff";var T=u.intensitymode;y[T+"Intensity"]=u.intensity,y[T+"IntensityBounds"]=[E.min,E.max],y.colormap=x(u)}else u.vertexcolor?(this.color=u.vertexcolor[0],y.vertexColors=f(u.vertexcolor)):u.facecolor?(this.color=u.facecolor[0],y.cellColors=f(u.facecolor)):(this.color=u.color,y.meshColor=p(u.color));this.mesh.update(y)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function b(u,o){var d=u.glplot.gl,w=g({gl:d}),A=new a(u,w,o.uid);return w._trace=A,A.update(o),u.glplot.add(w),A}G.exports=b},74212:function(G,U,t){var g=t(24040),C=t(3400),i=t(27260),S=t(52948);G.exports=function(v,p,r,e){function a(m,h){return C.coerce(v,p,S,m,h)}function n(m){var h=m.map(function(b){var u=a(b);return u&&C.isArrayOrTypedArray(u)?u:null});return h.every(function(b){return b&&b.length===h[0].length})&&h}var f=n(["x","y","z"]);if(!f){p.visible=!1;return}if(n(["i","j","k"]),p.i&&(!p.j||!p.k)||p.j&&(!p.k||!p.i)||p.k&&(!p.i||!p.j)){p.visible=!1;return}var c=g.getComponentMethod("calendars","handleTraceDefaults");c(v,p,["x","y","z"],e),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(m){a(m)});var l=a("contour.show");l&&(a("contour.color"),a("contour.width")),"intensity"in v?(a("intensity"),a("intensitymode"),i(v,p,e,a,{prefix:"",cLetter:"c"})):(p.showscale=!1,"facecolor"in v?a("facecolor"):"vertexcolor"in v?a("vertexcolor"):a("color",r)),a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),p._length=null}},7404:function(G,U,t){G.exports={attributes:t(52948),supplyDefaults:t(74212),calc:t(1876),colorbar:{min:"cmin",max:"cmax"},plot:t(576),moduleType:"trace",name:"mesh3d",basePlotModule:t(12536),categories:["gl3d","showLegend"],meta:{}}},20279:function(G,U,t){var g=t(3400).extendFlat,C=t(52904),i=t(29736).axisHoverFormat,S=t(98192).u,x=t(55756),v=t(48164),p=v.INCREASING.COLOR,r=v.DECREASING.COLOR,e=C.line;function a(n){return{line:{color:g({},e.color,{dflt:n}),width:e.width,dash:S,editType:"style"},editType:"style"}}G.exports={xperiod:C.xperiod,xperiod0:C.xperiod0,xperiodalignment:C.xperiodalignment,xhoverformat:i("x"),yhoverformat:i("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:g({},e.width,{}),dash:g({},S,{}),editType:"style"},increasing:a(p),decreasing:a(r),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:g({},x.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},42812:function(G,U,t){var g=t(3400),C=g._,i=t(54460),S=t(1220),x=t(39032).BADNUM;function v(a,n){var f=i.getFromId(a,n.xaxis),c=i.getFromId(a,n.yaxis),l=e(a,f,n),m=n._minDiff;n._minDiff=null;var h=n._origX;n._origX=null;var b=n._xcalc;n._xcalc=null;var u=r(a,n,h,b,c,p);return n._extremes[f._id]=i.findExtremes(f,b,{vpad:m/2}),u.length?(g.extendFlat(u[0].t,{wHover:m/2,tickLen:l}),u):[{t:{empty:!0}}]}function p(a,n,f,c){return{o:a,h:n,l:f,c}}function r(a,n,f,c,l,m){for(var h=l.makeCalcdata(n,"open"),b=l.makeCalcdata(n,"high"),u=l.makeCalcdata(n,"low"),o=l.makeCalcdata(n,"close"),d=g.isArrayOrTypedArray(n.text),w=g.isArrayOrTypedArray(n.hovertext),A=!0,_=null,y=!!n.xperiodalignment,E=[],T=0;T_):A=D>L,_=D;var N=m(L,M,z,D);N.pos=s,N.yc=(L+D)/2,N.i=T,N.dir=A?"increasing":"decreasing",N.x=N.pos,N.y=[z,M],y&&(N.orig_p=f[T]),d&&(N.tx=n.text[T]),w&&(N.htx=n.hovertext[T]),E.push(N)}else E.push({pos:s,empty:!0})}return n._extremes[l._id]=i.findExtremes(l,g.concat(u,b),{padded:!0}),E.length&&(E[0].t={labels:{open:C(a,"open:")+" ",high:C(a,"high:")+" ",low:C(a,"low:")+" ",close:C(a,"close:")+" "}}),E}function e(a,n,f){var c=f._minDiff;if(!c){var l=a._fullData,m=[];c=1/0;var h;for(h=0;h"+o.labels[D]+g.hoverLabelText(b,N,u.yhoverformat)):(k=C.extendFlat({},w),k.y0=k.y1=I,k.yLabelVal=N,k.yLabel=o.labels[D]+g.hoverLabelText(b,N,u.yhoverformat),k.name="",d.push(k),M[N]=k)}return d}function n(f,c,l,m){var h=f.cd,b=f.ya,u=h[0].trace,o=h[0].t,d=e(f,c,l,m);if(!d)return[];var w=d.index,A=h[w],_=d.index=A.i,y=A.dir;function E(N){return o.labels[N]+g.hoverLabelText(b,u[N][_],u.yhoverformat)}var T=A.hi||u.hoverinfo,s=T.split("+"),L=T==="all",M=L||s.indexOf("y")!==-1,z=L||s.indexOf("text")!==-1,D=M?[E("open"),E("high"),E("low"),E("close")+" "+p[y]]:[];return z&&x(A,u,D),d.extraText=D.join("
    "),d.y0=d.y1=b.c2p(A.yc,!0),[d]}G.exports={hoverPoints:r,hoverSplit:a,hoverOnPoints:n}},65456:function(G,U,t){G.exports={moduleType:"trace",name:"ohlc",basePlotModule:t(57952),categories:["cartesian","svg","showLegend"],meta:{},attributes:t(20279),supplyDefaults:t(23860),calc:t(42812).calc,plot:t(36664),style:t(14008),hoverPoints:t(18720).hoverPoints,selectPoints:t(97384)}},52744:function(G,U,t){var g=t(24040),C=t(3400);G.exports=function(S,x,v,p){var r=v("x"),e=v("open"),a=v("high"),n=v("low"),f=v("close");v("hoverlabel.split");var c=g.getComponentMethod("calendars","handleTraceDefaults");if(c(S,x,["x"],p),!!(e&&a&&n&&f)){var l=Math.min(e.length,a.length,n.length,f.length);return r&&(l=Math.min(l,C.minRowLength(r))),x._length=l,l}}},36664:function(G,U,t){var g=t(33428),C=t(3400);G.exports=function(S,x,v,p){var r=x.yaxis,e=x.xaxis,a=!!e.rangebreaks;C.makeTraceGroups(p,v,"trace ohlc").each(function(n){var f=g.select(this),c=n[0],l=c.t,m=c.trace;if(m.visible!==!0||l.empty){f.remove();return}var h=l.tickLen,b=f.selectAll("path").data(C.identity);b.enter().append("path"),b.exit().remove(),b.attr("d",function(u){if(u.empty)return"M0,0Z";var o=e.c2p(u.pos-h,!0),d=e.c2p(u.pos+h,!0),w=a?(o+d)/2:e.c2p(u.pos,!0),A=r.c2p(u.o,!0),_=r.c2p(u.h,!0),y=r.c2p(u.l,!0),E=r.c2p(u.c,!0);return"M"+o+","+A+"H"+w+"M"+w+","+_+"V"+y+"M"+d+","+E+"H"+w})})}},97384:function(G){G.exports=function(t,g){var C=t.cd,i=t.xaxis,S=t.yaxis,x=[],v,p=C[0].t.bPos||0;if(g===!1)for(v=0;v=u.length||o[u[d]]!==void 0)return!1;o[u[d]]=!0}return!0}},76671:function(G,U,t){var g=t(3400),C=t(94288).hasColorscale,i=t(27260),S=t(86968).Q,x=t(51272),v=t(72140),p=t(26284),r=t(38116).isTypedArraySpec;function e(n,f,c,l,m){m("line.shape"),m("line.hovertemplate");var h=m("line.color",l.colorway[0]);if(C(n,"line")&&g.isArrayOrTypedArray(h)){if(h.length)return m("line.colorscale"),i(n,f,l,m,{prefix:"line.",cLetter:"c"}),h.length;f.line.color=c}return 1/0}function a(n,f){function c(d,w){return g.coerce(n,f,v.dimensions,d,w)}var l=c("values"),m=c("visible");if(l&&l.length||(m=f.visible=!1),m){c("label"),c("displayindex",f._index);var h=n.categoryarray,b=g.isArrayOrTypedArray(h)&&h.length>0||r(h),u;b&&(u="array");var o=c("categoryorder",u);o==="array"?(c("categoryarray"),c("ticktext")):(delete n.categoryarray,delete n.ticktext),!b&&o==="array"&&(f.categoryorder="trace")}}G.exports=function(f,c,l,m){function h(w,A){return g.coerce(f,c,v,w,A)}var b=x(f,c,{name:"dimensions",handleItemDefaults:a}),u=e(f,c,l,m,h);S(c,m,h),(!Array.isArray(b)||!b.length)&&(c.visible=!1),p(c,b,"values",u),h("hoveron"),h("hovertemplate"),h("arrangement"),h("bundlecolors"),h("sortpaths"),h("counts");var o={family:m.font.family,size:Math.round(m.font.size),color:m.font.color};g.coerceFont(h,"labelfont",o);var d={family:m.font.family,size:Math.round(m.font.size/1.2),color:m.font.color};g.coerceFont(h,"tickfont",d)}},22020:function(G,U,t){G.exports={attributes:t(72140),supplyDefaults:t(76671),calc:t(69136),plot:t(60268),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:t(91800),categories:["noOpacity"],meta:{}}},51036:function(G,U,t){var g=t(33428),C=t(67756).Gz,i=t(36424),S=t(93024),x=t(3400),v=x.strTranslate,p=t(43616),r=t(49760),e=t(72736);function a(V,Q,ot,$){var Z=Q._context.staticPlot,st=V.map(it.bind(0,Q,ot)),nt=$.selectAll("g.parcatslayer").data([null]);nt.enter().append("g").attr("class","parcatslayer").style("pointer-events",Z?"none":"all");var ct=nt.selectAll("g.trace.parcats").data(st,n),gt=ct.enter().append("g").attr("class","trace parcats");ct.attr("transform",function(Vt){return v(Vt.x,Vt.y)}),gt.append("g").attr("class","paths");var Tt=ct.select("g.paths"),wt=Tt.selectAll("path.path").data(function(Vt){return Vt.paths},n);wt.attr("fill",function(Vt){return Vt.model.color});var Rt=wt.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Vt){return Vt.model.color}).attr("fill-opacity",0);o(Rt),wt.attr("d",function(Vt){return Vt.svgD}),Rt.empty()||wt.sort(c),wt.exit().remove(),wt.on("mouseover",l).on("mouseout",m).on("click",u),gt.append("g").attr("class","dimensions");var bt=ct.select("g.dimensions"),At=bt.selectAll("g.dimension").data(function(Vt){return Vt.dimensions},n);At.enter().append("g").attr("class","dimension"),At.attr("transform",function(Vt){return v(Vt.x,0)}),At.exit().remove();var mt=At.selectAll("g.category").data(function(Vt){return Vt.categories},n),Lt=mt.enter().append("g").attr("class","category");mt.attr("transform",function(Vt){return v(0,Vt.y)}),Lt.append("rect").attr("class","catrect").attr("pointer-events","none"),mt.select("rect.catrect").attr("fill","none").attr("width",function(Vt){return Vt.width}).attr("height",function(Vt){return Vt.height}),A(Lt);var Ht=mt.selectAll("rect.bandrect").data(function(Vt){return Vt.bands},n);Ht.each(function(){x.raiseToTop(this)}),Ht.attr("fill",function(Vt){return Vt.color});var Ut=Ht.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Vt){return Vt.color}).attr("fill-opacity",0);Ht.attr("fill",function(Vt){return Vt.color}).attr("width",function(Vt){return Vt.width}).attr("height",function(Vt){return Vt.height}).attr("y",function(Vt){return Vt.y}).attr("cursor",function(Vt){return Vt.parcatsViewModel.arrangement==="fixed"?"default":Vt.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),y(Ut),Ht.exit().remove(),Lt.append("text").attr("class","catlabel").attr("pointer-events","none");var kt=Q._fullLayout.paper_bgcolor;mt.select("text.catlabel").attr("text-anchor",function(Vt){return f(Vt)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",e.makeTextShadow(kt)).style("fill","rgb(0, 0, 0)").attr("x",function(Vt){return f(Vt)?Vt.width+5:-5}).attr("y",function(Vt){return Vt.height/2}).text(function(Vt){return Vt.model.categoryLabel}).each(function(Vt){p.font(g.select(this),Vt.parcatsViewModel.categorylabelfont),e.convertToTspans(g.select(this),Q)}),Lt.append("text").attr("class","dimlabel"),mt.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Vt){return Vt.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Vt){return Vt.width/2}).attr("y",-5).text(function(Vt,It){return It===0?Vt.parcatsViewModel.model.dimensions[Vt.model.dimensionInd].dimensionLabel:null}).each(function(Vt){p.font(g.select(this),Vt.parcatsViewModel.labelfont)}),mt.selectAll("rect.bandrect").on("mouseover",I).on("mouseout",k),mt.exit().remove(),At.call(g.behavior.drag().origin(function(Vt){return{x:Vt.x,y:0}}).on("dragstart",B).on("drag",O).on("dragend",H)),ct.each(function(Vt){Vt.traceSelection=g.select(this),Vt.pathSelection=g.select(this).selectAll("g.paths").selectAll("path.path"),Vt.dimensionSelection=g.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),ct.exit().remove()}G.exports=function(V,Q,ot,$){a(ot,V,$,Q)};function n(V){return V.key}function f(V){var Q=V.parcatsViewModel.dimensions.length,ot=V.parcatsViewModel.dimensions[Q-1].model.dimensionInd;return V.model.dimensionInd===ot}function c(V,Q){return V.model.rawColor>Q.model.rawColor?1:V.model.rawColor"),Kt=g.mouse(Z)[0];S.loneHover({trace:st,x:mt-ct.left+gt.left,y:Lt-ct.top+gt.top,text:re,color:V.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Ht,idealAlign:Kt1&&Tt.displayInd===gt.dimensions.length-1?(bt=nt.left,At="left"):(bt=nt.left+nt.width,At="right");var mt=ct.model.count,Lt=ct.model.categoryLabel,Ht=mt/ct.parcatsViewModel.model.count,Ut={countLabel:mt,categoryLabel:Lt,probabilityLabel:Ht.toFixed(3)},kt=[];ct.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&kt.push(["Count:",Ut.countLabel].join(" ")),ct.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&kt.push(["P("+Ut.categoryLabel+"):",Ut.probabilityLabel].join(" "));var Vt=kt.join("
    ");return{trace:wt,x:$*(bt-Q.left),y:Z*(Rt-Q.top),text:Vt,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:At,hovertemplate:wt.hovertemplate,hovertemplateLabels:Ut,eventData:[{data:wt._input,fullData:wt,count:mt,category:Lt,probability:Ht}]}}function D(V,Q,ot){var $=[];return g.select(ot.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Z=this;$.push(z(V,Q,Z))}),$}function N(V,Q,ot){V._fullLayout._calcInverseTransform(V);var $=V._fullLayout._invScaleX,Z=V._fullLayout._invScaleY,st=ot.getBoundingClientRect(),nt=g.select(ot).datum(),ct=nt.categoryViewModel,gt=ct.parcatsViewModel,Tt=gt.model.dimensions[ct.model.dimensionInd],wt=gt.trace,Rt=st.y+st.height/2,bt,At;gt.dimensions.length>1&&Tt.displayInd===gt.dimensions.length-1?(bt=st.left,At="left"):(bt=st.left+st.width,At="right");var mt=ct.model.categoryLabel,Lt=nt.parcatsViewModel.model.count,Ht=0;nt.categoryViewModel.bands.forEach(function(de){de.color===nt.color&&(Ht+=de.count)});var Ut=ct.model.count,kt=0;gt.pathSelection.each(function(de){de.model.color===nt.color&&(kt+=de.model.count)});var Vt=Ht/Lt,It=Ht/kt,re=Ht/Ut,Kt={countLabel:Lt,categoryLabel:mt,probabilityLabel:Vt.toFixed(3)},$t=[];ct.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&$t.push(["Count:",Kt.countLabel].join(" ")),ct.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&($t.push("P(color ∩ "+mt+"): "+Kt.probabilityLabel),$t.push("P("+mt+" | color): "+It.toFixed(3)),$t.push("P(color | "+mt+"): "+re.toFixed(3)));var le=$t.join("
    "),he=r.mostReadable(nt.color,["black","white"]);return{trace:wt,x:$*(bt-Q.left),y:Z*(Rt-Q.top),text:le,color:nt.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:he,fontSize:10,idealAlign:At,hovertemplate:wt.hovertemplate,hovertemplateLabels:Kt,eventData:[{data:wt._input,fullData:wt,category:mt,count:Lt,probability:Vt,categorycount:Ut,colorcount:kt,bandcolorcount:Ht}]}}function I(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var Q=g.mouse(this)[1];if(Q<-1)return;var ot=V.parcatsViewModel.graphDiv,$=ot._fullLayout,Z=$._paperdiv.node().getBoundingClientRect(),st=V.parcatsViewModel.hoveron,nt=this;if(st==="color"?(s(nt),M(nt,"plotly_hover",g.event)):(T(nt),L(nt,"plotly_hover",g.event)),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ct;st==="category"?ct=z(ot,Z,nt):st==="color"?ct=N(ot,Z,nt):st==="dimension"&&(ct=D(ot,Z,nt)),ct&&S.loneHover(ct,{container:$._hoverlayer.node(),outerContainer:$._paper.node(),gd:ot})}}}function k(V){var Q=V.parcatsViewModel;if(!Q.dragDimension&&(o(Q.pathSelection),A(Q.dimensionSelection.selectAll("g.category")),y(Q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),S.loneUnhover(Q.graphDiv._fullLayout._hoverlayer.node()),Q.pathSelection.sort(c),Q.hoverinfoItems.indexOf("skip")===-1)){var ot=V.parcatsViewModel.hoveron,$=this;ot==="color"?M($,"plotly_unhover",g.event):L($,"plotly_unhover",g.event)}}function B(V){V.parcatsViewModel.arrangement!=="fixed"&&(V.dragDimensionDisplayInd=V.model.displayInd,V.initialDragDimensionDisplayInds=V.parcatsViewModel.model.dimensions.map(function(Q){return Q.displayInd}),V.dragHasMoved=!1,V.dragCategoryDisplayInd=null,g.select(this).selectAll("g.category").select("rect.catrect").each(function(Q){var ot=g.mouse(this)[0],$=g.mouse(this)[1];-2<=ot&&ot<=Q.width+2&&-2<=$&&$<=Q.height+2&&(V.dragCategoryDisplayInd=Q.model.displayInd,V.initialDragCategoryDisplayInds=V.model.categories.map(function(Z){return Z.displayInd}),Q.model.dragY=Q.y,x.raiseToTop(this.parentNode),g.select(this.parentNode).selectAll("rect.bandrect").each(function(Z){Z.y<$&&$<=Z.y+Z.height&&(V.potentialClickBand=this)}))}),V.parcatsViewModel.dragDimension=V,S.loneUnhover(V.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function O(V){if(V.parcatsViewModel.arrangement!=="fixed"&&(V.dragHasMoved=!0,V.dragDimensionDisplayInd!==null)){var Q=V.dragDimensionDisplayInd,ot=Q-1,$=Q+1,Z=V.parcatsViewModel.dimensions[Q];if(V.dragCategoryDisplayInd!==null){var st=Z.categories[V.dragCategoryDisplayInd];st.model.dragY+=g.event.dy;var nt=st.model.dragY,ct=st.model.displayInd,gt=Z.categories,Tt=gt[ct-1],wt=gt[ct+1];Tt!==void 0&&ntwt.y+wt.height/2&&(st.model.displayInd=wt.model.displayInd,wt.model.displayInd=ct),V.dragCategoryDisplayInd=st.model.displayInd}if(V.dragCategoryDisplayInd===null||V.parcatsViewModel.arrangement==="freeform"){Z.model.dragX=g.event.x;var Rt=V.parcatsViewModel.dimensions[ot],bt=V.parcatsViewModel.dimensions[$];Rt!==void 0&&Z.model.dragXbt.x&&(Z.model.displayInd=bt.model.displayInd,bt.model.displayInd=V.dragDimensionDisplayInd),V.dragDimensionDisplayInd=Z.model.displayInd}X(V.parcatsViewModel),J(V.parcatsViewModel),et(V.parcatsViewModel),j(V.parcatsViewModel)}}function H(V){if(V.parcatsViewModel.arrangement!=="fixed"&&V.dragDimensionDisplayInd!==null){g.select(this).selectAll("text").attr("font-weight","normal");var Q={},ot=Y(V.parcatsViewModel),$=V.parcatsViewModel.model.dimensions.map(function(bt){return bt.displayInd}),Z=V.initialDragDimensionDisplayInds.some(function(bt,At){return bt!==$[At]});Z&&$.forEach(function(bt,At){var mt=V.parcatsViewModel.model.dimensions[At].containerInd;Q["dimensions["+mt+"].displayindex"]=bt});var st=!1;if(V.dragCategoryDisplayInd!==null){var nt=V.model.categories.map(function(bt){return bt.displayInd});if(st=V.initialDragCategoryDisplayInds.some(function(bt,At){return bt!==nt[At]}),st){var ct=V.model.categories.slice().sort(function(bt,At){return bt.displayInd-At.displayInd}),gt=ct.map(function(bt){return bt.categoryValue}),Tt=ct.map(function(bt){return bt.categoryLabel});Q["dimensions["+V.model.containerInd+"].categoryarray"]=[gt],Q["dimensions["+V.model.containerInd+"].ticktext"]=[Tt],Q["dimensions["+V.model.containerInd+"].categoryorder"]="array"}}if(V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!V.dragHasMoved&&V.potentialClickBand&&(V.parcatsViewModel.hoveron==="color"?M(V.potentialClickBand,"plotly_click",g.event.sourceEvent):L(V.potentialClickBand,"plotly_click",g.event.sourceEvent)),V.model.dragX=null,V.dragCategoryDisplayInd!==null){var wt=V.parcatsViewModel.dimensions[V.dragDimensionDisplayInd].categories[V.dragCategoryDisplayInd];wt.model.dragY=null,V.dragCategoryDisplayInd=null}V.dragDimensionDisplayInd=null,V.parcatsViewModel.dragDimension=null,V.dragHasMoved=null,V.potentialClickBand=null,X(V.parcatsViewModel),J(V.parcatsViewModel);var Rt=g.transition().duration(300).ease("cubic-in-out");Rt.each(function(){et(V.parcatsViewModel,!0),j(V.parcatsViewModel,!0)}).each("end",function(){(Z||st)&&i.restyle(V.parcatsViewModel.graphDiv,Q,[ot])})}}function Y(V){for(var Q,ot=V.graphDiv._fullData,$=0;$=0;gt--)Tt+="C"+nt[gt]+","+(Q[gt+1]+$)+" "+st[gt]+","+(Q[gt]+$)+" "+(V[gt]+ot[gt])+","+(Q[gt]+$),Tt+="l-"+ot[gt]+",0 ";return Tt+="Z",Tt}function J(V){var Q=V.dimensions,ot=V.model,$=Q.map(function(ne){return ne.categories.map(function(zt){return zt.y})}),Z=V.model.dimensions.map(function(ne){return ne.categories.map(function(zt){return zt.displayInd})}),st=V.model.dimensions.map(function(ne){return ne.displayInd}),nt=V.dimensions.map(function(ne){return ne.model.dimensionInd}),ct=Q.map(function(ne){return ne.x}),gt=Q.map(function(ne){return ne.width}),Tt=[];for(var wt in ot.paths)ot.paths.hasOwnProperty(wt)&&Tt.push(ot.paths[wt]);function Rt(ne){var zt=ne.categoryInds.map(function(Jt,Wt){return Z[Wt][Jt]}),Xt=nt.map(function(Jt){return zt[Jt]});return Xt}Tt.sort(function(ne,zt){var Xt=Rt(ne),Jt=Rt(zt);return V.sortpaths==="backward"&&(Xt.reverse(),Jt.reverse()),Xt.push(ne.valueInds[0]),Jt.push(zt.valueInds[0]),V.bundlecolors&&(Xt.unshift(ne.rawColor),Jt.unshift(zt.rawColor)),XtJt?1:0});for(var bt=new Array(Tt.length),At=Q[0].model.count,mt=Q[0].categories.map(function(ne){return ne.height}).reduce(function(ne,zt){return ne+zt}),Lt=0;Lt0?Ut=mt*(Ht.count/At):Ut=0;for(var kt=new Array($.length),Vt=0;Vt1?nt=(V.width-2*ot-$)/(Z-1):nt=0,ct=ot,gt=ct+nt*st;var Tt=[],wt=V.model.maxCats,Rt=Q.categories.length,bt=8,At=Q.count,mt=V.height-bt*(wt-1),Lt,Ht,Ut,kt,Vt,It=(wt-Rt)*bt/2,re=Q.categories.map(function(Kt){return{displayInd:Kt.displayInd,categoryInd:Kt.categoryInd}});for(re.sort(function(Kt,$t){return Kt.displayInd-$t.displayInd}),Vt=0;Vt0?Lt=Ht.count/At*mt:Lt=0,Ut={key:Ht.valueInds[0],model:Ht,width:$,height:Lt,y:Ht.dragY!==null?Ht.dragY:It,bands:[],parcatsViewModel:V},It=It+Lt+bt,Tt.push(Ut);return{key:Q.dimensionInd,x:Q.dragX!==null?Q.dragX:gt,y:0,width:$,model:Q,categories:Tt,parcatsViewModel:V,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}},60268:function(G,U,t){var g=t(51036);G.exports=function(i,S,x,v){var p=i._fullLayout,r=p._paper,e=p._size;g(i,r,S,{width:e.w,height:e.h,margin:{t:e.t,r:e.r,b:e.b,l:e.l}},x,v)}},82296:function(G,U,t){var g=t(49084),C=t(94724),i=t(25376),S=t(86968).u,x=t(92880).extendFlat,v=t(31780).templatedArray;G.exports={domain:S({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:i({editType:"plot"}),tickfont:i({editType:"plot"}),rangefont:i({editType:"plot"}),dimensions:v("dimension",{label:{valType:"string",editType:"plot"},tickvals:x({},C.tickvals,{editType:"plot"}),ticktext:x({},C.ticktext,{editType:"plot"}),tickformat:x({},C.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:x({editType:"calc"},g("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(G,U,t){var g=t(30140),C=t(33428),i=t(71688).keyFun,S=t(71688).repeat,x=t(3400).sorterAsc,v=t(3400).strTranslate,p=g.bar.snapRatio;function r(H,Y){return H*(1-p)+Y*p}var e=g.bar.snapClose;function a(H,Y){return H*(1-e)+Y*e}function n(H,Y,j,et){if(f(j,et))return j;var it=H?-1:1,ut=0,J=Y.length-1;if(it<0){var X=ut;ut=J,J=X}for(var tt=Y[ut],V=tt,Q=ut;it*Q=Y[j][0]&&H<=Y[j][1])return!0;return!1}function c(H){H.attr("x",-g.bar.captureWidth/2).attr("width",g.bar.captureWidth)}function l(H){H.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function m(H){if(!H.brush.filterSpecified)return"0,"+H.height;for(var Y=h(H.brush.filter.getConsolidated(),H.height),j=[0],et,it,ut,J=Y.length?Y[0][0]:null,X=0;XH[1]+j||Y=.9*H[1]+.1*H[0]?"n":Y<=.9*H[0]+.1*H[1]?"s":"ns"}function u(){C.select(document.body).style("cursor",null)}function o(H){H.attr("stroke-dasharray",m)}function d(H,Y){var j=C.select(H).selectAll(".highlight, .highlight-shadow"),et=Y?j.transition().duration(g.bar.snapDuration).each("end",Y):j;o(et)}function w(H,Y){var j=H.brush,et=j.filterSpecified,it=NaN,ut={},J;if(et){var X=H.height,tt=j.filter.getConsolidated(),V=h(tt,X),Q=NaN,ot=NaN,$=NaN;for(J=0;J<=V.length;J++){var Z=V[J];if(Z&&Z[0]<=Y&&Y<=Z[1]){Q=J;break}else if(ot=J?J-1:NaN,Z&&Z[0]>Y){$=J;break}}if(it=Q,isNaN(it)&&(isNaN(ot)||isNaN($)?it=isNaN(ot)?$:ot:it=Y-V[ot][1]=Tt[0]&><=Tt[1]){ut.clickableOrdinalRange=Tt;break}}}return ut}function A(H,Y){C.event.sourceEvent.stopPropagation();var j=Y.height-C.mouse(H)[1]-2*g.verticalPadding,et=Y.unitToPaddedPx.invert(j),it=Y.brush,ut=w(Y,j),J=ut.interval,X=it.svgBrush;if(X.wasDragged=!1,X.grabbingBar=ut.region==="ns",X.grabbingBar){var tt=J.map(Y.unitToPaddedPx);X.grabPoint=j-tt[0]-g.verticalPadding,X.barLength=tt[1]-tt[0]}X.clickableOrdinalRange=ut.clickableOrdinalRange,X.stayingIntervals=Y.multiselect&&it.filterSpecified?it.filter.getConsolidated():[],J&&(X.stayingIntervals=X.stayingIntervals.filter(function(V){return V[0]!==J[0]&&V[1]!==J[1]})),X.startExtent=ut.region?J[ut.region==="s"?1:0]:et,Y.parent.inBrushDrag=!0,X.brushStartCallback()}function _(H,Y){C.event.sourceEvent.stopPropagation();var j=Y.height-C.mouse(H)[1]-2*g.verticalPadding,et=Y.brush.svgBrush;et.wasDragged=!0,et._dragging=!0,et.grabbingBar?et.newExtent=[j-et.grabPoint,j+et.barLength-et.grabPoint].map(Y.unitToPaddedPx.invert):et.newExtent=[et.startExtent,Y.unitToPaddedPx.invert(j)].sort(x),Y.brush.filterSpecified=!0,et.extent=et.stayingIntervals.concat([et.newExtent]),et.brushCallback(Y),d(H.parentNode)}function y(H,Y){var j=Y.brush,et=j.filter,it=j.svgBrush;it._dragging||(E(H,Y),_(H,Y),Y.brush.svgBrush.wasDragged=!1),it._dragging=!1;var ut=C.event;ut.sourceEvent.stopPropagation();var J=it.grabbingBar;if(it.grabbingBar=!1,it.grabLocation=void 0,Y.parent.inBrushDrag=!1,u(),!it.wasDragged){it.wasDragged=void 0,it.clickableOrdinalRange?j.filterSpecified&&Y.multiselect?it.extent.push(it.clickableOrdinalRange):(it.extent=[it.clickableOrdinalRange],j.filterSpecified=!0):J?(it.extent=it.stayingIntervals,it.extent.length===0&&D(j)):D(j),it.brushCallback(Y),d(H.parentNode),it.brushEndCallback(j.filterSpecified?et.getConsolidated():[]);return}var X=function(){et.set(et.getConsolidated())};if(Y.ordinal){var tt=Y.unitTickvals;tt[tt.length-1]it.newExtent[0];it.extent=it.stayingIntervals.concat(V?[it.newExtent]:[]),it.extent.length||D(j),it.brushCallback(Y),V?d(H.parentNode,X):(X(),d(H.parentNode))}else X();it.brushEndCallback(j.filterSpecified?et.getConsolidated():[])}function E(H,Y){var j=Y.height-C.mouse(H)[1]-2*g.verticalPadding,et=w(Y,j),it="crosshair";et.clickableOrdinalRange?it="pointer":et.region&&(it=et.region+"-resize"),C.select(document.body).style("cursor",it)}function T(H){H.on("mousemove",function(Y){C.event.preventDefault(),Y.parent.inBrushDrag||E(this,Y)}).on("mouseleave",function(Y){Y.parent.inBrushDrag||u()}).call(C.behavior.drag().on("dragstart",function(Y){A(this,Y)}).on("drag",function(Y){_(this,Y)}).on("dragend",function(Y){y(this,Y)}))}function s(H,Y){return H[0]-Y[0]}function L(H,Y,j){var et=j._context.staticPlot,it=H.selectAll(".background").data(S);it.enter().append("rect").classed("background",!0).call(c).call(l).style("pointer-events",et?"none":"auto").attr("transform",v(0,g.verticalPadding)),it.call(T).attr("height",function(X){return X.height-g.verticalPadding});var ut=H.selectAll(".highlight-shadow").data(S);ut.enter().append("line").classed("highlight-shadow",!0).attr("x",-g.bar.width/2).attr("stroke-width",g.bar.width+g.bar.strokeWidth).attr("stroke",Y).attr("opacity",g.bar.strokeOpacity).attr("stroke-linecap","butt"),ut.attr("y1",function(X){return X.height}).call(o);var J=H.selectAll(".highlight").data(S);J.enter().append("line").classed("highlight",!0).attr("x",-g.bar.width/2).attr("stroke-width",g.bar.width-g.bar.strokeWidth).attr("stroke",g.bar.fillColor).attr("opacity",g.bar.fillOpacity).attr("stroke-linecap","butt"),J.attr("y1",function(X){return X.height}).call(o)}function M(H,Y,j){var et=H.selectAll("."+g.cn.axisBrush).data(S,i);et.enter().append("g").classed(g.cn.axisBrush,!0),L(et,Y,j)}function z(H){return H.svgBrush.extent.map(function(Y){return Y.slice()})}function D(H){H.filterSpecified=!1,H.svgBrush.extent=[[-1/0,1/0]]}function N(H){return function(j){var et=j.brush,it=z(et),ut=it.slice();et.filter.set(ut),H()}}function I(H){for(var Y=H.slice(),j=[],et,it=Y.shift();it;){for(et=it.slice();(it=Y.shift())&&it[0]<=et[1];)et[1]=Math.max(et[1],it[1]);j.push(et)}return j.length===1&&j[0][0]>j[0][1]&&(j=[]),j}function k(){var H=[],Y,j;return{set:function(et){H=et.map(function(it){return it.slice().sort(x)}).sort(s),H.length===1&&H[0][0]===-1/0&&H[0][1]===1/0&&(H=[[0,-1]]),Y=I(H),j=H.reduce(function(it,ut){return[Math.min(it[0],ut[0]),Math.max(it[1],ut[1])]},[1/0,-1/0])},get:function(){return H.slice()},getConsolidated:function(){return Y},getBounds:function(){return j}}}function B(H,Y,j,et,it,ut){var J=k();return J.set(j),{filter:J,filterSpecified:Y,svgBrush:{extent:[],brushStartCallback:et,brushCallback:N(it),brushEndCallback:ut}}}function O(H,Y){if(Array.isArray(H[0])?(H=H.map(function(et){return et.sort(x)}),Y.multiselect?H=I(H.sort(s)):H=[H[0]]):H=[H.sort(x)],Y.tickvals){var j=Y.tickvals.slice().sort(x);if(H=H.map(function(et){var it=[n(0,j,et[0],[]),n(1,j,et[1],[])];if(it[1]>it[0])return it}).filter(function(et){return et}),!H.length)return}return H.length>1?H:H[0]}G.exports={makeBrush:B,ensureAxisBrush:M,cleanRanges:O}},61664:function(G,U,t){G.exports={attributes:t(82296),supplyDefaults:t(60664),calc:t(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:t(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(G,U,t){var g=t(33428),C=t(84888)._M,i=t(24196),S=t(9616);U.name="parcoords",U.plot=function(x){var v=C(x.calcdata,"parcoords")[0];v.length&&i(x,v)},U.clean=function(x,v,p,r){var e=r._has&&r._has("parcoords"),a=v._has&&v._has("parcoords");e&&!a&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},U.toSVG=function(x){var v=x._fullLayout._glimages,p=g.select(x).selectAll(".svg-container"),r=p.filter(function(a,n){return n===p.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function e(){var a=this,n=a.toDataURL("image/png"),f=v.append("svg:image");f.attr({xmlns:S.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:a.style.width,height:a.style.height})}r.each(e),window.setTimeout(function(){g.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},95044:function(G,U,t){var g=t(3400).isArrayOrTypedArray,C=t(8932),i=t(71688).wrap;G.exports=function(v,p){var r,e;return C.hasColorscale(p,"line")&&g(p.line.color)?(r=p.line.color,e=C.extractOpts(p.line).colorscale,C.calc(v,p,{vals:r,containerStr:"line",cLetter:"c"})):(r=S(p._length),e=[[0,p.line.color],[1,p.line.color]]),i({lineColor:r,cscale:e})};function S(x){for(var v=new Array(x),p=0;pe&&(g.log("parcoords traces support up to "+e+" dimensions at the moment"),o.splice(e));var d=x(l,m,{name:"dimensions",layout:b,handleItemDefaults:f}),w=n(l,m,h,b,u);S(m,b,u),(!Array.isArray(d)||!d.length)&&(m.visible=!1),a(m,d,"values",w);var A={family:b.font.family,size:Math.round(b.font.size/1.2),color:b.font.color};g.coerceFont(u,"labelfont",A),g.coerceFont(u,"tickfont",A),g.coerceFont(u,"rangefont",A),u("labelangle"),u("labelside"),u("unselected.line.color"),u("unselected.line.opacity")}},95724:function(G,U,t){var g=t(3400).isTypedArray;U.convertTypedArray=function(C){return g(C)?Array.prototype.slice.call(C):C},U.isOrdinal=function(C){return!!C.tickvals},U.isVisible=function(C){return C.visible||!("visible"in C)}},29928:function(G,U,t){var g=t(61664);g.plot=t(24196),G.exports=g},51352:function(G,U,t){var g=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` `),C=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),i=e(30140).maxDimensionCount,S=e(3400),x=1e-6,v=2048,p=new Uint8Array(4),r=new Uint8Array(4),t={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function a(y){y.read({x:0,y:0,width:1,height:1,data:p})}function n(y,E,T,s,L){var M=y._gl;M.enable(M.SCISSOR_TEST),M.scissor(E,T,s,L),y.clear({color:[0,0,0,0],depth:1})}function f(y,E,T,s,L,M){var z=M.key;function D(N){var I=Math.min(s,L-N*s);N===0&&(window.cancelAnimationFrame(T.currentRafs[z]),delete T.currentRafs[z],n(y,M.scissorX,M.scissorY,M.scissorWidth,M.viewBoxSize[1])),!T.clearOnly&&(M.count=2*I,M.offset=2*N*s,E(M),N*s+I>>8*E)%256/255}function h(y,E,T){for(var s=new Array(y*(i+4)),L=0,M=0;Mwe&&(we=oe[ne].dim1.canvasX,ge=ne);se===0&&n(L,0,0,I.canvasWidth,I.canvasHeight);var Re=J(T);for(ne=0;nene._length&&(Le=Le.slice(0,ne._length));var Ve=ne.tickvals,Ue;function ke($e,lt){return{val:$e,text:Ue[lt]}}function He($e,lt){return $e.val-lt.val}if(i(Ve)&&Ve.length){C.isTypedArray(Ve)&&(Ve=Array.from(Ve)),Ue=ne.ticktext,!i(Ue)||!Ue.length?Ue=Ve.map(S(ne.tickformat)):Ue.length>Ve.length?Ue=Ue.slice(0,Ve.length):Ve.length>Ue.length&&(Ve=Ve.slice(0,Ue.length));for(var Ie=1;Ie=lt||St>=ht)return;var nt=Ke.lineLayer.readPixel(xt,ht-1-St),ze=nt[3]!==0,Ze=ze?nt[2]+256*(nt[1]+256*nt[0]):null,Je={x:xt,y:St,clientX:$e.clientX,clientY:$e.clientY,dataIndex:Ke.model.key,curveNumber:Ze};Ze!==ge&&(ze?X.hover(Je):X.unhover&&X.unhover(Je),ge=Ze)}}),ce.style("opacity",function(Ke){return Ke.pick?0:1}),Q.style("background","rgba(255, 255, 255, 0)");var we=Q.selectAll("."+b.cn.parcoords).data(ne,c);we.exit().remove(),we.enter().append("g").classed(b.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),we.attr("transform",function(Ke){return r(Ke.model.translateX,Ke.model.translateY)});var Re=we.selectAll("."+b.cn.parcoordsControlView).data(l,c);Re.enter().append("g").classed(b.cn.parcoordsControlView,!0),Re.attr("transform",function(Ke){return r(Ke.model.pad.l,Ke.model.pad.t)});var be=Re.selectAll("."+b.cn.yAxis).data(function(Ke){return Ke.dimensions},c);be.enter().append("g").classed(b.cn.yAxis,!0),Re.each(function(Ke){O(be,Ke,$)}),ce.each(function(Ke){if(Ke.viewModel){!Ke.lineLayer||X?Ke.lineLayer=o(this,Ke):Ke.lineLayer.update(Ke),(Ke.key||Ke.key===0)&&(Ke.viewModel[Ke.key]=Ke.lineLayer);var $e=!Ke.context||X;Ke.lineLayer.render(Ke.viewModel.panels,$e)}}),be.attr("transform",function(Ke){return r(Ke.xScale(Ke.xIndex),0)}),be.call(g.behavior.drag().origin(function(Ke){return Ke}).on("drag",function(Ke){var $e=Ke.parent;se.linePickActive(!1),Ke.x=Math.max(-b.overdrag,Math.min(Ke.model.width+b.overdrag,g.event.x)),Ke.canvasX=Ke.x*Ke.model.canvasPixelRatio,be.sort(function(lt,ht){return lt.x-ht.x}).each(function(lt,ht){lt.xIndex=ht,lt.x=Ke===lt?lt.x:lt.xScale(lt.xIndex),lt.canvasX=lt.x*lt.model.canvasPixelRatio}),O(be,$e,$),be.filter(function(lt){return Math.abs(Ke.xIndex-lt.xIndex)!==0}).attr("transform",function(lt){return r(lt.xScale(lt.xIndex),0)}),g.select(this).attr("transform",r(Ke.x,0)),be.each(function(lt,ht,dt){dt===Ke.parent.key&&($e.dimensions[ht]=lt)}),$e.contextLayer&&$e.contextLayer.render($e.panels,!1,!z($e)),$e.focusLayer.render&&$e.focusLayer.render($e.panels)}).on("dragend",function(Ke){var $e=Ke.parent;Ke.x=Ke.xScale(Ke.xIndex),Ke.canvasX=Ke.x*Ke.model.canvasPixelRatio,O(be,$e,$),g.select(this).attr("transform",function(lt){return r(lt.x,0)}),$e.contextLayer&&$e.contextLayer.render($e.panels,!1,!z($e)),$e.focusLayer&&$e.focusLayer.render($e.panels),$e.pickLayer&&$e.pickLayer.render($e.panels,!0),se.linePickActive(!0),X&&X.axesMoved&&X.axesMoved($e.key,$e.dimensions.map(function(lt){return lt.crossfilterDimensionIndex}))})),be.exit().remove();var Ae=be.selectAll("."+b.cn.axisOverlays).data(l,c);Ae.enter().append("g").classed(b.cn.axisOverlays,!0),Ae.selectAll("."+b.cn.axis).remove();var me=Ae.selectAll("."+b.cn.axis).data(l,c);me.enter().append("g").classed(b.cn.axis,!0),me.each(function(Ke){var $e=Ke.model.height/Ke.model.tickDistance,lt=Ke.domainScale,ht=lt.domain();g.select(this).call(g.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks($e,Ke.tickFormat).tickValues(Ke.ordinal?ht:null).tickFormat(function(dt){return h.isOrdinal(Ke)?dt:Y(Ke.model.dimensions[Ke.visibleIndex],dt)}).scale(lt)),a.font(me.selectAll("text"),Ke.model.tickFont)}),me.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),me.selectAll("text").style("text-shadow",t.makeTextShadow(Z)).style("cursor","default");var Le=Ae.selectAll("."+b.cn.axisHeading).data(l,c);Le.enter().append("g").classed(b.cn.axisHeading,!0);var Ve=Le.selectAll("."+b.cn.axisTitle).data(l,c);Ve.enter().append("text").classed(b.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",ee?"none":"auto"),Ve.text(function(Ke){return Ke.label}).each(function(Ke){var $e=g.select(this);a.font($e,Ke.model.labelFont),t.convertToTspans($e,ie)}).attr("transform",function(Ke){var $e=B(Ke.model.labelAngle,Ke.model.labelSide),lt=b.axisTitleOffset;return($e.dir>0?"":r(0,2*lt+Ke.model.height))+p($e.degrees)+r(-lt*$e.dx,-lt*$e.dy)}).attr("text-anchor",function(Ke){var $e=B(Ke.model.labelAngle,Ke.model.labelSide),lt=Math.abs($e.dx),ht=Math.abs($e.dy);return 2*lt>ht?$e.dir*$e.dx<0?"start":"end":"middle"});var Ue=Ae.selectAll("."+b.cn.axisExtent).data(l,c);Ue.enter().append("g").classed(b.cn.axisExtent,!0);var ke=Ue.selectAll("."+b.cn.axisExtentTop).data(l,c);ke.enter().append("g").classed(b.cn.axisExtentTop,!0),ke.attr("transform",r(0,-b.axisExtentOffset));var He=ke.selectAll("."+b.cn.axisExtentTopText).data(l,c);He.enter().append("text").classed(b.cn.axisExtentTopText,!0).call(I),He.text(function(Ke){return j(Ke,!0)}).each(function(Ke){a.font(g.select(this),Ke.model.rangeFont)});var Ie=Ue.selectAll("."+b.cn.axisExtentBottom).data(l,c);Ie.enter().append("g").classed(b.cn.axisExtentBottom,!0),Ie.attr("transform",function(Ke){return r(0,Ke.model.height+b.axisExtentOffset)});var rt=Ie.selectAll("."+b.cn.axisExtentBottomText).data(l,c);rt.enter().append("text").classed(b.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(I),rt.text(function(Ke){return j(Ke,!1)}).each(function(Ke){a.font(g.select(this),Ke.model.rangeFont)}),u.ensureAxisBrush(Ae,Z,ie)}},24196:function(H,U,e){var g=e(36336),C=e(5048),i=e(95724).isVisible,S={};function x(r,t,a){var n=t.indexOf(a),f=r.indexOf(n);return f===-1&&(f+=t.length),f}function v(r,t){return function(n,f){return x(r,t,n)-x(r,t,f)}}var p=H.exports=function(t,a){var n=t._fullLayout,f=C(t,[],S);if(f){var c={},l={},m={},h={},b=n._size;a.forEach(function(A,_){var y=A[0].trace;m[_]=y.index;var E=h[_]=y._fullInput.index;c[_]=t.data[E].dimensions,l[_]=t.data[E].dimensions.slice()});var u=function(A,_,y){var E=l[A][_],T=y.map(function(N){return N.slice()}),s="dimensions["+_+"].constraintrange",L=n._tracePreGUI[t._fullData[m[A]]._fullInput.uid];if(L[s]===void 0){var M=E.constraintrange;L[s]=M||null}var z=t._fullData[m[A]].dimensions[_];T.length?(T.length===1&&(T=T[0]),E.constraintrange=T,z.constraintrange=T.slice(),T=[T]):(delete E.constraintrange,delete z.constraintrange,T=null);var D={};D[s]=T,t.emit("plotly_restyle",[D,[h[A]]])},o=function(A){t.emit("plotly_hover",A)},d=function(A){t.emit("plotly_unhover",A)},w=function(A,_){var y=v(_,l[A].filter(i));c[A].sort(y),l[A].filter(function(E){return!i(E)}).sort(function(E){return l[A].indexOf(E)}).forEach(function(E){c[A].splice(c[A].indexOf(E),1),c[A].splice(l[A].indexOf(E),0,E)}),t.emit("plotly_restyle",[{dimensions:[c[A]]},[h[A]]])};g(t,a,{width:b.w,height:b.h,margin:{t:b.t,r:b.r,b:b.b,l:b.l}},{filterChanged:u,hover:o,unhover:d,axesMoved:w})}};p.reglPrecompiled=S},74996:function(H,U,e){var g=e(45464),C=e(86968).u,i=e(25376),S=e(22548),x=e(21776).Ks,v=e(21776).Gw,p=e(92880).extendFlat,r=e(98192).c,t=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});H.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:p({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:x({},{keys:["label","color","value","percent","text"]}),texttemplate:v({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:p({},t,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:p({},t,{}),outsidetextfont:p({},t,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:p({},t,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:C({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:p({},t,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},80036:function(H,U,e){var g=e(7316);U.name="pie",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},45768:function(H,U,e){var g=e(38248),C=e(49760),i=e(76308),S={};function x(t,a){var n=[],f=t._fullLayout,c=f.hiddenlabels||[],l=a.labels,m=a.marker.colors||[],h=a.values,b=a._length,u=a._hasValues&&b,o,d;if(a.dlabel)for(l=new Array(b),o=0;o=0});var M=a.type==="funnelarea"?y:a.sort;return M&&n.sort(function(z,D){return D.v-z.v}),n[0]&&(n[0].vTotal=_),n}function v(t){return function(n,f){return!n||(n=C(n),!n.isValid())?!1:(n=i.addOpacity(n,n.getAlpha()),t[f]||(t[f]=n),n)}}function p(t,a){var n=(a||{}).type;n||(n="pie");var f=t._fullLayout,c=t.calcdata,l=f[n+"colorway"],m=f["_"+n+"colormap"];f["extend"+n+"colors"]&&(l=r(l,S));for(var h=0,b=0;b0){m=!0;break}}m||(l=0)}return{hasLabels:f,hasValues:c,len:l}}function r(a,n,f,c,l){var m=c("marker.line.width");m&&c("marker.line.color",l?void 0:f.paper_bgcolor);var h=c("marker.colors");v(c,"marker.pattern",h),a.marker&&!n.marker.pattern.fgcolor&&(n.marker.pattern.fgcolor=a.marker.colors),n.marker.pattern.bgcolor||(n.marker.pattern.bgcolor=f.paper_bgcolor)}function t(a,n,f,c){function l(L,M){return C.coerce(a,n,i,L,M)}var m=l("labels"),h=l("values"),b=p(m,h),u=b.len;if(n._hasLabels=b.hasLabels,n._hasValues=b.hasValues,!n._hasLabels&&n._hasValues&&(l("label0"),l("dlabel")),!u){n.visible=!1;return}n._length=u,r(a,n,c,l,!0),l("scalegroup");var o=l("text"),d=l("texttemplate"),w;if(d||(w=l("textinfo",C.isArrayOrTypedArray(o)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),d||w&&w!=="none"){var A=l("textposition");x(a,n,c,l,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(A)||A==="auto",y=_||A==="outside";y&&l("automargin"),(A==="inside"||A==="auto"||Array.isArray(A))&&l("insidetextorientation")}else w==="none"&&l("textposition","none");S(n,c,l);var E=l("hole"),T=l("title.text");if(T){var s=l("title.position",E?"middle center":"top center");!E&&s==="middle center"&&(n.title.position="top center"),C.coerceFont(l,"title.font",c.font)}l("sort"),l("direction"),l("rotation"),l("pull")}H.exports={handleLabelsAndValues:p,handleMarkerDefaults:r,supplyDefaults:t}},53644:function(H,U,e){var g=e(10624).appendArrayMultiPointValues;H.exports=function(i,S){var x={curveNumber:S.index,pointNumbers:i.pts,data:S._input,fullData:S,label:i.label,color:i.color,value:i.v,percent:i.percent,text:i.text,bbox:i.bbox,v:i.v};return i.pts.length===1&&(x.pointNumber=x.i=i.pts[0]),g(x,S,i.pts),S.type==="funnelarea"&&(delete x.v,delete x.i),x}},21552:function(H,U,e){var g=e(43616),C=e(76308);H.exports=function(S,x,v,p){var r=v.marker.pattern;r&&r.shape?g.pointStyle(S,v,p,x):C.fill(S,x.color)}},69656:function(H,U,e){var g=e(3400);function C(i){return i.indexOf("e")!==-1?i.replace(/[.]?0+e/,"e"):i.indexOf(".")!==-1?i.replace(/[.]?0+$/,""):i}U.formatPiePercent=function(S,x){var v=C((S*100).toPrecision(3));return g.numSeparate(v,x)+"%"},U.formatPieValue=function(S,x){var v=C(S.toPrecision(10));return g.numSeparate(v,x)},U.getFirstFilled=function(S,x){if(g.isArrayOrTypedArray(S))for(var v=0;v0&&(Ie+=lt*ke.pxmid[0],rt+=lt*ke.pxmid[1])}ke.cxFinal=Ie,ke.cyFinal=rt;function ht(Je,We,Fe,xe){var ye=xe*(We[0]-Je[0]),Ee=xe*(We[1]-Je[1]);return"a"+xe*ne.r+","+xe*ne.r+" 0 "+ke.largeArc+(Fe?" 1 ":" 0 ")+ye+","+Ee}var dt=ce.hole;if(ke.v===ne.vTotal){var xt="M"+(Ie+ke.px0[0])+","+(rt+ke.px0[1])+ht(ke.px0,ke.pxmid,!0,1)+ht(ke.pxmid,ke.px0,!0,1)+"Z";dt?$e.attr("d","M"+(Ie+dt*ke.px0[0])+","+(rt+dt*ke.px0[1])+ht(ke.px0,ke.pxmid,!1,dt)+ht(ke.pxmid,ke.px0,!1,dt)+"Z"+xt):$e.attr("d",xt)}else{var St=ht(ke.px0,ke.px1,!0,1);if(dt){var nt=1-dt;$e.attr("d","M"+(Ie+dt*ke.px1[0])+","+(rt+dt*ke.px1[1])+ht(ke.px1,ke.px0,!1,dt)+"l"+nt*ke.px0[0]+","+nt*ke.px0[1]+St+"Z")}else $e.attr("d","M"+Ie+","+rt+"l"+ke.px0[0]+","+ke.px0[1]+St+"Z")}ue(X,ke,ne);var ze=l.castOption(ce.textposition,ke.pts),Ze=Ke.selectAll("g.slicetext").data(ke.text&&ze!=="none"?[0]:[]);Ze.enter().append("g").classed("slicetext",!0),Ze.exit().remove(),Ze.each(function(){var Je=v.ensureSingle(g.select(this),"text","",function(je){je.attr("data-notex",1)}),We=v.ensureUniformFontSize(X,ze==="outside"?d(ce,ke,Q.font):w(ce,ke,Q.font));Je.text(ke.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,We).call(t.convertToTspans,X);var Fe=x.bBox(Je.node()),xe;if(ze==="outside")xe=D(Fe,ke);else if(xe=_(Fe,ke,ne),ze==="auto"&&xe.scale<1){var ye=v.ensureUniformFontSize(X,ce.outsidetextfont);Je.call(x.font,ye),Fe=x.bBox(Je.node()),xe=D(Fe,ke)}var Ee=xe.textPosAngle,Me=Ee===void 0?ke.pxmid:ie(ne.r,Ee);if(xe.targetX=Ie+Me[0]*xe.rCenter+(xe.x||0),xe.targetY=rt+Me[1]*xe.rCenter+(xe.y||0),J(xe,Fe),xe.outside){var Ne=xe.targetY;ke.yLabelMin=Ne-Fe.height/2,ke.yLabelMid=Ne,ke.yLabelMax=Ne+Fe.height/2,ke.labelExtraX=0,ke.labelExtraY=0,we=!0}xe.fontSize=We.size,n(ce.type,xe,Q),Z[He].transform=xe,v.setTransormAndDisplay(Je,xe)})});var Re=g.select(this).selectAll("g.titletext").data(ce.title.text?[0]:[]);if(Re.enter().append("g").classed("titletext",!0),Re.exit().remove(),Re.each(function(){var ke=v.ensureSingle(g.select(this),"text","",function(rt){rt.attr("data-notex",1)}),He=ce.title.text;ce._meta&&(He=v.templateString(He,ce._meta)),ke.text(He).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,ce.title.font).call(t.convertToTspans,X);var Ie;ce.title.position==="middle center"?Ie=N(ne):Ie=I(ne,oe),ke.attr("transform",r(Ie.x,Ie.y)+p(Math.min(1,Ie.scale))+r(Ie.tx,Ie.ty))}),we&&V(Te,ce),u(ge,ce),we&&ce.automargin){var be=x.bBox(se.node()),Ae=ce.domain,me=oe.w*(Ae.x[1]-Ae.x[0]),Le=oe.h*(Ae.y[1]-Ae.y[0]),Ve=(.5*me-ne.r)/oe.w,Ue=(.5*Le-ne.r)/oe.h;C.autoMargin(X,"pie."+ce.uid+".automargin",{xl:Ae.x[0]-Ve,xr:Ae.x[1]+Ve,yb:Ae.y[0]-Ue,yt:Ae.y[1]+Ue,l:Math.max(ne.cx-ne.r-be.left,0),r:Math.max(be.right-(ne.cx+ne.r),0),b:Math.max(be.bottom-(ne.cy+ne.r),0),t:Math.max(ne.cy-ne.r-be.top,0),pad:5})}})});setTimeout(function(){$.selectAll("tspan").each(function(){var Z=g.select(this);Z.attr("dy")&&Z.attr("dy",Z.attr("dy"))})},0)}function u(X,ee){X.each(function(G){var Q=g.select(this);if(!G.labelExtraX&&!G.labelExtraY){Q.select("path.textline").remove();return}var oe=Q.select("g.slicetext text");G.transform.targetX+=G.labelExtraX,G.transform.targetY+=G.labelExtraY,v.setTransormAndDisplay(oe,G.transform);var $=G.cxFinal+G.pxmid[0],Z=G.cyFinal+G.pxmid[1],se="M"+$+","+Z,ne=(G.yLabelMax-G.yLabelMin)*(G.pxmid[0]<0?-1:1)/4;if(G.labelExtraX){var ce=G.labelExtraX*G.pxmid[1]/G.pxmid[0],ge=G.yLabelMid+G.labelExtraY-(G.cyFinal+G.pxmid[1]);Math.abs(ce)>Math.abs(ge)?se+="l"+ge*G.pxmid[0]/G.pxmid[1]+","+ge+"H"+($+G.labelExtraX+ne):se+="l"+G.labelExtraX+","+ce+"v"+(ge-ce)+"h"+ne}else se+="V"+(G.yLabelMid+G.labelExtraY)+"h"+ne;v.ensureSingle(Q,"path","textline").call(S.stroke,ee.outsidetextfont.color).attr({"stroke-width":Math.min(2,ee.outsidetextfont.size/8),d:se,fill:"none"})})}function o(X,ee,G){var Q=G[0],oe=Q.cx,$=Q.cy,Z=Q.trace,se=Z.type==="funnelarea";"_hasHoverLabel"in Z||(Z._hasHoverLabel=!1),"_hasHoverEvent"in Z||(Z._hasHoverEvent=!1),X.on("mouseover",function(ne){var ce=ee._fullLayout,ge=ee._fullData[Z.index];if(!(ee._dragging||ce.hovermode===!1)){var Te=ge.hoverinfo;if(Array.isArray(Te)&&(Te=i.castHoverinfo({hoverinfo:[l.castOption(Te,ne.pts)],_module:Z._module},ce,0)),Te==="all"&&(Te="label+text+value+percent+name"),ge.hovertemplate||Te!=="none"&&Te!=="skip"&&Te){var we=ne.rInscribed||0,Re=oe+ne.pxmid[0]*(1-we),be=$+ne.pxmid[1]*(1-we),Ae=ce.separators,me=[];if(Te&&Te.indexOf("label")!==-1&&me.push(ne.label),ne.text=l.castOption(ge.hovertext||ge.text,ne.pts),Te&&Te.indexOf("text")!==-1){var Le=ne.text;v.isValidTextValue(Le)&&me.push(Le)}ne.value=ne.v,ne.valueLabel=l.formatPieValue(ne.v,Ae),Te&&Te.indexOf("value")!==-1&&me.push(ne.valueLabel),ne.percent=ne.v/Q.vTotal,ne.percentLabel=l.formatPiePercent(ne.percent,Ae),Te&&Te.indexOf("percent")!==-1&&me.push(ne.percentLabel);var Ve=ge.hoverlabel,Ue=Ve.font,ke=[];i.loneHover({trace:Z,x0:Re-we*Q.r,x1:Re+we*Q.r,y:be,_x0:se?oe+ne.TL[0]:Re-we*Q.r,_x1:se?oe+ne.TR[0]:Re+we*Q.r,_y0:se?$+ne.TL[1]:be-we*Q.r,_y1:se?$+ne.BL[1]:be+we*Q.r,text:me.join("
    "),name:ge.hovertemplate||Te.indexOf("name")!==-1?ge.name:void 0,idealAlign:ne.pxmid[0]<0?"left":"right",color:l.castOption(Ve.bgcolor,ne.pts)||ne.color,borderColor:l.castOption(Ve.bordercolor,ne.pts),fontFamily:l.castOption(Ue.family,ne.pts),fontSize:l.castOption(Ue.size,ne.pts),fontColor:l.castOption(Ue.color,ne.pts),nameLength:l.castOption(Ve.namelength,ne.pts),textAlign:l.castOption(Ve.align,ne.pts),hovertemplate:l.castOption(ge.hovertemplate,ne.pts),hovertemplateLabels:ne,eventData:[m(ne,ge)]},{container:ce._hoverlayer.node(),outerContainer:ce._paper.node(),gd:ee,inOut_bbox:ke}),ne.bbox=ke[0],Z._hasHoverLabel=!0}Z._hasHoverEvent=!0,ee.emit("plotly_hover",{points:[m(ne,ge)],event:g.event})}}),X.on("mouseout",function(ne){var ce=ee._fullLayout,ge=ee._fullData[Z.index],Te=g.select(this).datum();Z._hasHoverEvent&&(ne.originalEvent=g.event,ee.emit("plotly_unhover",{points:[m(Te,ge)],event:g.event}),Z._hasHoverEvent=!1),Z._hasHoverLabel&&(i.loneUnhover(ce._hoverlayer.node()),Z._hasHoverLabel=!1)}),X.on("click",function(ne){var ce=ee._fullLayout,ge=ee._fullData[Z.index];ee._dragging||ce.hovermode===!1||(ee._hoverdata=[m(ne,ge)],i.click(ee,g.event))})}function d(X,ee,G){var Q=l.castOption(X.outsidetextfont.color,ee.pts)||l.castOption(X.textfont.color,ee.pts)||G.color,oe=l.castOption(X.outsidetextfont.family,ee.pts)||l.castOption(X.textfont.family,ee.pts)||G.family,$=l.castOption(X.outsidetextfont.size,ee.pts)||l.castOption(X.textfont.size,ee.pts)||G.size;return{color:Q,family:oe,size:$}}function w(X,ee,G){var Q=l.castOption(X.insidetextfont.color,ee.pts);!Q&&X._input.textfont&&(Q=l.castOption(X._input.textfont.color,ee.pts));var oe=l.castOption(X.insidetextfont.family,ee.pts)||l.castOption(X.textfont.family,ee.pts)||G.family,$=l.castOption(X.insidetextfont.size,ee.pts)||l.castOption(X.textfont.size,ee.pts)||G.size;return{color:Q||S.contrast(ee.color),family:oe,size:$}}function A(X,ee){for(var G,Q,oe=0;oe=-4;Ve-=2)Le(Math.PI*Ve,"tan");for(Ve=4;Ve>=-4;Ve-=2)Le(Math.PI*(Ve+1),"tan")}if(Te||Re){for(Ve=4;Ve>=-4;Ve-=2)Le(Math.PI*(Ve+1.5),"rad");for(Ve=4;Ve>=-4;Ve-=2)Le(Math.PI*(Ve+.5),"rad")}}if(se||be||Te){var Ue=Math.sqrt(X.width*X.width+X.height*X.height);if(me={scale:oe*Q*2/Ue,rCenter:1-oe,rotate:0},me.textPosAngle=(ee.startangle+ee.stopangle)/2,me.scale>=1)return me;Ae.push(me)}(be||Re)&&(me=E(X,Q,Z,ne,ce),me.textPosAngle=(ee.startangle+ee.stopangle)/2,Ae.push(me)),(be||we)&&(me=T(X,Q,Z,ne,ce),me.textPosAngle=(ee.startangle+ee.stopangle)/2,Ae.push(me));for(var ke=0,He=0,Ie=0;Ie=1)break}return Ae[ke]}function y(X,ee){var G=X.startangle,Q=X.stopangle;return G>ee&&ee>Q||G0?1:-1)/2,y:$/(1+G*G/(Q*Q)),outside:!0}}function N(X){var ee=Math.sqrt(X.titleBox.width*X.titleBox.width+X.titleBox.height*X.titleBox.height);return{x:X.cx,y:X.cy,scale:X.trace.hole*X.r*2/ee,tx:0,ty:-X.titleBox.height/2+X.trace.title.font.size}}function I(X,ee){var G=1,Q=1,oe,$=X.trace,Z={x:X.cx,y:X.cy},se={tx:0,ty:0};se.ty+=$.title.font.size,oe=O($),$.title.position.indexOf("top")!==-1?(Z.y-=(1+oe)*X.r,se.ty-=X.titleBox.height):$.title.position.indexOf("bottom")!==-1&&(Z.y+=(1+oe)*X.r);var ne=k(X.r,X.trace.aspectratio),ce=ee.w*($.domain.x[1]-$.domain.x[0])/2;return $.title.position.indexOf("left")!==-1?(ce=ce+ne,Z.x-=(1+oe)*ne,se.tx+=X.titleBox.width/2):$.title.position.indexOf("center")!==-1?ce*=2:$.title.position.indexOf("right")!==-1&&(ce=ce+ne,Z.x+=(1+oe)*ne,se.tx-=X.titleBox.width/2),G=ce/X.titleBox.width,Q=B(X,ee)/X.titleBox.height,{x:Z.x,y:Z.y,scale:Math.min(G,Q),tx:se.tx,ty:se.ty}}function k(X,ee){return X/(ee===void 0?1:ee)}function B(X,ee){var G=X.trace,Q=ee.h*(G.domain.y[1]-G.domain.y[0]);return Math.min(X.titleBox.height,Q/2)}function O(X){var ee=X.pull;if(!ee)return 0;var G;if(v.isArrayOrTypedArray(ee))for(ee=0,G=0;Gee&&(ee=X.pull[G]);return ee}function V(X,ee){var G,Q,oe,$,Z,se,ne,ce,ge,Te,we,Re,be;function Ae(Ue,ke){return Ue.pxmid[1]-ke.pxmid[1]}function me(Ue,ke){return ke.pxmid[1]-Ue.pxmid[1]}function Le(Ue,ke){ke||(ke={});var He=ke.labelExtraY+(Q?ke.yLabelMax:ke.yLabelMin),Ie=Q?Ue.yLabelMin:Ue.yLabelMax,rt=Q?Ue.yLabelMax:Ue.yLabelMin,Ke=Ue.cyFinal+Z(Ue.px0[1],Ue.px1[1]),$e=He-Ie,lt,ht,dt,xt,St,nt;if($e*ne>0&&(Ue.labelExtraY=$e),!!v.isArrayOrTypedArray(ee.pull))for(ht=0;ht=(l.castOption(ee.pull,dt.pts)||0))&&((Ue.pxmid[1]-dt.pxmid[1])*ne>0?(xt=dt.cyFinal+Z(dt.px0[1],dt.px1[1]),$e=xt-Ie-Ue.labelExtraY,$e*ne>0&&(Ue.labelExtraY+=$e)):(rt+Ue.labelExtraY-Ke)*ne>0&&(lt=3*se*Math.abs(ht-Te.indexOf(Ue)),St=dt.cxFinal+$(dt.px0[0],dt.px1[0]),nt=St+lt-(Ue.cxFinal+Ue.pxmid[0])-Ue.labelExtraX,nt*se>0&&(Ue.labelExtraX+=nt)))}for(Q=0;Q<2;Q++)for(oe=Q?Ae:me,Z=Q?Math.max:Math.min,ne=Q?1:-1,G=0;G<2;G++){for($=G?Math.max:Math.min,se=G?1:-1,ce=X[Q][G],ce.sort(oe),ge=X[1-Q][G],Te=ge.concat(ce),Re=[],we=0;we1?(ce=G.r,ge=ce/oe.aspectratio):(ge=G.r,ce=ge*oe.aspectratio),ce*=(1+oe.baseratio)/2,ne=ce*ge}Z=Math.min(Z,ne/G.vTotal)}for(Q=0;Qee.vTotal/2?1:0,ce.halfangle=Math.PI*Math.min(ce.v/ee.vTotal,.5),ce.ring=1-Q.hole,ce.rInscribed=z(ce,ee))}function ie(X,ee){return[X*Math.sin(ee),-X*Math.cos(ee)]}function ue(X,ee,G){var Q=X._fullLayout,oe=G.trace,$=oe.texttemplate,Z=oe.textinfo;if(!$&&Z&&Z!=="none"){var se=Z.split("+"),ne=function(ke){return se.indexOf(ke)!==-1},ce=ne("label"),ge=ne("text"),Te=ne("value"),we=ne("percent"),Re=Q.separators,be;if(be=ce?[ee.label]:[],ge){var Ae=l.getFirstFilled(oe.text,ee.pts);h(Ae)&&be.push(Ae)}Te&&be.push(l.formatPieValue(ee.v,Re)),we&&be.push(l.formatPiePercent(ee.v/G.vTotal,Re)),ee.text=be.join("
    ")}function me(ke){return{label:ke.label,value:ke.v,valueLabel:l.formatPieValue(ke.v,Q.separators),percent:ke.v/G.vTotal,percentLabel:l.formatPiePercent(ke.v/G.vTotal,Q.separators),color:ke.color,text:ke.text,customdata:v.castOption(oe,ke.i,"customdata")}}if($){var Le=v.castOption(oe,ee.i,"texttemplate");if(!Le)ee.text="";else{var Ve=me(ee),Ue=l.getFirstFilled(oe.text,ee.pts);(h(Ue)||Ue==="")&&(Ve.text=Ue),ee.text=v.texttemplateString(Le,Ve,X._fullLayout._d3locale,Ve,oe._meta||{})}}}function J(X,ee){var G=X.rotate*Math.PI/180,Q=Math.cos(G),oe=Math.sin(G),$=(ee.left+ee.right)/2,Z=(ee.top+ee.bottom)/2;X.textX=$*Q-Z*oe,X.textY=$*oe+Z*Q,X.noCenter=!0}H.exports={plot:b,formatSliceLabel:ue,transformInsideText:_,determineInsideTextFont:w,positionTitleOutside:I,prerenderTitles:A,layoutAreas:Y,attachFxHandlers:o,computeTransform:J}},22152:function(H,U,e){var g=e(33428),C=e(10528),i=e(82744).resizeText;H.exports=function(x){var v=x._fullLayout._pielayer.selectAll(".trace");i(x,v,"pie"),v.each(function(p){var r=p[0],t=r.trace,a=g.select(this);a.style({opacity:t.opacity}),a.selectAll("path.surface").each(function(n){g.select(this).call(C,n,t,x)})})}},10528:function(H,U,e){var g=e(76308),C=e(69656).castOption,i=e(21552);H.exports=function(x,v,p,r){var t=p.marker.line,a=C(t.color,v.pts)||g.defaultLine,n=C(t.width,v.pts)||0;x.call(i,v,p,r).style("stroke-width",n).call(g.stroke,a)}},35484:function(H,U,e){var g=e(52904);H.exports={x:g.x,y:g.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:g.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},11072:function(H,U,e){var g=e(67792).gl_pointcloud2d,C=e(3400).isArrayOrTypedArray,i=e(43080),S=e(19280).findExtremes,x=e(44928);function v(t,a){this.scene=t,this.uid=a,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=g(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var p=v.prototype;p.handlePick=function(t){var a=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[a*2],this.pickXYData[a*2+1]]:[this.pickXData[a],this.pickYData[a]],textLabel:C(this.textLabels)?this.textLabels[a]:this.textLabels,color:this.color,name:this.name,pointIndex:a,hoverinfo:this.hoverinfo}},p.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=x(t,{})},p.updateFast=function(t){var a=this.xData=this.pickXData=t.x,n=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,c=t.xbounds&&t.ybounds,l=t.indices,m,h,b,u=this.bounds,o,d,w;if(f){if(b=f,m=f.length>>>1,c)u[0]=t.xbounds[0],u[2]=t.xbounds[1],u[1]=t.ybounds[0],u[3]=t.ybounds[1];else for(w=0;wu[2]&&(u[2]=o),du[3]&&(u[3]=d);if(l)h=l;else for(h=new Int32Array(m),w=0;wu[2]&&(u[2]=o),du[3]&&(u[3]=d);this.idToIndex=h,this.pointcloudOptions.idToIndex=h,this.pointcloudOptions.positions=b;var A=i(t.marker.color),_=i(t.marker.border.color),y=t.opacity*t.marker.opacity;A[3]*=y,this.pointcloudOptions.color=A;var E=t.marker.blend;if(E===null){var T=100;E=a.length_&&(_=n.source[o]),n.target[o]>_&&(_=n.target[o]);var y=_+1;t.node._count=y;var E,T=t.node.groups,s={};for(o=0;o0&&x(I,y)&&x(k,y)&&!(s.hasOwnProperty(I)&&s.hasOwnProperty(k)&&s[I]===s[k])){s.hasOwnProperty(k)&&(k=s[k]),s.hasOwnProperty(I)&&(I=s[I]),I=+I,k=+k,h[I]=h[k]=!0;var B="";n.label&&n.label[o]&&(B=n.label[o]);var O=null;B&&b.hasOwnProperty(B)&&(O=b[B]),f.push({pointNumber:o,label:B,color:c?n.color[o]:n.color,hovercolor:l?n.hovercolor[o]:n.hovercolor,customdata:m?n.customdata[o]:n.customdata,concentrationscale:O,source:I,target:k,value:+N}),D.source.push(I),D.target.push(k)}}var V=y+T.length,Y=S(a.color),j=S(a.customdata),te=[];for(o=0;oy-1,childrenNodes:[],pointNumber:o,label:ie,color:Y?a.color[o]:a.color,customdata:j?a.customdata[o]:a.customdata})}var ue=!1;return r(V,D.source,D.target)&&(ue=!0),{circular:ue,links:f,nodes:te,groups:T,groupLookup:s}}function r(t,a,n){for(var f=C.init2dArray(t,0),c=0;c1})}H.exports=function(a,n){var f=p(n);return i({circular:f.circular,_nodes:f.nodes,_links:f.links,_groups:f.groups,_groupLookup:f.groupLookup})}},11820:function(H){H.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},47140:function(H,U,e){var g=e(3400),C=e(41440),i=e(76308),S=e(49760),x=e(86968).Q,v=e(16132),p=e(31780),r=e(51272);H.exports=function(n,f,c,l){function m(z,D){return g.coerce(n,f,C,z,D)}var h=g.extendDeep(l.hoverlabel,n.hoverlabel),b=n.node,u=p.newContainer(f,"node");function o(z,D){return g.coerce(b,u,C.node,z,D)}o("label"),o("groups"),o("x"),o("y"),o("pad"),o("thickness"),o("line.color"),o("line.width"),o("hoverinfo",n.hoverinfo),v(b,u,o,h),o("hovertemplate"),o("align");var d=l.colorway,w=function(z){return d[z%d.length]};o("color",u.label.map(function(z,D){return i.addOpacity(w(D),.8)})),o("customdata");var A=n.link||{},_=p.newContainer(f,"link");function y(z,D){return g.coerce(A,_,C.link,z,D)}y("label"),y("arrowlen"),y("source"),y("target"),y("value"),y("line.color"),y("line.width"),y("hoverinfo",n.hoverinfo),v(A,_,y,h),y("hovertemplate");var E=S(l.paper_bgcolor).getLuminance()<.333,T=E?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",s=y("color",T);function L(z){var D=S(z);if(!D.isValid())return z;var N=D.getAlpha();return N<=.8?D.setAlpha(N+.2):D=E?D.brighten():D.darken(),D.toRgbString()}y("hovercolor",Array.isArray(s)?s.map(L):L(s)),y("customdata"),r(A,_,{name:"colorscales",handleItemDefaults:t}),x(f,l,m),m("orientation"),m("valueformat"),m("valuesuffix");var M;u.x.length&&u.y.length&&(M="freeform"),m("arrangement",M),g.coerceFont(m,"textfont",g.extendFlat({},l.font)),f._length=null};function t(a,n){function f(c,l){return g.coerce(a,n,C.link.colorscales,c,l)}f("label"),f("cmin"),f("cmax"),f("colorscale")}},45499:function(H,U,e){H.exports={attributes:e(41440),supplyDefaults:e(47140),calc:e(48068),plot:e(59596),moduleType:"trace",name:"sankey",basePlotModule:e(10760),selectPoints:e(81128),categories:["noOpacity"],meta:{}}},59596:function(H,U,e){var g=e(33428),C=e(3400),i=C.numberFormat,S=e(83248),x=e(93024),v=e(76308),p=e(11820).cn,r=C._;function t(d){return d!==""}function a(d,w){return d.filter(function(A){return A.key===w.traceId})}function n(d,w){g.select(d).select("path").style("fill-opacity",w),g.select(d).select("rect").style("fill-opacity",w)}function f(d){g.select(d).select("text.name").style("fill","black")}function c(d){return function(w){return d.node.sourceLinks.indexOf(w.link)!==-1||d.node.targetLinks.indexOf(w.link)!==-1}}function l(d){return function(w){return w.node.sourceLinks.indexOf(d.link)!==-1||w.node.targetLinks.indexOf(d.link)!==-1}}function m(d,w,A){w&&A&&a(A,w).selectAll("."+p.sankeyLink).filter(c(w)).call(b.bind(0,w,A,!1))}function h(d,w,A){w&&A&&a(A,w).selectAll("."+p.sankeyLink).filter(c(w)).call(u.bind(0,w,A,!1))}function b(d,w,A,_){_.style("fill",function(y){if(!y.link.concentrationscale)return y.tinyColorHoverHue}).style("fill-opacity",function(y){if(!y.link.concentrationscale)return y.tinyColorHoverAlpha}),_.each(function(y){var E=y.link.label;E!==""&&a(w,d).selectAll("."+p.sankeyLink).filter(function(T){return T.link.label===E}).style("fill",function(T){if(!T.link.concentrationscale)return T.tinyColorHoverHue}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.tinyColorHoverAlpha})}),A&&a(w,d).selectAll("."+p.sankeyNode).filter(l(d)).call(m)}function u(d,w,A,_){_.style("fill",function(y){return y.tinyColorHue}).style("fill-opacity",function(y){return y.tinyColorAlpha}),_.each(function(y){var E=y.link.label;E!==""&&a(w,d).selectAll("."+p.sankeyLink).filter(function(T){return T.link.label===E}).style("fill",function(T){return T.tinyColorHue}).style("fill-opacity",function(T){return T.tinyColorAlpha})}),A&&a(w,d).selectAll(p.sankeyNode).filter(l(d)).call(h)}function o(d,w){var A=d.hoverlabel||{},_=C.nestedProperty(A,w).get();return Array.isArray(_)?!1:_}H.exports=function(w,A){for(var _=w._fullLayout,y=_._paper,E=_._size,T=0;T"),color:o(J,"bgcolor")||v.addOpacity(oe.color,1),borderColor:o(J,"bordercolor"),fontFamily:o(J,"font.family"),fontSize:o(J,"font.size"),fontColor:o(J,"font.color"),nameLength:o(J,"namelength"),textAlign:o(J,"align"),idealAlign:g.event.x<$[0]?"right":"left",hovertemplate:J.hovertemplate,hovertemplateLabels:Z,eventData:[oe]})}}var se=x.loneHover(X,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:w,anchorIndex:G});se.each(function(){var ne=this;ue.link.concentrationscale||n(ne,.65),f(ne)})},O=function(ie,ue,J){w._fullLayout.hovermode!==!1&&(g.select(ie).call(u.bind(0,ue,J,!0)),ue.link.trace.link.hoverinfo!=="skip"&&(ue.link.fullData=ue.link.trace,w.emit("plotly_unhover",{event:g.event,points:[ue.link]})),x.loneUnhover(_._hoverlayer.node()))},V=function(ie,ue,J){var X=ue.node;X.originalEvent=g.event,w._hoverdata=[X],g.select(ie).call(h,ue,J),x.click(w,{target:!0})},Y=function(ie,ue,J){w._fullLayout.hovermode!==!1&&(g.select(ie).call(m,ue,J),ue.node.trace.node.hoverinfo!=="skip"&&(ue.node.fullData=ue.node.trace,w.emit("plotly_hover",{event:g.event,points:[ue.node]})))},j=function(ie,ue){if(w._fullLayout.hovermode!==!1){var J=ue.node.trace.node;if(!(J.hoverinfo==="none"||J.hoverinfo==="skip")){var X=g.select(ie).select("."+p.nodeRect),ee=w._fullLayout._paperdiv.node().getBoundingClientRect(),G=X.node().getBoundingClientRect(),Q=G.left-2-ee.left,oe=G.right+2-ee.left,$=G.top+G.height/4-ee.top,Z={valueLabel:i(ue.valueFormat)(ue.node.value)+ue.valueSuffix};ue.node.fullData=ue.node.trace,w._fullLayout._calcInverseTransform(w);var se=w._fullLayout._invScaleX,ne=w._fullLayout._invScaleY,ce=x.loneHover({x0:se*Q,x1:se*oe,y:ne*$,name:i(ue.valueFormat)(ue.node.value)+ue.valueSuffix,text:[ue.node.label,I+ue.node.targetLinks.length,k+ue.node.sourceLinks.length].filter(t).join("
    "),color:o(J,"bgcolor")||ue.tinyColorHue,borderColor:o(J,"bordercolor"),fontFamily:o(J,"font.family"),fontSize:o(J,"font.size"),fontColor:o(J,"font.color"),nameLength:o(J,"namelength"),textAlign:o(J,"align"),idealAlign:"left",hovertemplate:J.hovertemplate,hovertemplateLabels:Z,eventData:[ue.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:w});n(ce,.85),f(ce)}}},te=function(ie,ue,J){w._fullLayout.hovermode!==!1&&(g.select(ie).call(h,ue,J),ue.node.trace.node.hoverinfo!=="skip"&&(ue.node.fullData=ue.node.trace,w.emit("plotly_unhover",{event:g.event,points:[ue.node]})),x.loneUnhover(_._hoverlayer.node()))};S(w,y,A,{width:E.w,height:E.h,margin:{t:E.t,r:E.r,b:E.b,l:E.l}},{linkEvents:{hover:M,follow:B,unhover:O,select:L},nodeEvents:{hover:Y,follow:j,unhover:te,select:V}})}},83248:function(H,U,e){var g=e(49812),C=e(67756).Gz,i=e(33428),S=e(26800),x=e(48932),v=e(11820),p=e(49760),r=e(76308),t=e(43616),a=e(3400),n=a.strTranslate,f=a.strRotate,c=e(71688),l=c.keyFun,m=c.repeat,h=c.unwrap,b=e(72736),u=e(24040),o=e(84284),d=o.CAP_SHIFT,w=o.LINE_SPACING,A=3;function _(ee,G,Q){var oe=h(G),$=oe.trace,Z=$.domain,se=$.orientation==="h",ne=$.node.pad,ce=$.node.thickness,ge={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[$.node.align],Te=ee.width*(Z.x[1]-Z.x[0]),we=ee.height*(Z.y[1]-Z.y[0]),Re=oe._nodes,be=oe._links,Ae=oe.circular,me;Ae?me=x.sankeyCircular().circularLinkGap(0):me=S.sankey(),me.iterations(v.sankeyIterations).size(se?[Te,we]:[we,Te]).nodeWidth(ce).nodePadding(ne).nodeId(function(nt){return nt.pointNumber}).nodeAlign(ge).nodes(Re).links(be);var Le=me();me.nodePadding()=We||(Je=We-Ze.y0,Je>1e-6&&(Ze.y0+=Je,Ze.y1+=Je)),We=Ze.y1+ne})}function ht(nt){var ze=nt.map(function(Ee,Me){return{x0:Ee.x0,index:Me}}).sort(function(Ee,Me){return Ee.x0-Me.x0}),Ze=[],Je=-1,We,Fe=-1/0,xe;for(Ve=0;VeFe+ce&&(Je+=1,We=ye.x0),Fe=ye.x0,Ze[Je]||(Ze[Je]=[]),Ze[Je].push(ye),xe=We-ye.x0,ye.x0+=xe,ye.x1+=xe}return Ze}if($.node.x.length&&$.node.y.length){for(Ve=0;Ve0?"L"+$.targetX+" "+$.targetY:"")+"Z":Q="M "+($.targetX-G)+" "+($.targetY-oe)+" L"+($.rightInnerExtent-G)+" "+($.targetY-oe)+"A"+($.rightLargeArcRadius+oe)+" "+($.rightSmallArcRadius+oe)+" 0 0 0 "+($.rightFullExtent-oe-G)+" "+($.targetY+$.rightSmallArcRadius)+"L"+($.rightFullExtent-oe-G)+" "+$.verticalRightInnerExtent+"A"+($.rightLargeArcRadius+oe)+" "+($.rightLargeArcRadius+oe)+" 0 0 0 "+($.rightInnerExtent-G)+" "+($.verticalFullExtent+oe)+"L"+$.leftInnerExtent+" "+($.verticalFullExtent+oe)+"A"+($.leftLargeArcRadius+oe)+" "+($.leftLargeArcRadius+oe)+" 0 0 0 "+($.leftFullExtent+oe)+" "+$.verticalLeftInnerExtent+"L"+($.leftFullExtent+oe)+" "+($.sourceY+$.leftSmallArcRadius)+"A"+($.leftLargeArcRadius+oe)+" "+($.leftSmallArcRadius+oe)+" 0 0 0 "+$.leftInnerExtent+" "+($.sourceY-oe)+"L"+$.sourceX+" "+($.sourceY-oe)+"L"+$.sourceX+" "+($.sourceY+oe)+"L"+$.leftInnerExtent+" "+($.sourceY+oe)+"A"+($.leftLargeArcRadius-oe)+" "+($.leftSmallArcRadius-oe)+" 0 0 1 "+($.leftFullExtent-oe)+" "+($.sourceY+$.leftSmallArcRadius)+"L"+($.leftFullExtent-oe)+" "+$.verticalLeftInnerExtent+"A"+($.leftLargeArcRadius-oe)+" "+($.leftLargeArcRadius-oe)+" 0 0 1 "+$.leftInnerExtent+" "+($.verticalFullExtent-oe)+"L"+($.rightInnerExtent-G)+" "+($.verticalFullExtent-oe)+"A"+($.rightLargeArcRadius-oe)+" "+($.rightLargeArcRadius-oe)+" 0 0 1 "+($.rightFullExtent+oe-G)+" "+$.verticalRightInnerExtent+"L"+($.rightFullExtent+oe-G)+" "+($.targetY+$.rightSmallArcRadius)+"A"+($.rightLargeArcRadius-oe)+" "+($.rightSmallArcRadius-oe)+" 0 0 1 "+($.rightInnerExtent-G)+" "+($.targetY+oe)+"L"+($.targetX-G)+" "+($.targetY+oe)+(G>0?"L"+$.targetX+" "+$.targetY:"")+"Z",Q}function T(){var ee=.5;function G(Q){var oe=Q.linkArrowLength;if(Q.link.circular)return E(Q.link,oe);var $=Math.abs((Q.link.target.x0-Q.link.source.x1)/2);oe>$&&(oe=$);var Z=Q.link.source.x1,se=Q.link.target.x0-oe,ne=C(Z,se),ce=ne(ee),ge=ne(1-ee),Te=Q.link.y0-Q.link.width/2,we=Q.link.y0+Q.link.width/2,Re=Q.link.y1-Q.link.width/2,be=Q.link.y1+Q.link.width/2,Ae="M"+Z+","+Te,me="C"+ce+","+Te+" "+ge+","+Re+" "+se+","+Re,Le="C"+ge+","+be+" "+ce+","+we+" "+Z+","+we,Ve=oe>0?"L"+(se+oe)+","+(Re+Q.link.width/2):"";return Ve+="L"+se+","+be,Ae+me+Ve+Le+"Z"}return G}function s(ee,G){var Q=p(G.color),oe=v.nodePadAcross,$=ee.nodePad/2;G.dx=G.x1-G.x0,G.dy=G.y1-G.y0;var Z=G.dx,se=Math.max(.5,G.dy),ne="node_"+G.pointNumber;return G.group&&(ne=a.randstr()),G.trace=ee.trace,G.curveNumber=ee.trace.index,{index:G.pointNumber,key:ne,partOfGroup:G.partOfGroup||!1,group:G.group,traceId:ee.key,trace:ee.trace,node:G,nodePad:ee.nodePad,nodeLineColor:ee.nodeLineColor,nodeLineWidth:ee.nodeLineWidth,textFont:ee.textFont,size:ee.horizontal?ee.height:ee.width,visibleWidth:Math.ceil(Z),visibleHeight:se,zoneX:-oe,zoneY:-$,zoneWidth:Z+2*oe,zoneHeight:se+2*$,labelY:ee.horizontal?G.dy/2+1:G.dx/2+1,left:G.originalLayer===1,sizeAcross:ee.width,forceLayouts:ee.forceLayouts,horizontal:ee.horizontal,darkBackground:Q.getBrightness()<=128,tinyColorHue:r.tinyRGB(Q),tinyColorAlpha:Q.getAlpha(),valueFormat:ee.valueFormat,valueSuffix:ee.valueSuffix,sankey:ee.sankey,graph:ee.graph,arrangement:ee.arrangement,uniqueNodeLabelPathId:[ee.guid,ee.key,ne].join("_"),interactionState:ee.interactionState,figure:ee}}function L(ee){ee.attr("transform",function(G){return n(G.node.x0.toFixed(3),G.node.y0.toFixed(3))})}function M(ee){ee.call(L)}function z(ee,G){ee.call(M),G.attr("d",T())}function D(ee){ee.attr("width",function(G){return G.node.x1-G.node.x0}).attr("height",function(G){return G.visibleHeight})}function N(ee){return ee.link.width>1||ee.linkLineWidth>0}function I(ee){var G=n(ee.translateX,ee.translateY);return G+(ee.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function k(ee,G,Q){ee.on(".basic",null).on("mouseover.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(Q.hover(this,oe,G),oe.interactionState.hovered=[this,oe])}).on("mousemove.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(Q.follow(this,oe),oe.interactionState.hovered=[this,oe])}).on("mouseout.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(Q.unhover(this,oe,G),oe.interactionState.hovered=!1)}).on("click.basic",function(oe){oe.interactionState.hovered&&(Q.unhover(this,oe,G),oe.interactionState.hovered=!1),!oe.interactionState.dragInProgress&&!oe.partOfGroup&&Q.select(this,oe,G)})}function B(ee,G,Q,oe){var $=i.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(a.ensureSingle(oe._fullLayout._infolayer,"g","dragcover",function(ne){oe._fullLayout._dragCover=ne}),a.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,ie(Z.node),Z.interactionState.hovered&&(Q.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var se=Z.traceId+"|"+Z.key;Z.forceLayouts[se]?Z.forceLayouts[se].alpha(1):O(ee,se,Z),V(ee,G,Z,se,oe)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var se=i.event.x,ne=i.event.y;Z.arrangement==="snap"?(Z.node.x0=se-Z.visibleWidth/2,Z.node.x1=se+Z.visibleWidth/2,Z.node.y0=ne-Z.visibleHeight/2,Z.node.y1=ne+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=se-Z.visibleWidth/2,Z.node.x1=se+Z.visibleWidth/2),ne=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,ne)),Z.node.y0=ne-Z.visibleHeight/2,Z.node.y1=ne+Z.visibleHeight/2),ie(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),z(ee.filter(ue(Z)),G))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var se=0;se0)window.requestAnimationFrame(Z);else{var ce=Q.node.originalX;Q.node.x0=ce-Q.visibleWidth/2,Q.node.x1=ce+Q.visibleWidth/2,j(Q,$)}})}function Y(ee,G,Q,oe){return function(){for(var Z=0,se=0;se0&&oe.forceLayouts[G].alpha(0)}}function j(ee,G){for(var Q=[],oe=[],$=0;$I&&L[B].gap;)B--;for(V=L[B].s,k=L.length-1;k>B;k--)L[k].s=V;for(;ID[h]&&h=0;c--){var l=x[c];if(l.type==="scatter"&&l.xaxis===n.xaxis&&l.yaxis===n.yaxis){l.opacity=void 0;break}}}}}},18800:function(H,U,e){var g=e(3400),C=e(24040),i=e(52904),S=e(88200),x=e(43028),v=e(43980),p=e(31147),r=e(43912),t=e(74428),a=e(66828),n=e(11731),f=e(124),c=e(70840),l=e(3400).coercePattern;H.exports=function(h,b,u,o){function d(L,M){return g.coerce(h,b,i,L,M)}var w=v(h,b,o,d);if(w||(b.visible=!1),!!b.visible){p(h,b,o,d),d("xhoverformat"),d("yhoverformat");var A=r(h,b,o,d);o.scattermode==="group"&&b.orientation===void 0&&d("orientation","v");var _=!A&&w=Math.min(ie,ue)&&h<=Math.max(ie,ue)?0:1/0}var J=Math.max(3,te.mrc||0),X=1-1/J,ee=Math.abs(l.c2p(te.x)-h);return ee=Math.min(ie,ue)&&b<=Math.max(ie,ue)?0:1/0}var J=Math.max(3,te.mrc||0),X=1-1/J,ee=Math.abs(m.c2p(te.y)-b);return eeQ!=Te>=Q&&(ne=Z[$-1][0],ce=Z[$][0],Te-ge&&(se=ne+(ce-ne)*(Q-ge)/(Te-ge),J=Math.min(J,se),X=Math.max(X,se)));return J=Math.max(J,0),X=Math.min(X,l._length),{x0:J,x1:X,y0:Q,y1:Q}}if(o.indexOf("fills")!==-1&&c._fillElement){var V=B(c._fillElement)&&!B(c._fillExclusionElement);if(V){var Y=O(c._polygons);Y===null&&(Y={x0:u[0],x1:u[0],y0:u[1],y1:u[1]});var j=x.defaultLine;return x.opacity(c.fillcolor)?j=c.fillcolor:x.opacity((c.line||{}).color)&&(j=c.line.color),g.extendFlat(r,{distance:r.maxHoverDistance,x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1,color:j,hovertemplate:!1}),delete r.index,c.text&&!g.isArrayOrTypedArray(c.text)?r.text=String(c.text):r.text=c.name,[r]}}}},65875:function(H,U,e){var g=e(43028);H.exports={hasLines:g.hasLines,hasMarkers:g.hasMarkers,hasText:g.hasText,isBubble:g.isBubble,attributes:e(52904),layoutAttributes:e(55308),supplyDefaults:e(18800),crossTraceDefaults:e(35036),supplyLayoutDefaults:e(59748),calc:e(16356).calc,crossTraceCalc:e(96664),arraysToCalcdata:e(20148),plot:e(96504),colorbar:e(5528),formatLabels:e(76688),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(98723),selectPoints:e(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308:function(H){H.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},59748:function(H,U,e){var g=e(3400),C=e(55308);H.exports=function(i,S){function x(p,r){return g.coerce(i,S,C,p,r)}var v=S.barmode==="group";S.scattermode==="group"&&x("scattergap",v?S.bargap:.2)}},66828:function(H,U,e){var g=e(3400).isArrayOrTypedArray,C=e(94288).hasColorscale,i=e(27260);H.exports=function(x,v,p,r,t,a){a||(a={});var n=(x.marker||{}).color;if(n&&n._inputArray&&(n=n._inputArray),t("line.color",p),C(x,"line"))i(x,v,r,t,{prefix:"line.",cLetter:"c"});else{var f=(g(n)?!1:n)||p;t("line.color",f)}t("line.width"),a.noDash||t("line.dash"),a.backoff&&t("line.backoff")}},52340:function(H,U,e){var g=e(43616),C=e(39032),i=C.BADNUM,S=C.LOG_CLIP,x=S+.5,v=S-.5,p=e(3400),r=p.segmentsIntersect,t=p.constrain,a=e(88200);H.exports=function(f,c){var l=c.trace||{},m=c.xaxis,h=c.yaxis,b=m.type==="log",u=h.type==="log",o=m._length,d=h._length,w=c.backoff,A=l.marker,_=c.connectGaps,y=c.baseTolerance,E=c.shape,T=E==="linear",s=l.fill&&l.fill!=="none",L=[],M=a.minTolerance,z=f.length,D=new Array(z),N=0,I,k,B,O,V,Y,j,te,ie,ue,J,X,ee,G,Q,oe;function $(mt){var bt=f[mt];if(!bt)return!1;var vt=c.linearized?m.l2p(bt.x):m.c2p(bt.x),Lt=c.linearized?h.l2p(bt.y):h.c2p(bt.y);if(vt===i){if(b&&(vt=m.c2p(bt.x,!0)),vt===i)return!1;u&&Lt===i&&(vt*=Math.abs(m._m*d*(m._m>0?x:v)/(h._m*o*(h._m>0?x:v)))),vt*=1e3}if(Lt===i){if(u&&(Lt=h.c2p(bt.y,!0)),Lt===i)return!1;Lt*=1e3}return[vt,Lt]}function Z(mt,bt,vt,Lt){var ct=vt-mt,Tt=Lt-bt,Bt=.5-mt,ir=.5-bt,pt=ct*ct+Tt*Tt,Xt=ct*Bt+Tt*ir;if(Xt>0&&Xt1||Math.abs(Bt.y-vt[0][1])>1)&&(Bt=[Bt.x,Bt.y],Lt&&ge(Bt,mt)Re||mt[1]Ae)return[t(mt[0],we,Re),t(mt[1],be,Ae)]}function $e(mt,bt){if(mt[0]===bt[0]&&(mt[0]===we||mt[0]===Re)||mt[1]===bt[1]&&(mt[1]===be||mt[1]===Ae))return!0}function lt(mt,bt){var vt=[],Lt=Ke(mt),ct=Ke(bt);return Lt&&ct&&$e(Lt,ct)||(Lt&&vt.push(Lt),ct&&vt.push(ct)),vt}function ht(mt,bt,vt){return function(Lt,ct){var Tt=Ke(Lt),Bt=Ke(ct),ir=[];if(Tt&&Bt&&$e(Tt,Bt))return ir;Tt&&ir.push(Tt),Bt&&ir.push(Bt);var pt=2*p.constrain((Lt[mt]+ct[mt])/2,bt,vt)-((Tt||Lt)[mt]+(Bt||ct)[mt]);if(pt){var Xt;Tt&&Bt?Xt=pt>0==Tt[mt]>Bt[mt]?Tt:Bt:Xt=Tt||Bt,Xt[mt]+=pt}return ir}}var dt;E==="linear"||E==="spline"?dt=rt:E==="hv"||E==="vh"?dt=lt:E==="hvh"?dt=ht(0,we,Re):E==="vhv"&&(dt=ht(1,be,Ae));function xt(mt,bt){var vt=bt[0]-mt[0],Lt=(bt[1]-mt[1])/vt,ct=(mt[1]*bt[0]-bt[1]*mt[0])/vt;return ct>0?[Lt>0?we:Re,Ae]:[Lt>0?Re:we,be]}function St(mt){var bt=mt[0],vt=mt[1],Lt=bt===D[N-1][0],ct=vt===D[N-1][1];if(!(Lt&&ct))if(N>1){var Tt=bt===D[N-2][0],Bt=vt===D[N-2][1];Lt&&(bt===we||bt===Re)&&Tt?Bt?N--:D[N-1]=mt:ct&&(vt===be||vt===Ae)&&Bt?Tt?N--:D[N-1]=mt:D[N++]=mt}else D[N++]=mt}function nt(mt){D[N-1][0]!==mt[0]&&D[N-1][1]!==mt[1]&&St([Ue,ke]),St(mt),He=null,Ue=ke=0}var ze=p.isArrayOrTypedArray(A);function Ze(mt){if(mt&&w&&(mt.i=I,mt.d=f,mt.trace=l,mt.marker=ze?A[mt.i]:A,mt.backoff=w),se=mt[0]/o,ne=mt[1]/d,Le=mt[0]Re?Re:0,Ve=mt[1]Ae?Ae:0,Le||Ve){if(!N)D[N++]=[Le||mt[0],Ve||mt[1]];else if(He){var bt=dt(He,mt);bt.length>1&&(nt(bt[0]),D[N++]=bt[1])}else Ie=dt(D[N-1],mt)[0],D[N++]=Ie;var vt=D[N-1];Le&&Ve&&(vt[0]!==Le||vt[1]!==Ve)?(He&&(Ue!==Le&&ke!==Ve?St(Ue&&ke?xt(He,mt):[Ue||Le,ke||Ve]):Ue&&ke&&St([Ue,ke])),St([Le,Ve])):Ue-Le&&ke-Ve&&St([Le||Ue,Ve||ke]),He=mt,Ue=Le,ke=Ve}else He&&nt(dt(He,mt)[0]),D[N++]=mt}for(I=0;Ice(Y,Je))break;B=Y,ee=ie[0]*te[0]+ie[1]*te[1],ee>J?(J=ee,O=Y,j=!1):ee=f.length||!Y)break;Ze(Y),k=Y}}He&&St([Ue||He[0],ke||He[1]]),L.push(D.slice(0,N))}var We=E.slice(E.length-1);if(w&&We!=="h"&&We!=="v"){for(var Fe=!1,xe=-1,ye=[],Ee=0;Ee=0?r=c:(r=c=f,f++),r0?Math.max(a,p):0}}},5528:function(H){H.exports={container:"marker",min:"cmin",max:"cmax"}},74428:function(H,U,e){var g=e(76308),C=e(94288).hasColorscale,i=e(27260),S=e(43028);H.exports=function(v,p,r,t,a,n){var f=S.isBubble(v),c=(v.line||{}).color,l;if(n=n||{},c&&(r=c),a("marker.symbol"),a("marker.opacity",f?.7:1),a("marker.size"),n.noAngle||(a("marker.angle"),n.noAngleRef||a("marker.angleref"),n.noStandOff||a("marker.standoff")),a("marker.color",r),C(v,"marker")&&i(v,p,t,a,{prefix:"marker.",cLetter:"c"}),n.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),n.noLine||(c&&!Array.isArray(c)&&p.marker.color!==c?l=c:f?l=g.background:l=g.defaultLine,a("marker.line.color",l),C(v,"marker.line")&&i(v,p,t,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",f?1:0)),f&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),n.gradient){var m=a("marker.gradient.type");m!=="none"&&a("marker.gradient.color")}}},31147:function(H,U,e){var g=e(3400).dateTick0,C=e(39032),i=C.ONEWEEK;function S(x,v){return x%i===0?g(v,1):g(v,0)}H.exports=function(v,p,r,t,a){if(a||(a={x:!0,y:!0}),a.x){var n=t("xperiod");n&&(t("xperiod0",S(n,p.xcalendar)),t("xperiodalignment"))}if(a.y){var f=t("yperiod");f&&(t("yperiod0",S(f,p.ycalendar)),t("yperiodalignment"))}}},96504:function(H,U,e){var g=e(33428),C=e(24040),i=e(3400),S=i.ensureSingle,x=i.identity,v=e(43616),p=e(43028),r=e(52340),t=e(14328),a=e(92065).tester;H.exports=function(m,h,b,u,o,d){var w,A,_=!o,y=!!o&&o.duration>0,E=t(m,h,b);if(w=u.selectAll("g.trace").data(E,function(s){return s[0].trace.uid}),w.enter().append("g").attr("class",function(s){return"trace scatter trace"+s[0].trace.uid}).style("stroke-miterlimit",2),w.order(),n(m,w,h),y){d&&(A=d());var T=g.transition().duration(o.duration).ease(o.easing).each("end",function(){A&&A()}).each("interrupt",function(){A&&A()});T.each(function(){u.selectAll("g.trace").each(function(s,L){f(m,L,h,s,E,this,o)})})}else w.each(function(s,L){f(m,L,h,s,E,this,o)});_&&w.exit().remove(),u.selectAll("path:not([d])").remove()};function n(l,m,h){m.each(function(b){var u=S(g.select(this),"g","fills");v.setClipUrl(u,h.layerClipId,l);var o=b[0].trace,d=[];o._ownfill&&d.push("_ownFill"),o._nexttrace&&d.push("_nextFill");var w=u.selectAll("g").data(d,x);w.enter().append("g"),w.exit().each(function(A){o[A]=null}).remove(),w.order().each(function(A){o[A]=S(g.select(this),"path","js-fill")})})}function f(l,m,h,b,u,o,d){var w=l._context.staticPlot,A;c(l,m,h,b,u);var _=!!d&&d.duration>0;function y(St){return _?St.transition():St}var E=h.xaxis,T=h.yaxis,s=b[0].trace,L=s.line,M=g.select(o),z=S(M,"g","errorbars"),D=S(M,"g","lines"),N=S(M,"g","points"),I=S(M,"g","text");if(C.getComponentMethod("errorbars","plot")(l,z,h,d),s.visible!==!0)return;y(M).style("opacity",s.opacity);var k,B,O=s.fill.charAt(s.fill.length-1);O!=="x"&&O!=="y"&&(O="");var V,Y;O==="y"?(V=1,Y=T.c2p(0,!0)):O==="x"&&(V=0,Y=E.c2p(0,!0)),b[0][h.isRangePlot?"nodeRangePlot3":"node3"]=M;var j="",te=[],ie=s._prevtrace,ue=null,J=null;ie&&(j=ie._prevRevpath||"",B=ie._nextFill,te=ie._ownPolygons,ue=ie._fillsegments,J=ie._fillElement);var X,ee,G="",Q="",oe,$,Z,se,ne,ce,ge=[];s._polygons=[];var Te=[],we=[],Re=i.noop;if(k=s._ownFill,p.hasLines(s)||s.fill!=="none"){B&&B.datum(b),["hv","vh","hvh","vhv"].indexOf(L.shape)!==-1?(oe=v.steps(L.shape),$=v.steps(L.shape.split("").reverse().join(""))):L.shape==="spline"?oe=$=function(St){var nt=St[St.length-1];return St.length>1&&St[0][0]===nt[0]&&St[0][1]===nt[1]?v.smoothclosed(St.slice(1),L.smoothing):v.smoothopen(St,L.smoothing)}:oe=$=function(St){return"M"+St.join("L")},Z=function(St){return $(St.reverse())},we=r(b,{xaxis:E,yaxis:T,trace:s,connectGaps:s.connectgaps,baseTolerance:Math.max(L.width||1,3)/4,shape:L.shape,backoff:L.backoff,simplify:L.simplify,fill:s.fill}),Te=new Array(we.length);var be=0;for(A=0;A=w[0]&&M.x<=w[1]&&M.y>=A[0]&&M.y<=A[1]}),T=Math.ceil(E.length/y),s=0;u.forEach(function(M,z){var D=M[0].trace;p.hasMarkers(D)&&D.marker.maxdisplayed>0&&z0){var h=r.c2l(l);r._lowerLogErrorBound||(r._lowerLogErrorBound=h),r._lowerErrorBound=Math.min(r._lowerLogErrorBound,h)}}else a[n]=[-f[0]*p,f[1]*p]}return a}function i(x){for(var v=0;v-1?-1:M.indexOf("right")>-1?1:0}function d(M){return M==null?0:M.indexOf("top")>-1?-1:M.indexOf("bottom")>-1?1:0}function w(M){var z=0,D=0,N=[z,D];if(Array.isArray(M))for(var I=0;I=0){var Y=b(O.position,O.delaunayColor,O.delaunayAxis);Y.opacity=M.opacity,this.delaunayMesh?this.delaunayMesh.update(Y):(Y.gl=z,this.delaunayMesh=S(Y),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},h.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function L(M,z){var D=new m(M,z.uid);return D.update(z),D}H.exports=L},83484:function(H,U,e){var g=e(24040),C=e(3400),i=e(43028),S=e(74428),x=e(66828),v=e(124),p=e(91592);H.exports=function(a,n,f,c){function l(A,_){return C.coerce(a,n,p,A,_)}var m=r(a,n,l,c);if(!m){n.visible=!1;return}l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),l("mode"),i.hasMarkers(n)&&S(a,n,f,c,l,{noSelect:!0,noAngle:!0}),i.hasLines(n)&&(l("connectgaps"),x(a,n,f,c,l)),i.hasText(n)&&(l("texttemplate"),v(a,n,c,l,{noSelect:!0}));var h=(n.line||{}).color,b=(n.marker||{}).color;l("surfaceaxis")>=0&&l("surfacecolor",h||b);for(var u=["x","y","z"],o=0;o<3;++o){var d="projection."+u[o];l(d+".show")&&(l(d+".opacity"),l(d+".scale"))}var w=g.getComponentMethod("errorbars","supplyDefaults");w(a,n,h||b||f,{axis:"z"}),w(a,n,h||b||f,{axis:"y",inherit:"z"}),w(a,n,h||b||f,{axis:"x",inherit:"z"})};function r(t,a,n,f){var c=0,l=n("x"),m=n("y"),h=n("z"),b=g.getComponentMethod("calendars","handleTraceDefaults");return b(t,a,["x","y","z"],f),l&&m&&h&&(c=Math.min(l.length,m.length,h.length),a._length=a._xlength=a._ylength=a._zlength=c),c}},3296:function(H,U,e){H.exports={plot:e(41064),attributes:e(91592),markerSymbols:e(87792),supplyDefaults:e(83484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e(41484),moduleType:"trace",name:"scatter3d",basePlotModule:e(12536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},90372:function(H,U,e){var g=e(98304),C=e(52904),i=e(45464),S=e(21776).Ks,x=e(21776).Gw,v=e(49084),p=e(92880).extendFlat,r=C.marker,t=C.line,a=r.line;H.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:p({},C.mode,{dflt:"markers"}),text:p({},C.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","text"]}),hovertext:p({},C.hovertext,{}),line:{color:t.color,width:t.width,dash:t.dash,backoff:t.backoff,shape:p({},t.shape,{values:["linear","spline"]}),smoothing:t.smoothing,editType:"calc"},connectgaps:C.connectgaps,fill:p({},C.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:g(),marker:p({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:p({width:a.width,editType:"calc"},v("marker.line")),gradient:r.gradient,editType:"calc"},v("marker")),textfont:C.textfont,textposition:C.textposition,selected:C.selected,unselected:C.unselected,hoverinfo:p({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:C.hoveron,hovertemplate:S()}},48228:function(H,U,e){var g=e(38248),C=e(90136),i=e(20148),S=e(4500),x=e(16356).calcMarkerSize,v=e(50948);H.exports=function(r,t){var a=t._carpetTrace=v(r,t);if(!(!a||!a.visible||a.visible==="legendonly")){var n;t.xaxis=a.xaxis,t.yaxis=a.yaxis;var f=t._length,c=new Array(f),l,m,h=!1;for(n=0;n0?y=A.labelprefix.replace(/ = $/,""):y=A._hovertitle,u.push(y+": "+_.toFixed(3)+A.labelsuffix)}if(!m.hovertemplate){var d=l.hi||m.hoverinfo,w=d.split("+");w.indexOf("all")!==-1&&(w=["a","b","text"]),w.indexOf("a")!==-1&&o(h.aaxis,l.a),w.indexOf("b")!==-1&&o(h.baxis,l.b),u.push("y: "+t.yLabel),w.indexOf("text")!==-1&&C(l,m,u),t.extraText=u.join("
    ")}return r}},4184:function(H,U,e){H.exports={attributes:e(90372),supplyDefaults:e(6176),colorbar:e(5528),formatLabels:e(52364),calc:e(48228),plot:e(20036),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(58960),selectPoints:e(91560),eventData:e(89307),moduleType:"trace",name:"scattercarpet",basePlotModule:e(57952),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},20036:function(H,U,e){var g=e(96504),C=e(54460),i=e(43616);H.exports=function(x,v,p,r){var t,a,n,f=p[0][0].carpet,c=C.getFromId(x,f.xaxis||"x"),l=C.getFromId(x,f.yaxis||"y"),m={xaxis:c,yaxis:l,plot:v.plot};for(t=0;t")}},36952:function(H,U,e){H.exports={attributes:e(6096),supplyDefaults:e(86188),colorbar:e(5528),formatLabels:e(56696),calc:e(25212),calcGeoJSON:e(48691).calcGeoJSON,plot:e(48691).plot,style:e(25064),styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(64292),eventData:e(58544),selectPoints:e(8796),moduleType:"trace",name:"scattergeo",basePlotModule:e(10816),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},48691:function(H,U,e){var g=e(33428),C=e(3400),i=e(59972).getTopojsonFeatures,S=e(44808),x=e(27144),v=e(19280).findExtremes,p=e(39032).BADNUM,r=e(16356).calcMarkerSize,t=e(43028),a=e(25064);function n(c,l,m){var h=l.layers.frontplot.select(".scatterlayer"),b=C.makeTraceGroups(h,m,"trace scattergeo");function u(o,d){o.lonlat[0]===p&&g.select(d).remove()}b.selectAll("*").remove(),b.each(function(o){var d=g.select(this),w=o[0].trace;if(t.hasLines(w)||w.fill!=="none"){var A=S.calcTraceToLineCoords(o),_=w.fill!=="none"?S.makePolygon(A):S.makeLine(A);d.selectAll("path.js-line").data([{geojson:_,trace:w}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}t.hasMarkers(w)&&d.selectAll("path.point").data(C.identity).enter().append("path").classed("point",!0).each(function(y){u(y,this)}),t.hasText(w)&&d.selectAll("g").data(C.identity).enter().append("g").append("text").each(function(y){u(y,this)}),a(c,o)})}function f(c,l){var m=c[0].trace,h=l[m.geo],b=h._subplot,u=m._length,o,d;if(C.isArrayOrTypedArray(m.locations)){var w=m.locationmode,A=w==="geojson-id"?x.extractTraceFeature(c):i(m,b.topojson);for(o=0;o=l,T=y*2,s={},L,M=w.makeCalcdata(o,"x"),z=A.makeCalcdata(o,"y"),D=x(o,w,"x",M),N=x(o,A,"y",z),I=D.vals,k=N.vals;o._x=I,o._y=k,o.xperiodalignment&&(o._origX=M,o._xStarts=D.starts,o._xEnds=D.ends),o.yperiodalignment&&(o._origY=z,o._yStarts=N.starts,o._yEnds=N.ends);var B=new Array(T),O=new Array(y);for(L=0;L1&&C.extendFlat(_.line,n.linePositions(b,o,d)),_.errorX||_.errorY){var y=n.errorBarPositions(b,o,d,w,A);_.errorX&&C.extendFlat(_.errorX,y.x),_.errorY&&C.extendFlat(_.errorY,y.y)}return _.text&&(C.extendFlat(_.text,{positions:d},n.textPosition(b,o,_.text,_.marker)),C.extendFlat(_.textSel,{positions:d},n.textPosition(b,o,_.text,_.markerSel)),C.extendFlat(_.textUnsel,{positions:d},n.textPosition(b,o,_.text,_.markerUnsel))),_}},67072:function(H){var U=20;H.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:U,SYMBOL_STROKE:U/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},84236:function(H,U,e){var g=e(38248),C=e(20472),i=e(72160),S=e(24040),x=e(3400),v=x.isArrayOrTypedArray,p=e(43616),r=e(79811),t=e(33040).formatColor,a=e(43028),n=e(7152),f=e(80088),c=e(67072),l=e(13448).DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},h=e(10624).appendArrayPointValue;function b(N,I){var k,B={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},O=N._context.plotGlPixelRatio;if(I.visible!==!0)return B;if(a.hasText(I)&&(B.text=u(N,I),B.textSel=w(N,I,I.selected),B.textUnsel=w(N,I,I.unselected)),a.hasMarkers(I)&&(B.marker=o(N,I),B.markerSel=d(N,I,I.selected),B.markerUnsel=d(N,I,I.unselected),!I.unselected&&v(I.marker.opacity))){var V=I.marker.opacity;for(B.markerUnsel.opacity=new Array(V.length),k=0;kc.TOO_MANY_POINTS||a.hasMarkers(I)?"rect":"round";if(ie&&I.connectgaps){var J=V[0],X=V[1];for(Y=0;Y1?te[Y]:te[0]:te,ee=v(ie)?ie.length>1?ie[Y]:ie[0]:ie,G=m[X],Q=m[ee],oe=ue?ue/.8+1:0,$=-Q*oe-Q*.5;V.offset[Y]=[G*oe/J,$/J]}}return V}H.exports={style:b,markerStyle:o,markerSelection:d,linePositions:M,errorBarPositions:z,textPosition:D}},80220:function(H,U,e){var g=e(3400),C=e(24040),i=e(80088),S=e(2876),x=e(88200),v=e(43028),p=e(43980),r=e(31147),t=e(74428),a=e(66828),n=e(70840),f=e(124);H.exports=function(l,m,h,b){function u(T,s){return g.coerce(l,m,S,T,s)}var o=l.marker?i.isOpenSymbol(l.marker.symbol):!1,d=v.isBubble(l),w=p(l,m,b,u);if(!w){m.visible=!1;return}r(l,m,b,u),u("xhoverformat"),u("yhoverformat");var A=w100},U.isDotSymbol=function(C){return typeof C=="string"?g.DOT_RE.test(C):C>200}},41272:function(H,U,e){var g=e(24040),C=e(3400),i=e(44928);function S(v,p,r,t){var a=v.cd,n=a[0].t,f=a[0].trace,c=v.xa,l=v.ya,m=n.x,h=n.y,b=c.c2p(p),u=l.c2p(r),o=v.distance,d;if(n.tree){var w=c.p2c(b-o),A=c.p2c(b+o),_=l.p2c(u-o),y=l.p2c(u+o);t==="x"?d=n.tree.range(Math.min(w,A),Math.min(l._rl[0],l._rl[1]),Math.max(w,A),Math.max(l._rl[0],l._rl[1])):d=n.tree.range(Math.min(w,A),Math.min(_,y),Math.max(w,A),Math.max(_,y))}else d=n.ids;var E,T,s,L,M,z,D,N,I,k=o;if(t==="x"){var B=!!f.xperiodalignment,O=!!f.yperiodalignment;for(M=0;M=Math.min(V,Y)&&b<=Math.max(V,Y)?0:1/0}if(z=Math.min(j,te)&&u<=Math.max(j,te)?0:1/0}I=Math.sqrt(z*z+D*D),T=d[M]}}}else for(M=d.length-1;M>-1;M--)E=d[M],s=m[E],L=h[E],z=c.c2p(s)-b,D=l.c2p(L)-u,N=Math.sqrt(z*z+D*D),No.glText.length){var s=E-o.glText.length;for(A=0;Ase&&(isNaN(Z[ne])||isNaN(Z[ne+1]));)ne-=2;$.positions=Z.slice(se,ne+2)}return $}),o.line2d.update(o.lineOptions)),o.error2d){var z=(o.errorXOptions||[]).concat(o.errorYOptions||[]);o.error2d.update(z)}o.scatter2d&&o.scatter2d.update(o.markerOptions),o.fillOrder=x.repeat(null,E),o.fill2d&&(o.fillOptions=o.fillOptions.map(function($,Z){var se=b[Z];if(!(!$||!se||!se[0]||!se[0].trace)){var ne=se[0],ce=ne.trace,ge=ne.t,Te=o.lineOptions[Z],we,Re,be=[];ce._ownfill&&be.push(Z),ce._nexttrace&&be.push(Z+1),be.length&&(o.fillOrder[Z]=be);var Ae=[],me=Te&&Te.positions||ge.positions,Le,Ve;if(ce.fill==="tozeroy"){for(Le=0;LeLe&&isNaN(me[Ve+1]);)Ve-=2;me[Le+1]!==0&&(Ae=[me[Le],0]),Ae=Ae.concat(me.slice(Le,Ve+2)),me[Ve+1]!==0&&(Ae=Ae.concat([me[Ve],0]))}else if(ce.fill==="tozerox"){for(Le=0;LeLe&&isNaN(me[Ve]);)Ve-=2;me[Le]!==0&&(Ae=[0,me[Le+1]]),Ae=Ae.concat(me.slice(Le,Ve+2)),me[Ve]!==0&&(Ae=Ae.concat([0,me[Ve+1]]))}else if(ce.fill==="toself"||ce.fill==="tonext"){for(Ae=[],we=0,$.splitNull=!0,Re=0;Re-1;for(A=0;A=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),A=w*360,_=a-A;function y(I){var k=I.lonlat;if(k[0]===x||o&&b.indexOf(I.i+1)===-1)return 1/0;var B=C.modHalf(k[0],360),O=k[1],V=h.project([B,O]),Y=V.x-l.c2p([_,O]),j=V.y-m.c2p([B,n]),te=Math.max(3,I.mrc||0);return Math.max(Math.sqrt(Y*Y+j*j)-te,1-3/te)}if(g.getClosest(f,y,t),t.index!==!1){var E=f[t.index],T=E.lonlat,s=[C.modHalf(T[0],360)+A,T[1]],L=l.c2p(s),M=m.c2p(s),z=E.mrc||1;t.x0=L-z,t.x1=L+z,t.y0=M-z,t.y1=M+z;var D={};D[c.subplot]={_subplot:h};var N=c._module.formatLabels(E,c,D);return t.lonLabel=N.lonLabel,t.latLabel=N.latLabel,t.color=i(c,E),t.extraText=r(c,E,f[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}function r(t,a,n){if(t.hovertemplate)return;var f=a.hi||t.hoverinfo,c=f.split("+"),l=c.indexOf("all")!==-1,m=c.indexOf("lon")!==-1,h=c.indexOf("lat")!==-1,b=a.lonlat,u=[];function o(d){return d+"°"}return l||m&&h?u.push("("+o(b[1])+", "+o(b[0])+")"):m?u.push(n.lon+o(b[0])):h&&u.push(n.lat+o(b[1])),(l||c.indexOf("text")!==-1)&&S(a,t,u),u.join("
    ")}H.exports={hoverPoints:p,getExtraText:r}},11572:function(H,U,e){H.exports={attributes:e(31512),supplyDefaults:e(15752),colorbar:e(5528),formatLabels:e(11960),calc:e(25212),plot:e(9660),hoverPoints:e(63312).hoverPoints,eventData:e(37920),selectPoints:e(404),styleOnSelect:function(g,C){if(C){var i=C[0].trace;i._glTrace.update(C)}},moduleType:"trace",name:"scattermapbox",basePlotModule:e(33688),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(H,U,e){var g=e(3400),C=e(59392),i=e(47552).traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function x(p,r,t,a){this.type="scattermapbox",this.subplot=p,this.uid=r,this.clusterEnabled=t,this.isHidden=a,this.sourceIds={fill:"source-"+r+"-fill",line:"source-"+r+"-line",circle:"source-"+r+"-circle",symbol:"source-"+r+"-symbol",cluster:"source-"+r+"-circle",clusterCount:"source-"+r+"-circle"},this.layerIds={fill:i+r+"-fill",line:i+r+"-line",circle:i+r+"-circle",symbol:i+r+"-symbol",cluster:i+r+"-cluster",clusterCount:i+r+"-cluster-count"},this.below=null}var v=x.prototype;v.addSource=function(p,r,t){var a={type:"geojson",data:r.geojson};t&&t.enabled&&g.extendFlat(a,{cluster:!0,clusterMaxZoom:t.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[p]);n?n.setData(r.geojson):this.subplot.map.addSource(this.sourceIds[p],a)},v.setSourceData=function(p,r){this.subplot.map.getSource(this.sourceIds[p]).setData(r.geojson)},v.addLayer=function(p,r,t){var a={type:r.type,id:this.layerIds[p],source:this.sourceIds[p],layout:r.layout,paint:r.paint};r.filter&&(a.filter=r.filter);for(var n=this.layerIds[p],f,c=this.subplot.getMapLayers(),l=0;l=0;L--){var M=s[L];n.removeLayer(h.layerIds[M])}T||n.removeSource(h.sourceIds.circle)}function o(T){for(var s=S.nonCluster,L=0;L=0;L--){var M=s[L];n.removeLayer(h.layerIds[M]),T||n.removeSource(h.sourceIds[M])}}function w(T){m?u(T):d(T)}function A(T){l?b(T):o(T)}function _(){for(var T=l?S.cluster:S.nonCluster,s=0;s=0;a--){var n=t[a];r.removeLayer(this.layerIds[n]),r.removeSource(this.sourceIds[n])}},H.exports=function(r,t){var a=t[0].trace,n=a.cluster&&a.cluster.enabled,f=a.visible!==!0,c=new x(r,a.uid,n,f),l=C(r.gd,t),m=c.below=r.belowLookup["trace-"+a.uid],h,b,u;if(n)for(c.addSource("circle",l.circle,a.cluster),h=0;h")}}H.exports={hoverPoints:C,makeHoverPointText:i}},76924:function(H,U,e){H.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e(40872),categories:["polar","symbols","showLegend","scatter-like"],attributes:e(8319),supplyDefaults:e(85968).supplyDefaults,colorbar:e(5528),formatLabels:e(22852),calc:e(58320),plot:e(43456),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(8504).hoverPoints,selectPoints:e(91560),meta:{}}},43456:function(H,U,e){var g=e(96504),C=e(39032).BADNUM;H.exports=function(S,x,v){for(var p=x.layers.frontplot.select("g.scatterlayer"),r=x.xaxis,t=x.yaxis,a={xaxis:r,yaxis:t,plot:x.framework,layerClipId:x._hasClipOnAxisFalse?x.clipIds.forTraces:null},n=x.radialAxis,f=x.angularAxis,c=0;c=p&&(_.marker.cluster=o.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=s),_.line&&s.length>1&&v.extendFlat(_.line,x.linePositions(a,u,s)),_.text&&(v.extendFlat(_.text,{positions:s},x.textPosition(a,u,_.text,_.marker)),v.extendFlat(_.textSel,{positions:s},x.textPosition(a,u,_.text,_.markerSel)),v.extendFlat(_.textUnsel,{positions:s},x.textPosition(a,u,_.text,_.markerUnsel))),_.fill&&!m.fill2d&&(m.fill2d=!0),_.marker&&!m.scatter2d&&(m.scatter2d=!0),_.line&&!m.line2d&&(m.line2d=!0),_.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(_.line),m.fillOptions.push(_.fill),m.markerOptions.push(_.marker),m.markerSelectedOptions.push(_.markerSel),m.markerUnselectedOptions.push(_.markerUnsel),m.textOptions.push(_.text),m.textSelectedOptions.push(_.textSel),m.textUnselectedOptions.push(_.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),o.x=L,o.y=M,o.rawx=L,o.rawy=M,o.r=w,o.theta=A,o.positions=s,o._scene=m,o.index=m.count,m.count++}}),i(a,n,f)}},H.exports.reglPrecompiled=r},69496:function(H,U,e){var g=e(21776).Ks,C=e(21776).Gw,i=e(92880).extendFlat,S=e(98304),x=e(52904),v=e(45464),p=x.line;H.exports={mode:x.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:x.text,texttemplate:C({editType:"plot"},{keys:["real","imag","text"]}),hovertext:x.hovertext,line:{color:p.color,width:p.width,dash:p.dash,backoff:p.backoff,shape:i({},p.shape,{values:["linear","spline"]}),smoothing:p.smoothing,editType:"calc"},connectgaps:x.connectgaps,marker:x.marker,cliponaxis:i({},x.cliponaxis,{dflt:!1}),textposition:x.textposition,textfont:x.textfont,fill:i({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),hoverinfo:i({},v.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:x.hoveron,hovertemplate:g(),selected:x.selected,unselected:x.unselected}},47507:function(H,U,e){var g=e(38248),C=e(39032).BADNUM,i=e(90136),S=e(20148),x=e(4500),v=e(16356).calcMarkerSize;H.exports=function(r,t){for(var a=r._fullLayout,n=t.subplot,f=a[n].realaxis,c=a[n].imaginaryaxis,l=f.makeCalcdata(t,"real"),m=c.makeCalcdata(t,"imag"),h=t._length,b=new Array(h),u=0;u")}}H.exports={hoverPoints:C,makeHoverPointText:i}},95443:function(H,U,e){H.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e(47788),categories:["smith","symbols","showLegend","scatter-like"],attributes:e(69496),supplyDefaults:e(76716),colorbar:e(5528),formatLabels:e(49504),calc:e(47507),plot:e(34927),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(25292).hoverPoints,selectPoints:e(91560),meta:{}}},34927:function(H,U,e){var g=e(96504),C=e(39032).BADNUM,i=e(36416),S=i.smith;H.exports=function(v,p,r){for(var t=p.layers.frontplot.select("g.scatterlayer"),a=p.xaxis,n=p.yaxis,f={xaxis:a,yaxis:n,plot:p.framework,layerClipId:p._hasClipOnAxisFalse?p.clipIds.forTraces:null},c=0;c"),r.hovertemplate=l.hovertemplate,p}},34864:function(H,U,e){H.exports={attributes:e(5896),supplyDefaults:e(84256),colorbar:e(5528),formatLabels:e(90404),calc:e(34335),plot:e(88776),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(26596),selectPoints:e(91560),eventData:e(97476),moduleType:"trace",name:"scatterternary",basePlotModule:e(19352),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},88776:function(H,U,e){var g=e(96504);H.exports=function(i,S,x){var v=S.plotContainer;v.select(".scatterlayer").selectAll("*").remove();for(var p=S.xaxis,r=S.yaxis,t={xaxis:p,yaxis:r,plot:v,layerClipId:S._hasClipOnAxisFalse?S.clipIdRelative:null},a=S.layers.frontplot.select("g.scatterlayer"),n=0;na,L;for(s?L=h.sizeAvg||Math.max(h.size,3):L=i(c,m),w=0;wd&&h||o-1,I=S(h)||!!a.selectedpoints||N,k=!0;if(I){var B=a._length;if(a.selectedpoints){f.selectBatch=a.selectedpoints;var O=a.selectedpoints,V={};for(o=0;o1&&(T=r[n-1],L=t[n-1],z=a[n-1]),f=0;fT?"-":"+")+"x"),w=w.replace("y",(s>L?"-":"+")+"y"),w=w.replace("z",(M>z?"-":"+")+"z");var k=function(){n=0,D=[],N=[],I=[]};(!n||n2?h=l.slice(1,m-1):m===2?h=[(l[0]+l[1])/2]:h=l,h}function n(l){var m=l.length;return m===1?[.5,.5]:[l[1]-l[0],l[m-1]-l[m-2]]}function f(l,m){var h=l.fullSceneLayout,b=l.dataScale,u=m._len,o={};function d(ue,J){var X=h[J],ee=b[p[J]];return i.simpleMap(ue,function(G){return X.d2l(G)*ee})}if(o.vectors=v(d(m._u,"xaxis"),d(m._v,"yaxis"),d(m._w,"zaxis"),u),!u)return{positions:[],cells:[]};var w=d(m._Xs,"xaxis"),A=d(m._Ys,"yaxis"),_=d(m._Zs,"zaxis");o.meshgrid=[w,A,_],o.gridFill=m._gridFill;var y=m._slen;if(y)o.startingPositions=v(d(m._startsX,"xaxis"),d(m._startsY,"yaxis"),d(m._startsZ,"zaxis"));else{for(var E=A[0],T=a(w),s=a(_),L=new Array(T.length*s.length),M=0,z=0;z=0},L,M,z;b?(L=Math.min(h.length,o.length),M=function(G){return T(h[G])&&s(G)},z=function(G){return String(h[G])}):(L=Math.min(u.length,o.length),M=function(G){return T(u[G])&&s(G)},z=function(G){return String(u[G])}),w&&(L=Math.min(L,d.length));for(var D=0;D1){for(var V=i.randstr(),Y=0;Y=0){x.i=t.i;var f=v.marker;f.pattern?(!f.colors||!f.pattern.shape)&&(f.color=n,x.color=n):(f.color=n,x.color=n),g.pointStyle(S,v,p,x)}else C.fill(S,n)}},45716:function(H,U,e){var g=e(33428),C=e(24040),i=e(10624).appendArrayPointValue,S=e(93024),x=e(3400),v=e(95924),p=e(78176),r=e(69656),t=r.formatPieValue;H.exports=function(f,c,l,m,h){var b=m[0],u=b.trace,o=b.hierarchy,d=u.type==="sunburst",w=u.type==="treemap"||u.type==="icicle";"_hasHoverLabel"in u||(u._hasHoverLabel=!1),"_hasHoverEvent"in u||(u._hasHoverEvent=!1);var A=function(E){var T=l._fullLayout;if(!(l._dragging||T.hovermode===!1)){var s=l._fullData[u.index],L=E.data.data,M=L.i,z=p.isHierarchyRoot(E),D=p.getParent(o,E),N=p.getValue(E),I=function(Z){return x.castOption(s,M,Z)},k=I("hovertemplate"),B=S.castHoverinfo(s,T,M),O=T.separators,V;if(k||B&&B!=="none"&&B!=="skip"){var Y,j;d&&(Y=b.cx+E.pxmid[0]*(1-E.rInscribed),j=b.cy+E.pxmid[1]*(1-E.rInscribed)),w&&(Y=E._hoverX,j=E._hoverY);var te={},ie=[],ue=[],J=function(Z){return ie.indexOf(Z)!==-1};B&&(ie=B==="all"?s._module.attributes.hoverinfo.flags:B.split("+")),te.label=L.label,J("label")&&te.label&&ue.push(te.label),L.hasOwnProperty("v")&&(te.value=L.v,te.valueLabel=t(te.value,O),J("value")&&ue.push(te.valueLabel)),te.currentPath=E.currentPath=p.getPath(E.data),J("current path")&&!z&&ue.push(te.currentPath);var X,ee=[],G=function(){ee.indexOf(X)===-1&&(ue.push(X),ee.push(X))};te.percentParent=E.percentParent=N/p.getValue(D),te.parent=E.parentString=p.getPtLabel(D),J("percent parent")&&(X=p.formatPercent(te.percentParent,O)+" of "+te.parent,G()),te.percentEntry=E.percentEntry=N/p.getValue(c),te.entry=E.entry=p.getPtLabel(c),J("percent entry")&&!z&&!E.onPathbar&&(X=p.formatPercent(te.percentEntry,O)+" of "+te.entry,G()),te.percentRoot=E.percentRoot=N/p.getValue(o),te.root=E.root=p.getPtLabel(o),J("percent root")&&!z&&(X=p.formatPercent(te.percentRoot,O)+" of "+te.root,G()),te.text=I("hovertext")||I("text"),J("text")&&(X=te.text,x.isValidTextValue(X)&&ue.push(X)),V=[a(E,s,h.eventDataKeys)];var Q={trace:s,y:j,_x0:E._x0,_x1:E._x1,_y0:E._y0,_y1:E._y1,text:ue.join("
    "),name:k||J("name")?s.name:void 0,color:I("hoverlabel.bgcolor")||L.color,borderColor:I("hoverlabel.bordercolor"),fontFamily:I("hoverlabel.font.family"),fontSize:I("hoverlabel.font.size"),fontColor:I("hoverlabel.font.color"),nameLength:I("hoverlabel.namelength"),textAlign:I("hoverlabel.align"),hovertemplate:k,hovertemplateLabels:te,eventData:V};d&&(Q.x0=Y-E.rInscribed*E.rpx1,Q.x1=Y+E.rInscribed*E.rpx1,Q.idealAlign=E.pxmid[0]<0?"left":"right"),w&&(Q.x=Y,Q.idealAlign=Y<0?"left":"right");var oe=[];S.loneHover(Q,{container:T._hoverlayer.node(),outerContainer:T._paper.node(),gd:l,inOut_bbox:oe}),V[0].bbox=oe[0],u._hasHoverLabel=!0}if(w){var $=f.select("path.surface");h.styleOne($,E,s,l,{hovered:!0})}u._hasHoverEvent=!0,l.emit("plotly_hover",{points:V||[a(E,s,h.eventDataKeys)],event:g.event})}},_=function(E){var T=l._fullLayout,s=l._fullData[u.index],L=g.select(this).datum();if(u._hasHoverEvent&&(E.originalEvent=g.event,l.emit("plotly_unhover",{points:[a(L,s,h.eventDataKeys)],event:g.event}),u._hasHoverEvent=!1),u._hasHoverLabel&&(S.loneUnhover(T._hoverlayer.node()),u._hasHoverLabel=!1),w){var M=f.select("path.surface");h.styleOne(M,L,s,l,{hovered:!1})}},y=function(E){var T=l._fullLayout,s=l._fullData[u.index],L=d&&(p.isHierarchyRoot(E)||p.isLeaf(E)),M=p.getPtId(E),z=p.isEntry(E)?p.findEntryWithChild(o,M):p.findEntryWithLevel(o,M),D=p.getPtId(z),N={points:[a(E,s,h.eventDataKeys)],event:g.event};L||(N.nextLevel=D);var I=v.triggerHandler(l,"plotly_"+u.type+"click",N);if(I!==!1&&T.hovermode&&(l._hoverdata=[a(E,s,h.eventDataKeys)],S.click(l,g.event)),!L&&I!==!1&&!l._dragging&&!l._transitioning){C.call("_storeDirectGUIEdit",s,T._tracePreGUI[s.uid],{level:s.level});var k={data:[{level:D}],traces:[u.index]},B={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(T._hoverlayer.node()),C.call("animate",l,k,B)}};f.on("mouseover",A),f.on("mouseout",_),f.on("click",y)};function a(n,f,c){for(var l=n.data.data,m={curveNumber:f.index,pointNumber:l.i,data:f._input,fullData:f},h=0;h0)},U.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},U.isHeader=function(r,t){return!(U.isLeaf(r)||r.depth===t._maxDepth-1)};function p(r){return r.data.data.pid}U.getParent=function(r,t){return U.findEntryWithLevel(r,p(t))},U.listPath=function(r,t){var a=r.parent;if(!a)return[];var n=t?[a.data[t]]:[a];return U.listPath(a,t).concat(n)},U.getPath=function(r){return U.listPath(r,"label").join("/")+"/"},U.formatValue=S.formatPieValue,U.formatPercent=function(r,t){var a=g.formatPercent(r,0);return a==="0%"&&(a=S.formatPiePercent(r,t)),a}},5621:function(H,U,e){H.exports={moduleType:"trace",name:"sunburst",basePlotModule:e(54904),categories:[],animatable:!0,attributes:e(424),layoutAttributes:e(84920),supplyDefaults:e(25244),supplyLayoutDefaults:e(28732),calc:e(3776).calc,crossTraceCalc:e(3776).crossTraceCalc,plot:e(96488).plot,style:e(85676).style,colorbar:e(5528),meta:{}}},84920:function(H){H.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},28732:function(H,U,e){var g=e(3400),C=e(84920);H.exports=function(S,x){function v(p,r){return g.coerce(S,x,C,p,r)}v("sunburstcolorway",x.colorway),v("extendsunburstcolors")}},96488:function(H,U,e){var g=e(33428),C=e(74148),i=e(67756).qy,S=e(43616),x=e(3400),v=e(72736),p=e(82744),r=p.recordMinTextSize,t=p.clearMinTextSize,a=e(37820),n=e(69656).getRotationAngle,f=a.computeTransform,c=a.transformInsideText,l=e(85676).styleOne,m=e(60100).resizeText,h=e(45716),b=e(27328),u=e(78176);U.plot=function(y,E,T,s){var L=y._fullLayout,M=L._sunburstlayer,z,D,N=!T,I=!L.uniformtext.mode&&u.hasTransition(T);if(t("sunburst",L),z=M.selectAll("g.trace.sunburst").data(E,function(B){return B[0].trace.uid}),z.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),z.order(),I){s&&(D=s());var k=g.transition().duration(T.duration).ease(T.easing).each("end",function(){D&&D()}).each("interrupt",function(){D&&D()});k.each(function(){M.selectAll("g.trace").each(function(B){o(y,B,this,T)})})}else z.each(function(B){o(y,B,this,T)}),L.uniformtext.mode&&m(y,L._sunburstlayer.selectAll(".trace"),"sunburst");N&&z.exit().remove()};function o(y,E,T,s){var L=y._context.staticPlot,M=y._fullLayout,z=!M.uniformtext.mode&&u.hasTransition(s),D=g.select(T),N=D.selectAll("g.slice"),I=E[0],k=I.trace,B=I.hierarchy,O=u.findEntryWithLevel(B,k.level),V=u.getMaxDepth(k),Y=M._size,j=k.domain,te=Y.w*(j.x[1]-j.x[0]),ie=Y.h*(j.y[1]-j.y[0]),ue=.5*Math.min(te,ie),J=I.cx=Y.l+Y.w*(j.x[1]+j.x[0])/2,X=I.cy=Y.t+Y.h*(1-j.y[0])-ie/2;if(!O)return N.remove();var ee=null,G={};z&&N.each(function(He){G[u.getPtId(He)]={rpx0:He.rpx0,rpx1:He.rpx1,x0:He.x0,x1:He.x1,transform:He.transform},!ee&&u.isEntry(He)&&(ee=He)});var Q=d(O).descendants(),oe=O.height+1,$=0,Z=V;I.hasMultipleRoots&&u.isHierarchyRoot(O)&&(Q=Q.slice(1),oe-=1,$=1,Z+=1),Q=Q.filter(function(He){return He.y1<=Z});var se=n(k.rotation);se&&Q.forEach(function(He){He.x0+=se,He.x1+=se});var ne=Math.min(oe,V),ce=function(He){return(He-$)/ne*ue},ge=function(He,Ie){return[He*Math.cos(Ie),-He*Math.sin(Ie)]},Te=function(He){return x.pathAnnulus(He.rpx0,He.rpx1,He.x0,He.x1,J,X)},we=function(He){return J+A(He)[0]*(He.transform.rCenter||0)+(He.transform.x||0)},Re=function(He){return X+A(He)[1]*(He.transform.rCenter||0)+(He.transform.y||0)};N=N.data(Q,u.getPtId),N.enter().append("g").classed("slice",!0),z?N.exit().transition().each(function(){var He=g.select(this),Ie=He.select("path.surface");Ie.transition().attrTween("d",function(Ke){var $e=Le(Ke);return function(lt){return Te($e(lt))}});var rt=He.select("g.slicetext");rt.attr("opacity",0)}).remove():N.exit().remove(),N.order();var be=null;if(z&&ee){var Ae=u.getPtId(ee);N.each(function(He){be===null&&u.getPtId(He)===Ae&&(be=He.x1)})}var me=N;z&&(me=me.transition().each("end",function(){var He=g.select(this);u.setSliceCursor(He,y,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),me.each(function(He){var Ie=g.select(this),rt=x.ensureSingle(Ie,"path","surface",function(xt){xt.style("pointer-events",L?"none":"all")});He.rpx0=ce(He.y0),He.rpx1=ce(He.y1),He.xmid=(He.x0+He.x1)/2,He.pxmid=ge(He.rpx1,He.xmid),He.midangle=-(He.xmid-Math.PI/2),He.startangle=-(He.x0-Math.PI/2),He.stopangle=-(He.x1-Math.PI/2),He.halfangle=.5*Math.min(x.angleDelta(He.x0,He.x1)||Math.PI,Math.PI),He.ring=1-He.rpx0/He.rpx1,He.rInscribed=w(He),z?rt.transition().attrTween("d",function(xt){var St=Ve(xt);return function(nt){return Te(St(nt))}}):rt.attr("d",Te),Ie.call(h,O,y,E,{eventDataKeys:b.eventDataKeys,transitionTime:b.CLICK_TRANSITION_TIME,transitionEasing:b.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,y,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:y._transitioning}),rt.call(l,He,k,y);var Ke=x.ensureSingle(Ie,"g","slicetext"),$e=x.ensureSingle(Ke,"text","",function(xt){xt.attr("data-notex",1)}),lt=x.ensureUniformFontSize(y,u.determineTextFont(k,He,M.font));$e.text(U.formatSliceLabel(He,O,k,E,M)).classed("slicetext",!0).attr("text-anchor","middle").call(S.font,lt).call(v.convertToTspans,y);var ht=S.bBox($e.node());He.transform=c(ht,He,I),He.transform.targetX=we(He),He.transform.targetY=Re(He);var dt=function(xt,St){var nt=xt.transform;return f(nt,St),nt.fontSize=lt.size,r(k.type,nt,M),x.getTextTransform(nt)};z?$e.transition().attrTween("transform",function(xt){var St=Ue(xt);return function(nt){return dt(St(nt),ht)}}):$e.attr("transform",dt(He,ht))});function Le(He){var Ie=u.getPtId(He),rt=G[Ie],Ke=G[u.getPtId(O)],$e;if(Ke){var lt=(He.x1>Ke.x1?2*Math.PI:0)+se;$e=He.rpx1be?2*Math.PI:0)+se;rt={x0:$e,x1:$e}}else rt={rpx0:ue,rpx1:ue},x.extendFlat(rt,ke(He));else rt={rpx0:0,rpx1:0};else rt={x0:se,x1:se};return i(rt,Ke)}function Ue(He){var Ie=G[u.getPtId(He)],rt,Ke=He.transform;if(Ie)rt=Ie;else if(rt={rpx1:He.rpx1,transform:{textPosAngle:Ke.textPosAngle,scale:0,rotate:Ke.rotate,rCenter:Ke.rCenter,x:Ke.x,y:Ke.y}},ee)if(He.parent)if(be){var $e=He.x1>be?2*Math.PI:0;rt.x0=rt.x1=$e}else x.extendFlat(rt,ke(He));else rt.x0=rt.x1=se;else rt.x0=rt.x1=se;var lt=i(rt.transform.textPosAngle,He.transform.textPosAngle),ht=i(rt.rpx1,He.rpx1),dt=i(rt.x0,He.x0),xt=i(rt.x1,He.x1),St=i(rt.transform.scale,Ke.scale),nt=i(rt.transform.rotate,Ke.rotate),ze=Ke.rCenter===0?3:rt.transform.rCenter===0?1/3:1,Ze=i(rt.transform.rCenter,Ke.rCenter),Je=function(We){return Ze(Math.pow(We,ze))};return function(We){var Fe=ht(We),xe=dt(We),ye=xt(We),Ee=Je(We),Me=ge(Fe,(xe+ye)/2),Ne=lt(We),je={pxmid:Me,rpx1:Fe,transform:{textPosAngle:Ne,rCenter:Ee,x:Ke.x,y:Ke.y}};return r(k.type,Ke,M),{transform:{targetX:we(je),targetY:Re(je),scale:St(We),rotate:nt(We),rCenter:Ee}}}}function ke(He){var Ie=He.parent,rt=G[u.getPtId(Ie)],Ke={};if(rt){var $e=Ie.children,lt=$e.indexOf(He),ht=$e.length,dt=i(rt.x0,rt.x1);Ke.x0=dt(lt/ht),Ke.x1=dt(lt/ht)}else Ke.x0=Ke.x1=0;return Ke}}function d(y){return C.partition().size([2*Math.PI,y.height+1])(y)}U.formatSliceLabel=function(y,E,T,s,L){var M=T.texttemplate,z=T.textinfo;if(!M&&(!z||z==="none"))return"";var D=L.separators,N=s[0],I=y.data.data,k=N.hierarchy,B=u.isHierarchyRoot(y),O=u.getParent(k,y),V=u.getValue(y);if(!M){var Y=z.split("+"),j=function($){return Y.indexOf($)!==-1},te=[],ie;if(j("label")&&I.label&&te.push(I.label),I.hasOwnProperty("v")&&j("value")&&te.push(u.formatValue(I.v,D)),!B){j("current path")&&te.push(u.getPath(y.data));var ue=0;j("percent parent")&&ue++,j("percent entry")&&ue++,j("percent root")&&ue++;var J=ue>1;if(ue){var X,ee=function($){ie=u.formatPercent(X,D),J&&(ie+=" of "+$),te.push(ie)};j("percent parent")&&!B&&(X=V/u.getValue(O),ee("parent")),j("percent entry")&&(X=V/u.getValue(E),ee("entry")),j("percent root")&&(X=V/u.getValue(k),ee("root"))}}return j("text")&&(ie=x.castOption(T,I.i,"text"),x.isValidTextValue(ie)&&te.push(ie)),te.join("
    ")}var G=x.castOption(T,I.i,"texttemplate");if(!G)return"";var Q={};I.label&&(Q.label=I.label),I.hasOwnProperty("v")&&(Q.value=I.v,Q.valueLabel=u.formatValue(I.v,D)),Q.currentPath=u.getPath(y.data),B||(Q.percentParent=V/u.getValue(O),Q.percentParentLabel=u.formatPercent(Q.percentParent,D),Q.parent=u.getPtLabel(O)),Q.percentEntry=V/u.getValue(E),Q.percentEntryLabel=u.formatPercent(Q.percentEntry,D),Q.entry=u.getPtLabel(E),Q.percentRoot=V/u.getValue(k),Q.percentRootLabel=u.formatPercent(Q.percentRoot,D),Q.root=u.getPtLabel(k),I.hasOwnProperty("color")&&(Q.color=I.color);var oe=x.castOption(T,I.i,"text");return(x.isValidTextValue(oe)||oe==="")&&(Q.text=oe),Q.customdata=x.castOption(T,I.i,"customdata"),x.texttemplateString(G,Q,L._d3locale,Q,T._meta||{})};function w(y){return y.rpx0===0&&x.isFullCircle([y.x0,y.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(y.halfangle)),y.ring/2))}function A(y){return _(y.rpx1,y.transform.textPosAngle)}function _(y,E){return[y*Math.sin(E),-y*Math.cos(E)]}},85676:function(H,U,e){var g=e(33428),C=e(76308),i=e(3400),S=e(82744).resizeText,x=e(60404);function v(r){var t=r._fullLayout._sunburstlayer.selectAll(".trace");S(r,t,"sunburst"),t.each(function(a){var n=g.select(this),f=a[0],c=f.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(l){g.select(this).call(p,l,c,r)})})}function p(r,t,a,n){var f=t.data.data,c=!t.children,l=f.i,m=i.castOption(a,l,"marker.line.color")||C.defaultLine,h=i.castOption(a,l,"marker.line.width")||0;r.call(x,t,a,n).style("stroke-width",h).call(C.stroke,m).style("opacity",c?a.leaf.opacity:null)}H.exports={style:v,styleOne:p}},16716:function(H,U,e){var g=e(76308),C=e(49084),i=e(29736).axisHoverFormat,S=e(21776).Ks,x=e(45464),v=e(92880).extendFlat,p=e(67824).overrideAll;function r(n){return{valType:"boolean",dflt:!1}}function t(n){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:r(),y:r(),z:r()},color:{valType:"color",dflt:g.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:g.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var a=H.exports=p(v({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:S(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},C("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:t(),y:t(),z:t()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:v({},C.zauto,{}),zmin:v({},C.zmin,{}),zmax:v({},C.zmax,{})},hoverinfo:v({},x.hoverinfo),showlegend:v({},x.showlegend,{dflt:!1})}),"calc","nested");a.x.editType=a.y.editType=a.z.editType="calc+clearAxisTypes",a.transforms=void 0},56576:function(H,U,e){var g=e(47128);H.exports=function(i,S){S.surfacecolor?g(i,S,{vals:S.surfacecolor,containerStr:"",cLetter:"c"}):g(i,S,{vals:S.z,containerStr:"",cLetter:"c"})}},79164:function(H,U,e){var g=e(67792).gl_surface3d,C=e(67792).ndarray,i=e(67792).ndarray_linear_interpolate.d2,S=e(70448),x=e(11240),v=e(3400).isArrayOrTypedArray,p=e(33040).parseColorScale,r=e(43080),t=e(8932).extractOpts;function a(s,L,M){this.scene=s,this.uid=M,this.surface=L,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var n=a.prototype;n.getXat=function(s,L,M,z){var D=v(this.data.x)?v(this.data.x[0])?this.data.x[L][s]:this.data.x[s]:s;return M===void 0?D:z.d2l(D,0,M)},n.getYat=function(s,L,M,z){var D=v(this.data.y)?v(this.data.y[0])?this.data.y[L][s]:this.data.y[L]:L;return M===void 0?D:z.d2l(D,0,M)},n.getZat=function(s,L,M,z){var D=this.data.z[L][s];return D===null&&this.data.connectgaps&&this.data._interpolatedZ&&(D=this.data._interpolatedZ[L][s]),M===void 0?D:z.d2l(D,0,M)},n.handlePick=function(s){if(s.object===this.surface){var L=(s.data.index[0]-1)/this.dataScaleX-1,M=(s.data.index[1]-1)/this.dataScaleY-1,z=Math.max(Math.min(Math.round(L),this.data.z[0].length-1),0),D=Math.max(Math.min(Math.round(M),this.data._ylength-1),0);s.index=[z,D],s.traceCoordinate=[this.getXat(z,D),this.getYat(z,D),this.getZat(z,D)],s.dataCoordinate=[this.getXat(z,D,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(z,D,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(z,D,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var N=0;N<3;N++){var I=s.dataCoordinate[N];I!=null&&(s.dataCoordinate[N]*=this.scene.dataScale[N])}var k=this.data.hovertext||this.data.text;return v(k)&&k[D]&&k[D][z]!==void 0?s.textLabel=k[D][z]:k?s.textLabel=k:s.textLabel="",s.data.dataCoordinate=s.dataCoordinate.slice(),this.surface.highlight(s.data),this.scene.glplot.spikes.position=s.dataCoordinate,!0}};function f(s){var L=s[0].rgb,M=s[s.length-1].rgb;return L[0]===M[0]&&L[1]===M[1]&&L[2]===M[2]&&L[3]===M[3]}var c=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function l(s,L){if(s0){M=c[z];break}return M}function b(s,L){if(!(s<1||L<1)){for(var M=m(s),z=m(L),D=1,N=0;Nw;)z--,z/=h(z),z++,z1?D:1};function A(s,L,M){var z=M[8]+M[2]*L[0]+M[5]*L[1];return s[0]=(M[6]+M[0]*L[0]+M[3]*L[1])/z,s[1]=(M[7]+M[1]*L[0]+M[4]*L[1])/z,s}function _(s,L,M){return y(s,L,A,M),s}function y(s,L,M,z){for(var D=[0,0],N=s.shape[0],I=s.shape[1],k=0;k0&&this.contourStart[z]!==null&&this.contourEnd[z]!==null&&this.contourEnd[z]>this.contourStart[z]))for(L[z]=!0,D=this.contourStart[z];Dj&&(this.minValues[O]=j),this.maxValues[O]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},55992:function(H,U,e){var g=e(23536),C=e(92880).extendFlat,i=e(38248),S=e(38116).isTypedArray,x=e(38116).isArrayOrTypedArray;H.exports=function(m,h){var b=r(h.cells.values),u=function(j){return j.slice(h.header.values.length,j.length)},o=r(h.header.values);o.length&&!o[0].length&&(o[0]=[""],o=r(o));var d=o.concat(u(b).map(function(){return t((o[0]||[""]).length)})),w=h.domain,A=Math.floor(m._fullLayout._size.w*(w.x[1]-w.x[0])),_=Math.floor(m._fullLayout._size.h*(w.y[1]-w.y[0])),y=h.header.values.length?d[0].map(function(){return h.header.height}):[g.emptyHeaderHeight],E=b.length?b[0].map(function(){return h.cells.height}):[],T=y.reduce(p,0),s=_-T,L=s+g.uplift,M=f(E,L),z=f(y,T),D=n(z,[]),N=n(M,D),I={},k=h._fullInput.columnorder;x(k)&&(k=Array.from(k)),k=k.concat(u(b.map(function(j,te){return te})));var B=d.map(function(j,te){var ie=x(h.columnwidth)?h.columnwidth[Math.min(te,h.columnwidth.length-1)]:h.columnwidth;return i(ie)?Number(ie):1}),O=B.reduce(p,0);B=B.map(function(j){return j/O*A});var V=Math.max(v(h.header.line.width),v(h.cells.line.width)),Y={key:h.uid+m._context.staticPlot,translateX:w.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-w.y[1]),size:m._fullLayout._size,width:A,maxLineWidth:V,height:_,columnOrder:k,groupHeight:_,rowBlocks:N,headerRowBlocks:D,scrollY:0,cells:C({},h.cells,{values:b}),headerCells:C({},h.header,{values:d}),gdColumns:d.map(function(j){return j[0]}),gdColumnsOriginalOrder:d.map(function(j){return j[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:d.map(function(j,te){var ie=I[j];I[j]=(ie||0)+1;var ue=j+"__"+I[j];return{key:ue,label:j,specIndex:te,xIndex:k[te],xScale:a,x:void 0,calcdata:void 0,columnWidth:B[te]}})};return Y.columns.forEach(function(j){j.calcdata=Y,j.x=a(j)}),Y};function v(l){if(x(l)){for(var m=0,h=0;h=m||_===l.length-1)&&(h[u]=d,d.key=A++,d.firstRowIndex=w,d.lastRowIndex=_,d=c(),u+=o,w=_+1,o=0);return h}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}},53056:function(H,U,e){var g=e(92880).extendFlat;U.splitToPanels=function(i){var S=[0,0],x=g({},i,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:i.calcdata.headerCells.values[i.specIndex],rowBlocks:i.calcdata.headerRowBlocks,calcdata:g({},i.calcdata,{cells:i.calcdata.headerCells})}),v=g({},i,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:i.calcdata.cells.values[i.specIndex],rowBlocks:i.calcdata.rowBlocks}),p=g({},i,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:i.calcdata.cells.values[i.specIndex],rowBlocks:i.calcdata.rowBlocks});return[v,p,x]},U.splitToCells=function(i){var S=C(i);return(i.values||[]).slice(S[0],S[1]).map(function(x,v){var p=typeof x=="string"&&x.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:v+p,key:S[0]+v,column:i,calcdata:i.calcdata,page:i.page,rowBlocks:i.rowBlocks,value:x}})};function C(i){var S=i.rowBlocks[i.page],x=S?S.rows[0].rowIndex:0,v=S?x+S.rows.length:0;return[x,v]}},53212:function(H,U,e){var g=e(3400),C=e(60520),i=e(86968).Q;function S(x,v){for(var p=x.columnorder||[],r=x.header.values.length,t=p.slice(0,r),a=t.slice().sort(function(c,l){return c-l}),n=t.map(function(c){return a.indexOf(c)}),f=n.length;f/i),me=!be||Ae;ge.mayHaveMarkup=be&&Re.match(/[<&>]/);var Le=M(Re);ge.latex=Le;var Ve=Le?"":N(ge.calcdata.cells.prefix,Te,we)||"",Ue=Le?"":N(ge.calcdata.cells.suffix,Te,we)||"",ke=Le?null:N(ge.calcdata.cells.format,Te,we)||null,He=Ve+(ke?S(ke)(ge.value):ge.value)+Ue,Ie;ge.wrappingNeeded=!ge.wrapped&&!me&&!Le&&(Ie=z(He)),ge.cellHeightMayIncrease=Ae||Le||ge.mayHaveMarkup||(Ie===void 0?z(He):Ie),ge.needsConvertToTspans=ge.mayHaveMarkup||ge.wrappingNeeded||ge.latex;var rt;if(ge.wrappingNeeded){var Ke=g.wrapSplitCharacter===" "?He.replace(/ge&&ce.push(Te),ge+=be}return ce}function Y(Z,se,ne){var ce=b(se)[0];if(ce!==void 0){var ge=ce.rowBlocks,Te=ce.calcdata,we=ee(ge,ge.length),Re=ce.calcdata.groupHeight-O(ce),be=Te.scrollY=Math.max(0,Math.min(we-Re,Te.scrollY)),Ae=V(ge,be,Re);Ae.length===1&&(Ae[0]===ge.length-1?Ae.unshift(Ae[0]-1):Ae.push(Ae[0]+1)),Ae[0]%2&&Ae.reverse(),se.each(function(me,Le){me.page=Ae[Le],me.scrollY=be}),se.attr("transform",function(me){var Le=ee(me.rowBlocks,me.page)-me.scrollY;return t(0,Le)}),Z&&(te(Z,ne,se,Ae,ce.prevPages,ce,0),te(Z,ne,se,Ae,ce.prevPages,ce,1),u(ne,Z))}}function j(Z,se,ne,ce){return function(Te){var we=Te.calcdata?Te.calcdata:Te,Re=se.filter(function(Le){return we.key===Le.key}),be=ne||we.scrollbarState.dragMultiplier,Ae=we.scrollY;we.scrollY=ce===void 0?we.scrollY+be*C.event.dy:ce;var me=Re.selectAll("."+g.cn.yColumn).selectAll("."+g.cn.columnBlock).filter(k);return Y(Z,me,Re),we.scrollY===Ae}}function te(Z,se,ne,ce,ge,Te,we){var Re=ce[we]!==ge[we];Re&&(clearTimeout(Te.currentRepaint[we]),Te.currentRepaint[we]=setTimeout(function(){var be=ne.filter(function(Ae,me){return me===we&&ce[me]!==ge[me]});o(Z,se,be,ne),ge[we]=ce[we]}))}function ie(Z,se,ne,ce){return function(){var Te=C.select(se.parentNode);Te.each(function(we){var Re=we.fragments;Te.selectAll("tspan.line").each(function(He,Ie){Re[Ie].width=this.getComputedTextLength()});var be=Re[Re.length-1].width,Ae=Re.slice(0,-1),me=[],Le,Ve,Ue=0,ke=we.column.columnWidth-2*g.cellPad;for(we.value="";Ae.length;)Le=Ae.shift(),Ve=Le.width+be,Ue+Ve>ke&&(we.value+=me.join(g.wrapSpacer)+g.lineBreaker,me=[],Ue=0),me.push(Le.text),Ue+=Ve;Ue&&(we.value+=me.join(g.wrapSpacer)),we.wrapped=!0}),Te.selectAll("tspan.line").remove(),L(Te.select("."+g.cn.cellText),ne,Z,ce),C.select(se.parentNode.parentNode).call(X)}}function ue(Z,se,ne,ce,ge){return function(){if(!ge.settledY){var we=C.select(se.parentNode),Re=oe(ge),be=ge.key-Re.firstRowIndex,Ae=Re.rows[be].rowHeight,me=ge.cellHeightMayIncrease?se.parentNode.getBoundingClientRect().height+2*g.cellPad:Ae,Le=Math.max(me,Ae),Ve=Le-Re.rows[be].rowHeight;Ve&&(Re.rows[be].rowHeight=Le,Z.selectAll("."+g.cn.columnCell).call(X),Y(null,Z.filter(k),0),u(ne,ce,!0)),we.attr("transform",function(){var Ue=this,ke=Ue.parentNode,He=ke.getBoundingClientRect(),Ie=C.select(Ue.parentNode).select("."+g.cn.cellRect).node().getBoundingClientRect(),rt=Ue.transform.baseVal.consolidate(),Ke=Ie.top-He.top+(rt?rt.matrix.f:g.cellPad);return t(J(ge,C.select(Ue.parentNode).select("."+g.cn.cellTextHolder).node().getBoundingClientRect().width),Ke)}),ge.settledY=!0}}}function J(Z,se){switch(Z.align){case"left":return g.cellPad;case"right":return Z.column.columnWidth-(se||0)-g.cellPad;case"center":return(Z.column.columnWidth-(se||0))/2;default:return g.cellPad}}function X(Z){Z.attr("transform",function(se){var ne=se.rowBlocks[0].auxiliaryBlocks.reduce(function(we,Re){return we+G(Re,1/0)},0),ce=oe(se),ge=G(ce,se.key),Te=ge+ne;return t(0,Te)}).selectAll("."+g.cn.cellRect).attr("height",function(se){return $(oe(se),se.key).rowHeight})}function ee(Z,se){for(var ne=0,ce=se-1;ce>=0;ce--)ne+=Q(Z[ce]);return ne}function G(Z,se){for(var ne=0,ce=0;ce","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},x.textfont,{}),editType:"calc"},text:x.text,textinfo:v.textinfo,texttemplate:C({editType:"plot"},{keys:p.eventDataKeys.concat(["label","value"])}),hovertext:x.hovertext,hoverinfo:v.hoverinfo,hovertemplate:g({},{keys:p.eventDataKeys}),textfont:x.textfont,insidetextfont:x.insidetextfont,outsidetextfont:r({},x.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:x.sort,root:v.root,domain:S({name:"treemap",trace:!0,editType:"calc"})}},79516:function(H,U,e){var g=e(7316);U.name="treemap",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},97840:function(H,U,e){var g=e(3776);U.r=function(C,i){return g.calc(C,i)},U.q=function(C){return g._runCrossTraceCalc("treemap",C)}},32984:function(H){H.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},34092:function(H,U,e){var g=e(3400),C=e(40516),i=e(76308),S=e(86968).Q,x=e(31508).handleText,v=e(78048).TEXTPAD,p=e(74174).handleMarkerDefaults,r=e(8932),t=r.hasColorscale,a=r.handleDefaults;H.exports=function(f,c,l,m){function h(s,L){return g.coerce(f,c,C,s,L)}var b=h("labels"),u=h("parents");if(!b||!b.length||!u||!u.length){c.visible=!1;return}var o=h("values");o&&o.length?h("branchvalues"):h("count"),h("level"),h("maxdepth");var d=h("tiling.packing");d==="squarify"&&h("tiling.squarifyratio"),h("tiling.flip"),h("tiling.pad");var w=h("text");h("texttemplate"),c.texttemplate||h("textinfo",g.isArrayOrTypedArray(w)?"text+label":"label"),h("hovertext"),h("hovertemplate");var A=h("pathbar.visible"),_="auto";x(f,c,m,h,_,{hasPathbar:A,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var y=c.textposition.indexOf("bottom")!==-1;p(f,c,m,h);var E=c._hasColorscale=t(f,"marker","colors")||(f.marker||{}).coloraxis;E?a(f,c,m,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(c.marker.colors||[]).length);var T=c.textfont.size*2;h("marker.pad.t",y?T/4:T),h("marker.pad.l",T/4),h("marker.pad.r",T/4),h("marker.pad.b",y?T:T/4),h("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:i.contrast(m.paper_bgcolor)}}},A&&(h("pathbar.thickness",c.pathbar.textfont.size+2*v),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),S(c,m,h),c._length=null}},95808:function(H,U,e){var g=e(33428),C=e(78176),i=e(82744),S=i.clearMinTextSize,x=e(60100).resizeText,v=e(52960);H.exports=function(r,t,a,n,f){var c=f.type,l=f.drawDescendants,m=r._fullLayout,h=m["_"+c+"layer"],b,u,o=!a;if(S(c,m),b=h.selectAll("g.trace."+c).data(t,function(w){return w[0].trace.uid}),b.enter().append("g").classed("trace",!0).classed(c,!0),b.order(),!m.uniformtext.mode&&C.hasTransition(a)){n&&(u=n());var d=g.transition().duration(a.duration).ease(a.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});d.each(function(){h.selectAll("g.trace").each(function(w){v(r,w,this,a,l)})})}else b.each(function(w){v(r,w,this,a,l)}),m.uniformtext.mode&&x(r,h.selectAll(".trace"),c);o&&b.exit().remove()}},27336:function(H,U,e){var g=e(33428),C=e(3400),i=e(43616),S=e(72736),x=e(13832),v=e(66192).styleOne,p=e(32984),r=e(78176),t=e(45716),a=!0;H.exports=function(f,c,l,m,h){var b=h.barDifY,u=h.width,o=h.height,d=h.viewX,w=h.viewY,A=h.pathSlice,_=h.toMoveInsideSlice,y=h.strTransform,E=h.hasTransition,T=h.handleSlicesExit,s=h.makeUpdateSliceInterpolator,L=h.makeUpdateTextInterpolator,M={},z=f._context.staticPlot,D=f._fullLayout,N=c[0],I=N.trace,k=N.hierarchy,B=u/I._entryDepth,O=r.listPath(l.data,"id"),V=x(k.copy(),[u,o],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();V=V.filter(function(j){var te=O.indexOf(j.data.id);return te===-1?!1:(j.x0=B*te,j.x1=B*(te+1),j.y0=b,j.y1=b+o,j.onPathbar=!0,!0)}),V.reverse(),m=m.data(V,r.getPtId),m.enter().append("g").classed("pathbar",!0),T(m,a,M,[u,o],A),m.order();var Y=m;E&&(Y=Y.transition().each("end",function(){var j=g.select(this);r.setSliceCursor(j,f,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),Y.each(function(j){j._x0=d(j.x0),j._x1=d(j.x1),j._y0=w(j.y0),j._y1=w(j.y1),j._hoverX=d(j.x1-Math.min(u,o)/2),j._hoverY=w(j.y1-o/2);var te=g.select(this),ie=C.ensureSingle(te,"path","surface",function(ee){ee.style("pointer-events",z?"none":"all")});E?ie.transition().attrTween("d",function(ee){var G=s(ee,a,M,[u,o]);return function(Q){return A(G(Q))}}):ie.attr("d",A),te.call(t,l,f,c,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,f,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:f._transitioning}),ie.call(v,j,I,f,{hovered:!1}),j._text=(r.getPtLabel(j)||"").split("
    ").join(" ")||"";var ue=C.ensureSingle(te,"g","slicetext"),J=C.ensureSingle(ue,"text","",function(ee){ee.attr("data-notex",1)}),X=C.ensureUniformFontSize(f,r.determineTextFont(I,j,D.font,{onPathbar:!0}));J.text(j._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,X).call(S.convertToTspans,f),j.textBB=i.bBox(J.node()),j.transform=_(j,{fontSize:X.size,onPathbar:!0}),j.transform.fontSize=X.size,E?J.transition().attrTween("transform",function(ee){var G=L(ee,a,M,[u,o]);return function(Q){return y(G(Q))}}):J.attr("transform",y(j))})}},76477:function(H,U,e){var g=e(33428),C=e(3400),i=e(43616),S=e(72736),x=e(13832),v=e(66192).styleOne,p=e(32984),r=e(78176),t=e(45716),a=e(96488).formatSliceLabel,n=!1;H.exports=function(c,l,m,h,b){var u=b.width,o=b.height,d=b.viewX,w=b.viewY,A=b.pathSlice,_=b.toMoveInsideSlice,y=b.strTransform,E=b.hasTransition,T=b.handleSlicesExit,s=b.makeUpdateSliceInterpolator,L=b.makeUpdateTextInterpolator,M=b.prevEntry,z={},D=c._context.staticPlot,N=c._fullLayout,I=l[0],k=I.trace,B=k.textposition.indexOf("left")!==-1,O=k.textposition.indexOf("right")!==-1,V=k.textposition.indexOf("bottom")!==-1,Y=!V&&!k.marker.pad.t||V&&!k.marker.pad.b,j=x(m,[u,o],{packing:k.tiling.packing,squarifyratio:k.tiling.squarifyratio,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1,pad:{inner:k.tiling.pad,top:k.marker.pad.t,left:k.marker.pad.l,right:k.marker.pad.r,bottom:k.marker.pad.b}}),te=j.descendants(),ie=1/0,ue=-1/0;te.forEach(function(Q){var oe=Q.depth;oe>=k._maxDepth?(Q.x0=Q.x1=(Q.x0+Q.x1)/2,Q.y0=Q.y1=(Q.y0+Q.y1)/2):(ie=Math.min(ie,oe),ue=Math.max(ue,oe))}),h=h.data(te,r.getPtId),k._maxVisibleLayers=isFinite(ue)?ue-ie+1:0,h.enter().append("g").classed("slice",!0),T(h,n,z,[u,o],A),h.order();var J=null;if(E&&M){var X=r.getPtId(M);h.each(function(Q){J===null&&r.getPtId(Q)===X&&(J={x0:Q.x0,x1:Q.x1,y0:Q.y0,y1:Q.y1})})}var ee=function(){return J||{x0:0,x1:u,y0:0,y1:o}},G=h;return E&&(G=G.transition().each("end",function(){var Q=g.select(this);r.setSliceCursor(Q,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),G.each(function(Q){var oe=r.isHeader(Q,k);Q._x0=d(Q.x0),Q._x1=d(Q.x1),Q._y0=w(Q.y0),Q._y1=w(Q.y1),Q._hoverX=d(Q.x1-k.marker.pad.r),Q._hoverY=w(V?Q.y1-k.marker.pad.b/2:Q.y0+k.marker.pad.t/2);var $=g.select(this),Z=C.ensureSingle($,"path","surface",function(we){we.style("pointer-events",D?"none":"all")});E?Z.transition().attrTween("d",function(we){var Re=s(we,n,ee(),[u,o]);return function(be){return A(Re(be))}}):Z.attr("d",A),$.call(t,m,c,l,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{isTransitioning:c._transitioning}),Z.call(v,Q,k,c,{hovered:!1}),Q.x0===Q.x1||Q.y0===Q.y1?Q._text="":oe?Q._text=Y?"":r.getPtLabel(Q)||"":Q._text=a(Q,m,k,l,N)||"";var se=C.ensureSingle($,"g","slicetext"),ne=C.ensureSingle(se,"text","",function(we){we.attr("data-notex",1)}),ce=C.ensureUniformFontSize(c,r.determineTextFont(k,Q,N.font)),ge=Q._text||" ",Te=oe&&ge.indexOf("
    ")===-1;ne.text(ge).classed("slicetext",!0).attr("text-anchor",O?"end":B||Te?"start":"middle").call(i.font,ce).call(S.convertToTspans,c),Q.textBB=i.bBox(ne.node()),Q.transform=_(Q,{fontSize:ce.size,isHeader:oe}),Q.transform.fontSize=ce.size,E?ne.transition().attrTween("transform",function(we){var Re=L(we,n,ee(),[u,o]);return function(be){return y(Re(be))}}):ne.attr("transform",y(Q))}),J}},83024:function(H){H.exports=function U(e,g,C){var i;C.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),C.flipX&&(i=e.x0,e.x0=g[0]-e.x1,e.x1=g[0]-i),C.flipY&&(i=e.y0,e.y0=g[1]-e.y1,e.y1=g[1]-i);var S=e.children;if(S)for(var x=0;x-1?O+j:-(Y+j):0,ie={x0:V,x1:V,y0:te,y1:te+Y},ue=function(ze,Ze,Je){var We=w.tiling.pad,Fe=function(Me){return Me-We<=Ze.x0},xe=function(Me){return Me+We>=Ze.x1},ye=function(Me){return Me-We<=Ze.y0},Ee=function(Me){return Me+We>=Ze.y1};return ze.x0===Ze.x0&&ze.x1===Ze.x1&&ze.y0===Ze.y0&&ze.y1===Ze.y1?{x0:ze.x0,x1:ze.x1,y0:ze.y0,y1:ze.y1}:{x0:Fe(ze.x0-We)?0:xe(ze.x0-We)?Je[0]:ze.x0,x1:Fe(ze.x1+We)?0:xe(ze.x1+We)?Je[0]:ze.x1,y0:ye(ze.y0-We)?0:Ee(ze.y0-We)?Je[1]:ze.y0,y1:ye(ze.y1+We)?0:Ee(ze.y1+We)?Je[1]:ze.y1}},J=null,X={},ee={},G=null,Q=function(ze,Ze){return Ze?X[f(ze)]:ee[f(ze)]},oe=function(ze,Ze,Je,We){if(Ze)return X[f(y)]||ie;var Fe=ee[w.level]||Je;return N(ze)?ue(ze,Fe,We):{}};d.hasMultipleRoots&&M&&D++,w._maxDepth=D,w._backgroundColor=o.paper_bgcolor,w._entryDepth=E.data.depth,w._atRootLevel=M;var $=-B/2+I.l+I.w*(k.x[1]+k.x[0])/2,Z=-O/2+I.t+I.h*(1-(k.y[1]+k.y[0])/2),se=function(ze){return $+ze},ne=function(ze){return Z+ze},ce=ne(0),ge=se(0),Te=function(ze){return ge+ze},we=function(ze){return ce+ze};function Re(ze,Ze){return ze+","+Ze}var be=Te(0),Ae=function(ze){ze.x=Math.max(be,ze.x)},me=w.pathbar.edgeshape,Le=function(ze){var Ze=Te(Math.max(Math.min(ze.x0,ze.x0),0)),Je=Te(Math.min(Math.max(ze.x1,ze.x1),V)),We=we(ze.y0),Fe=we(ze.y1),xe=Y/2,ye={},Ee={};ye.x=Ze,Ee.x=Je,ye.y=Ee.y=(We+Fe)/2;var Me={x:Ze,y:We},Ne={x:Je,y:We},je={x:Je,y:Fe},it={x:Ze,y:Fe};return me===">"?(Me.x-=xe,Ne.x-=xe,je.x-=xe,it.x-=xe):me==="/"?(je.x-=xe,it.x-=xe,ye.x-=xe/2,Ee.x-=xe/2):me==="\\"?(Me.x-=xe,Ne.x-=xe,ye.x-=xe/2,Ee.x-=xe/2):me==="<"&&(ye.x-=xe,Ee.x-=xe),Ae(Me),Ae(it),Ae(ye),Ae(Ne),Ae(je),Ae(Ee),"M"+Re(Me.x,Me.y)+"L"+Re(Ne.x,Ne.y)+"L"+Re(Ee.x,Ee.y)+"L"+Re(je.x,je.y)+"L"+Re(it.x,it.y)+"L"+Re(ye.x,ye.y)+"Z"},Ve=w[_?"tiling":"marker"].pad,Ue=function(ze){return w.textposition.indexOf(ze)!==-1},ke=Ue("top"),He=Ue("left"),Ie=Ue("right"),rt=Ue("bottom"),Ke=function(ze){var Ze=se(ze.x0),Je=se(ze.x1),We=ne(ze.y0),Fe=ne(ze.y1),xe=Je-Ze,ye=Fe-We;if(!xe||!ye)return"";var Ee=w.marker.cornerradius||0,Me=Math.min(Ee,xe/2,ye/2);Me&&ze.data&&ze.data.data&&ze.data.data.label&&(ke&&(Me=Math.min(Me,Ve.t)),He&&(Me=Math.min(Me,Ve.l)),Ie&&(Me=Math.min(Me,Ve.r)),rt&&(Me=Math.min(Me,Ve.b)));var Ne=function(je,it){return Me?"a"+Re(Me,Me)+" 0 0 1 "+Re(je,it):""};return"M"+Re(Ze,We+Me)+Ne(Me,-Me)+"L"+Re(Je-Me,We)+Ne(Me,Me)+"L"+Re(Je,Fe-Me)+Ne(-Me,Me)+"L"+Re(Ze+Me,Fe)+Ne(-Me,-Me)+"Z"},$e=function(ze,Ze){var Je=ze.x0,We=ze.x1,Fe=ze.y0,xe=ze.y1,ye=ze.textBB,Ee=ke||Ze.isHeader&&!rt,Me=Ee?"start":rt?"end":"middle",Ne=Ue("right"),je=Ue("left")||Ze.onPathbar,it=je?-1:Ne?1:0;if(Ze.isHeader){if(Je+=(_?Ve:Ve.l)-x,We-=(_?Ve:Ve.r)-x,Je>=We){var mt=(Je+We)/2;Je=mt,We=mt}var bt;rt?(bt=xe-(_?Ve:Ve.b),Fe0)for(var T=0;T0){var A=p.xa,_=p.ya,y,E,T,s,L;l.orientation==="h"?(L=r,y="y",T=_,E="x",s=A):(L=t,y="x",T=A,E="y",s=_);var M=c[p.index];if(L>=M.span[0]&&L<=M.span[1]){var z=C.extendFlat({},p),D=s.c2p(L,!0),N=x.getKdeValue(M,l,L),I=x.getPositionOnKdePath(M,l,D),k=T._offset,B=T._length;z[y+"0"]=I[0],z[y+"1"]=I[1],z[E+"0"]=z[E+"1"]=D,z[E+"Label"]=E+": "+i.hoverLabelText(s,L,l[E+"hoverformat"])+", "+c[0].t.labels.kde+" "+N.toFixed(3);for(var O=0,V=0;V")),c.color=v(m,w),[c]};function v(p,r){var t=p[r.dir].marker,a=t.color,n=t.line.color,f=t.line.width;if(C(a))return a;if(C(n)&&f)return n}},95952:function(H,U,e){H.exports={attributes:e(65776),layoutAttributes:e(91352),supplyDefaults:e(24224).supplyDefaults,crossTraceDefaults:e(24224).crossTraceDefaults,supplyLayoutDefaults:e(59464),calc:e(73540),crossTraceCalc:e(50152),plot:e(64488),style:e(12252).style,hoverPoints:e(94196),eventData:e(53256),selectPoints:e(45784),moduleType:"trace",name:"waterfall",basePlotModule:e(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},91352:function(H){H.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},59464:function(H,U,e){var g=e(3400),C=e(91352);H.exports=function(i,S,x){var v=!1;function p(a,n){return g.coerce(i,S,C,a,n)}for(var r=0;r0&&(o?L+="M"+T[0]+","+s[1]+"V"+s[0]:L+="M"+T[1]+","+s[0]+"H"+T[0]),d!=="between"&&(_.isSum||y path").each(function(h){if(!h.isBlank){var b=m[h.dir].marker;g.select(this).call(i.fill,b.color).call(i.stroke,b.line.color).call(C.dashLine,b.line.dash,b.line.width).style("opacity",m.selectedpoints&&!h.selected?S:1)}}),p(l,m,t),l.selectAll(".lines").each(function(){var h=m.connector.line;C.lineGroupStyle(g.select(this).selectAll("path"),h.width,h.color,h.dash)})})}H.exports={style:r}},84224:function(H,U,e){var g=e(54460),C=e(3400),i=e(73060),S=e(60468).W,x=e(39032).BADNUM;U.moduleType="transform",U.name="aggregate";var v=U.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},p=v.aggregations;U.supplyDefaults=function(c,l){var m={},h;function b(M,z){return C.coerce(c,m,v,M,z)}var u=b("enabled");if(!u)return m;var o=i.findArrayAttributes(l),d={};for(h=0;hw&&(w=E,A=y)}}return w?b(A):x};case"rms":return function(u,o){for(var d=0,w=0,A=0;A":return function(d){return u(d)>o};case">=":return function(d){return u(d)>=o};case"[]":return function(d){var w=u(d);return w>=o[0]&&w<=o[1]};case"()":return function(d){var w=u(d);return w>o[0]&&w=o[0]&&wo[0]&&w<=o[1]};case"][":return function(d){var w=u(d);return w<=o[0]||w>=o[1]};case")(":return function(d){var w=u(d);return wo[1]};case"](":return function(d){var w=u(d);return w<=o[0]||w>o[1]};case")[":return function(d){var w=u(d);return w=o[1]};case"{}":return function(d){return o.indexOf(u(d))!==-1};case"}{":return function(d){return o.indexOf(u(d))===-1}}}},32028:function(H,U,e){var g=e(3400),C=e(73060),i=e(7316),S=e(60468).W;U.moduleType="transform",U.name="groupby",U.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},U.supplyDefaults=function(v,p,r){var t,a={};function n(b,u){return g.coerce(v,a,U.attributes,b,u)}var f=n("enabled");if(!f)return a;n("groups"),n("nameformat",r._dataLength>1?"%{group} (%{trace})":"%{group}");var c=v.styles,l=a.styles=[];if(c)for(t=0;t>>8*E)%256/255}function h(y,E,T){for(var s=new Array(y*(i+4)),L=0,M=0;Mwt&&(wt=ot[nt].dim1.canvasX,gt=nt);st===0&&n(L,0,0,I.canvasWidth,I.canvasHeight);var Rt=J(T);for(nt=0;ntnt._length&&(Lt=Lt.slice(0,nt._length));var Ht=nt.tickvals,Ut;function kt($t,le){return{val:$t,text:Ut[le]}}function Vt($t,le){return $t.val-le.val}if(i(Ht)&&Ht.length){C.isTypedArray(Ht)&&(Ht=Array.from(Ht)),Ut=nt.ticktext,!i(Ut)||!Ut.length?Ut=Ht.map(S(nt.tickformat)):Ut.length>Ht.length?Ut=Ut.slice(0,Ht.length):Ht.length>Ut.length&&(Ht=Ht.slice(0,Ut.length));for(var It=1;It=le||Se>=he)return;var ne=Kt.lineLayer.readPixel(xe,he-1-Se),zt=ne[3]!==0,Xt=zt?ne[2]+256*(ne[1]+256*ne[0]):null,Jt={x:xe,y:Se,clientX:$t.clientX,clientY:$t.clientY,dataIndex:Kt.model.key,curveNumber:Xt};Xt!==gt&&(zt?X.hover(Jt):X.unhover&&X.unhover(Jt),gt=Xt)}}),ct.style("opacity",function(Kt){return Kt.pick?0:1}),Q.style("background","rgba(255, 255, 255, 0)");var wt=Q.selectAll("."+b.cn.parcoords).data(nt,c);wt.exit().remove(),wt.enter().append("g").classed(b.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),wt.attr("transform",function(Kt){return r(Kt.model.translateX,Kt.model.translateY)});var Rt=wt.selectAll("."+b.cn.parcoordsControlView).data(l,c);Rt.enter().append("g").classed(b.cn.parcoordsControlView,!0),Rt.attr("transform",function(Kt){return r(Kt.model.pad.l,Kt.model.pad.t)});var bt=Rt.selectAll("."+b.cn.yAxis).data(function(Kt){return Kt.dimensions},c);bt.enter().append("g").classed(b.cn.yAxis,!0),Rt.each(function(Kt){O(bt,Kt,$)}),ct.each(function(Kt){if(Kt.viewModel){!Kt.lineLayer||X?Kt.lineLayer=o(this,Kt):Kt.lineLayer.update(Kt),(Kt.key||Kt.key===0)&&(Kt.viewModel[Kt.key]=Kt.lineLayer);var $t=!Kt.context||X;Kt.lineLayer.render(Kt.viewModel.panels,$t)}}),bt.attr("transform",function(Kt){return r(Kt.xScale(Kt.xIndex),0)}),bt.call(g.behavior.drag().origin(function(Kt){return Kt}).on("drag",function(Kt){var $t=Kt.parent;st.linePickActive(!1),Kt.x=Math.max(-b.overdrag,Math.min(Kt.model.width+b.overdrag,g.event.x)),Kt.canvasX=Kt.x*Kt.model.canvasPixelRatio,bt.sort(function(le,he){return le.x-he.x}).each(function(le,he){le.xIndex=he,le.x=Kt===le?le.x:le.xScale(le.xIndex),le.canvasX=le.x*le.model.canvasPixelRatio}),O(bt,$t,$),bt.filter(function(le){return Math.abs(Kt.xIndex-le.xIndex)!==0}).attr("transform",function(le){return r(le.xScale(le.xIndex),0)}),g.select(this).attr("transform",r(Kt.x,0)),bt.each(function(le,he,de){de===Kt.parent.key&&($t.dimensions[he]=le)}),$t.contextLayer&&$t.contextLayer.render($t.panels,!1,!z($t)),$t.focusLayer.render&&$t.focusLayer.render($t.panels)}).on("dragend",function(Kt){var $t=Kt.parent;Kt.x=Kt.xScale(Kt.xIndex),Kt.canvasX=Kt.x*Kt.model.canvasPixelRatio,O(bt,$t,$),g.select(this).attr("transform",function(le){return r(le.x,0)}),$t.contextLayer&&$t.contextLayer.render($t.panels,!1,!z($t)),$t.focusLayer&&$t.focusLayer.render($t.panels),$t.pickLayer&&$t.pickLayer.render($t.panels,!0),st.linePickActive(!0),X&&X.axesMoved&&X.axesMoved($t.key,$t.dimensions.map(function(le){return le.crossfilterDimensionIndex}))})),bt.exit().remove();var At=bt.selectAll("."+b.cn.axisOverlays).data(l,c);At.enter().append("g").classed(b.cn.axisOverlays,!0),At.selectAll("."+b.cn.axis).remove();var mt=At.selectAll("."+b.cn.axis).data(l,c);mt.enter().append("g").classed(b.cn.axis,!0),mt.each(function(Kt){var $t=Kt.model.height/Kt.model.tickDistance,le=Kt.domainScale,he=le.domain();g.select(this).call(g.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks($t,Kt.tickFormat).tickValues(Kt.ordinal?he:null).tickFormat(function(de){return h.isOrdinal(Kt)?de:Y(Kt.model.dimensions[Kt.visibleIndex],de)}).scale(le)),a.font(mt.selectAll("text"),Kt.model.tickFont)}),mt.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),mt.selectAll("text").style("text-shadow",e.makeTextShadow(Z)).style("cursor","default");var Lt=At.selectAll("."+b.cn.axisHeading).data(l,c);Lt.enter().append("g").classed(b.cn.axisHeading,!0);var Ht=Lt.selectAll("."+b.cn.axisTitle).data(l,c);Ht.enter().append("text").classed(b.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",tt?"none":"auto"),Ht.text(function(Kt){return Kt.label}).each(function(Kt){var $t=g.select(this);a.font($t,Kt.model.labelFont),e.convertToTspans($t,it)}).attr("transform",function(Kt){var $t=B(Kt.model.labelAngle,Kt.model.labelSide),le=b.axisTitleOffset;return($t.dir>0?"":r(0,2*le+Kt.model.height))+p($t.degrees)+r(-le*$t.dx,-le*$t.dy)}).attr("text-anchor",function(Kt){var $t=B(Kt.model.labelAngle,Kt.model.labelSide),le=Math.abs($t.dx),he=Math.abs($t.dy);return 2*le>he?$t.dir*$t.dx<0?"start":"end":"middle"});var Ut=At.selectAll("."+b.cn.axisExtent).data(l,c);Ut.enter().append("g").classed(b.cn.axisExtent,!0);var kt=Ut.selectAll("."+b.cn.axisExtentTop).data(l,c);kt.enter().append("g").classed(b.cn.axisExtentTop,!0),kt.attr("transform",r(0,-b.axisExtentOffset));var Vt=kt.selectAll("."+b.cn.axisExtentTopText).data(l,c);Vt.enter().append("text").classed(b.cn.axisExtentTopText,!0).call(I),Vt.text(function(Kt){return j(Kt,!0)}).each(function(Kt){a.font(g.select(this),Kt.model.rangeFont)});var It=Ut.selectAll("."+b.cn.axisExtentBottom).data(l,c);It.enter().append("g").classed(b.cn.axisExtentBottom,!0),It.attr("transform",function(Kt){return r(0,Kt.model.height+b.axisExtentOffset)});var re=It.selectAll("."+b.cn.axisExtentBottomText).data(l,c);re.enter().append("text").classed(b.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(I),re.text(function(Kt){return j(Kt,!1)}).each(function(Kt){a.font(g.select(this),Kt.model.rangeFont)}),u.ensureAxisBrush(At,Z,it)}},24196:function(G,U,t){var g=t(36336),C=t(5048),i=t(95724).isVisible,S={};function x(r,e,a){var n=e.indexOf(a),f=r.indexOf(n);return f===-1&&(f+=e.length),f}function v(r,e){return function(n,f){return x(r,e,n)-x(r,e,f)}}var p=G.exports=function(e,a){var n=e._fullLayout,f=C(e,[],S);if(f){var c={},l={},m={},h={},b=n._size;a.forEach(function(A,_){var y=A[0].trace;m[_]=y.index;var E=h[_]=y._fullInput.index;c[_]=e.data[E].dimensions,l[_]=e.data[E].dimensions.slice()});var u=function(A,_,y){var E=l[A][_],T=y.map(function(N){return N.slice()}),s="dimensions["+_+"].constraintrange",L=n._tracePreGUI[e._fullData[m[A]]._fullInput.uid];if(L[s]===void 0){var M=E.constraintrange;L[s]=M||null}var z=e._fullData[m[A]].dimensions[_];T.length?(T.length===1&&(T=T[0]),E.constraintrange=T,z.constraintrange=T.slice(),T=[T]):(delete E.constraintrange,delete z.constraintrange,T=null);var D={};D[s]=T,e.emit("plotly_restyle",[D,[h[A]]])},o=function(A){e.emit("plotly_hover",A)},d=function(A){e.emit("plotly_unhover",A)},w=function(A,_){var y=v(_,l[A].filter(i));c[A].sort(y),l[A].filter(function(E){return!i(E)}).sort(function(E){return l[A].indexOf(E)}).forEach(function(E){c[A].splice(c[A].indexOf(E),1),c[A].splice(l[A].indexOf(E),0,E)}),e.emit("plotly_restyle",[{dimensions:[c[A]]},[h[A]]])};g(e,a,{width:b.w,height:b.h,margin:{t:b.t,r:b.r,b:b.b,l:b.l}},{filterChanged:u,hover:o,unhover:d,axesMoved:w})}};p.reglPrecompiled=S},74996:function(G,U,t){var g=t(45464),C=t(86968).u,i=t(25376),S=t(22548),x=t(21776).Ks,v=t(21776).Gw,p=t(92880).extendFlat,r=t(98192).c,e=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});G.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:p({},g.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:x({},{keys:["label","color","value","percent","text"]}),texttemplate:v({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:p({},e,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:p({},e,{}),outsidetextfont:p({},e,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:p({},e,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:C({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:p({},e,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},80036:function(G,U,t){var g=t(7316);U.name="pie",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},45768:function(G,U,t){var g=t(38248),C=t(49760),i=t(76308),S={};function x(e,a){var n=[],f=e._fullLayout,c=f.hiddenlabels||[],l=a.labels,m=a.marker.colors||[],h=a.values,b=a._length,u=a._hasValues&&b,o,d;if(a.dlabel)for(l=new Array(b),o=0;o=0});var M=a.type==="funnelarea"?y:a.sort;return M&&n.sort(function(z,D){return D.v-z.v}),n[0]&&(n[0].vTotal=_),n}function v(e){return function(n,f){return!n||(n=C(n),!n.isValid())?!1:(n=i.addOpacity(n,n.getAlpha()),e[f]||(e[f]=n),n)}}function p(e,a){var n=(a||{}).type;n||(n="pie");var f=e._fullLayout,c=e.calcdata,l=f[n+"colorway"],m=f["_"+n+"colormap"];f["extend"+n+"colors"]&&(l=r(l,S));for(var h=0,b=0;b0){m=!0;break}}m||(l=0)}return{hasLabels:f,hasValues:c,len:l}}function r(a,n,f,c,l){var m=c("marker.line.width");m&&c("marker.line.color",l?void 0:f.paper_bgcolor);var h=c("marker.colors");v(c,"marker.pattern",h),a.marker&&!n.marker.pattern.fgcolor&&(n.marker.pattern.fgcolor=a.marker.colors),n.marker.pattern.bgcolor||(n.marker.pattern.bgcolor=f.paper_bgcolor)}function e(a,n,f,c){function l(L,M){return C.coerce(a,n,i,L,M)}var m=l("labels"),h=l("values"),b=p(m,h),u=b.len;if(n._hasLabels=b.hasLabels,n._hasValues=b.hasValues,!n._hasLabels&&n._hasValues&&(l("label0"),l("dlabel")),!u){n.visible=!1;return}n._length=u,r(a,n,c,l,!0),l("scalegroup");var o=l("text"),d=l("texttemplate"),w;if(d||(w=l("textinfo",C.isArrayOrTypedArray(o)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),d||w&&w!=="none"){var A=l("textposition");x(a,n,c,l,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(A)||A==="auto",y=_||A==="outside";y&&l("automargin"),(A==="inside"||A==="auto"||Array.isArray(A))&&l("insidetextorientation")}else w==="none"&&l("textposition","none");S(n,c,l);var E=l("hole"),T=l("title.text");if(T){var s=l("title.position",E?"middle center":"top center");!E&&s==="middle center"&&(n.title.position="top center"),C.coerceFont(l,"title.font",c.font)}l("sort"),l("direction"),l("rotation"),l("pull")}G.exports={handleLabelsAndValues:p,handleMarkerDefaults:r,supplyDefaults:e}},53644:function(G,U,t){var g=t(10624).appendArrayMultiPointValues;G.exports=function(i,S){var x={curveNumber:S.index,pointNumbers:i.pts,data:S._input,fullData:S,label:i.label,color:i.color,value:i.v,percent:i.percent,text:i.text,bbox:i.bbox,v:i.v};return i.pts.length===1&&(x.pointNumber=x.i=i.pts[0]),g(x,S,i.pts),S.type==="funnelarea"&&(delete x.v,delete x.i),x}},21552:function(G,U,t){var g=t(43616),C=t(76308);G.exports=function(S,x,v,p){var r=v.marker.pattern;r&&r.shape?g.pointStyle(S,v,p,x):C.fill(S,x.color)}},69656:function(G,U,t){var g=t(3400);function C(i){return i.indexOf("e")!==-1?i.replace(/[.]?0+e/,"e"):i.indexOf(".")!==-1?i.replace(/[.]?0+$/,""):i}U.formatPiePercent=function(S,x){var v=C((S*100).toPrecision(3));return g.numSeparate(v,x)+"%"},U.formatPieValue=function(S,x){var v=C(S.toPrecision(10));return g.numSeparate(v,x)},U.getFirstFilled=function(S,x){if(g.isArrayOrTypedArray(S))for(var v=0;v0&&(It+=le*kt.pxmid[0],re+=le*kt.pxmid[1])}kt.cxFinal=It,kt.cyFinal=re;function he(Jt,Wt,Ft,xt){var yt=xt*(Wt[0]-Jt[0]),Et=xt*(Wt[1]-Jt[1]);return"a"+xt*nt.r+","+xt*nt.r+" 0 "+kt.largeArc+(Ft?" 1 ":" 0 ")+yt+","+Et}var de=ct.hole;if(kt.v===nt.vTotal){var xe="M"+(It+kt.px0[0])+","+(re+kt.px0[1])+he(kt.px0,kt.pxmid,!0,1)+he(kt.pxmid,kt.px0,!0,1)+"Z";de?$t.attr("d","M"+(It+de*kt.px0[0])+","+(re+de*kt.px0[1])+he(kt.px0,kt.pxmid,!1,de)+he(kt.pxmid,kt.px0,!1,de)+"Z"+xe):$t.attr("d",xe)}else{var Se=he(kt.px0,kt.px1,!0,1);if(de){var ne=1-de;$t.attr("d","M"+(It+de*kt.px1[0])+","+(re+de*kt.px1[1])+he(kt.px1,kt.px0,!1,de)+"l"+ne*kt.px0[0]+","+ne*kt.px0[1]+Se+"Z")}else $t.attr("d","M"+It+","+re+"l"+kt.px0[0]+","+kt.px0[1]+Se+"Z")}ut(X,kt,nt);var zt=l.castOption(ct.textposition,kt.pts),Xt=Kt.selectAll("g.slicetext").data(kt.text&&zt!=="none"?[0]:[]);Xt.enter().append("g").classed("slicetext",!0),Xt.exit().remove(),Xt.each(function(){var Jt=v.ensureSingle(g.select(this),"text","",function(jt){jt.attr("data-notex",1)}),Wt=v.ensureUniformFontSize(X,zt==="outside"?d(ct,kt,Q.font):w(ct,kt,Q.font));Jt.text(kt.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,Wt).call(e.convertToTspans,X);var Ft=x.bBox(Jt.node()),xt;if(zt==="outside")xt=D(Ft,kt);else if(xt=_(Ft,kt,nt),zt==="auto"&&xt.scale<1){var yt=v.ensureUniformFontSize(X,ct.outsidetextfont);Jt.call(x.font,yt),Ft=x.bBox(Jt.node()),xt=D(Ft,kt)}var Et=xt.textPosAngle,Mt=Et===void 0?kt.pxmid:it(nt.r,Et);if(xt.targetX=It+Mt[0]*xt.rCenter+(xt.x||0),xt.targetY=re+Mt[1]*xt.rCenter+(xt.y||0),J(xt,Ft),xt.outside){var Nt=xt.targetY;kt.yLabelMin=Nt-Ft.height/2,kt.yLabelMid=Nt,kt.yLabelMax=Nt+Ft.height/2,kt.labelExtraX=0,kt.labelExtraY=0,wt=!0}xt.fontSize=Wt.size,n(ct.type,xt,Q),Z[Vt].transform=xt,v.setTransormAndDisplay(Jt,xt)})});var Rt=g.select(this).selectAll("g.titletext").data(ct.title.text?[0]:[]);if(Rt.enter().append("g").classed("titletext",!0),Rt.exit().remove(),Rt.each(function(){var kt=v.ensureSingle(g.select(this),"text","",function(re){re.attr("data-notex",1)}),Vt=ct.title.text;ct._meta&&(Vt=v.templateString(Vt,ct._meta)),kt.text(Vt).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,ct.title.font).call(e.convertToTspans,X);var It;ct.title.position==="middle center"?It=N(nt):It=I(nt,ot),kt.attr("transform",r(It.x,It.y)+p(Math.min(1,It.scale))+r(It.tx,It.ty))}),wt&&H(Tt,ct),u(gt,ct),wt&&ct.automargin){var bt=x.bBox(st.node()),At=ct.domain,mt=ot.w*(At.x[1]-At.x[0]),Lt=ot.h*(At.y[1]-At.y[0]),Ht=(.5*mt-nt.r)/ot.w,Ut=(.5*Lt-nt.r)/ot.h;C.autoMargin(X,"pie."+ct.uid+".automargin",{xl:At.x[0]-Ht,xr:At.x[1]+Ht,yb:At.y[0]-Ut,yt:At.y[1]+Ut,l:Math.max(nt.cx-nt.r-bt.left,0),r:Math.max(bt.right-(nt.cx+nt.r),0),b:Math.max(bt.bottom-(nt.cy+nt.r),0),t:Math.max(nt.cy-nt.r-bt.top,0),pad:5})}})});setTimeout(function(){$.selectAll("tspan").each(function(){var Z=g.select(this);Z.attr("dy")&&Z.attr("dy",Z.attr("dy"))})},0)}function u(X,tt){X.each(function(V){var Q=g.select(this);if(!V.labelExtraX&&!V.labelExtraY){Q.select("path.textline").remove();return}var ot=Q.select("g.slicetext text");V.transform.targetX+=V.labelExtraX,V.transform.targetY+=V.labelExtraY,v.setTransormAndDisplay(ot,V.transform);var $=V.cxFinal+V.pxmid[0],Z=V.cyFinal+V.pxmid[1],st="M"+$+","+Z,nt=(V.yLabelMax-V.yLabelMin)*(V.pxmid[0]<0?-1:1)/4;if(V.labelExtraX){var ct=V.labelExtraX*V.pxmid[1]/V.pxmid[0],gt=V.yLabelMid+V.labelExtraY-(V.cyFinal+V.pxmid[1]);Math.abs(ct)>Math.abs(gt)?st+="l"+gt*V.pxmid[0]/V.pxmid[1]+","+gt+"H"+($+V.labelExtraX+nt):st+="l"+V.labelExtraX+","+ct+"v"+(gt-ct)+"h"+nt}else st+="V"+(V.yLabelMid+V.labelExtraY)+"h"+nt;v.ensureSingle(Q,"path","textline").call(S.stroke,tt.outsidetextfont.color).attr({"stroke-width":Math.min(2,tt.outsidetextfont.size/8),d:st,fill:"none"})})}function o(X,tt,V){var Q=V[0],ot=Q.cx,$=Q.cy,Z=Q.trace,st=Z.type==="funnelarea";"_hasHoverLabel"in Z||(Z._hasHoverLabel=!1),"_hasHoverEvent"in Z||(Z._hasHoverEvent=!1),X.on("mouseover",function(nt){var ct=tt._fullLayout,gt=tt._fullData[Z.index];if(!(tt._dragging||ct.hovermode===!1)){var Tt=gt.hoverinfo;if(Array.isArray(Tt)&&(Tt=i.castHoverinfo({hoverinfo:[l.castOption(Tt,nt.pts)],_module:Z._module},ct,0)),Tt==="all"&&(Tt="label+text+value+percent+name"),gt.hovertemplate||Tt!=="none"&&Tt!=="skip"&&Tt){var wt=nt.rInscribed||0,Rt=ot+nt.pxmid[0]*(1-wt),bt=$+nt.pxmid[1]*(1-wt),At=ct.separators,mt=[];if(Tt&&Tt.indexOf("label")!==-1&&mt.push(nt.label),nt.text=l.castOption(gt.hovertext||gt.text,nt.pts),Tt&&Tt.indexOf("text")!==-1){var Lt=nt.text;v.isValidTextValue(Lt)&&mt.push(Lt)}nt.value=nt.v,nt.valueLabel=l.formatPieValue(nt.v,At),Tt&&Tt.indexOf("value")!==-1&&mt.push(nt.valueLabel),nt.percent=nt.v/Q.vTotal,nt.percentLabel=l.formatPiePercent(nt.percent,At),Tt&&Tt.indexOf("percent")!==-1&&mt.push(nt.percentLabel);var Ht=gt.hoverlabel,Ut=Ht.font,kt=[];i.loneHover({trace:Z,x0:Rt-wt*Q.r,x1:Rt+wt*Q.r,y:bt,_x0:st?ot+nt.TL[0]:Rt-wt*Q.r,_x1:st?ot+nt.TR[0]:Rt+wt*Q.r,_y0:st?$+nt.TL[1]:bt-wt*Q.r,_y1:st?$+nt.BL[1]:bt+wt*Q.r,text:mt.join("
    "),name:gt.hovertemplate||Tt.indexOf("name")!==-1?gt.name:void 0,idealAlign:nt.pxmid[0]<0?"left":"right",color:l.castOption(Ht.bgcolor,nt.pts)||nt.color,borderColor:l.castOption(Ht.bordercolor,nt.pts),fontFamily:l.castOption(Ut.family,nt.pts),fontSize:l.castOption(Ut.size,nt.pts),fontColor:l.castOption(Ut.color,nt.pts),nameLength:l.castOption(Ht.namelength,nt.pts),textAlign:l.castOption(Ht.align,nt.pts),hovertemplate:l.castOption(gt.hovertemplate,nt.pts),hovertemplateLabels:nt,eventData:[m(nt,gt)]},{container:ct._hoverlayer.node(),outerContainer:ct._paper.node(),gd:tt,inOut_bbox:kt}),nt.bbox=kt[0],Z._hasHoverLabel=!0}Z._hasHoverEvent=!0,tt.emit("plotly_hover",{points:[m(nt,gt)],event:g.event})}}),X.on("mouseout",function(nt){var ct=tt._fullLayout,gt=tt._fullData[Z.index],Tt=g.select(this).datum();Z._hasHoverEvent&&(nt.originalEvent=g.event,tt.emit("plotly_unhover",{points:[m(Tt,gt)],event:g.event}),Z._hasHoverEvent=!1),Z._hasHoverLabel&&(i.loneUnhover(ct._hoverlayer.node()),Z._hasHoverLabel=!1)}),X.on("click",function(nt){var ct=tt._fullLayout,gt=tt._fullData[Z.index];tt._dragging||ct.hovermode===!1||(tt._hoverdata=[m(nt,gt)],i.click(tt,g.event))})}function d(X,tt,V){var Q=l.castOption(X.outsidetextfont.color,tt.pts)||l.castOption(X.textfont.color,tt.pts)||V.color,ot=l.castOption(X.outsidetextfont.family,tt.pts)||l.castOption(X.textfont.family,tt.pts)||V.family,$=l.castOption(X.outsidetextfont.size,tt.pts)||l.castOption(X.textfont.size,tt.pts)||V.size;return{color:Q,family:ot,size:$}}function w(X,tt,V){var Q=l.castOption(X.insidetextfont.color,tt.pts);!Q&&X._input.textfont&&(Q=l.castOption(X._input.textfont.color,tt.pts));var ot=l.castOption(X.insidetextfont.family,tt.pts)||l.castOption(X.textfont.family,tt.pts)||V.family,$=l.castOption(X.insidetextfont.size,tt.pts)||l.castOption(X.textfont.size,tt.pts)||V.size;return{color:Q||S.contrast(tt.color),family:ot,size:$}}function A(X,tt){for(var V,Q,ot=0;ot=-4;Ht-=2)Lt(Math.PI*Ht,"tan");for(Ht=4;Ht>=-4;Ht-=2)Lt(Math.PI*(Ht+1),"tan")}if(Tt||Rt){for(Ht=4;Ht>=-4;Ht-=2)Lt(Math.PI*(Ht+1.5),"rad");for(Ht=4;Ht>=-4;Ht-=2)Lt(Math.PI*(Ht+.5),"rad")}}if(st||bt||Tt){var Ut=Math.sqrt(X.width*X.width+X.height*X.height);if(mt={scale:ot*Q*2/Ut,rCenter:1-ot,rotate:0},mt.textPosAngle=(tt.startangle+tt.stopangle)/2,mt.scale>=1)return mt;At.push(mt)}(bt||Rt)&&(mt=E(X,Q,Z,nt,ct),mt.textPosAngle=(tt.startangle+tt.stopangle)/2,At.push(mt)),(bt||wt)&&(mt=T(X,Q,Z,nt,ct),mt.textPosAngle=(tt.startangle+tt.stopangle)/2,At.push(mt));for(var kt=0,Vt=0,It=0;It=1)break}return At[kt]}function y(X,tt){var V=X.startangle,Q=X.stopangle;return V>tt&&tt>Q||V0?1:-1)/2,y:$/(1+V*V/(Q*Q)),outside:!0}}function N(X){var tt=Math.sqrt(X.titleBox.width*X.titleBox.width+X.titleBox.height*X.titleBox.height);return{x:X.cx,y:X.cy,scale:X.trace.hole*X.r*2/tt,tx:0,ty:-X.titleBox.height/2+X.trace.title.font.size}}function I(X,tt){var V=1,Q=1,ot,$=X.trace,Z={x:X.cx,y:X.cy},st={tx:0,ty:0};st.ty+=$.title.font.size,ot=O($),$.title.position.indexOf("top")!==-1?(Z.y-=(1+ot)*X.r,st.ty-=X.titleBox.height):$.title.position.indexOf("bottom")!==-1&&(Z.y+=(1+ot)*X.r);var nt=k(X.r,X.trace.aspectratio),ct=tt.w*($.domain.x[1]-$.domain.x[0])/2;return $.title.position.indexOf("left")!==-1?(ct=ct+nt,Z.x-=(1+ot)*nt,st.tx+=X.titleBox.width/2):$.title.position.indexOf("center")!==-1?ct*=2:$.title.position.indexOf("right")!==-1&&(ct=ct+nt,Z.x+=(1+ot)*nt,st.tx-=X.titleBox.width/2),V=ct/X.titleBox.width,Q=B(X,tt)/X.titleBox.height,{x:Z.x,y:Z.y,scale:Math.min(V,Q),tx:st.tx,ty:st.ty}}function k(X,tt){return X/(tt===void 0?1:tt)}function B(X,tt){var V=X.trace,Q=tt.h*(V.domain.y[1]-V.domain.y[0]);return Math.min(X.titleBox.height,Q/2)}function O(X){var tt=X.pull;if(!tt)return 0;var V;if(v.isArrayOrTypedArray(tt))for(tt=0,V=0;Vtt&&(tt=X.pull[V]);return tt}function H(X,tt){var V,Q,ot,$,Z,st,nt,ct,gt,Tt,wt,Rt,bt;function At(Ut,kt){return Ut.pxmid[1]-kt.pxmid[1]}function mt(Ut,kt){return kt.pxmid[1]-Ut.pxmid[1]}function Lt(Ut,kt){kt||(kt={});var Vt=kt.labelExtraY+(Q?kt.yLabelMax:kt.yLabelMin),It=Q?Ut.yLabelMin:Ut.yLabelMax,re=Q?Ut.yLabelMax:Ut.yLabelMin,Kt=Ut.cyFinal+Z(Ut.px0[1],Ut.px1[1]),$t=Vt-It,le,he,de,xe,Se,ne;if($t*nt>0&&(Ut.labelExtraY=$t),!!v.isArrayOrTypedArray(tt.pull))for(he=0;he=(l.castOption(tt.pull,de.pts)||0))&&((Ut.pxmid[1]-de.pxmid[1])*nt>0?(xe=de.cyFinal+Z(de.px0[1],de.px1[1]),$t=xe-It-Ut.labelExtraY,$t*nt>0&&(Ut.labelExtraY+=$t)):(re+Ut.labelExtraY-Kt)*nt>0&&(le=3*st*Math.abs(he-Tt.indexOf(Ut)),Se=de.cxFinal+$(de.px0[0],de.px1[0]),ne=Se+le-(Ut.cxFinal+Ut.pxmid[0])-Ut.labelExtraX,ne*st>0&&(Ut.labelExtraX+=ne)))}for(Q=0;Q<2;Q++)for(ot=Q?At:mt,Z=Q?Math.max:Math.min,nt=Q?1:-1,V=0;V<2;V++){for($=V?Math.max:Math.min,st=V?1:-1,ct=X[Q][V],ct.sort(ot),gt=X[1-Q][V],Tt=gt.concat(ct),Rt=[],wt=0;wt1?(ct=V.r,gt=ct/ot.aspectratio):(gt=V.r,ct=gt*ot.aspectratio),ct*=(1+ot.baseratio)/2,nt=ct*gt}Z=Math.min(Z,nt/V.vTotal)}for(Q=0;Qtt.vTotal/2?1:0,ct.halfangle=Math.PI*Math.min(ct.v/tt.vTotal,.5),ct.ring=1-Q.hole,ct.rInscribed=z(ct,tt))}function it(X,tt){return[X*Math.sin(tt),-X*Math.cos(tt)]}function ut(X,tt,V){var Q=X._fullLayout,ot=V.trace,$=ot.texttemplate,Z=ot.textinfo;if(!$&&Z&&Z!=="none"){var st=Z.split("+"),nt=function(kt){return st.indexOf(kt)!==-1},ct=nt("label"),gt=nt("text"),Tt=nt("value"),wt=nt("percent"),Rt=Q.separators,bt;if(bt=ct?[tt.label]:[],gt){var At=l.getFirstFilled(ot.text,tt.pts);h(At)&&bt.push(At)}Tt&&bt.push(l.formatPieValue(tt.v,Rt)),wt&&bt.push(l.formatPiePercent(tt.v/V.vTotal,Rt)),tt.text=bt.join("
    ")}function mt(kt){return{label:kt.label,value:kt.v,valueLabel:l.formatPieValue(kt.v,Q.separators),percent:kt.v/V.vTotal,percentLabel:l.formatPiePercent(kt.v/V.vTotal,Q.separators),color:kt.color,text:kt.text,customdata:v.castOption(ot,kt.i,"customdata")}}if($){var Lt=v.castOption(ot,tt.i,"texttemplate");if(!Lt)tt.text="";else{var Ht=mt(tt),Ut=l.getFirstFilled(ot.text,tt.pts);(h(Ut)||Ut==="")&&(Ht.text=Ut),tt.text=v.texttemplateString(Lt,Ht,X._fullLayout._d3locale,Ht,ot._meta||{})}}}function J(X,tt){var V=X.rotate*Math.PI/180,Q=Math.cos(V),ot=Math.sin(V),$=(tt.left+tt.right)/2,Z=(tt.top+tt.bottom)/2;X.textX=$*Q-Z*ot,X.textY=$*ot+Z*Q,X.noCenter=!0}G.exports={plot:b,formatSliceLabel:ut,transformInsideText:_,determineInsideTextFont:w,positionTitleOutside:I,prerenderTitles:A,layoutAreas:Y,attachFxHandlers:o,computeTransform:J}},22152:function(G,U,t){var g=t(33428),C=t(10528),i=t(82744).resizeText;G.exports=function(x){var v=x._fullLayout._pielayer.selectAll(".trace");i(x,v,"pie"),v.each(function(p){var r=p[0],e=r.trace,a=g.select(this);a.style({opacity:e.opacity}),a.selectAll("path.surface").each(function(n){g.select(this).call(C,n,e,x)})})}},10528:function(G,U,t){var g=t(76308),C=t(69656).castOption,i=t(21552);G.exports=function(x,v,p,r){var e=p.marker.line,a=C(e.color,v.pts)||g.defaultLine,n=C(e.width,v.pts)||0;x.call(i,v,p,r).style("stroke-width",n).call(g.stroke,a)}},35484:function(G,U,t){var g=t(52904);G.exports={x:g.x,y:g.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:g.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},11072:function(G,U,t){var g=t(67792).gl_pointcloud2d,C=t(3400).isArrayOrTypedArray,i=t(43080),S=t(19280).findExtremes,x=t(44928);function v(e,a){this.scene=e,this.uid=a,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=g(e.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var p=v.prototype;p.handlePick=function(e){var a=this.idToIndex[e.pointId];return{trace:this,dataCoord:e.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[a*2],this.pickXYData[a*2+1]]:[this.pickXData[a],this.pickYData[a]],textLabel:C(this.textLabels)?this.textLabels[a]:this.textLabels,color:this.color,name:this.name,pointIndex:a,hoverinfo:this.hoverinfo}},p.update=function(e){this.index=e.index,this.textLabels=e.text,this.name=e.name,this.hoverinfo=e.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(e),this.color=x(e,{})},p.updateFast=function(e){var a=this.xData=this.pickXData=e.x,n=this.yData=this.pickYData=e.y,f=this.pickXYData=e.xy,c=e.xbounds&&e.ybounds,l=e.indices,m,h,b,u=this.bounds,o,d,w;if(f){if(b=f,m=f.length>>>1,c)u[0]=e.xbounds[0],u[2]=e.xbounds[1],u[1]=e.ybounds[0],u[3]=e.ybounds[1];else for(w=0;wu[2]&&(u[2]=o),du[3]&&(u[3]=d);if(l)h=l;else for(h=new Int32Array(m),w=0;wu[2]&&(u[2]=o),du[3]&&(u[3]=d);this.idToIndex=h,this.pointcloudOptions.idToIndex=h,this.pointcloudOptions.positions=b;var A=i(e.marker.color),_=i(e.marker.border.color),y=e.opacity*e.marker.opacity;A[3]*=y,this.pointcloudOptions.color=A;var E=e.marker.blend;if(E===null){var T=100;E=a.length_&&(_=n.source[o]),n.target[o]>_&&(_=n.target[o]);var y=_+1;e.node._count=y;var E,T=e.node.groups,s={};for(o=0;o0&&x(I,y)&&x(k,y)&&!(s.hasOwnProperty(I)&&s.hasOwnProperty(k)&&s[I]===s[k])){s.hasOwnProperty(k)&&(k=s[k]),s.hasOwnProperty(I)&&(I=s[I]),I=+I,k=+k,h[I]=h[k]=!0;var B="";n.label&&n.label[o]&&(B=n.label[o]);var O=null;B&&b.hasOwnProperty(B)&&(O=b[B]),f.push({pointNumber:o,label:B,color:c?n.color[o]:n.color,hovercolor:l?n.hovercolor[o]:n.hovercolor,customdata:m?n.customdata[o]:n.customdata,concentrationscale:O,source:I,target:k,value:+N}),D.source.push(I),D.target.push(k)}}var H=y+T.length,Y=S(a.color),j=S(a.customdata),et=[];for(o=0;oy-1,childrenNodes:[],pointNumber:o,label:it,color:Y?a.color[o]:a.color,customdata:j?a.customdata[o]:a.customdata})}var ut=!1;return r(H,D.source,D.target)&&(ut=!0),{circular:ut,links:f,nodes:et,groups:T,groupLookup:s}}function r(e,a,n){for(var f=C.init2dArray(e,0),c=0;c1})}G.exports=function(a,n){var f=p(n);return i({circular:f.circular,_nodes:f.nodes,_links:f.links,_groups:f.groups,_groupLookup:f.groupLookup})}},11820:function(G){G.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},47140:function(G,U,t){var g=t(3400),C=t(41440),i=t(76308),S=t(49760),x=t(86968).Q,v=t(16132),p=t(31780),r=t(51272);G.exports=function(n,f,c,l){function m(z,D){return g.coerce(n,f,C,z,D)}var h=g.extendDeep(l.hoverlabel,n.hoverlabel),b=n.node,u=p.newContainer(f,"node");function o(z,D){return g.coerce(b,u,C.node,z,D)}o("label"),o("groups"),o("x"),o("y"),o("pad"),o("thickness"),o("line.color"),o("line.width"),o("hoverinfo",n.hoverinfo),v(b,u,o,h),o("hovertemplate"),o("align");var d=l.colorway,w=function(z){return d[z%d.length]};o("color",u.label.map(function(z,D){return i.addOpacity(w(D),.8)})),o("customdata");var A=n.link||{},_=p.newContainer(f,"link");function y(z,D){return g.coerce(A,_,C.link,z,D)}y("label"),y("arrowlen"),y("source"),y("target"),y("value"),y("line.color"),y("line.width"),y("hoverinfo",n.hoverinfo),v(A,_,y,h),y("hovertemplate");var E=S(l.paper_bgcolor).getLuminance()<.333,T=E?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",s=y("color",T);function L(z){var D=S(z);if(!D.isValid())return z;var N=D.getAlpha();return N<=.8?D.setAlpha(N+.2):D=E?D.brighten():D.darken(),D.toRgbString()}y("hovercolor",Array.isArray(s)?s.map(L):L(s)),y("customdata"),r(A,_,{name:"colorscales",handleItemDefaults:e}),x(f,l,m),m("orientation"),m("valueformat"),m("valuesuffix");var M;u.x.length&&u.y.length&&(M="freeform"),m("arrangement",M),g.coerceFont(m,"textfont",g.extendFlat({},l.font)),f._length=null};function e(a,n){function f(c,l){return g.coerce(a,n,C.link.colorscales,c,l)}f("label"),f("cmin"),f("cmax"),f("colorscale")}},45499:function(G,U,t){G.exports={attributes:t(41440),supplyDefaults:t(47140),calc:t(48068),plot:t(59596),moduleType:"trace",name:"sankey",basePlotModule:t(10760),selectPoints:t(81128),categories:["noOpacity"],meta:{}}},59596:function(G,U,t){var g=t(33428),C=t(3400),i=C.numberFormat,S=t(83248),x=t(93024),v=t(76308),p=t(11820).cn,r=C._;function e(d){return d!==""}function a(d,w){return d.filter(function(A){return A.key===w.traceId})}function n(d,w){g.select(d).select("path").style("fill-opacity",w),g.select(d).select("rect").style("fill-opacity",w)}function f(d){g.select(d).select("text.name").style("fill","black")}function c(d){return function(w){return d.node.sourceLinks.indexOf(w.link)!==-1||d.node.targetLinks.indexOf(w.link)!==-1}}function l(d){return function(w){return w.node.sourceLinks.indexOf(d.link)!==-1||w.node.targetLinks.indexOf(d.link)!==-1}}function m(d,w,A){w&&A&&a(A,w).selectAll("."+p.sankeyLink).filter(c(w)).call(b.bind(0,w,A,!1))}function h(d,w,A){w&&A&&a(A,w).selectAll("."+p.sankeyLink).filter(c(w)).call(u.bind(0,w,A,!1))}function b(d,w,A,_){_.style("fill",function(y){if(!y.link.concentrationscale)return y.tinyColorHoverHue}).style("fill-opacity",function(y){if(!y.link.concentrationscale)return y.tinyColorHoverAlpha}),_.each(function(y){var E=y.link.label;E!==""&&a(w,d).selectAll("."+p.sankeyLink).filter(function(T){return T.link.label===E}).style("fill",function(T){if(!T.link.concentrationscale)return T.tinyColorHoverHue}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.tinyColorHoverAlpha})}),A&&a(w,d).selectAll("."+p.sankeyNode).filter(l(d)).call(m)}function u(d,w,A,_){_.style("fill",function(y){return y.tinyColorHue}).style("fill-opacity",function(y){return y.tinyColorAlpha}),_.each(function(y){var E=y.link.label;E!==""&&a(w,d).selectAll("."+p.sankeyLink).filter(function(T){return T.link.label===E}).style("fill",function(T){return T.tinyColorHue}).style("fill-opacity",function(T){return T.tinyColorAlpha})}),A&&a(w,d).selectAll(p.sankeyNode).filter(l(d)).call(h)}function o(d,w){var A=d.hoverlabel||{},_=C.nestedProperty(A,w).get();return Array.isArray(_)?!1:_}G.exports=function(w,A){for(var _=w._fullLayout,y=_._paper,E=_._size,T=0;T"),color:o(J,"bgcolor")||v.addOpacity(ot.color,1),borderColor:o(J,"bordercolor"),fontFamily:o(J,"font.family"),fontSize:o(J,"font.size"),fontColor:o(J,"font.color"),nameLength:o(J,"namelength"),textAlign:o(J,"align"),idealAlign:g.event.x<$[0]?"right":"left",hovertemplate:J.hovertemplate,hovertemplateLabels:Z,eventData:[ot]})}}var st=x.loneHover(X,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:w,anchorIndex:V});st.each(function(){var nt=this;ut.link.concentrationscale||n(nt,.65),f(nt)})},O=function(it,ut,J){w._fullLayout.hovermode!==!1&&(g.select(it).call(u.bind(0,ut,J,!0)),ut.link.trace.link.hoverinfo!=="skip"&&(ut.link.fullData=ut.link.trace,w.emit("plotly_unhover",{event:g.event,points:[ut.link]})),x.loneUnhover(_._hoverlayer.node()))},H=function(it,ut,J){var X=ut.node;X.originalEvent=g.event,w._hoverdata=[X],g.select(it).call(h,ut,J),x.click(w,{target:!0})},Y=function(it,ut,J){w._fullLayout.hovermode!==!1&&(g.select(it).call(m,ut,J),ut.node.trace.node.hoverinfo!=="skip"&&(ut.node.fullData=ut.node.trace,w.emit("plotly_hover",{event:g.event,points:[ut.node]})))},j=function(it,ut){if(w._fullLayout.hovermode!==!1){var J=ut.node.trace.node;if(!(J.hoverinfo==="none"||J.hoverinfo==="skip")){var X=g.select(it).select("."+p.nodeRect),tt=w._fullLayout._paperdiv.node().getBoundingClientRect(),V=X.node().getBoundingClientRect(),Q=V.left-2-tt.left,ot=V.right+2-tt.left,$=V.top+V.height/4-tt.top,Z={valueLabel:i(ut.valueFormat)(ut.node.value)+ut.valueSuffix};ut.node.fullData=ut.node.trace,w._fullLayout._calcInverseTransform(w);var st=w._fullLayout._invScaleX,nt=w._fullLayout._invScaleY,ct=x.loneHover({x0:st*Q,x1:st*ot,y:nt*$,name:i(ut.valueFormat)(ut.node.value)+ut.valueSuffix,text:[ut.node.label,I+ut.node.targetLinks.length,k+ut.node.sourceLinks.length].filter(e).join("
    "),color:o(J,"bgcolor")||ut.tinyColorHue,borderColor:o(J,"bordercolor"),fontFamily:o(J,"font.family"),fontSize:o(J,"font.size"),fontColor:o(J,"font.color"),nameLength:o(J,"namelength"),textAlign:o(J,"align"),idealAlign:"left",hovertemplate:J.hovertemplate,hovertemplateLabels:Z,eventData:[ut.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:w});n(ct,.85),f(ct)}}},et=function(it,ut,J){w._fullLayout.hovermode!==!1&&(g.select(it).call(h,ut,J),ut.node.trace.node.hoverinfo!=="skip"&&(ut.node.fullData=ut.node.trace,w.emit("plotly_unhover",{event:g.event,points:[ut.node]})),x.loneUnhover(_._hoverlayer.node()))};S(w,y,A,{width:E.w,height:E.h,margin:{t:E.t,r:E.r,b:E.b,l:E.l}},{linkEvents:{hover:M,follow:B,unhover:O,select:L},nodeEvents:{hover:Y,follow:j,unhover:et,select:H}})}},83248:function(G,U,t){var g=t(49812),C=t(67756).Gz,i=t(33428),S=t(26800),x=t(48932),v=t(11820),p=t(49760),r=t(76308),e=t(43616),a=t(3400),n=a.strTranslate,f=a.strRotate,c=t(71688),l=c.keyFun,m=c.repeat,h=c.unwrap,b=t(72736),u=t(24040),o=t(84284),d=o.CAP_SHIFT,w=o.LINE_SPACING,A=3;function _(tt,V,Q){var ot=h(V),$=ot.trace,Z=$.domain,st=$.orientation==="h",nt=$.node.pad,ct=$.node.thickness,gt={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[$.node.align],Tt=tt.width*(Z.x[1]-Z.x[0]),wt=tt.height*(Z.y[1]-Z.y[0]),Rt=ot._nodes,bt=ot._links,At=ot.circular,mt;At?mt=x.sankeyCircular().circularLinkGap(0):mt=S.sankey(),mt.iterations(v.sankeyIterations).size(st?[Tt,wt]:[wt,Tt]).nodeWidth(ct).nodePadding(nt).nodeId(function(ne){return ne.pointNumber}).nodeAlign(gt).nodes(Rt).links(bt);var Lt=mt();mt.nodePadding()=Wt||(Jt=Wt-Xt.y0,Jt>1e-6&&(Xt.y0+=Jt,Xt.y1+=Jt)),Wt=Xt.y1+nt})}function he(ne){var zt=ne.map(function(Et,Mt){return{x0:Et.x0,index:Mt}}).sort(function(Et,Mt){return Et.x0-Mt.x0}),Xt=[],Jt=-1,Wt,Ft=-1/0,xt;for(Ht=0;HtFt+ct&&(Jt+=1,Wt=yt.x0),Ft=yt.x0,Xt[Jt]||(Xt[Jt]=[]),Xt[Jt].push(yt),xt=Wt-yt.x0,yt.x0+=xt,yt.x1+=xt}return Xt}if($.node.x.length&&$.node.y.length){for(Ht=0;Ht0?"L"+$.targetX+" "+$.targetY:"")+"Z":Q="M "+($.targetX-V)+" "+($.targetY-ot)+" L"+($.rightInnerExtent-V)+" "+($.targetY-ot)+"A"+($.rightLargeArcRadius+ot)+" "+($.rightSmallArcRadius+ot)+" 0 0 0 "+($.rightFullExtent-ot-V)+" "+($.targetY+$.rightSmallArcRadius)+"L"+($.rightFullExtent-ot-V)+" "+$.verticalRightInnerExtent+"A"+($.rightLargeArcRadius+ot)+" "+($.rightLargeArcRadius+ot)+" 0 0 0 "+($.rightInnerExtent-V)+" "+($.verticalFullExtent+ot)+"L"+$.leftInnerExtent+" "+($.verticalFullExtent+ot)+"A"+($.leftLargeArcRadius+ot)+" "+($.leftLargeArcRadius+ot)+" 0 0 0 "+($.leftFullExtent+ot)+" "+$.verticalLeftInnerExtent+"L"+($.leftFullExtent+ot)+" "+($.sourceY+$.leftSmallArcRadius)+"A"+($.leftLargeArcRadius+ot)+" "+($.leftSmallArcRadius+ot)+" 0 0 0 "+$.leftInnerExtent+" "+($.sourceY-ot)+"L"+$.sourceX+" "+($.sourceY-ot)+"L"+$.sourceX+" "+($.sourceY+ot)+"L"+$.leftInnerExtent+" "+($.sourceY+ot)+"A"+($.leftLargeArcRadius-ot)+" "+($.leftSmallArcRadius-ot)+" 0 0 1 "+($.leftFullExtent-ot)+" "+($.sourceY+$.leftSmallArcRadius)+"L"+($.leftFullExtent-ot)+" "+$.verticalLeftInnerExtent+"A"+($.leftLargeArcRadius-ot)+" "+($.leftLargeArcRadius-ot)+" 0 0 1 "+$.leftInnerExtent+" "+($.verticalFullExtent-ot)+"L"+($.rightInnerExtent-V)+" "+($.verticalFullExtent-ot)+"A"+($.rightLargeArcRadius-ot)+" "+($.rightLargeArcRadius-ot)+" 0 0 1 "+($.rightFullExtent+ot-V)+" "+$.verticalRightInnerExtent+"L"+($.rightFullExtent+ot-V)+" "+($.targetY+$.rightSmallArcRadius)+"A"+($.rightLargeArcRadius-ot)+" "+($.rightSmallArcRadius-ot)+" 0 0 1 "+($.rightInnerExtent-V)+" "+($.targetY+ot)+"L"+($.targetX-V)+" "+($.targetY+ot)+(V>0?"L"+$.targetX+" "+$.targetY:"")+"Z",Q}function T(){var tt=.5;function V(Q){var ot=Q.linkArrowLength;if(Q.link.circular)return E(Q.link,ot);var $=Math.abs((Q.link.target.x0-Q.link.source.x1)/2);ot>$&&(ot=$);var Z=Q.link.source.x1,st=Q.link.target.x0-ot,nt=C(Z,st),ct=nt(tt),gt=nt(1-tt),Tt=Q.link.y0-Q.link.width/2,wt=Q.link.y0+Q.link.width/2,Rt=Q.link.y1-Q.link.width/2,bt=Q.link.y1+Q.link.width/2,At="M"+Z+","+Tt,mt="C"+ct+","+Tt+" "+gt+","+Rt+" "+st+","+Rt,Lt="C"+gt+","+bt+" "+ct+","+wt+" "+Z+","+wt,Ht=ot>0?"L"+(st+ot)+","+(Rt+Q.link.width/2):"";return Ht+="L"+st+","+bt,At+mt+Ht+Lt+"Z"}return V}function s(tt,V){var Q=p(V.color),ot=v.nodePadAcross,$=tt.nodePad/2;V.dx=V.x1-V.x0,V.dy=V.y1-V.y0;var Z=V.dx,st=Math.max(.5,V.dy),nt="node_"+V.pointNumber;return V.group&&(nt=a.randstr()),V.trace=tt.trace,V.curveNumber=tt.trace.index,{index:V.pointNumber,key:nt,partOfGroup:V.partOfGroup||!1,group:V.group,traceId:tt.key,trace:tt.trace,node:V,nodePad:tt.nodePad,nodeLineColor:tt.nodeLineColor,nodeLineWidth:tt.nodeLineWidth,textFont:tt.textFont,size:tt.horizontal?tt.height:tt.width,visibleWidth:Math.ceil(Z),visibleHeight:st,zoneX:-ot,zoneY:-$,zoneWidth:Z+2*ot,zoneHeight:st+2*$,labelY:tt.horizontal?V.dy/2+1:V.dx/2+1,left:V.originalLayer===1,sizeAcross:tt.width,forceLayouts:tt.forceLayouts,horizontal:tt.horizontal,darkBackground:Q.getBrightness()<=128,tinyColorHue:r.tinyRGB(Q),tinyColorAlpha:Q.getAlpha(),valueFormat:tt.valueFormat,valueSuffix:tt.valueSuffix,sankey:tt.sankey,graph:tt.graph,arrangement:tt.arrangement,uniqueNodeLabelPathId:[tt.guid,tt.key,nt].join("_"),interactionState:tt.interactionState,figure:tt}}function L(tt){tt.attr("transform",function(V){return n(V.node.x0.toFixed(3),V.node.y0.toFixed(3))})}function M(tt){tt.call(L)}function z(tt,V){tt.call(M),V.attr("d",T())}function D(tt){tt.attr("width",function(V){return V.node.x1-V.node.x0}).attr("height",function(V){return V.visibleHeight})}function N(tt){return tt.link.width>1||tt.linkLineWidth>0}function I(tt){var V=n(tt.translateX,tt.translateY);return V+(tt.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function k(tt,V,Q){tt.on(".basic",null).on("mouseover.basic",function(ot){!ot.interactionState.dragInProgress&&!ot.partOfGroup&&(Q.hover(this,ot,V),ot.interactionState.hovered=[this,ot])}).on("mousemove.basic",function(ot){!ot.interactionState.dragInProgress&&!ot.partOfGroup&&(Q.follow(this,ot),ot.interactionState.hovered=[this,ot])}).on("mouseout.basic",function(ot){!ot.interactionState.dragInProgress&&!ot.partOfGroup&&(Q.unhover(this,ot,V),ot.interactionState.hovered=!1)}).on("click.basic",function(ot){ot.interactionState.hovered&&(Q.unhover(this,ot,V),ot.interactionState.hovered=!1),!ot.interactionState.dragInProgress&&!ot.partOfGroup&&Q.select(this,ot,V)})}function B(tt,V,Q,ot){var $=i.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(a.ensureSingle(ot._fullLayout._infolayer,"g","dragcover",function(nt){ot._fullLayout._dragCover=nt}),a.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,it(Z.node),Z.interactionState.hovered&&(Q.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var st=Z.traceId+"|"+Z.key;Z.forceLayouts[st]?Z.forceLayouts[st].alpha(1):O(tt,st,Z),H(tt,V,Z,st,ot)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var st=i.event.x,nt=i.event.y;Z.arrangement==="snap"?(Z.node.x0=st-Z.visibleWidth/2,Z.node.x1=st+Z.visibleWidth/2,Z.node.y0=nt-Z.visibleHeight/2,Z.node.y1=nt+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=st-Z.visibleWidth/2,Z.node.x1=st+Z.visibleWidth/2),nt=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,nt)),Z.node.y0=nt-Z.visibleHeight/2,Z.node.y1=nt+Z.visibleHeight/2),it(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),z(tt.filter(ut(Z)),V))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var st=0;st0)window.requestAnimationFrame(Z);else{var ct=Q.node.originalX;Q.node.x0=ct-Q.visibleWidth/2,Q.node.x1=ct+Q.visibleWidth/2,j(Q,$)}})}function Y(tt,V,Q,ot){return function(){for(var Z=0,st=0;st0&&ot.forceLayouts[V].alpha(0)}}function j(tt,V){for(var Q=[],ot=[],$=0;$I&&L[B].gap;)B--;for(H=L[B].s,k=L.length-1;k>B;k--)L[k].s=H;for(;ID[h]&&h=0;c--){var l=x[c];if(l.type==="scatter"&&l.xaxis===n.xaxis&&l.yaxis===n.yaxis){l.opacity=void 0;break}}}}}},18800:function(G,U,t){var g=t(3400),C=t(24040),i=t(52904),S=t(88200),x=t(43028),v=t(43980),p=t(31147),r=t(43912),e=t(74428),a=t(66828),n=t(11731),f=t(124),c=t(70840),l=t(3400).coercePattern;G.exports=function(h,b,u,o){function d(L,M){return g.coerce(h,b,i,L,M)}var w=v(h,b,o,d);if(w||(b.visible=!1),!!b.visible){p(h,b,o,d),d("xhoverformat"),d("yhoverformat");var A=r(h,b,o,d);o.scattermode==="group"&&b.orientation===void 0&&d("orientation","v");var _=!A&&w=Math.min(it,ut)&&h<=Math.max(it,ut)?0:1/0}var J=Math.max(3,et.mrc||0),X=1-1/J,tt=Math.abs(l.c2p(et.x)-h);return tt=Math.min(it,ut)&&b<=Math.max(it,ut)?0:1/0}var J=Math.max(3,et.mrc||0),X=1-1/J,tt=Math.abs(m.c2p(et.y)-b);return ttQ!=Tt>=Q&&(nt=Z[$-1][0],ct=Z[$][0],Tt-gt&&(st=nt+(ct-nt)*(Q-gt)/(Tt-gt),J=Math.min(J,st),X=Math.max(X,st)));return J=Math.max(J,0),X=Math.min(X,l._length),{x0:J,x1:X,y0:Q,y1:Q}}if(o.indexOf("fills")!==-1&&c._fillElement){var H=B(c._fillElement)&&!B(c._fillExclusionElement);if(H){var Y=O(c._polygons);Y===null&&(Y={x0:u[0],x1:u[0],y0:u[1],y1:u[1]});var j=x.defaultLine;return x.opacity(c.fillcolor)?j=c.fillcolor:x.opacity((c.line||{}).color)&&(j=c.line.color),g.extendFlat(r,{distance:r.maxHoverDistance,x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1,color:j,hovertemplate:!1}),delete r.index,c.text&&!g.isArrayOrTypedArray(c.text)?r.text=String(c.text):r.text=c.name,[r]}}}},65875:function(G,U,t){var g=t(43028);G.exports={hasLines:g.hasLines,hasMarkers:g.hasMarkers,hasText:g.hasText,isBubble:g.isBubble,attributes:t(52904),layoutAttributes:t(55308),supplyDefaults:t(18800),crossTraceDefaults:t(35036),supplyLayoutDefaults:t(59748),calc:t(16356).calc,crossTraceCalc:t(96664),arraysToCalcdata:t(20148),plot:t(96504),colorbar:t(5528),formatLabels:t(76688),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(98723),selectPoints:t(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:t(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308:function(G){G.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},59748:function(G,U,t){var g=t(3400),C=t(55308);G.exports=function(i,S){function x(p,r){return g.coerce(i,S,C,p,r)}var v=S.barmode==="group";S.scattermode==="group"&&x("scattergap",v?S.bargap:.2)}},66828:function(G,U,t){var g=t(3400).isArrayOrTypedArray,C=t(94288).hasColorscale,i=t(27260);G.exports=function(x,v,p,r,e,a){a||(a={});var n=(x.marker||{}).color;if(n&&n._inputArray&&(n=n._inputArray),e("line.color",p),C(x,"line"))i(x,v,r,e,{prefix:"line.",cLetter:"c"});else{var f=(g(n)?!1:n)||p;e("line.color",f)}e("line.width"),a.noDash||e("line.dash"),a.backoff&&e("line.backoff")}},52340:function(G,U,t){var g=t(43616),C=t(39032),i=C.BADNUM,S=C.LOG_CLIP,x=S+.5,v=S-.5,p=t(3400),r=p.segmentsIntersect,e=p.constrain,a=t(88200);G.exports=function(f,c){var l=c.trace||{},m=c.xaxis,h=c.yaxis,b=m.type==="log",u=h.type==="log",o=m._length,d=h._length,w=c.backoff,A=l.marker,_=c.connectGaps,y=c.baseTolerance,E=c.shape,T=E==="linear",s=l.fill&&l.fill!=="none",L=[],M=a.minTolerance,z=f.length,D=new Array(z),N=0,I,k,B,O,H,Y,j,et,it,ut,J,X,tt,V,Q,ot;function $(me){var be=f[me];if(!be)return!1;var ve=c.linearized?m.l2p(be.x):m.c2p(be.x),Le=c.linearized?h.l2p(be.y):h.c2p(be.y);if(ve===i){if(b&&(ve=m.c2p(be.x,!0)),ve===i)return!1;u&&Le===i&&(ve*=Math.abs(m._m*d*(m._m>0?x:v)/(h._m*o*(h._m>0?x:v)))),ve*=1e3}if(Le===i){if(u&&(Le=h.c2p(be.y,!0)),Le===i)return!1;Le*=1e3}return[ve,Le]}function Z(me,be,ve,Le){var ce=ve-me,Te=Le-be,Be=.5-me,ir=.5-be,pe=ce*ce+Te*Te,Xe=ce*Be+Te*ir;if(Xe>0&&Xe1||Math.abs(Be.y-ve[0][1])>1)&&(Be=[Be.x,Be.y],Le&>(Be,me)Rt||me[1]At)return[e(me[0],wt,Rt),e(me[1],bt,At)]}function $t(me,be){if(me[0]===be[0]&&(me[0]===wt||me[0]===Rt)||me[1]===be[1]&&(me[1]===bt||me[1]===At))return!0}function le(me,be){var ve=[],Le=Kt(me),ce=Kt(be);return Le&&ce&&$t(Le,ce)||(Le&&ve.push(Le),ce&&ve.push(ce)),ve}function he(me,be,ve){return function(Le,ce){var Te=Kt(Le),Be=Kt(ce),ir=[];if(Te&&Be&&$t(Te,Be))return ir;Te&&ir.push(Te),Be&&ir.push(Be);var pe=2*p.constrain((Le[me]+ce[me])/2,be,ve)-((Te||Le)[me]+(Be||ce)[me]);if(pe){var Xe;Te&&Be?Xe=pe>0==Te[me]>Be[me]?Te:Be:Xe=Te||Be,Xe[me]+=pe}return ir}}var de;E==="linear"||E==="spline"?de=re:E==="hv"||E==="vh"?de=le:E==="hvh"?de=he(0,wt,Rt):E==="vhv"&&(de=he(1,bt,At));function xe(me,be){var ve=be[0]-me[0],Le=(be[1]-me[1])/ve,ce=(me[1]*be[0]-be[1]*me[0])/ve;return ce>0?[Le>0?wt:Rt,At]:[Le>0?Rt:wt,bt]}function Se(me){var be=me[0],ve=me[1],Le=be===D[N-1][0],ce=ve===D[N-1][1];if(!(Le&&ce))if(N>1){var Te=be===D[N-2][0],Be=ve===D[N-2][1];Le&&(be===wt||be===Rt)&&Te?Be?N--:D[N-1]=me:ce&&(ve===bt||ve===At)&&Be?Te?N--:D[N-1]=me:D[N++]=me}else D[N++]=me}function ne(me){D[N-1][0]!==me[0]&&D[N-1][1]!==me[1]&&Se([Ut,kt]),Se(me),Vt=null,Ut=kt=0}var zt=p.isArrayOrTypedArray(A);function Xt(me){if(me&&w&&(me.i=I,me.d=f,me.trace=l,me.marker=zt?A[me.i]:A,me.backoff=w),st=me[0]/o,nt=me[1]/d,Lt=me[0]Rt?Rt:0,Ht=me[1]At?At:0,Lt||Ht){if(!N)D[N++]=[Lt||me[0],Ht||me[1]];else if(Vt){var be=de(Vt,me);be.length>1&&(ne(be[0]),D[N++]=be[1])}else It=de(D[N-1],me)[0],D[N++]=It;var ve=D[N-1];Lt&&Ht&&(ve[0]!==Lt||ve[1]!==Ht)?(Vt&&(Ut!==Lt&&kt!==Ht?Se(Ut&&kt?xe(Vt,me):[Ut||Lt,kt||Ht]):Ut&&kt&&Se([Ut,kt])),Se([Lt,Ht])):Ut-Lt&&kt-Ht&&Se([Lt||Ut,Ht||kt]),Vt=me,Ut=Lt,kt=Ht}else Vt&&ne(de(Vt,me)[0]),D[N++]=me}for(I=0;Ict(Y,Jt))break;B=Y,tt=it[0]*et[0]+it[1]*et[1],tt>J?(J=tt,O=Y,j=!1):tt=f.length||!Y)break;Xt(Y),k=Y}}Vt&&Se([Ut||Vt[0],kt||Vt[1]]),L.push(D.slice(0,N))}var Wt=E.slice(E.length-1);if(w&&Wt!=="h"&&Wt!=="v"){for(var Ft=!1,xt=-1,yt=[],Et=0;Et=0?r=c:(r=c=f,f++),r0?Math.max(a,p):0}}},5528:function(G){G.exports={container:"marker",min:"cmin",max:"cmax"}},74428:function(G,U,t){var g=t(76308),C=t(94288).hasColorscale,i=t(27260),S=t(43028);G.exports=function(v,p,r,e,a,n){var f=S.isBubble(v),c=(v.line||{}).color,l;if(n=n||{},c&&(r=c),a("marker.symbol"),a("marker.opacity",f?.7:1),a("marker.size"),n.noAngle||(a("marker.angle"),n.noAngleRef||a("marker.angleref"),n.noStandOff||a("marker.standoff")),a("marker.color",r),C(v,"marker")&&i(v,p,e,a,{prefix:"marker.",cLetter:"c"}),n.noSelect||(a("selected.marker.color"),a("unselected.marker.color"),a("selected.marker.size"),a("unselected.marker.size")),n.noLine||(c&&!Array.isArray(c)&&p.marker.color!==c?l=c:f?l=g.background:l=g.defaultLine,a("marker.line.color",l),C(v,"marker.line")&&i(v,p,e,a,{prefix:"marker.line.",cLetter:"c"}),a("marker.line.width",f?1:0)),f&&(a("marker.sizeref"),a("marker.sizemin"),a("marker.sizemode")),n.gradient){var m=a("marker.gradient.type");m!=="none"&&a("marker.gradient.color")}}},31147:function(G,U,t){var g=t(3400).dateTick0,C=t(39032),i=C.ONEWEEK;function S(x,v){return x%i===0?g(v,1):g(v,0)}G.exports=function(v,p,r,e,a){if(a||(a={x:!0,y:!0}),a.x){var n=e("xperiod");n&&(e("xperiod0",S(n,p.xcalendar)),e("xperiodalignment"))}if(a.y){var f=e("yperiod");f&&(e("yperiod0",S(f,p.ycalendar)),e("yperiodalignment"))}}},96504:function(G,U,t){var g=t(33428),C=t(24040),i=t(3400),S=i.ensureSingle,x=i.identity,v=t(43616),p=t(43028),r=t(52340),e=t(14328),a=t(92065).tester;G.exports=function(m,h,b,u,o,d){var w,A,_=!o,y=!!o&&o.duration>0,E=e(m,h,b);if(w=u.selectAll("g.trace").data(E,function(s){return s[0].trace.uid}),w.enter().append("g").attr("class",function(s){return"trace scatter trace"+s[0].trace.uid}).style("stroke-miterlimit",2),w.order(),n(m,w,h),y){d&&(A=d());var T=g.transition().duration(o.duration).ease(o.easing).each("end",function(){A&&A()}).each("interrupt",function(){A&&A()});T.each(function(){u.selectAll("g.trace").each(function(s,L){f(m,L,h,s,E,this,o)})})}else w.each(function(s,L){f(m,L,h,s,E,this,o)});_&&w.exit().remove(),u.selectAll("path:not([d])").remove()};function n(l,m,h){m.each(function(b){var u=S(g.select(this),"g","fills");v.setClipUrl(u,h.layerClipId,l);var o=b[0].trace,d=[];o._ownfill&&d.push("_ownFill"),o._nexttrace&&d.push("_nextFill");var w=u.selectAll("g").data(d,x);w.enter().append("g"),w.exit().each(function(A){o[A]=null}).remove(),w.order().each(function(A){o[A]=S(g.select(this),"path","js-fill")})})}function f(l,m,h,b,u,o,d){var w=l._context.staticPlot,A;c(l,m,h,b,u);var _=!!d&&d.duration>0;function y(Se){return _?Se.transition():Se}var E=h.xaxis,T=h.yaxis,s=b[0].trace,L=s.line,M=g.select(o),z=S(M,"g","errorbars"),D=S(M,"g","lines"),N=S(M,"g","points"),I=S(M,"g","text");if(C.getComponentMethod("errorbars","plot")(l,z,h,d),s.visible!==!0)return;y(M).style("opacity",s.opacity);var k,B,O=s.fill.charAt(s.fill.length-1);O!=="x"&&O!=="y"&&(O="");var H,Y;O==="y"?(H=1,Y=T.c2p(0,!0)):O==="x"&&(H=0,Y=E.c2p(0,!0)),b[0][h.isRangePlot?"nodeRangePlot3":"node3"]=M;var j="",et=[],it=s._prevtrace,ut=null,J=null;it&&(j=it._prevRevpath||"",B=it._nextFill,et=it._ownPolygons,ut=it._fillsegments,J=it._fillElement);var X,tt,V="",Q="",ot,$,Z,st,nt,ct,gt=[];s._polygons=[];var Tt=[],wt=[],Rt=i.noop;if(k=s._ownFill,p.hasLines(s)||s.fill!=="none"){B&&B.datum(b),["hv","vh","hvh","vhv"].indexOf(L.shape)!==-1?(ot=v.steps(L.shape),$=v.steps(L.shape.split("").reverse().join(""))):L.shape==="spline"?ot=$=function(Se){var ne=Se[Se.length-1];return Se.length>1&&Se[0][0]===ne[0]&&Se[0][1]===ne[1]?v.smoothclosed(Se.slice(1),L.smoothing):v.smoothopen(Se,L.smoothing)}:ot=$=function(Se){return"M"+Se.join("L")},Z=function(Se){return $(Se.reverse())},wt=r(b,{xaxis:E,yaxis:T,trace:s,connectGaps:s.connectgaps,baseTolerance:Math.max(L.width||1,3)/4,shape:L.shape,backoff:L.backoff,simplify:L.simplify,fill:s.fill}),Tt=new Array(wt.length);var bt=0;for(A=0;A=w[0]&&M.x<=w[1]&&M.y>=A[0]&&M.y<=A[1]}),T=Math.ceil(E.length/y),s=0;u.forEach(function(M,z){var D=M[0].trace;p.hasMarkers(D)&&D.marker.maxdisplayed>0&&z0){var h=r.c2l(l);r._lowerLogErrorBound||(r._lowerLogErrorBound=h),r._lowerErrorBound=Math.min(r._lowerLogErrorBound,h)}}else a[n]=[-f[0]*p,f[1]*p]}return a}function i(x){for(var v=0;v-1?-1:M.indexOf("right")>-1?1:0}function d(M){return M==null?0:M.indexOf("top")>-1?-1:M.indexOf("bottom")>-1?1:0}function w(M){var z=0,D=0,N=[z,D];if(Array.isArray(M))for(var I=0;I=0){var Y=b(O.position,O.delaunayColor,O.delaunayAxis);Y.opacity=M.opacity,this.delaunayMesh?this.delaunayMesh.update(Y):(Y.gl=z,this.delaunayMesh=S(Y),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},h.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function L(M,z){var D=new m(M,z.uid);return D.update(z),D}G.exports=L},83484:function(G,U,t){var g=t(24040),C=t(3400),i=t(43028),S=t(74428),x=t(66828),v=t(124),p=t(91592);G.exports=function(a,n,f,c){function l(A,_){return C.coerce(a,n,p,A,_)}var m=r(a,n,l,c);if(!m){n.visible=!1;return}l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),l("mode"),i.hasMarkers(n)&&S(a,n,f,c,l,{noSelect:!0,noAngle:!0}),i.hasLines(n)&&(l("connectgaps"),x(a,n,f,c,l)),i.hasText(n)&&(l("texttemplate"),v(a,n,c,l,{noSelect:!0}));var h=(n.line||{}).color,b=(n.marker||{}).color;l("surfaceaxis")>=0&&l("surfacecolor",h||b);for(var u=["x","y","z"],o=0;o<3;++o){var d="projection."+u[o];l(d+".show")&&(l(d+".opacity"),l(d+".scale"))}var w=g.getComponentMethod("errorbars","supplyDefaults");w(a,n,h||b||f,{axis:"z"}),w(a,n,h||b||f,{axis:"y",inherit:"z"}),w(a,n,h||b||f,{axis:"x",inherit:"z"})};function r(e,a,n,f){var c=0,l=n("x"),m=n("y"),h=n("z"),b=g.getComponentMethod("calendars","handleTraceDefaults");return b(e,a,["x","y","z"],f),l&&m&&h&&(c=Math.min(l.length,m.length,h.length),a._length=a._xlength=a._ylength=a._zlength=c),c}},3296:function(G,U,t){G.exports={plot:t(41064),attributes:t(91592),markerSymbols:t(87792),supplyDefaults:t(83484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:t(41484),moduleType:"trace",name:"scatter3d",basePlotModule:t(12536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},90372:function(G,U,t){var g=t(98304),C=t(52904),i=t(45464),S=t(21776).Ks,x=t(21776).Gw,v=t(49084),p=t(92880).extendFlat,r=C.marker,e=C.line,a=r.line;G.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:p({},C.mode,{dflt:"markers"}),text:p({},C.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","text"]}),hovertext:p({},C.hovertext,{}),line:{color:e.color,width:e.width,dash:e.dash,backoff:e.backoff,shape:p({},e.shape,{values:["linear","spline"]}),smoothing:e.smoothing,editType:"calc"},connectgaps:C.connectgaps,fill:p({},C.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:g(),marker:p({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:p({width:a.width,editType:"calc"},v("marker.line")),gradient:r.gradient,editType:"calc"},v("marker")),textfont:C.textfont,textposition:C.textposition,selected:C.selected,unselected:C.unselected,hoverinfo:p({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:C.hoveron,hovertemplate:S()}},48228:function(G,U,t){var g=t(38248),C=t(90136),i=t(20148),S=t(4500),x=t(16356).calcMarkerSize,v=t(50948);G.exports=function(r,e){var a=e._carpetTrace=v(r,e);if(!(!a||!a.visible||a.visible==="legendonly")){var n;e.xaxis=a.xaxis,e.yaxis=a.yaxis;var f=e._length,c=new Array(f),l,m,h=!1;for(n=0;n0?y=A.labelprefix.replace(/ = $/,""):y=A._hovertitle,u.push(y+": "+_.toFixed(3)+A.labelsuffix)}if(!m.hovertemplate){var d=l.hi||m.hoverinfo,w=d.split("+");w.indexOf("all")!==-1&&(w=["a","b","text"]),w.indexOf("a")!==-1&&o(h.aaxis,l.a),w.indexOf("b")!==-1&&o(h.baxis,l.b),u.push("y: "+e.yLabel),w.indexOf("text")!==-1&&C(l,m,u),e.extraText=u.join("
    ")}return r}},4184:function(G,U,t){G.exports={attributes:t(90372),supplyDefaults:t(6176),colorbar:t(5528),formatLabels:t(52364),calc:t(48228),plot:t(20036),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(58960),selectPoints:t(91560),eventData:t(89307),moduleType:"trace",name:"scattercarpet",basePlotModule:t(57952),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},20036:function(G,U,t){var g=t(96504),C=t(54460),i=t(43616);G.exports=function(x,v,p,r){var e,a,n,f=p[0][0].carpet,c=C.getFromId(x,f.xaxis||"x"),l=C.getFromId(x,f.yaxis||"y"),m={xaxis:c,yaxis:l,plot:v.plot};for(e=0;e")}},36952:function(G,U,t){G.exports={attributes:t(6096),supplyDefaults:t(86188),colorbar:t(5528),formatLabels:t(56696),calc:t(25212),calcGeoJSON:t(48691).calcGeoJSON,plot:t(48691).plot,style:t(25064),styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(64292),eventData:t(58544),selectPoints:t(8796),moduleType:"trace",name:"scattergeo",basePlotModule:t(10816),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},48691:function(G,U,t){var g=t(33428),C=t(3400),i=t(59972).getTopojsonFeatures,S=t(44808),x=t(27144),v=t(19280).findExtremes,p=t(39032).BADNUM,r=t(16356).calcMarkerSize,e=t(43028),a=t(25064);function n(c,l,m){var h=l.layers.frontplot.select(".scatterlayer"),b=C.makeTraceGroups(h,m,"trace scattergeo");function u(o,d){o.lonlat[0]===p&&g.select(d).remove()}b.selectAll("*").remove(),b.each(function(o){var d=g.select(this),w=o[0].trace;if(e.hasLines(w)||w.fill!=="none"){var A=S.calcTraceToLineCoords(o),_=w.fill!=="none"?S.makePolygon(A):S.makeLine(A);d.selectAll("path.js-line").data([{geojson:_,trace:w}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}e.hasMarkers(w)&&d.selectAll("path.point").data(C.identity).enter().append("path").classed("point",!0).each(function(y){u(y,this)}),e.hasText(w)&&d.selectAll("g").data(C.identity).enter().append("g").append("text").each(function(y){u(y,this)}),a(c,o)})}function f(c,l){var m=c[0].trace,h=l[m.geo],b=h._subplot,u=m._length,o,d;if(C.isArrayOrTypedArray(m.locations)){var w=m.locationmode,A=w==="geojson-id"?x.extractTraceFeature(c):i(m,b.topojson);for(o=0;o=l,T=y*2,s={},L,M=w.makeCalcdata(o,"x"),z=A.makeCalcdata(o,"y"),D=x(o,w,"x",M),N=x(o,A,"y",z),I=D.vals,k=N.vals;o._x=I,o._y=k,o.xperiodalignment&&(o._origX=M,o._xStarts=D.starts,o._xEnds=D.ends),o.yperiodalignment&&(o._origY=z,o._yStarts=N.starts,o._yEnds=N.ends);var B=new Array(T),O=new Array(y);for(L=0;L1&&C.extendFlat(_.line,n.linePositions(b,o,d)),_.errorX||_.errorY){var y=n.errorBarPositions(b,o,d,w,A);_.errorX&&C.extendFlat(_.errorX,y.x),_.errorY&&C.extendFlat(_.errorY,y.y)}return _.text&&(C.extendFlat(_.text,{positions:d},n.textPosition(b,o,_.text,_.marker)),C.extendFlat(_.textSel,{positions:d},n.textPosition(b,o,_.text,_.markerSel)),C.extendFlat(_.textUnsel,{positions:d},n.textPosition(b,o,_.text,_.markerUnsel))),_}},67072:function(G){var U=20;G.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:U,SYMBOL_STROKE:U/20,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},84236:function(G,U,t){var g=t(38248),C=t(20472),i=t(72160),S=t(24040),x=t(3400),v=x.isArrayOrTypedArray,p=t(43616),r=t(79811),e=t(33040).formatColor,a=t(43028),n=t(7152),f=t(80088),c=t(67072),l=t(13448).DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},h=t(10624).appendArrayPointValue;function b(N,I){var k,B={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},O=N._context.plotGlPixelRatio;if(I.visible!==!0)return B;if(a.hasText(I)&&(B.text=u(N,I),B.textSel=w(N,I,I.selected),B.textUnsel=w(N,I,I.unselected)),a.hasMarkers(I)&&(B.marker=o(N,I),B.markerSel=d(N,I,I.selected),B.markerUnsel=d(N,I,I.unselected),!I.unselected&&v(I.marker.opacity))){var H=I.marker.opacity;for(B.markerUnsel.opacity=new Array(H.length),k=0;kc.TOO_MANY_POINTS||a.hasMarkers(I)?"rect":"round";if(it&&I.connectgaps){var J=H[0],X=H[1];for(Y=0;Y1?et[Y]:et[0]:et,tt=v(it)?it.length>1?it[Y]:it[0]:it,V=m[X],Q=m[tt],ot=ut?ut/.8+1:0,$=-Q*ot-Q*.5;H.offset[Y]=[V*ot/J,$/J]}}return H}G.exports={style:b,markerStyle:o,markerSelection:d,linePositions:M,errorBarPositions:z,textPosition:D}},80220:function(G,U,t){var g=t(3400),C=t(24040),i=t(80088),S=t(2876),x=t(88200),v=t(43028),p=t(43980),r=t(31147),e=t(74428),a=t(66828),n=t(70840),f=t(124);G.exports=function(l,m,h,b){function u(T,s){return g.coerce(l,m,S,T,s)}var o=l.marker?i.isOpenSymbol(l.marker.symbol):!1,d=v.isBubble(l),w=p(l,m,b,u);if(!w){m.visible=!1;return}r(l,m,b,u),u("xhoverformat"),u("yhoverformat");var A=w100},U.isDotSymbol=function(C){return typeof C=="string"?g.DOT_RE.test(C):C>200}},41272:function(G,U,t){var g=t(24040),C=t(3400),i=t(44928);function S(v,p,r,e){var a=v.cd,n=a[0].t,f=a[0].trace,c=v.xa,l=v.ya,m=n.x,h=n.y,b=c.c2p(p),u=l.c2p(r),o=v.distance,d;if(n.tree){var w=c.p2c(b-o),A=c.p2c(b+o),_=l.p2c(u-o),y=l.p2c(u+o);e==="x"?d=n.tree.range(Math.min(w,A),Math.min(l._rl[0],l._rl[1]),Math.max(w,A),Math.max(l._rl[0],l._rl[1])):d=n.tree.range(Math.min(w,A),Math.min(_,y),Math.max(w,A),Math.max(_,y))}else d=n.ids;var E,T,s,L,M,z,D,N,I,k=o;if(e==="x"){var B=!!f.xperiodalignment,O=!!f.yperiodalignment;for(M=0;M=Math.min(H,Y)&&b<=Math.max(H,Y)?0:1/0}if(z=Math.min(j,et)&&u<=Math.max(j,et)?0:1/0}I=Math.sqrt(z*z+D*D),T=d[M]}}}else for(M=d.length-1;M>-1;M--)E=d[M],s=m[E],L=h[E],z=c.c2p(s)-b,D=l.c2p(L)-u,N=Math.sqrt(z*z+D*D),No.glText.length){var s=E-o.glText.length;for(A=0;Ast&&(isNaN(Z[nt])||isNaN(Z[nt+1]));)nt-=2;$.positions=Z.slice(st,nt+2)}return $}),o.line2d.update(o.lineOptions)),o.error2d){var z=(o.errorXOptions||[]).concat(o.errorYOptions||[]);o.error2d.update(z)}o.scatter2d&&o.scatter2d.update(o.markerOptions),o.fillOrder=x.repeat(null,E),o.fill2d&&(o.fillOptions=o.fillOptions.map(function($,Z){var st=b[Z];if(!(!$||!st||!st[0]||!st[0].trace)){var nt=st[0],ct=nt.trace,gt=nt.t,Tt=o.lineOptions[Z],wt,Rt,bt=[];ct._ownfill&&bt.push(Z),ct._nexttrace&&bt.push(Z+1),bt.length&&(o.fillOrder[Z]=bt);var At=[],mt=Tt&&Tt.positions||gt.positions,Lt,Ht;if(ct.fill==="tozeroy"){for(Lt=0;LtLt&&isNaN(mt[Ht+1]);)Ht-=2;mt[Lt+1]!==0&&(At=[mt[Lt],0]),At=At.concat(mt.slice(Lt,Ht+2)),mt[Ht+1]!==0&&(At=At.concat([mt[Ht],0]))}else if(ct.fill==="tozerox"){for(Lt=0;LtLt&&isNaN(mt[Ht]);)Ht-=2;mt[Lt]!==0&&(At=[0,mt[Lt+1]]),At=At.concat(mt.slice(Lt,Ht+2)),mt[Ht]!==0&&(At=At.concat([0,mt[Ht+1]]))}else if(ct.fill==="toself"||ct.fill==="tonext"){for(At=[],wt=0,$.splitNull=!0,Rt=0;Rt-1;for(A=0;A=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),A=w*360,_=a-A;function y(I){var k=I.lonlat;if(k[0]===x||o&&b.indexOf(I.i+1)===-1)return 1/0;var B=C.modHalf(k[0],360),O=k[1],H=h.project([B,O]),Y=H.x-l.c2p([_,O]),j=H.y-m.c2p([B,n]),et=Math.max(3,I.mrc||0);return Math.max(Math.sqrt(Y*Y+j*j)-et,1-3/et)}if(g.getClosest(f,y,e),e.index!==!1){var E=f[e.index],T=E.lonlat,s=[C.modHalf(T[0],360)+A,T[1]],L=l.c2p(s),M=m.c2p(s),z=E.mrc||1;e.x0=L-z,e.x1=L+z,e.y0=M-z,e.y1=M+z;var D={};D[c.subplot]={_subplot:h};var N=c._module.formatLabels(E,c,D);return e.lonLabel=N.lonLabel,e.latLabel=N.latLabel,e.color=i(c,E),e.extraText=r(c,E,f[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}function r(e,a,n){if(e.hovertemplate)return;var f=a.hi||e.hoverinfo,c=f.split("+"),l=c.indexOf("all")!==-1,m=c.indexOf("lon")!==-1,h=c.indexOf("lat")!==-1,b=a.lonlat,u=[];function o(d){return d+"°"}return l||m&&h?u.push("("+o(b[1])+", "+o(b[0])+")"):m?u.push(n.lon+o(b[0])):h&&u.push(n.lat+o(b[1])),(l||c.indexOf("text")!==-1)&&S(a,e,u),u.join("
    ")}G.exports={hoverPoints:p,getExtraText:r}},11572:function(G,U,t){G.exports={attributes:t(31512),supplyDefaults:t(15752),colorbar:t(5528),formatLabels:t(11960),calc:t(25212),plot:t(9660),hoverPoints:t(63312).hoverPoints,eventData:t(37920),selectPoints:t(404),styleOnSelect:function(g,C){if(C){var i=C[0].trace;i._glTrace.update(C)}},moduleType:"trace",name:"scattermapbox",basePlotModule:t(33688),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(G,U,t){var g=t(3400),C=t(59392),i=t(47552).traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function x(p,r,e,a){this.type="scattermapbox",this.subplot=p,this.uid=r,this.clusterEnabled=e,this.isHidden=a,this.sourceIds={fill:"source-"+r+"-fill",line:"source-"+r+"-line",circle:"source-"+r+"-circle",symbol:"source-"+r+"-symbol",cluster:"source-"+r+"-circle",clusterCount:"source-"+r+"-circle"},this.layerIds={fill:i+r+"-fill",line:i+r+"-line",circle:i+r+"-circle",symbol:i+r+"-symbol",cluster:i+r+"-cluster",clusterCount:i+r+"-cluster-count"},this.below=null}var v=x.prototype;v.addSource=function(p,r,e){var a={type:"geojson",data:r.geojson};e&&e.enabled&&g.extendFlat(a,{cluster:!0,clusterMaxZoom:e.maxzoom});var n=this.subplot.map.getSource(this.sourceIds[p]);n?n.setData(r.geojson):this.subplot.map.addSource(this.sourceIds[p],a)},v.setSourceData=function(p,r){this.subplot.map.getSource(this.sourceIds[p]).setData(r.geojson)},v.addLayer=function(p,r,e){var a={type:r.type,id:this.layerIds[p],source:this.sourceIds[p],layout:r.layout,paint:r.paint};r.filter&&(a.filter=r.filter);for(var n=this.layerIds[p],f,c=this.subplot.getMapLayers(),l=0;l=0;L--){var M=s[L];n.removeLayer(h.layerIds[M])}T||n.removeSource(h.sourceIds.circle)}function o(T){for(var s=S.nonCluster,L=0;L=0;L--){var M=s[L];n.removeLayer(h.layerIds[M]),T||n.removeSource(h.sourceIds[M])}}function w(T){m?u(T):d(T)}function A(T){l?b(T):o(T)}function _(){for(var T=l?S.cluster:S.nonCluster,s=0;s=0;a--){var n=e[a];r.removeLayer(this.layerIds[n]),r.removeSource(this.sourceIds[n])}},G.exports=function(r,e){var a=e[0].trace,n=a.cluster&&a.cluster.enabled,f=a.visible!==!0,c=new x(r,a.uid,n,f),l=C(r.gd,e),m=c.below=r.belowLookup["trace-"+a.uid],h,b,u;if(n)for(c.addSource("circle",l.circle,a.cluster),h=0;h")}}G.exports={hoverPoints:C,makeHoverPointText:i}},76924:function(G,U,t){G.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t(40872),categories:["polar","symbols","showLegend","scatter-like"],attributes:t(8319),supplyDefaults:t(85968).supplyDefaults,colorbar:t(5528),formatLabels:t(22852),calc:t(58320),plot:t(43456),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(8504).hoverPoints,selectPoints:t(91560),meta:{}}},43456:function(G,U,t){var g=t(96504),C=t(39032).BADNUM;G.exports=function(S,x,v){for(var p=x.layers.frontplot.select("g.scatterlayer"),r=x.xaxis,e=x.yaxis,a={xaxis:r,yaxis:e,plot:x.framework,layerClipId:x._hasClipOnAxisFalse?x.clipIds.forTraces:null},n=x.radialAxis,f=x.angularAxis,c=0;c=p&&(_.marker.cluster=o.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=s),_.line&&s.length>1&&v.extendFlat(_.line,x.linePositions(a,u,s)),_.text&&(v.extendFlat(_.text,{positions:s},x.textPosition(a,u,_.text,_.marker)),v.extendFlat(_.textSel,{positions:s},x.textPosition(a,u,_.text,_.markerSel)),v.extendFlat(_.textUnsel,{positions:s},x.textPosition(a,u,_.text,_.markerUnsel))),_.fill&&!m.fill2d&&(m.fill2d=!0),_.marker&&!m.scatter2d&&(m.scatter2d=!0),_.line&&!m.line2d&&(m.line2d=!0),_.text&&!m.glText&&(m.glText=!0),m.lineOptions.push(_.line),m.fillOptions.push(_.fill),m.markerOptions.push(_.marker),m.markerSelectedOptions.push(_.markerSel),m.markerUnselectedOptions.push(_.markerUnsel),m.textOptions.push(_.text),m.textSelectedOptions.push(_.textSel),m.textUnselectedOptions.push(_.textUnsel),m.selectBatch.push([]),m.unselectBatch.push([]),o.x=L,o.y=M,o.rawx=L,o.rawy=M,o.r=w,o.theta=A,o.positions=s,o._scene=m,o.index=m.count,m.count++}}),i(a,n,f)}},G.exports.reglPrecompiled=r},69496:function(G,U,t){var g=t(21776).Ks,C=t(21776).Gw,i=t(92880).extendFlat,S=t(98304),x=t(52904),v=t(45464),p=x.line;G.exports={mode:x.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:x.text,texttemplate:C({editType:"plot"},{keys:["real","imag","text"]}),hovertext:x.hovertext,line:{color:p.color,width:p.width,dash:p.dash,backoff:p.backoff,shape:i({},p.shape,{values:["linear","spline"]}),smoothing:p.smoothing,editType:"calc"},connectgaps:x.connectgaps,marker:x.marker,cliponaxis:i({},x.cliponaxis,{dflt:!1}),textposition:x.textposition,textfont:x.textfont,fill:i({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),hoverinfo:i({},v.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:x.hoveron,hovertemplate:g(),selected:x.selected,unselected:x.unselected}},47507:function(G,U,t){var g=t(38248),C=t(39032).BADNUM,i=t(90136),S=t(20148),x=t(4500),v=t(16356).calcMarkerSize;G.exports=function(r,e){for(var a=r._fullLayout,n=e.subplot,f=a[n].realaxis,c=a[n].imaginaryaxis,l=f.makeCalcdata(e,"real"),m=c.makeCalcdata(e,"imag"),h=e._length,b=new Array(h),u=0;u")}}G.exports={hoverPoints:C,makeHoverPointText:i}},95443:function(G,U,t){G.exports={moduleType:"trace",name:"scattersmith",basePlotModule:t(47788),categories:["smith","symbols","showLegend","scatter-like"],attributes:t(69496),supplyDefaults:t(76716),colorbar:t(5528),formatLabels:t(49504),calc:t(47507),plot:t(34927),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(25292).hoverPoints,selectPoints:t(91560),meta:{}}},34927:function(G,U,t){var g=t(96504),C=t(39032).BADNUM,i=t(36416),S=i.smith;G.exports=function(v,p,r){for(var e=p.layers.frontplot.select("g.scatterlayer"),a=p.xaxis,n=p.yaxis,f={xaxis:a,yaxis:n,plot:p.framework,layerClipId:p._hasClipOnAxisFalse?p.clipIds.forTraces:null},c=0;c"),r.hovertemplate=l.hovertemplate,p}},34864:function(G,U,t){G.exports={attributes:t(5896),supplyDefaults:t(84256),colorbar:t(5528),formatLabels:t(90404),calc:t(34335),plot:t(88776),style:t(49224).style,styleOnSelect:t(49224).styleOnSelect,hoverPoints:t(26596),selectPoints:t(91560),eventData:t(97476),moduleType:"trace",name:"scatterternary",basePlotModule:t(19352),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},88776:function(G,U,t){var g=t(96504);G.exports=function(i,S,x){var v=S.plotContainer;v.select(".scatterlayer").selectAll("*").remove();for(var p=S.xaxis,r=S.yaxis,e={xaxis:p,yaxis:r,plot:v,layerClipId:S._hasClipOnAxisFalse?S.clipIdRelative:null},a=S.layers.frontplot.select("g.scatterlayer"),n=0;na,L;for(s?L=h.sizeAvg||Math.max(h.size,3):L=i(c,m),w=0;wd&&h||o-1,I=S(h)||!!a.selectedpoints||N,k=!0;if(I){var B=a._length;if(a.selectedpoints){f.selectBatch=a.selectedpoints;var O=a.selectedpoints,H={};for(o=0;o1&&(T=r[n-1],L=e[n-1],z=a[n-1]),f=0;fT?"-":"+")+"x"),w=w.replace("y",(s>L?"-":"+")+"y"),w=w.replace("z",(M>z?"-":"+")+"z");var k=function(){n=0,D=[],N=[],I=[]};(!n||n2?h=l.slice(1,m-1):m===2?h=[(l[0]+l[1])/2]:h=l,h}function n(l){var m=l.length;return m===1?[.5,.5]:[l[1]-l[0],l[m-1]-l[m-2]]}function f(l,m){var h=l.fullSceneLayout,b=l.dataScale,u=m._len,o={};function d(ut,J){var X=h[J],tt=b[p[J]];return i.simpleMap(ut,function(V){return X.d2l(V)*tt})}if(o.vectors=v(d(m._u,"xaxis"),d(m._v,"yaxis"),d(m._w,"zaxis"),u),!u)return{positions:[],cells:[]};var w=d(m._Xs,"xaxis"),A=d(m._Ys,"yaxis"),_=d(m._Zs,"zaxis");o.meshgrid=[w,A,_],o.gridFill=m._gridFill;var y=m._slen;if(y)o.startingPositions=v(d(m._startsX,"xaxis"),d(m._startsY,"yaxis"),d(m._startsZ,"zaxis"));else{for(var E=A[0],T=a(w),s=a(_),L=new Array(T.length*s.length),M=0,z=0;z=0},L,M,z;b?(L=Math.min(h.length,o.length),M=function(V){return T(h[V])&&s(V)},z=function(V){return String(h[V])}):(L=Math.min(u.length,o.length),M=function(V){return T(u[V])&&s(V)},z=function(V){return String(u[V])}),w&&(L=Math.min(L,d.length));for(var D=0;D1){for(var H=i.randstr(),Y=0;Y=0){x.i=e.i;var f=v.marker;f.pattern?(!f.colors||!f.pattern.shape)&&(f.color=n,x.color=n):(f.color=n,x.color=n),g.pointStyle(S,v,p,x)}else C.fill(S,n)}},45716:function(G,U,t){var g=t(33428),C=t(24040),i=t(10624).appendArrayPointValue,S=t(93024),x=t(3400),v=t(95924),p=t(78176),r=t(69656),e=r.formatPieValue;G.exports=function(f,c,l,m,h){var b=m[0],u=b.trace,o=b.hierarchy,d=u.type==="sunburst",w=u.type==="treemap"||u.type==="icicle";"_hasHoverLabel"in u||(u._hasHoverLabel=!1),"_hasHoverEvent"in u||(u._hasHoverEvent=!1);var A=function(E){var T=l._fullLayout;if(!(l._dragging||T.hovermode===!1)){var s=l._fullData[u.index],L=E.data.data,M=L.i,z=p.isHierarchyRoot(E),D=p.getParent(o,E),N=p.getValue(E),I=function(Z){return x.castOption(s,M,Z)},k=I("hovertemplate"),B=S.castHoverinfo(s,T,M),O=T.separators,H;if(k||B&&B!=="none"&&B!=="skip"){var Y,j;d&&(Y=b.cx+E.pxmid[0]*(1-E.rInscribed),j=b.cy+E.pxmid[1]*(1-E.rInscribed)),w&&(Y=E._hoverX,j=E._hoverY);var et={},it=[],ut=[],J=function(Z){return it.indexOf(Z)!==-1};B&&(it=B==="all"?s._module.attributes.hoverinfo.flags:B.split("+")),et.label=L.label,J("label")&&et.label&&ut.push(et.label),L.hasOwnProperty("v")&&(et.value=L.v,et.valueLabel=e(et.value,O),J("value")&&ut.push(et.valueLabel)),et.currentPath=E.currentPath=p.getPath(E.data),J("current path")&&!z&&ut.push(et.currentPath);var X,tt=[],V=function(){tt.indexOf(X)===-1&&(ut.push(X),tt.push(X))};et.percentParent=E.percentParent=N/p.getValue(D),et.parent=E.parentString=p.getPtLabel(D),J("percent parent")&&(X=p.formatPercent(et.percentParent,O)+" of "+et.parent,V()),et.percentEntry=E.percentEntry=N/p.getValue(c),et.entry=E.entry=p.getPtLabel(c),J("percent entry")&&!z&&!E.onPathbar&&(X=p.formatPercent(et.percentEntry,O)+" of "+et.entry,V()),et.percentRoot=E.percentRoot=N/p.getValue(o),et.root=E.root=p.getPtLabel(o),J("percent root")&&!z&&(X=p.formatPercent(et.percentRoot,O)+" of "+et.root,V()),et.text=I("hovertext")||I("text"),J("text")&&(X=et.text,x.isValidTextValue(X)&&ut.push(X)),H=[a(E,s,h.eventDataKeys)];var Q={trace:s,y:j,_x0:E._x0,_x1:E._x1,_y0:E._y0,_y1:E._y1,text:ut.join("
    "),name:k||J("name")?s.name:void 0,color:I("hoverlabel.bgcolor")||L.color,borderColor:I("hoverlabel.bordercolor"),fontFamily:I("hoverlabel.font.family"),fontSize:I("hoverlabel.font.size"),fontColor:I("hoverlabel.font.color"),nameLength:I("hoverlabel.namelength"),textAlign:I("hoverlabel.align"),hovertemplate:k,hovertemplateLabels:et,eventData:H};d&&(Q.x0=Y-E.rInscribed*E.rpx1,Q.x1=Y+E.rInscribed*E.rpx1,Q.idealAlign=E.pxmid[0]<0?"left":"right"),w&&(Q.x=Y,Q.idealAlign=Y<0?"left":"right");var ot=[];S.loneHover(Q,{container:T._hoverlayer.node(),outerContainer:T._paper.node(),gd:l,inOut_bbox:ot}),H[0].bbox=ot[0],u._hasHoverLabel=!0}if(w){var $=f.select("path.surface");h.styleOne($,E,s,l,{hovered:!0})}u._hasHoverEvent=!0,l.emit("plotly_hover",{points:H||[a(E,s,h.eventDataKeys)],event:g.event})}},_=function(E){var T=l._fullLayout,s=l._fullData[u.index],L=g.select(this).datum();if(u._hasHoverEvent&&(E.originalEvent=g.event,l.emit("plotly_unhover",{points:[a(L,s,h.eventDataKeys)],event:g.event}),u._hasHoverEvent=!1),u._hasHoverLabel&&(S.loneUnhover(T._hoverlayer.node()),u._hasHoverLabel=!1),w){var M=f.select("path.surface");h.styleOne(M,L,s,l,{hovered:!1})}},y=function(E){var T=l._fullLayout,s=l._fullData[u.index],L=d&&(p.isHierarchyRoot(E)||p.isLeaf(E)),M=p.getPtId(E),z=p.isEntry(E)?p.findEntryWithChild(o,M):p.findEntryWithLevel(o,M),D=p.getPtId(z),N={points:[a(E,s,h.eventDataKeys)],event:g.event};L||(N.nextLevel=D);var I=v.triggerHandler(l,"plotly_"+u.type+"click",N);if(I!==!1&&T.hovermode&&(l._hoverdata=[a(E,s,h.eventDataKeys)],S.click(l,g.event)),!L&&I!==!1&&!l._dragging&&!l._transitioning){C.call("_storeDirectGUIEdit",s,T._tracePreGUI[s.uid],{level:s.level});var k={data:[{level:D}],traces:[u.index]},B={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(T._hoverlayer.node()),C.call("animate",l,k,B)}};f.on("mouseover",A),f.on("mouseout",_),f.on("click",y)};function a(n,f,c){for(var l=n.data.data,m={curveNumber:f.index,pointNumber:l.i,data:f._input,fullData:f},h=0;h0)},U.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},U.isHeader=function(r,e){return!(U.isLeaf(r)||r.depth===e._maxDepth-1)};function p(r){return r.data.data.pid}U.getParent=function(r,e){return U.findEntryWithLevel(r,p(e))},U.listPath=function(r,e){var a=r.parent;if(!a)return[];var n=e?[a.data[e]]:[a];return U.listPath(a,e).concat(n)},U.getPath=function(r){return U.listPath(r,"label").join("/")+"/"},U.formatValue=S.formatPieValue,U.formatPercent=function(r,e){var a=g.formatPercent(r,0);return a==="0%"&&(a=S.formatPiePercent(r,e)),a}},5621:function(G,U,t){G.exports={moduleType:"trace",name:"sunburst",basePlotModule:t(54904),categories:[],animatable:!0,attributes:t(424),layoutAttributes:t(84920),supplyDefaults:t(25244),supplyLayoutDefaults:t(28732),calc:t(3776).calc,crossTraceCalc:t(3776).crossTraceCalc,plot:t(96488).plot,style:t(85676).style,colorbar:t(5528),meta:{}}},84920:function(G){G.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},28732:function(G,U,t){var g=t(3400),C=t(84920);G.exports=function(S,x){function v(p,r){return g.coerce(S,x,C,p,r)}v("sunburstcolorway",x.colorway),v("extendsunburstcolors")}},96488:function(G,U,t){var g=t(33428),C=t(74148),i=t(67756).qy,S=t(43616),x=t(3400),v=t(72736),p=t(82744),r=p.recordMinTextSize,e=p.clearMinTextSize,a=t(37820),n=t(69656).getRotationAngle,f=a.computeTransform,c=a.transformInsideText,l=t(85676).styleOne,m=t(60100).resizeText,h=t(45716),b=t(27328),u=t(78176);U.plot=function(y,E,T,s){var L=y._fullLayout,M=L._sunburstlayer,z,D,N=!T,I=!L.uniformtext.mode&&u.hasTransition(T);if(e("sunburst",L),z=M.selectAll("g.trace.sunburst").data(E,function(B){return B[0].trace.uid}),z.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),z.order(),I){s&&(D=s());var k=g.transition().duration(T.duration).ease(T.easing).each("end",function(){D&&D()}).each("interrupt",function(){D&&D()});k.each(function(){M.selectAll("g.trace").each(function(B){o(y,B,this,T)})})}else z.each(function(B){o(y,B,this,T)}),L.uniformtext.mode&&m(y,L._sunburstlayer.selectAll(".trace"),"sunburst");N&&z.exit().remove()};function o(y,E,T,s){var L=y._context.staticPlot,M=y._fullLayout,z=!M.uniformtext.mode&&u.hasTransition(s),D=g.select(T),N=D.selectAll("g.slice"),I=E[0],k=I.trace,B=I.hierarchy,O=u.findEntryWithLevel(B,k.level),H=u.getMaxDepth(k),Y=M._size,j=k.domain,et=Y.w*(j.x[1]-j.x[0]),it=Y.h*(j.y[1]-j.y[0]),ut=.5*Math.min(et,it),J=I.cx=Y.l+Y.w*(j.x[1]+j.x[0])/2,X=I.cy=Y.t+Y.h*(1-j.y[0])-it/2;if(!O)return N.remove();var tt=null,V={};z&&N.each(function(Vt){V[u.getPtId(Vt)]={rpx0:Vt.rpx0,rpx1:Vt.rpx1,x0:Vt.x0,x1:Vt.x1,transform:Vt.transform},!tt&&u.isEntry(Vt)&&(tt=Vt)});var Q=d(O).descendants(),ot=O.height+1,$=0,Z=H;I.hasMultipleRoots&&u.isHierarchyRoot(O)&&(Q=Q.slice(1),ot-=1,$=1,Z+=1),Q=Q.filter(function(Vt){return Vt.y1<=Z});var st=n(k.rotation);st&&Q.forEach(function(Vt){Vt.x0+=st,Vt.x1+=st});var nt=Math.min(ot,H),ct=function(Vt){return(Vt-$)/nt*ut},gt=function(Vt,It){return[Vt*Math.cos(It),-Vt*Math.sin(It)]},Tt=function(Vt){return x.pathAnnulus(Vt.rpx0,Vt.rpx1,Vt.x0,Vt.x1,J,X)},wt=function(Vt){return J+A(Vt)[0]*(Vt.transform.rCenter||0)+(Vt.transform.x||0)},Rt=function(Vt){return X+A(Vt)[1]*(Vt.transform.rCenter||0)+(Vt.transform.y||0)};N=N.data(Q,u.getPtId),N.enter().append("g").classed("slice",!0),z?N.exit().transition().each(function(){var Vt=g.select(this),It=Vt.select("path.surface");It.transition().attrTween("d",function(Kt){var $t=Lt(Kt);return function(le){return Tt($t(le))}});var re=Vt.select("g.slicetext");re.attr("opacity",0)}).remove():N.exit().remove(),N.order();var bt=null;if(z&&tt){var At=u.getPtId(tt);N.each(function(Vt){bt===null&&u.getPtId(Vt)===At&&(bt=Vt.x1)})}var mt=N;z&&(mt=mt.transition().each("end",function(){var Vt=g.select(this);u.setSliceCursor(Vt,y,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),mt.each(function(Vt){var It=g.select(this),re=x.ensureSingle(It,"path","surface",function(xe){xe.style("pointer-events",L?"none":"all")});Vt.rpx0=ct(Vt.y0),Vt.rpx1=ct(Vt.y1),Vt.xmid=(Vt.x0+Vt.x1)/2,Vt.pxmid=gt(Vt.rpx1,Vt.xmid),Vt.midangle=-(Vt.xmid-Math.PI/2),Vt.startangle=-(Vt.x0-Math.PI/2),Vt.stopangle=-(Vt.x1-Math.PI/2),Vt.halfangle=.5*Math.min(x.angleDelta(Vt.x0,Vt.x1)||Math.PI,Math.PI),Vt.ring=1-Vt.rpx0/Vt.rpx1,Vt.rInscribed=w(Vt),z?re.transition().attrTween("d",function(xe){var Se=Ht(xe);return function(ne){return Tt(Se(ne))}}):re.attr("d",Tt),It.call(h,O,y,E,{eventDataKeys:b.eventDataKeys,transitionTime:b.CLICK_TRANSITION_TIME,transitionEasing:b.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,y,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:y._transitioning}),re.call(l,Vt,k,y);var Kt=x.ensureSingle(It,"g","slicetext"),$t=x.ensureSingle(Kt,"text","",function(xe){xe.attr("data-notex",1)}),le=x.ensureUniformFontSize(y,u.determineTextFont(k,Vt,M.font));$t.text(U.formatSliceLabel(Vt,O,k,E,M)).classed("slicetext",!0).attr("text-anchor","middle").call(S.font,le).call(v.convertToTspans,y);var he=S.bBox($t.node());Vt.transform=c(he,Vt,I),Vt.transform.targetX=wt(Vt),Vt.transform.targetY=Rt(Vt);var de=function(xe,Se){var ne=xe.transform;return f(ne,Se),ne.fontSize=le.size,r(k.type,ne,M),x.getTextTransform(ne)};z?$t.transition().attrTween("transform",function(xe){var Se=Ut(xe);return function(ne){return de(Se(ne),he)}}):$t.attr("transform",de(Vt,he))});function Lt(Vt){var It=u.getPtId(Vt),re=V[It],Kt=V[u.getPtId(O)],$t;if(Kt){var le=(Vt.x1>Kt.x1?2*Math.PI:0)+st;$t=Vt.rpx1bt?2*Math.PI:0)+st;re={x0:$t,x1:$t}}else re={rpx0:ut,rpx1:ut},x.extendFlat(re,kt(Vt));else re={rpx0:0,rpx1:0};else re={x0:st,x1:st};return i(re,Kt)}function Ut(Vt){var It=V[u.getPtId(Vt)],re,Kt=Vt.transform;if(It)re=It;else if(re={rpx1:Vt.rpx1,transform:{textPosAngle:Kt.textPosAngle,scale:0,rotate:Kt.rotate,rCenter:Kt.rCenter,x:Kt.x,y:Kt.y}},tt)if(Vt.parent)if(bt){var $t=Vt.x1>bt?2*Math.PI:0;re.x0=re.x1=$t}else x.extendFlat(re,kt(Vt));else re.x0=re.x1=st;else re.x0=re.x1=st;var le=i(re.transform.textPosAngle,Vt.transform.textPosAngle),he=i(re.rpx1,Vt.rpx1),de=i(re.x0,Vt.x0),xe=i(re.x1,Vt.x1),Se=i(re.transform.scale,Kt.scale),ne=i(re.transform.rotate,Kt.rotate),zt=Kt.rCenter===0?3:re.transform.rCenter===0?1/3:1,Xt=i(re.transform.rCenter,Kt.rCenter),Jt=function(Wt){return Xt(Math.pow(Wt,zt))};return function(Wt){var Ft=he(Wt),xt=de(Wt),yt=xe(Wt),Et=Jt(Wt),Mt=gt(Ft,(xt+yt)/2),Nt=le(Wt),jt={pxmid:Mt,rpx1:Ft,transform:{textPosAngle:Nt,rCenter:Et,x:Kt.x,y:Kt.y}};return r(k.type,Kt,M),{transform:{targetX:wt(jt),targetY:Rt(jt),scale:Se(Wt),rotate:ne(Wt),rCenter:Et}}}}function kt(Vt){var It=Vt.parent,re=V[u.getPtId(It)],Kt={};if(re){var $t=It.children,le=$t.indexOf(Vt),he=$t.length,de=i(re.x0,re.x1);Kt.x0=de(le/he),Kt.x1=de(le/he)}else Kt.x0=Kt.x1=0;return Kt}}function d(y){return C.partition().size([2*Math.PI,y.height+1])(y)}U.formatSliceLabel=function(y,E,T,s,L){var M=T.texttemplate,z=T.textinfo;if(!M&&(!z||z==="none"))return"";var D=L.separators,N=s[0],I=y.data.data,k=N.hierarchy,B=u.isHierarchyRoot(y),O=u.getParent(k,y),H=u.getValue(y);if(!M){var Y=z.split("+"),j=function($){return Y.indexOf($)!==-1},et=[],it;if(j("label")&&I.label&&et.push(I.label),I.hasOwnProperty("v")&&j("value")&&et.push(u.formatValue(I.v,D)),!B){j("current path")&&et.push(u.getPath(y.data));var ut=0;j("percent parent")&&ut++,j("percent entry")&&ut++,j("percent root")&&ut++;var J=ut>1;if(ut){var X,tt=function($){it=u.formatPercent(X,D),J&&(it+=" of "+$),et.push(it)};j("percent parent")&&!B&&(X=H/u.getValue(O),tt("parent")),j("percent entry")&&(X=H/u.getValue(E),tt("entry")),j("percent root")&&(X=H/u.getValue(k),tt("root"))}}return j("text")&&(it=x.castOption(T,I.i,"text"),x.isValidTextValue(it)&&et.push(it)),et.join("
    ")}var V=x.castOption(T,I.i,"texttemplate");if(!V)return"";var Q={};I.label&&(Q.label=I.label),I.hasOwnProperty("v")&&(Q.value=I.v,Q.valueLabel=u.formatValue(I.v,D)),Q.currentPath=u.getPath(y.data),B||(Q.percentParent=H/u.getValue(O),Q.percentParentLabel=u.formatPercent(Q.percentParent,D),Q.parent=u.getPtLabel(O)),Q.percentEntry=H/u.getValue(E),Q.percentEntryLabel=u.formatPercent(Q.percentEntry,D),Q.entry=u.getPtLabel(E),Q.percentRoot=H/u.getValue(k),Q.percentRootLabel=u.formatPercent(Q.percentRoot,D),Q.root=u.getPtLabel(k),I.hasOwnProperty("color")&&(Q.color=I.color);var ot=x.castOption(T,I.i,"text");return(x.isValidTextValue(ot)||ot==="")&&(Q.text=ot),Q.customdata=x.castOption(T,I.i,"customdata"),x.texttemplateString(V,Q,L._d3locale,Q,T._meta||{})};function w(y){return y.rpx0===0&&x.isFullCircle([y.x0,y.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(y.halfangle)),y.ring/2))}function A(y){return _(y.rpx1,y.transform.textPosAngle)}function _(y,E){return[y*Math.sin(E),-y*Math.cos(E)]}},85676:function(G,U,t){var g=t(33428),C=t(76308),i=t(3400),S=t(82744).resizeText,x=t(60404);function v(r){var e=r._fullLayout._sunburstlayer.selectAll(".trace");S(r,e,"sunburst"),e.each(function(a){var n=g.select(this),f=a[0],c=f.trace;n.style("opacity",c.opacity),n.selectAll("path.surface").each(function(l){g.select(this).call(p,l,c,r)})})}function p(r,e,a,n){var f=e.data.data,c=!e.children,l=f.i,m=i.castOption(a,l,"marker.line.color")||C.defaultLine,h=i.castOption(a,l,"marker.line.width")||0;r.call(x,e,a,n).style("stroke-width",h).call(C.stroke,m).style("opacity",c?a.leaf.opacity:null)}G.exports={style:v,styleOne:p}},16716:function(G,U,t){var g=t(76308),C=t(49084),i=t(29736).axisHoverFormat,S=t(21776).Ks,x=t(45464),v=t(92880).extendFlat,p=t(67824).overrideAll;function r(n){return{valType:"boolean",dflt:!1}}function e(n){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:r(),y:r(),z:r()},color:{valType:"color",dflt:g.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:g.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var a=G.exports=p(v({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:S(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},C("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:e(),y:e(),z:e()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:v({},C.zauto,{}),zmin:v({},C.zmin,{}),zmax:v({},C.zmax,{})},hoverinfo:v({},x.hoverinfo),showlegend:v({},x.showlegend,{dflt:!1})}),"calc","nested");a.x.editType=a.y.editType=a.z.editType="calc+clearAxisTypes",a.transforms=void 0},56576:function(G,U,t){var g=t(47128);G.exports=function(i,S){S.surfacecolor?g(i,S,{vals:S.surfacecolor,containerStr:"",cLetter:"c"}):g(i,S,{vals:S.z,containerStr:"",cLetter:"c"})}},79164:function(G,U,t){var g=t(67792).gl_surface3d,C=t(67792).ndarray,i=t(67792).ndarray_linear_interpolate.d2,S=t(70448),x=t(11240),v=t(3400).isArrayOrTypedArray,p=t(33040).parseColorScale,r=t(43080),e=t(8932).extractOpts;function a(s,L,M){this.scene=s,this.uid=M,this.surface=L,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var n=a.prototype;n.getXat=function(s,L,M,z){var D=v(this.data.x)?v(this.data.x[0])?this.data.x[L][s]:this.data.x[s]:s;return M===void 0?D:z.d2l(D,0,M)},n.getYat=function(s,L,M,z){var D=v(this.data.y)?v(this.data.y[0])?this.data.y[L][s]:this.data.y[L]:L;return M===void 0?D:z.d2l(D,0,M)},n.getZat=function(s,L,M,z){var D=this.data.z[L][s];return D===null&&this.data.connectgaps&&this.data._interpolatedZ&&(D=this.data._interpolatedZ[L][s]),M===void 0?D:z.d2l(D,0,M)},n.handlePick=function(s){if(s.object===this.surface){var L=(s.data.index[0]-1)/this.dataScaleX-1,M=(s.data.index[1]-1)/this.dataScaleY-1,z=Math.max(Math.min(Math.round(L),this.data.z[0].length-1),0),D=Math.max(Math.min(Math.round(M),this.data._ylength-1),0);s.index=[z,D],s.traceCoordinate=[this.getXat(z,D),this.getYat(z,D),this.getZat(z,D)],s.dataCoordinate=[this.getXat(z,D,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(z,D,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(z,D,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var N=0;N<3;N++){var I=s.dataCoordinate[N];I!=null&&(s.dataCoordinate[N]*=this.scene.dataScale[N])}var k=this.data.hovertext||this.data.text;return v(k)&&k[D]&&k[D][z]!==void 0?s.textLabel=k[D][z]:k?s.textLabel=k:s.textLabel="",s.data.dataCoordinate=s.dataCoordinate.slice(),this.surface.highlight(s.data),this.scene.glplot.spikes.position=s.dataCoordinate,!0}};function f(s){var L=s[0].rgb,M=s[s.length-1].rgb;return L[0]===M[0]&&L[1]===M[1]&&L[2]===M[2]&&L[3]===M[3]}var c=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function l(s,L){if(s0){M=c[z];break}return M}function b(s,L){if(!(s<1||L<1)){for(var M=m(s),z=m(L),D=1,N=0;Nw;)z--,z/=h(z),z++,z1?D:1};function A(s,L,M){var z=M[8]+M[2]*L[0]+M[5]*L[1];return s[0]=(M[6]+M[0]*L[0]+M[3]*L[1])/z,s[1]=(M[7]+M[1]*L[0]+M[4]*L[1])/z,s}function _(s,L,M){return y(s,L,A,M),s}function y(s,L,M,z){for(var D=[0,0],N=s.shape[0],I=s.shape[1],k=0;k0&&this.contourStart[z]!==null&&this.contourEnd[z]!==null&&this.contourEnd[z]>this.contourStart[z]))for(L[z]=!0,D=this.contourStart[z];Dj&&(this.minValues[O]=j),this.maxValues[O]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},55992:function(G,U,t){var g=t(23536),C=t(92880).extendFlat,i=t(38248),S=t(38116).isTypedArray,x=t(38116).isArrayOrTypedArray;G.exports=function(m,h){var b=r(h.cells.values),u=function(j){return j.slice(h.header.values.length,j.length)},o=r(h.header.values);o.length&&!o[0].length&&(o[0]=[""],o=r(o));var d=o.concat(u(b).map(function(){return e((o[0]||[""]).length)})),w=h.domain,A=Math.floor(m._fullLayout._size.w*(w.x[1]-w.x[0])),_=Math.floor(m._fullLayout._size.h*(w.y[1]-w.y[0])),y=h.header.values.length?d[0].map(function(){return h.header.height}):[g.emptyHeaderHeight],E=b.length?b[0].map(function(){return h.cells.height}):[],T=y.reduce(p,0),s=_-T,L=s+g.uplift,M=f(E,L),z=f(y,T),D=n(z,[]),N=n(M,D),I={},k=h._fullInput.columnorder;x(k)&&(k=Array.from(k)),k=k.concat(u(b.map(function(j,et){return et})));var B=d.map(function(j,et){var it=x(h.columnwidth)?h.columnwidth[Math.min(et,h.columnwidth.length-1)]:h.columnwidth;return i(it)?Number(it):1}),O=B.reduce(p,0);B=B.map(function(j){return j/O*A});var H=Math.max(v(h.header.line.width),v(h.cells.line.width)),Y={key:h.uid+m._context.staticPlot,translateX:w.x[0]*m._fullLayout._size.w,translateY:m._fullLayout._size.h*(1-w.y[1]),size:m._fullLayout._size,width:A,maxLineWidth:H,height:_,columnOrder:k,groupHeight:_,rowBlocks:N,headerRowBlocks:D,scrollY:0,cells:C({},h.cells,{values:b}),headerCells:C({},h.header,{values:d}),gdColumns:d.map(function(j){return j[0]}),gdColumnsOriginalOrder:d.map(function(j){return j[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:d.map(function(j,et){var it=I[j];I[j]=(it||0)+1;var ut=j+"__"+I[j];return{key:ut,label:j,specIndex:et,xIndex:k[et],xScale:a,x:void 0,calcdata:void 0,columnWidth:B[et]}})};return Y.columns.forEach(function(j){j.calcdata=Y,j.x=a(j)}),Y};function v(l){if(x(l)){for(var m=0,h=0;h=m||_===l.length-1)&&(h[u]=d,d.key=A++,d.firstRowIndex=w,d.lastRowIndex=_,d=c(),u+=o,w=_+1,o=0);return h}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}},53056:function(G,U,t){var g=t(92880).extendFlat;U.splitToPanels=function(i){var S=[0,0],x=g({},i,{key:"header",type:"header",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!0,values:i.calcdata.headerCells.values[i.specIndex],rowBlocks:i.calcdata.headerRowBlocks,calcdata:g({},i.calcdata,{cells:i.calcdata.headerCells})}),v=g({},i,{key:"cells1",type:"cells",page:0,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:i.calcdata.cells.values[i.specIndex],rowBlocks:i.calcdata.rowBlocks}),p=g({},i,{key:"cells2",type:"cells",page:1,prevPages:S,currentRepaint:[null,null],dragHandle:!1,values:i.calcdata.cells.values[i.specIndex],rowBlocks:i.calcdata.rowBlocks});return[v,p,x]},U.splitToCells=function(i){var S=C(i);return(i.values||[]).slice(S[0],S[1]).map(function(x,v){var p=typeof x=="string"&&x.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:v+p,key:S[0]+v,column:i,calcdata:i.calcdata,page:i.page,rowBlocks:i.rowBlocks,value:x}})};function C(i){var S=i.rowBlocks[i.page],x=S?S.rows[0].rowIndex:0,v=S?x+S.rows.length:0;return[x,v]}},53212:function(G,U,t){var g=t(3400),C=t(60520),i=t(86968).Q;function S(x,v){for(var p=x.columnorder||[],r=x.header.values.length,e=p.slice(0,r),a=e.slice().sort(function(c,l){return c-l}),n=e.map(function(c){return a.indexOf(c)}),f=n.length;f/i),mt=!bt||At;gt.mayHaveMarkup=bt&&Rt.match(/[<&>]/);var Lt=M(Rt);gt.latex=Lt;var Ht=Lt?"":N(gt.calcdata.cells.prefix,Tt,wt)||"",Ut=Lt?"":N(gt.calcdata.cells.suffix,Tt,wt)||"",kt=Lt?null:N(gt.calcdata.cells.format,Tt,wt)||null,Vt=Ht+(kt?S(kt)(gt.value):gt.value)+Ut,It;gt.wrappingNeeded=!gt.wrapped&&!mt&&!Lt&&(It=z(Vt)),gt.cellHeightMayIncrease=At||Lt||gt.mayHaveMarkup||(It===void 0?z(Vt):It),gt.needsConvertToTspans=gt.mayHaveMarkup||gt.wrappingNeeded||gt.latex;var re;if(gt.wrappingNeeded){var Kt=g.wrapSplitCharacter===" "?Vt.replace(/
    gt&&ct.push(Tt),gt+=bt}return ct}function Y(Z,st,nt){var ct=b(st)[0];if(ct!==void 0){var gt=ct.rowBlocks,Tt=ct.calcdata,wt=tt(gt,gt.length),Rt=ct.calcdata.groupHeight-O(ct),bt=Tt.scrollY=Math.max(0,Math.min(wt-Rt,Tt.scrollY)),At=H(gt,bt,Rt);At.length===1&&(At[0]===gt.length-1?At.unshift(At[0]-1):At.push(At[0]+1)),At[0]%2&&At.reverse(),st.each(function(mt,Lt){mt.page=At[Lt],mt.scrollY=bt}),st.attr("transform",function(mt){var Lt=tt(mt.rowBlocks,mt.page)-mt.scrollY;return e(0,Lt)}),Z&&(et(Z,nt,st,At,ct.prevPages,ct,0),et(Z,nt,st,At,ct.prevPages,ct,1),u(nt,Z))}}function j(Z,st,nt,ct){return function(Tt){var wt=Tt.calcdata?Tt.calcdata:Tt,Rt=st.filter(function(Lt){return wt.key===Lt.key}),bt=nt||wt.scrollbarState.dragMultiplier,At=wt.scrollY;wt.scrollY=ct===void 0?wt.scrollY+bt*C.event.dy:ct;var mt=Rt.selectAll("."+g.cn.yColumn).selectAll("."+g.cn.columnBlock).filter(k);return Y(Z,mt,Rt),wt.scrollY===At}}function et(Z,st,nt,ct,gt,Tt,wt){var Rt=ct[wt]!==gt[wt];Rt&&(clearTimeout(Tt.currentRepaint[wt]),Tt.currentRepaint[wt]=setTimeout(function(){var bt=nt.filter(function(At,mt){return mt===wt&&ct[mt]!==gt[mt]});o(Z,st,bt,nt),gt[wt]=ct[wt]}))}function it(Z,st,nt,ct){return function(){var Tt=C.select(st.parentNode);Tt.each(function(wt){var Rt=wt.fragments;Tt.selectAll("tspan.line").each(function(Vt,It){Rt[It].width=this.getComputedTextLength()});var bt=Rt[Rt.length-1].width,At=Rt.slice(0,-1),mt=[],Lt,Ht,Ut=0,kt=wt.column.columnWidth-2*g.cellPad;for(wt.value="";At.length;)Lt=At.shift(),Ht=Lt.width+bt,Ut+Ht>kt&&(wt.value+=mt.join(g.wrapSpacer)+g.lineBreaker,mt=[],Ut=0),mt.push(Lt.text),Ut+=Ht;Ut&&(wt.value+=mt.join(g.wrapSpacer)),wt.wrapped=!0}),Tt.selectAll("tspan.line").remove(),L(Tt.select("."+g.cn.cellText),nt,Z,ct),C.select(st.parentNode.parentNode).call(X)}}function ut(Z,st,nt,ct,gt){return function(){if(!gt.settledY){var wt=C.select(st.parentNode),Rt=ot(gt),bt=gt.key-Rt.firstRowIndex,At=Rt.rows[bt].rowHeight,mt=gt.cellHeightMayIncrease?st.parentNode.getBoundingClientRect().height+2*g.cellPad:At,Lt=Math.max(mt,At),Ht=Lt-Rt.rows[bt].rowHeight;Ht&&(Rt.rows[bt].rowHeight=Lt,Z.selectAll("."+g.cn.columnCell).call(X),Y(null,Z.filter(k),0),u(nt,ct,!0)),wt.attr("transform",function(){var Ut=this,kt=Ut.parentNode,Vt=kt.getBoundingClientRect(),It=C.select(Ut.parentNode).select("."+g.cn.cellRect).node().getBoundingClientRect(),re=Ut.transform.baseVal.consolidate(),Kt=It.top-Vt.top+(re?re.matrix.f:g.cellPad);return e(J(gt,C.select(Ut.parentNode).select("."+g.cn.cellTextHolder).node().getBoundingClientRect().width),Kt)}),gt.settledY=!0}}}function J(Z,st){switch(Z.align){case"left":return g.cellPad;case"right":return Z.column.columnWidth-(st||0)-g.cellPad;case"center":return(Z.column.columnWidth-(st||0))/2;default:return g.cellPad}}function X(Z){Z.attr("transform",function(st){var nt=st.rowBlocks[0].auxiliaryBlocks.reduce(function(wt,Rt){return wt+V(Rt,1/0)},0),ct=ot(st),gt=V(ct,st.key),Tt=gt+nt;return e(0,Tt)}).selectAll("."+g.cn.cellRect).attr("height",function(st){return $(ot(st),st.key).rowHeight})}function tt(Z,st){for(var nt=0,ct=st-1;ct>=0;ct--)nt+=Q(Z[ct]);return nt}function V(Z,st){for(var nt=0,ct=0;ct","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},x.textfont,{}),editType:"calc"},text:x.text,textinfo:v.textinfo,texttemplate:C({editType:"plot"},{keys:p.eventDataKeys.concat(["label","value"])}),hovertext:x.hovertext,hoverinfo:v.hoverinfo,hovertemplate:g({},{keys:p.eventDataKeys}),textfont:x.textfont,insidetextfont:x.insidetextfont,outsidetextfont:r({},x.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:x.sort,root:v.root,domain:S({name:"treemap",trace:!0,editType:"calc"})}},79516:function(G,U,t){var g=t(7316);U.name="treemap",U.plot=function(C,i,S,x){g.plotBasePlot(U.name,C,i,S,x)},U.clean=function(C,i,S,x){g.cleanBasePlot(U.name,C,i,S,x)}},97840:function(G,U,t){var g=t(3776);U.r=function(C,i){return g.calc(C,i)},U.q=function(C){return g._runCrossTraceCalc("treemap",C)}},32984:function(G){G.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},34092:function(G,U,t){var g=t(3400),C=t(40516),i=t(76308),S=t(86968).Q,x=t(31508).handleText,v=t(78048).TEXTPAD,p=t(74174).handleMarkerDefaults,r=t(8932),e=r.hasColorscale,a=r.handleDefaults;G.exports=function(f,c,l,m){function h(s,L){return g.coerce(f,c,C,s,L)}var b=h("labels"),u=h("parents");if(!b||!b.length||!u||!u.length){c.visible=!1;return}var o=h("values");o&&o.length?h("branchvalues"):h("count"),h("level"),h("maxdepth");var d=h("tiling.packing");d==="squarify"&&h("tiling.squarifyratio"),h("tiling.flip"),h("tiling.pad");var w=h("text");h("texttemplate"),c.texttemplate||h("textinfo",g.isArrayOrTypedArray(w)?"text+label":"label"),h("hovertext"),h("hovertemplate");var A=h("pathbar.visible"),_="auto";x(f,c,m,h,_,{hasPathbar:A,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var y=c.textposition.indexOf("bottom")!==-1;p(f,c,m,h);var E=c._hasColorscale=e(f,"marker","colors")||(f.marker||{}).coloraxis;E?a(f,c,m,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(c.marker.colors||[]).length);var T=c.textfont.size*2;h("marker.pad.t",y?T/4:T),h("marker.pad.l",T/4),h("marker.pad.r",T/4),h("marker.pad.b",y?T:T/4),h("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:i.contrast(m.paper_bgcolor)}}},A&&(h("pathbar.thickness",c.pathbar.textfont.size+2*v),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),S(c,m,h),c._length=null}},95808:function(G,U,t){var g=t(33428),C=t(78176),i=t(82744),S=i.clearMinTextSize,x=t(60100).resizeText,v=t(52960);G.exports=function(r,e,a,n,f){var c=f.type,l=f.drawDescendants,m=r._fullLayout,h=m["_"+c+"layer"],b,u,o=!a;if(S(c,m),b=h.selectAll("g.trace."+c).data(e,function(w){return w[0].trace.uid}),b.enter().append("g").classed("trace",!0).classed(c,!0),b.order(),!m.uniformtext.mode&&C.hasTransition(a)){n&&(u=n());var d=g.transition().duration(a.duration).ease(a.easing).each("end",function(){u&&u()}).each("interrupt",function(){u&&u()});d.each(function(){h.selectAll("g.trace").each(function(w){v(r,w,this,a,l)})})}else b.each(function(w){v(r,w,this,a,l)}),m.uniformtext.mode&&x(r,h.selectAll(".trace"),c);o&&b.exit().remove()}},27336:function(G,U,t){var g=t(33428),C=t(3400),i=t(43616),S=t(72736),x=t(13832),v=t(66192).styleOne,p=t(32984),r=t(78176),e=t(45716),a=!0;G.exports=function(f,c,l,m,h){var b=h.barDifY,u=h.width,o=h.height,d=h.viewX,w=h.viewY,A=h.pathSlice,_=h.toMoveInsideSlice,y=h.strTransform,E=h.hasTransition,T=h.handleSlicesExit,s=h.makeUpdateSliceInterpolator,L=h.makeUpdateTextInterpolator,M={},z=f._context.staticPlot,D=f._fullLayout,N=c[0],I=N.trace,k=N.hierarchy,B=u/I._entryDepth,O=r.listPath(l.data,"id"),H=x(k.copy(),[u,o],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();H=H.filter(function(j){var et=O.indexOf(j.data.id);return et===-1?!1:(j.x0=B*et,j.x1=B*(et+1),j.y0=b,j.y1=b+o,j.onPathbar=!0,!0)}),H.reverse(),m=m.data(H,r.getPtId),m.enter().append("g").classed("pathbar",!0),T(m,a,M,[u,o],A),m.order();var Y=m;E&&(Y=Y.transition().each("end",function(){var j=g.select(this);r.setSliceCursor(j,f,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),Y.each(function(j){j._x0=d(j.x0),j._x1=d(j.x1),j._y0=w(j.y0),j._y1=w(j.y1),j._hoverX=d(j.x1-Math.min(u,o)/2),j._hoverY=w(j.y1-o/2);var et=g.select(this),it=C.ensureSingle(et,"path","surface",function(tt){tt.style("pointer-events",z?"none":"all")});E?it.transition().attrTween("d",function(tt){var V=s(tt,a,M,[u,o]);return function(Q){return A(V(Q))}}):it.attr("d",A),et.call(e,l,f,c,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,f,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:f._transitioning}),it.call(v,j,I,f,{hovered:!1}),j._text=(r.getPtLabel(j)||"").split("
    ").join(" ")||"";var ut=C.ensureSingle(et,"g","slicetext"),J=C.ensureSingle(ut,"text","",function(tt){tt.attr("data-notex",1)}),X=C.ensureUniformFontSize(f,r.determineTextFont(I,j,D.font,{onPathbar:!0}));J.text(j._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,X).call(S.convertToTspans,f),j.textBB=i.bBox(J.node()),j.transform=_(j,{fontSize:X.size,onPathbar:!0}),j.transform.fontSize=X.size,E?J.transition().attrTween("transform",function(tt){var V=L(tt,a,M,[u,o]);return function(Q){return y(V(Q))}}):J.attr("transform",y(j))})}},76477:function(G,U,t){var g=t(33428),C=t(3400),i=t(43616),S=t(72736),x=t(13832),v=t(66192).styleOne,p=t(32984),r=t(78176),e=t(45716),a=t(96488).formatSliceLabel,n=!1;G.exports=function(c,l,m,h,b){var u=b.width,o=b.height,d=b.viewX,w=b.viewY,A=b.pathSlice,_=b.toMoveInsideSlice,y=b.strTransform,E=b.hasTransition,T=b.handleSlicesExit,s=b.makeUpdateSliceInterpolator,L=b.makeUpdateTextInterpolator,M=b.prevEntry,z={},D=c._context.staticPlot,N=c._fullLayout,I=l[0],k=I.trace,B=k.textposition.indexOf("left")!==-1,O=k.textposition.indexOf("right")!==-1,H=k.textposition.indexOf("bottom")!==-1,Y=!H&&!k.marker.pad.t||H&&!k.marker.pad.b,j=x(m,[u,o],{packing:k.tiling.packing,squarifyratio:k.tiling.squarifyratio,flipX:k.tiling.flip.indexOf("x")>-1,flipY:k.tiling.flip.indexOf("y")>-1,pad:{inner:k.tiling.pad,top:k.marker.pad.t,left:k.marker.pad.l,right:k.marker.pad.r,bottom:k.marker.pad.b}}),et=j.descendants(),it=1/0,ut=-1/0;et.forEach(function(Q){var ot=Q.depth;ot>=k._maxDepth?(Q.x0=Q.x1=(Q.x0+Q.x1)/2,Q.y0=Q.y1=(Q.y0+Q.y1)/2):(it=Math.min(it,ot),ut=Math.max(ut,ot))}),h=h.data(et,r.getPtId),k._maxVisibleLayers=isFinite(ut)?ut-it+1:0,h.enter().append("g").classed("slice",!0),T(h,n,z,[u,o],A),h.order();var J=null;if(E&&M){var X=r.getPtId(M);h.each(function(Q){J===null&&r.getPtId(Q)===X&&(J={x0:Q.x0,x1:Q.x1,y0:Q.y0,y1:Q.y1})})}var tt=function(){return J||{x0:0,x1:u,y0:0,y1:o}},V=h;return E&&(V=V.transition().each("end",function(){var Q=g.select(this);r.setSliceCursor(Q,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),V.each(function(Q){var ot=r.isHeader(Q,k);Q._x0=d(Q.x0),Q._x1=d(Q.x1),Q._y0=w(Q.y0),Q._y1=w(Q.y1),Q._hoverX=d(Q.x1-k.marker.pad.r),Q._hoverY=w(H?Q.y1-k.marker.pad.b/2:Q.y0+k.marker.pad.t/2);var $=g.select(this),Z=C.ensureSingle($,"path","surface",function(wt){wt.style("pointer-events",D?"none":"all")});E?Z.transition().attrTween("d",function(wt){var Rt=s(wt,n,tt(),[u,o]);return function(bt){return A(Rt(bt))}}):Z.attr("d",A),$.call(e,m,c,l,{styleOne:v,eventDataKeys:p.eventDataKeys,transitionTime:p.CLICK_TRANSITION_TIME,transitionEasing:p.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{isTransitioning:c._transitioning}),Z.call(v,Q,k,c,{hovered:!1}),Q.x0===Q.x1||Q.y0===Q.y1?Q._text="":ot?Q._text=Y?"":r.getPtLabel(Q)||"":Q._text=a(Q,m,k,l,N)||"";var st=C.ensureSingle($,"g","slicetext"),nt=C.ensureSingle(st,"text","",function(wt){wt.attr("data-notex",1)}),ct=C.ensureUniformFontSize(c,r.determineTextFont(k,Q,N.font)),gt=Q._text||" ",Tt=ot&>.indexOf("
    ")===-1;nt.text(gt).classed("slicetext",!0).attr("text-anchor",O?"end":B||Tt?"start":"middle").call(i.font,ct).call(S.convertToTspans,c),Q.textBB=i.bBox(nt.node()),Q.transform=_(Q,{fontSize:ct.size,isHeader:ot}),Q.transform.fontSize=ct.size,E?nt.transition().attrTween("transform",function(wt){var Rt=L(wt,n,tt(),[u,o]);return function(bt){return y(Rt(bt))}}):nt.attr("transform",y(Q))}),J}},83024:function(G){G.exports=function U(t,g,C){var i;C.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),C.flipX&&(i=t.x0,t.x0=g[0]-t.x1,t.x1=g[0]-i),C.flipY&&(i=t.y0,t.y0=g[1]-t.y1,t.y1=g[1]-i);var S=t.children;if(S)for(var x=0;x-1?O+j:-(Y+j):0,it={x0:H,x1:H,y0:et,y1:et+Y},ut=function(zt,Xt,Jt){var Wt=w.tiling.pad,Ft=function(Mt){return Mt-Wt<=Xt.x0},xt=function(Mt){return Mt+Wt>=Xt.x1},yt=function(Mt){return Mt-Wt<=Xt.y0},Et=function(Mt){return Mt+Wt>=Xt.y1};return zt.x0===Xt.x0&&zt.x1===Xt.x1&&zt.y0===Xt.y0&&zt.y1===Xt.y1?{x0:zt.x0,x1:zt.x1,y0:zt.y0,y1:zt.y1}:{x0:Ft(zt.x0-Wt)?0:xt(zt.x0-Wt)?Jt[0]:zt.x0,x1:Ft(zt.x1+Wt)?0:xt(zt.x1+Wt)?Jt[0]:zt.x1,y0:yt(zt.y0-Wt)?0:Et(zt.y0-Wt)?Jt[1]:zt.y0,y1:yt(zt.y1+Wt)?0:Et(zt.y1+Wt)?Jt[1]:zt.y1}},J=null,X={},tt={},V=null,Q=function(zt,Xt){return Xt?X[f(zt)]:tt[f(zt)]},ot=function(zt,Xt,Jt,Wt){if(Xt)return X[f(y)]||it;var Ft=tt[w.level]||Jt;return N(zt)?ut(zt,Ft,Wt):{}};d.hasMultipleRoots&&M&&D++,w._maxDepth=D,w._backgroundColor=o.paper_bgcolor,w._entryDepth=E.data.depth,w._atRootLevel=M;var $=-B/2+I.l+I.w*(k.x[1]+k.x[0])/2,Z=-O/2+I.t+I.h*(1-(k.y[1]+k.y[0])/2),st=function(zt){return $+zt},nt=function(zt){return Z+zt},ct=nt(0),gt=st(0),Tt=function(zt){return gt+zt},wt=function(zt){return ct+zt};function Rt(zt,Xt){return zt+","+Xt}var bt=Tt(0),At=function(zt){zt.x=Math.max(bt,zt.x)},mt=w.pathbar.edgeshape,Lt=function(zt){var Xt=Tt(Math.max(Math.min(zt.x0,zt.x0),0)),Jt=Tt(Math.min(Math.max(zt.x1,zt.x1),H)),Wt=wt(zt.y0),Ft=wt(zt.y1),xt=Y/2,yt={},Et={};yt.x=Xt,Et.x=Jt,yt.y=Et.y=(Wt+Ft)/2;var Mt={x:Xt,y:Wt},Nt={x:Jt,y:Wt},jt={x:Jt,y:Ft},ie={x:Xt,y:Ft};return mt===">"?(Mt.x-=xt,Nt.x-=xt,jt.x-=xt,ie.x-=xt):mt==="/"?(jt.x-=xt,ie.x-=xt,yt.x-=xt/2,Et.x-=xt/2):mt==="\\"?(Mt.x-=xt,Nt.x-=xt,yt.x-=xt/2,Et.x-=xt/2):mt==="<"&&(yt.x-=xt,Et.x-=xt),At(Mt),At(ie),At(yt),At(Nt),At(jt),At(Et),"M"+Rt(Mt.x,Mt.y)+"L"+Rt(Nt.x,Nt.y)+"L"+Rt(Et.x,Et.y)+"L"+Rt(jt.x,jt.y)+"L"+Rt(ie.x,ie.y)+"L"+Rt(yt.x,yt.y)+"Z"},Ht=w[_?"tiling":"marker"].pad,Ut=function(zt){return w.textposition.indexOf(zt)!==-1},kt=Ut("top"),Vt=Ut("left"),It=Ut("right"),re=Ut("bottom"),Kt=function(zt){var Xt=st(zt.x0),Jt=st(zt.x1),Wt=nt(zt.y0),Ft=nt(zt.y1),xt=Jt-Xt,yt=Ft-Wt;if(!xt||!yt)return"";var Et=w.marker.cornerradius||0,Mt=Math.min(Et,xt/2,yt/2);Mt&&zt.data&&zt.data.data&&zt.data.data.label&&(kt&&(Mt=Math.min(Mt,Ht.t)),Vt&&(Mt=Math.min(Mt,Ht.l)),It&&(Mt=Math.min(Mt,Ht.r)),re&&(Mt=Math.min(Mt,Ht.b)));var Nt=function(jt,ie){return Mt?"a"+Rt(Mt,Mt)+" 0 0 1 "+Rt(jt,ie):""};return"M"+Rt(Xt,Wt+Mt)+Nt(Mt,-Mt)+"L"+Rt(Jt-Mt,Wt)+Nt(Mt,Mt)+"L"+Rt(Jt,Ft-Mt)+Nt(-Mt,Mt)+"L"+Rt(Xt+Mt,Ft)+Nt(-Mt,-Mt)+"Z"},$t=function(zt,Xt){var Jt=zt.x0,Wt=zt.x1,Ft=zt.y0,xt=zt.y1,yt=zt.textBB,Et=kt||Xt.isHeader&&!re,Mt=Et?"start":re?"end":"middle",Nt=Ut("right"),jt=Ut("left")||Xt.onPathbar,ie=jt?-1:Nt?1:0;if(Xt.isHeader){if(Jt+=(_?Ht:Ht.l)-x,Wt-=(_?Ht:Ht.r)-x,Jt>=Wt){var me=(Jt+Wt)/2;Jt=me,Wt=me}var be;re?(be=xt-(_?Ht:Ht.b),Ft0)for(var T=0;T0){var A=p.xa,_=p.ya,y,E,T,s,L;l.orientation==="h"?(L=r,y="y",T=_,E="x",s=A):(L=e,y="x",T=A,E="y",s=_);var M=c[p.index];if(L>=M.span[0]&&L<=M.span[1]){var z=C.extendFlat({},p),D=s.c2p(L,!0),N=x.getKdeValue(M,l,L),I=x.getPositionOnKdePath(M,l,D),k=T._offset,B=T._length;z[y+"0"]=I[0],z[y+"1"]=I[1],z[E+"0"]=z[E+"1"]=D,z[E+"Label"]=E+": "+i.hoverLabelText(s,L,l[E+"hoverformat"])+", "+c[0].t.labels.kde+" "+N.toFixed(3);for(var O=0,H=0;H")),c.color=v(m,w),[c]};function v(p,r){var e=p[r.dir].marker,a=e.color,n=e.line.color,f=e.line.width;if(C(a))return a;if(C(n)&&f)return n}},95952:function(G,U,t){G.exports={attributes:t(65776),layoutAttributes:t(91352),supplyDefaults:t(24224).supplyDefaults,crossTraceDefaults:t(24224).crossTraceDefaults,supplyLayoutDefaults:t(59464),calc:t(73540),crossTraceCalc:t(50152),plot:t(64488),style:t(12252).style,hoverPoints:t(94196),eventData:t(53256),selectPoints:t(45784),moduleType:"trace",name:"waterfall",basePlotModule:t(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},91352:function(G){G.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},59464:function(G,U,t){var g=t(3400),C=t(91352);G.exports=function(i,S,x){var v=!1;function p(a,n){return g.coerce(i,S,C,a,n)}for(var r=0;r0&&(o?L+="M"+T[0]+","+s[1]+"V"+s[0]:L+="M"+T[1]+","+s[0]+"H"+T[0]),d!=="between"&&(_.isSum||y path").each(function(h){if(!h.isBlank){var b=m[h.dir].marker;g.select(this).call(i.fill,b.color).call(i.stroke,b.line.color).call(C.dashLine,b.line.dash,b.line.width).style("opacity",m.selectedpoints&&!h.selected?S:1)}}),p(l,m,e),l.selectAll(".lines").each(function(){var h=m.connector.line;C.lineGroupStyle(g.select(this).selectAll("path"),h.width,h.color,h.dash)})})}G.exports={style:r}},84224:function(G,U,t){var g=t(54460),C=t(3400),i=t(73060),S=t(60468).W,x=t(39032).BADNUM;U.moduleType="transform",U.name="aggregate";var v=U.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},p=v.aggregations;U.supplyDefaults=function(c,l){var m={},h;function b(M,z){return C.coerce(c,m,v,M,z)}var u=b("enabled");if(!u)return m;var o=i.findArrayAttributes(l),d={};for(h=0;hw&&(w=E,A=y)}}return w?b(A):x};case"rms":return function(u,o){for(var d=0,w=0,A=0;A":return function(d){return u(d)>o};case">=":return function(d){return u(d)>=o};case"[]":return function(d){var w=u(d);return w>=o[0]&&w<=o[1]};case"()":return function(d){var w=u(d);return w>o[0]&&w=o[0]&&wo[0]&&w<=o[1]};case"][":return function(d){var w=u(d);return w<=o[0]||w>=o[1]};case")(":return function(d){var w=u(d);return wo[1]};case"](":return function(d){var w=u(d);return w<=o[0]||w>o[1]};case")[":return function(d){var w=u(d);return w=o[1]};case"{}":return function(d){return o.indexOf(u(d))!==-1};case"}{":return function(d){return o.indexOf(u(d))===-1}}}},32028:function(G,U,t){var g=t(3400),C=t(73060),i=t(7316),S=t(60468).W;U.moduleType="transform",U.name="groupby",U.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"data_array",dflt:[],editType:"calc"},nameformat:{valType:"string",editType:"calc"},styles:{_isLinkedToArray:"style",target:{valType:"string",editType:"calc"},value:{valType:"any",dflt:{},editType:"calc",_compareAsJSON:!0},editType:"calc"},editType:"calc"},U.supplyDefaults=function(v,p,r){var e,a={};function n(b,u){return g.coerce(v,a,U.attributes,b,u)}var f=n("enabled");if(!f)return a;n("groups"),n("nameformat",r._dataLength>1?"%{group} (%{trace})":"%{group}");var c=v.styles,l=a.styles=[];if(c)for(e=0;e * @license MIT -*/function t(xe,ye){if(!(xe instanceof ye))throw new TypeError("Cannot call a class as a function")}function a(xe,ye){for(var Ee=0;Ee"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u(xe){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ee){return Ee.__proto__||Object.getPrototypeOf(Ee)},u(xe)}function o(xe){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ye){return typeof ye}:function(ye){return ye&&typeof Symbol=="function"&&ye.constructor===Symbol&&ye!==Symbol.prototype?"symbol":typeof ye},o(xe)}var d=r(3910),w=r(3187),A=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;p.lW=T,p.h2=50;var _=2147483647;T.TYPED_ARRAY_SUPPORT=y(),!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function y(){try{var xe=new Uint8Array(1),ye={foo:function(){return 42}};return Object.setPrototypeOf(ye,Uint8Array.prototype),Object.setPrototypeOf(xe,ye),xe.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}}),Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function E(xe){if(xe>_)throw new RangeError('The value "'+xe+'" is invalid for option "size"');var ye=new Uint8Array(xe);return Object.setPrototypeOf(ye,T.prototype),ye}function T(xe,ye,Ee){if(typeof xe=="number"){if(typeof ye=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return z(xe)}return s(xe,ye,Ee)}T.poolSize=8192;function s(xe,ye,Ee){if(typeof xe=="string")return D(xe,ye);if(ArrayBuffer.isView(xe))return I(xe);if(xe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(xe));if(ze(xe,ArrayBuffer)||xe&&ze(xe.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ze(xe,SharedArrayBuffer)||xe&&ze(xe.buffer,SharedArrayBuffer)))return k(xe,ye,Ee);if(typeof xe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Me=xe.valueOf&&xe.valueOf();if(Me!=null&&Me!==xe)return T.from(Me,ye,Ee);var Ne=B(xe);if(Ne)return Ne;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof xe[Symbol.toPrimitive]=="function")return T.from(xe[Symbol.toPrimitive]("string"),ye,Ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(xe))}T.from=function(xe,ye,Ee){return s(xe,ye,Ee)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function L(xe){if(typeof xe!="number")throw new TypeError('"size" argument must be of type number');if(xe<0)throw new RangeError('The value "'+xe+'" is invalid for option "size"')}function M(xe,ye,Ee){return L(xe),xe<=0?E(xe):ye!==void 0?typeof Ee=="string"?E(xe).fill(ye,Ee):E(xe).fill(ye):E(xe)}T.alloc=function(xe,ye,Ee){return M(xe,ye,Ee)};function z(xe){return L(xe),E(xe<0?0:O(xe)|0)}T.allocUnsafe=function(xe){return z(xe)},T.allocUnsafeSlow=function(xe){return z(xe)};function D(xe,ye){if((typeof ye!="string"||ye==="")&&(ye="utf8"),!T.isEncoding(ye))throw new TypeError("Unknown encoding: "+ye);var Ee=V(xe,ye)|0,Me=E(Ee),Ne=Me.write(xe,ye);return Ne!==Ee&&(Me=Me.slice(0,Ne)),Me}function N(xe){for(var ye=xe.length<0?0:O(xe.length)|0,Ee=E(ye),Me=0;Me=_)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_.toString(16)+" bytes");return xe|0}T.isBuffer=function(ye){return ye!=null&&ye._isBuffer===!0&&ye!==T.prototype},T.compare=function(ye,Ee){if(ze(ye,Uint8Array)&&(ye=T.from(ye,ye.offset,ye.byteLength)),ze(Ee,Uint8Array)&&(Ee=T.from(Ee,Ee.offset,Ee.byteLength)),!T.isBuffer(ye)||!T.isBuffer(Ee))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ye===Ee)return 0;for(var Me=ye.length,Ne=Ee.length,je=0,it=Math.min(Me,Ne);jeNe.length?(T.isBuffer(it)||(it=T.from(it)),it.copy(Ne,je)):Uint8Array.prototype.set.call(Ne,it,je);else if(T.isBuffer(it))it.copy(Ne,je);else throw new TypeError('"list" argument must be an Array of Buffers');je+=it.length}return Ne};function V(xe,ye){if(T.isBuffer(xe))return xe.length;if(ArrayBuffer.isView(xe)||ze(xe,ArrayBuffer))return xe.byteLength;if(typeof xe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+o(xe));var Ee=xe.length,Me=arguments.length>2&&arguments[2]===!0;if(!Me&&Ee===0)return 0;for(var Ne=!1;;)switch(ye){case"ascii":case"latin1":case"binary":return Ee;case"utf8":case"utf-8":return ht(xe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ee*2;case"hex":return Ee>>>1;case"base64":return St(xe).length;default:if(Ne)return Me?-1:ht(xe).length;ye=(""+ye).toLowerCase(),Ne=!0}}T.byteLength=V;function Y(xe,ye,Ee){var Me=!1;if((ye===void 0||ye<0)&&(ye=0),ye>this.length||((Ee===void 0||Ee>this.length)&&(Ee=this.length),Ee<=0)||(Ee>>>=0,ye>>>=0,Ee<=ye))return"";for(xe||(xe="utf8");;)switch(xe){case"hex":return ce(this,ye,Ee);case"utf8":case"utf-8":return oe(this,ye,Ee);case"ascii":return se(this,ye,Ee);case"latin1":case"binary":return ne(this,ye,Ee);case"base64":return Q(this,ye,Ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,ye,Ee);default:if(Me)throw new TypeError("Unknown encoding: "+xe);xe=(xe+"").toLowerCase(),Me=!0}}T.prototype._isBuffer=!0;function j(xe,ye,Ee){var Me=xe[ye];xe[ye]=xe[Ee],xe[Ee]=Me}T.prototype.swap16=function(){var ye=this.length;if(ye%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ee=0;EeEe&&(ye+=" ... "),""},A&&(T.prototype[A]=T.prototype.inspect),T.prototype.compare=function(ye,Ee,Me,Ne,je){if(ze(ye,Uint8Array)&&(ye=T.from(ye,ye.offset,ye.byteLength)),!T.isBuffer(ye))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+o(ye));if(Ee===void 0&&(Ee=0),Me===void 0&&(Me=ye?ye.length:0),Ne===void 0&&(Ne=0),je===void 0&&(je=this.length),Ee<0||Me>ye.length||Ne<0||je>this.length)throw new RangeError("out of range index");if(Ne>=je&&Ee>=Me)return 0;if(Ne>=je)return-1;if(Ee>=Me)return 1;if(Ee>>>=0,Me>>>=0,Ne>>>=0,je>>>=0,this===ye)return 0;for(var it=je-Ne,mt=Me-Ee,bt=Math.min(it,mt),vt=this.slice(Ne,je),Lt=ye.slice(Ee,Me),ct=0;ct2147483647?Ee=2147483647:Ee<-2147483648&&(Ee=-2147483648),Ee=+Ee,Ze(Ee)&&(Ee=Ne?0:xe.length-1),Ee<0&&(Ee=xe.length+Ee),Ee>=xe.length){if(Ne)return-1;Ee=xe.length-1}else if(Ee<0)if(Ne)Ee=0;else return-1;if(typeof ye=="string"&&(ye=T.from(ye,Me)),T.isBuffer(ye))return ye.length===0?-1:ie(xe,ye,Ee,Me,Ne);if(typeof ye=="number")return ye=ye&255,typeof Uint8Array.prototype.indexOf=="function"?Ne?Uint8Array.prototype.indexOf.call(xe,ye,Ee):Uint8Array.prototype.lastIndexOf.call(xe,ye,Ee):ie(xe,[ye],Ee,Me,Ne);throw new TypeError("val must be string, number or Buffer")}function ie(xe,ye,Ee,Me,Ne){var je=1,it=xe.length,mt=ye.length;if(Me!==void 0&&(Me=String(Me).toLowerCase(),Me==="ucs2"||Me==="ucs-2"||Me==="utf16le"||Me==="utf-16le")){if(xe.length<2||ye.length<2)return-1;je=2,it/=2,mt/=2,Ee/=2}function bt(Bt,ir){return je===1?Bt[ir]:Bt.readUInt16BE(ir*je)}var vt;if(Ne){var Lt=-1;for(vt=Ee;vtit&&(Ee=it-mt),vt=Ee;vt>=0;vt--){for(var ct=!0,Tt=0;TtNe&&(Me=Ne)):Me=Ne;var je=ye.length;Me>je/2&&(Me=je/2);var it;for(it=0;it>>0,isFinite(Me)?(Me=Me>>>0,Ne===void 0&&(Ne="utf8")):(Ne=Me,Me=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var je=this.length-Ee;if((Me===void 0||Me>je)&&(Me=je),ye.length>0&&(Me<0||Ee<0)||Ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ne||(Ne="utf8");for(var it=!1;;)switch(Ne){case"hex":return ue(this,ye,Ee,Me);case"utf8":case"utf-8":return J(this,ye,Ee,Me);case"ascii":case"latin1":case"binary":return X(this,ye,Ee,Me);case"base64":return ee(this,ye,Ee,Me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,ye,Ee,Me);default:if(it)throw new TypeError("Unknown encoding: "+Ne);Ne=(""+Ne).toLowerCase(),it=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(xe,ye,Ee){return ye===0&&Ee===xe.length?d.fromByteArray(xe):d.fromByteArray(xe.slice(ye,Ee))}function oe(xe,ye,Ee){Ee=Math.min(xe.length,Ee);for(var Me=[],Ne=ye;Ne239?4:je>223?3:je>191?2:1;if(Ne+mt<=Ee){var bt=void 0,vt=void 0,Lt=void 0,ct=void 0;switch(mt){case 1:je<128&&(it=je);break;case 2:bt=xe[Ne+1],(bt&192)===128&&(ct=(je&31)<<6|bt&63,ct>127&&(it=ct));break;case 3:bt=xe[Ne+1],vt=xe[Ne+2],(bt&192)===128&&(vt&192)===128&&(ct=(je&15)<<12|(bt&63)<<6|vt&63,ct>2047&&(ct<55296||ct>57343)&&(it=ct));break;case 4:bt=xe[Ne+1],vt=xe[Ne+2],Lt=xe[Ne+3],(bt&192)===128&&(vt&192)===128&&(Lt&192)===128&&(ct=(je&15)<<18|(bt&63)<<12|(vt&63)<<6|Lt&63,ct>65535&&ct<1114112&&(it=ct))}}it===null?(it=65533,mt=1):it>65535&&(it-=65536,Me.push(it>>>10&1023|55296),it=56320|it&1023),Me.push(it),Ne+=mt}return Z(Me)}var $=4096;function Z(xe){var ye=xe.length;if(ye<=$)return String.fromCharCode.apply(String,xe);for(var Ee="",Me=0;MeMe)&&(Ee=Me);for(var Ne="",je=ye;jeMe&&(ye=Me),Ee<0?(Ee+=Me,Ee<0&&(Ee=0)):Ee>Me&&(Ee=Me),EeEe)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(ye,Ee,Me){ye=ye>>>0,Ee=Ee>>>0,Me||Te(ye,Ee,this.length);for(var Ne=this[ye],je=1,it=0;++it>>0,Ee=Ee>>>0,Me||Te(ye,Ee,this.length);for(var Ne=this[ye+--Ee],je=1;Ee>0&&(je*=256);)Ne+=this[ye+--Ee]*je;return Ne},T.prototype.readUint8=T.prototype.readUInt8=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,1,this.length),this[ye]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,2,this.length),this[ye]|this[ye+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,2,this.length),this[ye]<<8|this[ye+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,4,this.length),(this[ye]|this[ye+1]<<8|this[ye+2]<<16)+this[ye+3]*16777216},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,4,this.length),this[ye]*16777216+(this[ye+1]<<16|this[ye+2]<<8|this[ye+3])},T.prototype.readBigUInt64LE=We(function(ye){ye=ye>>>0,rt(ye,"offset");var Ee=this[ye],Me=this[ye+7];(Ee===void 0||Me===void 0)&&Ke(ye,this.length-8);var Ne=Ee+this[++ye]*Math.pow(2,8)+this[++ye]*Math.pow(2,16)+this[++ye]*Math.pow(2,24),je=this[++ye]+this[++ye]*Math.pow(2,8)+this[++ye]*Math.pow(2,16)+Me*Math.pow(2,24);return BigInt(Ne)+(BigInt(je)<>>0,rt(ye,"offset");var Ee=this[ye],Me=this[ye+7];(Ee===void 0||Me===void 0)&&Ke(ye,this.length-8);var Ne=Ee*Math.pow(2,24)+this[++ye]*Math.pow(2,16)+this[++ye]*Math.pow(2,8)+this[++ye],je=this[++ye]*Math.pow(2,24)+this[++ye]*Math.pow(2,16)+this[++ye]*Math.pow(2,8)+Me;return(BigInt(Ne)<>>0,Ee=Ee>>>0,Me||Te(ye,Ee,this.length);for(var Ne=this[ye],je=1,it=0;++it=je&&(Ne-=Math.pow(2,8*Ee)),Ne},T.prototype.readIntBE=function(ye,Ee,Me){ye=ye>>>0,Ee=Ee>>>0,Me||Te(ye,Ee,this.length);for(var Ne=Ee,je=1,it=this[ye+--Ne];Ne>0&&(je*=256);)it+=this[ye+--Ne]*je;return je*=128,it>=je&&(it-=Math.pow(2,8*Ee)),it},T.prototype.readInt8=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,1,this.length),this[ye]&128?(255-this[ye]+1)*-1:this[ye]},T.prototype.readInt16LE=function(ye,Ee){ye=ye>>>0,Ee||Te(ye,2,this.length);var Me=this[ye]|this[ye+1]<<8;return Me&32768?Me|4294901760:Me},T.prototype.readInt16BE=function(ye,Ee){ye=ye>>>0,Ee||Te(ye,2,this.length);var Me=this[ye+1]|this[ye]<<8;return Me&32768?Me|4294901760:Me},T.prototype.readInt32LE=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,4,this.length),this[ye]|this[ye+1]<<8|this[ye+2]<<16|this[ye+3]<<24},T.prototype.readInt32BE=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,4,this.length),this[ye]<<24|this[ye+1]<<16|this[ye+2]<<8|this[ye+3]},T.prototype.readBigInt64LE=We(function(ye){ye=ye>>>0,rt(ye,"offset");var Ee=this[ye],Me=this[ye+7];(Ee===void 0||Me===void 0)&&Ke(ye,this.length-8);var Ne=this[ye+4]+this[ye+5]*Math.pow(2,8)+this[ye+6]*Math.pow(2,16)+(Me<<24);return(BigInt(Ne)<>>0,rt(ye,"offset");var Ee=this[ye],Me=this[ye+7];(Ee===void 0||Me===void 0)&&Ke(ye,this.length-8);var Ne=(Ee<<24)+this[++ye]*Math.pow(2,16)+this[++ye]*Math.pow(2,8)+this[++ye];return(BigInt(Ne)<>>0,Ee||Te(ye,4,this.length),w.read(this,ye,!0,23,4)},T.prototype.readFloatBE=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,4,this.length),w.read(this,ye,!1,23,4)},T.prototype.readDoubleLE=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,8,this.length),w.read(this,ye,!0,52,8)},T.prototype.readDoubleBE=function(ye,Ee){return ye=ye>>>0,Ee||Te(ye,8,this.length),w.read(this,ye,!1,52,8)};function we(xe,ye,Ee,Me,Ne,je){if(!T.isBuffer(xe))throw new TypeError('"buffer" argument must be a Buffer instance');if(ye>Ne||yexe.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(ye,Ee,Me,Ne){if(ye=+ye,Ee=Ee>>>0,Me=Me>>>0,!Ne){var je=Math.pow(2,8*Me)-1;we(this,ye,Ee,Me,je,0)}var it=1,mt=0;for(this[Ee]=ye&255;++mt>>0,Me=Me>>>0,!Ne){var je=Math.pow(2,8*Me)-1;we(this,ye,Ee,Me,je,0)}var it=Me-1,mt=1;for(this[Ee+it]=ye&255;--it>=0&&(mt*=256);)this[Ee+it]=ye/mt&255;return Ee+Me},T.prototype.writeUint8=T.prototype.writeUInt8=function(ye,Ee,Me){return ye=+ye,Ee=Ee>>>0,Me||we(this,ye,Ee,1,255,0),this[Ee]=ye&255,Ee+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(ye,Ee,Me){return ye=+ye,Ee=Ee>>>0,Me||we(this,ye,Ee,2,65535,0),this[Ee]=ye&255,this[Ee+1]=ye>>>8,Ee+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(ye,Ee,Me){return ye=+ye,Ee=Ee>>>0,Me||we(this,ye,Ee,2,65535,0),this[Ee]=ye>>>8,this[Ee+1]=ye&255,Ee+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(ye,Ee,Me){return ye=+ye,Ee=Ee>>>0,Me||we(this,ye,Ee,4,4294967295,0),this[Ee+3]=ye>>>24,this[Ee+2]=ye>>>16,this[Ee+1]=ye>>>8,this[Ee]=ye&255,Ee+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(ye,Ee,Me){return ye=+ye,Ee=Ee>>>0,Me||we(this,ye,Ee,4,4294967295,0),this[Ee]=ye>>>24,this[Ee+1]=ye>>>16,this[Ee+2]=ye>>>8,this[Ee+3]=ye&255,Ee+4};function Re(xe,ye,Ee,Me,Ne){Ie(ye,Me,Ne,xe,Ee,7);var je=Number(ye&BigInt(4294967295));xe[Ee++]=je,je=je>>8,xe[Ee++]=je,je=je>>8,xe[Ee++]=je,je=je>>8,xe[Ee++]=je;var it=Number(ye>>BigInt(32)&BigInt(4294967295));return xe[Ee++]=it,it=it>>8,xe[Ee++]=it,it=it>>8,xe[Ee++]=it,it=it>>8,xe[Ee++]=it,Ee}function be(xe,ye,Ee,Me,Ne){Ie(ye,Me,Ne,xe,Ee,7);var je=Number(ye&BigInt(4294967295));xe[Ee+7]=je,je=je>>8,xe[Ee+6]=je,je=je>>8,xe[Ee+5]=je,je=je>>8,xe[Ee+4]=je;var it=Number(ye>>BigInt(32)&BigInt(4294967295));return xe[Ee+3]=it,it=it>>8,xe[Ee+2]=it,it=it>>8,xe[Ee+1]=it,it=it>>8,xe[Ee]=it,Ee+8}T.prototype.writeBigUInt64LE=We(function(ye){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Re(this,ye,Ee,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeBigUInt64BE=We(function(ye){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return be(this,ye,Ee,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeIntLE=function(ye,Ee,Me,Ne){if(ye=+ye,Ee=Ee>>>0,!Ne){var je=Math.pow(2,8*Me-1);we(this,ye,Ee,Me,je-1,-je)}var it=0,mt=1,bt=0;for(this[Ee]=ye&255;++it>0)-bt&255;return Ee+Me},T.prototype.writeIntBE=function(ye,Ee,Me,Ne){if(ye=+ye,Ee=Ee>>>0,!Ne){var je=Math.pow(2,8*Me-1);we(this,ye,Ee,Me,je-1,-je)}var it=Me-1,mt=1,bt=0;for(this[Ee+it]=ye&255;--it>=0&&(mt*=256);)ye<0&&bt===0&&this[Ee+it+1]!==0&&(bt=1),this[Ee+it]=(ye/mt>>0)-bt&255;return Ee+Me},T.prototype.writeInt8=function(ye,Ee,Me){return ye=+ye,Ee=Ee>>>0,Me||we(this,ye,Ee,1,127,-128),ye<0&&(ye=255+ye+1),this[Ee]=ye&255,Ee+1},T.prototype.writeInt16LE=function(ye,Ee,Me){return ye=+ye,Ee=Ee>>>0,Me||we(this,ye,Ee,2,32767,-32768),this[Ee]=ye&255,this[Ee+1]=ye>>>8,Ee+2},T.prototype.writeInt16BE=function(ye,Ee,Me){return ye=+ye,Ee=Ee>>>0,Me||we(this,ye,Ee,2,32767,-32768),this[Ee]=ye>>>8,this[Ee+1]=ye&255,Ee+2},T.prototype.writeInt32LE=function(ye,Ee,Me){return ye=+ye,Ee=Ee>>>0,Me||we(this,ye,Ee,4,2147483647,-2147483648),this[Ee]=ye&255,this[Ee+1]=ye>>>8,this[Ee+2]=ye>>>16,this[Ee+3]=ye>>>24,Ee+4},T.prototype.writeInt32BE=function(ye,Ee,Me){return ye=+ye,Ee=Ee>>>0,Me||we(this,ye,Ee,4,2147483647,-2147483648),ye<0&&(ye=4294967295+ye+1),this[Ee]=ye>>>24,this[Ee+1]=ye>>>16,this[Ee+2]=ye>>>8,this[Ee+3]=ye&255,Ee+4},T.prototype.writeBigInt64LE=We(function(ye){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Re(this,ye,Ee,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),T.prototype.writeBigInt64BE=We(function(ye){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return be(this,ye,Ee,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ae(xe,ye,Ee,Me,Ne,je){if(Ee+Me>xe.length)throw new RangeError("Index out of range");if(Ee<0)throw new RangeError("Index out of range")}function me(xe,ye,Ee,Me,Ne){return ye=+ye,Ee=Ee>>>0,Ne||Ae(xe,ye,Ee,4),w.write(xe,ye,Ee,Me,23,4),Ee+4}T.prototype.writeFloatLE=function(ye,Ee,Me){return me(this,ye,Ee,!0,Me)},T.prototype.writeFloatBE=function(ye,Ee,Me){return me(this,ye,Ee,!1,Me)};function Le(xe,ye,Ee,Me,Ne){return ye=+ye,Ee=Ee>>>0,Ne||Ae(xe,ye,Ee,8),w.write(xe,ye,Ee,Me,52,8),Ee+8}T.prototype.writeDoubleLE=function(ye,Ee,Me){return Le(this,ye,Ee,!0,Me)},T.prototype.writeDoubleBE=function(ye,Ee,Me){return Le(this,ye,Ee,!1,Me)},T.prototype.copy=function(ye,Ee,Me,Ne){if(!T.isBuffer(ye))throw new TypeError("argument should be a Buffer");if(Me||(Me=0),!Ne&&Ne!==0&&(Ne=this.length),Ee>=ye.length&&(Ee=ye.length),Ee||(Ee=0),Ne>0&&Ne=this.length)throw new RangeError("Index out of range");if(Ne<0)throw new RangeError("sourceEnd out of bounds");Ne>this.length&&(Ne=this.length),ye.length-Ee>>0,Me=Me===void 0?this.length:Me>>>0,ye||(ye=0);var it;if(typeof ye=="number")for(it=Ee;itMath.pow(2,32)?Ne=ke(String(Ee)):typeof Ee=="bigint"&&(Ne=String(Ee),(Ee>Math.pow(BigInt(2),BigInt(32))||Ee<-Math.pow(BigInt(2),BigInt(32)))&&(Ne=ke(Ne)),Ne+="n"),Me+=" It must be ".concat(ye,". Received ").concat(Ne),Me},RangeError);function ke(xe){for(var ye="",Ee=xe.length,Me=xe[0]==="-"?1:0;Ee>=Me+4;Ee-=3)ye="_".concat(xe.slice(Ee-3,Ee)).concat(ye);return"".concat(xe.slice(0,Ee)).concat(ye)}function He(xe,ye,Ee){rt(ye,"offset"),(xe[ye]===void 0||xe[ye+Ee]===void 0)&&Ke(ye,xe.length-(Ee+1))}function Ie(xe,ye,Ee,Me,Ne,je){if(xe>Ee||xe3?ye===0||ye===BigInt(0)?mt=">= 0".concat(it," and < 2").concat(it," ** ").concat((je+1)*8).concat(it):mt=">= -(2".concat(it," ** ").concat((je+1)*8-1).concat(it,") and < 2 ** ")+"".concat((je+1)*8-1).concat(it):mt=">= ".concat(ye).concat(it," and <= ").concat(Ee).concat(it),new Ve.ERR_OUT_OF_RANGE("value",mt,xe)}He(Me,Ne,je)}function rt(xe,ye){if(typeof xe!="number")throw new Ve.ERR_INVALID_ARG_TYPE(ye,"number",xe)}function Ke(xe,ye,Ee){throw Math.floor(xe)!==xe?(rt(xe,Ee),new Ve.ERR_OUT_OF_RANGE(Ee||"offset","an integer",xe)):ye<0?new Ve.ERR_BUFFER_OUT_OF_BOUNDS:new Ve.ERR_OUT_OF_RANGE(Ee||"offset",">= ".concat(Ee?1:0," and <= ").concat(ye),xe)}var $e=/[^+/0-9A-Za-z-_]/g;function lt(xe){if(xe=xe.split("=")[0],xe=xe.trim().replace($e,""),xe.length<2)return"";for(;xe.length%4!==0;)xe=xe+"=";return xe}function ht(xe,ye){ye=ye||1/0;for(var Ee,Me=xe.length,Ne=null,je=[],it=0;it55295&&Ee<57344){if(!Ne){if(Ee>56319){(ye-=3)>-1&&je.push(239,191,189);continue}else if(it+1===Me){(ye-=3)>-1&&je.push(239,191,189);continue}Ne=Ee;continue}if(Ee<56320){(ye-=3)>-1&&je.push(239,191,189),Ne=Ee;continue}Ee=(Ne-55296<<10|Ee-56320)+65536}else Ne&&(ye-=3)>-1&&je.push(239,191,189);if(Ne=null,Ee<128){if((ye-=1)<0)break;je.push(Ee)}else if(Ee<2048){if((ye-=2)<0)break;je.push(Ee>>6|192,Ee&63|128)}else if(Ee<65536){if((ye-=3)<0)break;je.push(Ee>>12|224,Ee>>6&63|128,Ee&63|128)}else if(Ee<1114112){if((ye-=4)<0)break;je.push(Ee>>18|240,Ee>>12&63|128,Ee>>6&63|128,Ee&63|128)}else throw new Error("Invalid code point")}return je}function dt(xe){for(var ye=[],Ee=0;Ee>8,Ne=Ee%256,je.push(Ne),je.push(Me);return je}function St(xe){return d.toByteArray(lt(xe))}function nt(xe,ye,Ee,Me){var Ne;for(Ne=0;Ne=ye.length||Ne>=xe.length);++Ne)ye[Ne+Ee]=xe[Ne];return Ne}function ze(xe,ye){return xe instanceof ye||xe!=null&&xe.constructor!=null&&xe.constructor.name!=null&&xe.constructor.name===ye.name}function Ze(xe){return xe!==xe}var Je=function(){for(var xe="0123456789abcdef",ye=new Array(256),Ee=0;Ee<16;++Ee)for(var Me=Ee*16,Ne=0;Ne<16;++Ne)ye[Me+Ne]=xe[Ee]+xe[Ne];return ye}();function We(xe){return typeof BigInt>"u"?Fe:xe}function Fe(){throw new Error("BigInt not supported")}},2321:function(v){v.exports=a,v.exports.isMobile=a,v.exports.default=a;var p=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,t=/android|ipad|playbook|silk/i;function a(n){n||(n={});var f=n.ua;if(!f&&typeof navigator<"u"&&(f=navigator.userAgent),f&&f.headers&&typeof f.headers["user-agent"]=="string"&&(f=f.headers["user-agent"]),typeof f!="string")return!1;var c=p.test(f)&&!r.test(f)||!!n.tablet&&t.test(f);return!c&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&f.indexOf("Macintosh")!==-1&&f.indexOf("Safari")!==-1&&(c=!0),c}},3910:function(v,p){p.byteLength=m,p.toByteArray=b,p.fromByteArray=d;for(var r=[],t=[],a=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,c=n.length;f0)throw new Error("Invalid string. Length must be a multiple of 4");var _=w.indexOf("=");_===-1&&(_=A);var y=_===A?0:4-_%4;return[_,y]}function m(w){var A=l(w),_=A[0],y=A[1];return(_+y)*3/4-y}function h(w,A,_){return(A+_)*3/4-_}function b(w){var A,_=l(w),y=_[0],E=_[1],T=new a(h(w,y,E)),s=0,L=E>0?y-4:y,M;for(M=0;M>16&255,T[s++]=A>>8&255,T[s++]=A&255;return E===2&&(A=t[w.charCodeAt(M)]<<2|t[w.charCodeAt(M+1)]>>4,T[s++]=A&255),E===1&&(A=t[w.charCodeAt(M)]<<10|t[w.charCodeAt(M+1)]<<4|t[w.charCodeAt(M+2)]>>2,T[s++]=A>>8&255,T[s++]=A&255),T}function u(w){return r[w>>18&63]+r[w>>12&63]+r[w>>6&63]+r[w&63]}function o(w,A,_){for(var y,E=[],T=A;T<_;T+=3)y=(w[T]<<16&16711680)+(w[T+1]<<8&65280)+(w[T+2]&255),E.push(u(y));return E.join("")}function d(w){for(var A,_=w.length,y=_%3,E=[],T=16383,s=0,L=_-y;sL?L:s+T));return y===1?(A=w[_-1],E.push(r[A>>2]+r[A<<4&63]+"==")):y===2&&(A=(w[_-2]<<8)+w[_-1],E.push(r[A>>10]+r[A>>4&63]+r[A<<2&63]+"=")),E.join("")}},3187:function(v,p){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */p.read=function(r,t,a,n,f){var c,l,m=f*8-n-1,h=(1<>1,u=-7,o=a?f-1:0,d=a?-1:1,w=r[t+o];for(o+=d,c=w&(1<<-u)-1,w>>=-u,u+=m;u>0;c=c*256+r[t+o],o+=d,u-=8);for(l=c&(1<<-u)-1,c>>=-u,u+=n;u>0;l=l*256+r[t+o],o+=d,u-=8);if(c===0)c=1-b;else{if(c===h)return l?NaN:(w?-1:1)*(1/0);l=l+Math.pow(2,n),c=c-b}return(w?-1:1)*l*Math.pow(2,c-n)},p.write=function(r,t,a,n,f,c){var l,m,h,b=c*8-f-1,u=(1<>1,d=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:c-1,A=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(m=isNaN(t)?1:0,l=u):(l=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-l))<1&&(l--,h*=2),l+o>=1?t+=d/h:t+=d*Math.pow(2,1-o),t*h>=2&&(l++,h/=2),l+o>=u?(m=0,l=u):l+o>=1?(m=(t*h-1)*Math.pow(2,f),l=l+o):(m=t*Math.pow(2,o-1)*Math.pow(2,f),l=0));f>=8;r[a+w]=m&255,w+=A,m/=256,f-=8);for(l=l<0;r[a+w]=l&255,w+=A,l/=256,b-=8);r[a+w-A]|=_*128}},1152:function(v,p,r){v.exports=l;var t=r(3440),a=r(7774),n=r(9298);function f(m,h){this._controllerNames=Object.keys(m),this._controllerList=this._controllerNames.map(function(b){return m[b]}),this._mode=h,this._active=m[h],this._active||(this._mode="turntable",this._active=m.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var c=f.prototype;c.flush=function(m){for(var h=this._controllerList,b=0;b"u"?r(5346):WeakMap,a=r(5827),n=r(2944),f=new t;function c(l){var m=f.get(l),h=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!h||!l.isBuffer(h)){var b=a(l,new Float32Array([-1,-1,-1,4,4,-1]));m=n(l,[{buffer:b,type:l.FLOAT,size:2}]),m._triangleBuffer=b,f.set(l,m)}m.bind(),l.drawArrays(l.TRIANGLES,0,3),m.unbind()}v.exports=c},8008:function(v,p,r){var t=r(4930);v.exports=a;function a(n,f,c){f=typeof f=="number"?f:1,c=c||": ";var l=n.split(/\r?\n/),m=String(l.length+f-1).length;return l.map(function(h,b){var u=b+f,o=String(u).length,d=t(u,m-o);return d+c+h}).join(` -`)}},2153:function(v,p,r){v.exports=n;var t=r(417);function a(f,c){for(var l=new Array(c+1),m=0;m0?o=o.ushln(u):u<0&&(d=d.ushln(-u)),c(o,d)}},234:function(v,p,r){var t=r(3218);v.exports=a;function a(n){return Array.isArray(n)&&n.length===2&&t(n[0])&&t(n[1])}},4275:function(v,p,r){var t=r(1928);v.exports=a;function a(n){return n.cmp(new t(0))}},9958:function(v,p,r){var t=r(4275);v.exports=a;function a(n){var f=n.length,c=n.words,l=0;if(f===1)l=c[0];else if(f===2)l=c[0]+c[1]*67108864;else for(var m=0;m20?52:l+32}},3218:function(v,p,r){r(1928),v.exports=t;function t(a){return a&&typeof a=="object"&&!!a.words}},5514:function(v,p,r){var t=r(1928),a=r(8362);v.exports=n;function n(f){var c=a.exponent(f);return c<52?new t(f):new t(f*Math.pow(2,52-c)).ushln(c-52)}},8524:function(v,p,r){var t=r(5514),a=r(4275);v.exports=n;function n(f,c){var l=a(f),m=a(c);if(l===0)return[t(0),t(1)];if(m===0)return[t(0),t(0)];m<0&&(f=f.neg(),c=c.neg());var h=f.gcd(c);return h.cmpn(1)?[f.div(h),c.div(h)]:[f,c]}},2813:function(v,p,r){var t=r(1928);v.exports=a;function a(n){return new t(n)}},3962:function(v,p,r){var t=r(8524);v.exports=a;function a(n,f){return t(n[0].mul(f[0]),n[1].mul(f[1]))}},4951:function(v,p,r){var t=r(4275);v.exports=a;function a(n){return t(n[0])*t(n[1])}},4354:function(v,p,r){var t=r(8524);v.exports=a;function a(n,f){return t(n[0].mul(f[1]).sub(n[1].mul(f[0])),n[1].mul(f[1]))}},7999:function(v,p,r){var t=r(9958),a=r(1112);v.exports=n;function n(f){var c=f[0],l=f[1];if(c.cmpn(0)===0)return 0;var m=c.abs().divmod(l.abs()),h=m.div,b=t(h),u=m.mod,o=c.negative!==l.negative?-1:1;if(u.cmpn(0)===0)return o*b;if(b){var d=a(b)+4,w=t(u.ushln(d).divRound(l));return o*(b+w*Math.pow(2,-d))}else{var A=l.bitLength()-u.bitLength()+53,w=t(u.ushln(A).divRound(l));return A<1023?o*w*Math.pow(2,-A):(w*=Math.pow(2,-1023),o*w*Math.pow(2,1023-A))}}},5070:function(v){function p(c,l,m,h,b){for(var u=b+1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w>=0?(u=o,b=o-1):h=o+1}return u}function r(c,l,m,h,b){for(var u=b+1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w>0?(u=o,b=o-1):h=o+1}return u}function t(c,l,m,h,b){for(var u=h-1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w<0?(u=o,h=o+1):b=o-1}return u}function a(c,l,m,h,b){for(var u=h-1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w<=0?(u=o,h=o+1):b=o-1}return u}function n(c,l,m,h,b){for(;h<=b;){var u=h+b>>>1,o=c[u],d=m!==void 0?m(o,l):o-l;if(d===0)return u;d<=0?h=u+1:b=u-1}return-1}function f(c,l,m,h,b,u){return typeof m=="function"?u(c,l,m,h===void 0?0:h|0,b===void 0?c.length-1:b|0):u(c,l,void 0,m===void 0?0:m|0,h===void 0?c.length-1:h|0)}v.exports={ge:function(c,l,m,h,b){return f(c,l,m,h,b,p)},gt:function(c,l,m,h,b){return f(c,l,m,h,b,r)},lt:function(c,l,m,h,b){return f(c,l,m,h,b,t)},le:function(c,l,m,h,b){return f(c,l,m,h,b,a)},eq:function(c,l,m,h,b){return f(c,l,m,h,b,n)}}},2288:function(v,p){"use restrict";var r=32;p.INT_BITS=r,p.INT_MAX=2147483647,p.INT_MIN=-1<0)-(n<0)},p.abs=function(n){var f=n>>r-1;return(n^f)-f},p.min=function(n,f){return f^(n^f)&-(n65535)<<4,n>>>=f,c=(n>255)<<3,n>>>=c,f|=c,c=(n>15)<<2,n>>>=c,f|=c,c=(n>3)<<1,n>>>=c,f|=c,f|n>>1},p.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},p.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function t(n){var f=32;return n&=-n,n&&f--,n&65535&&(f-=16),n&16711935&&(f-=8),n&252645135&&(f-=4),n&858993459&&(f-=2),n&1431655765&&(f-=1),f}p.countTrailingZeros=t,p.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},p.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},p.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var f=0;f<256;++f){var c=f,l=f,m=7;for(c>>>=1;c;c>>>=1)l<<=1,l|=c&1,--m;n[f]=l<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},p.interleave2=function(n,f){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,n|f<<1},p.deinterleave2=function(n,f){return n=n>>>f&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},p.interleave3=function(n,f,c){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,n|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,n|c<<2},p.deinterleave3=function(n,f){return n=n>>>f&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},p.nextCombination=function(n){var f=n|n-1;return f+1|(~f&-~f)-1>>>t(n)+1}},1928:function(v,p,r){v=r.nmd(v),function(t,a){function n(B,O){if(!B)throw new Error(O||"Assertion failed")}function f(B,O){B.super_=O;var V=function(){};V.prototype=O.prototype,B.prototype=new V,B.prototype.constructor=B}function c(B,O,V){if(c.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((O==="le"||O==="be")&&(V=O,O=10),this._init(B||0,O||10,V||"be"))}typeof t=="object"?t.exports=c:a.BN=c,c.BN=c,c.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=r(6601).Buffer}catch{}c.isBN=function(O){return O instanceof c?!0:O!==null&&typeof O=="object"&&O.constructor.wordSize===c.wordSize&&Array.isArray(O.words)},c.max=function(O,V){return O.cmp(V)>0?O:V},c.min=function(O,V){return O.cmp(V)<0?O:V},c.prototype._init=function(O,V,Y){if(typeof O=="number")return this._initNumber(O,V,Y);if(typeof O=="object")return this._initArray(O,V,Y);V==="hex"&&(V=16),n(V===(V|0)&&V>=2&&V<=36),O=O.toString().replace(/\s+/g,"");var j=0;O[0]==="-"&&(j++,this.negative=1),j=0;j-=3)ie=O[j]|O[j-1]<<8|O[j-2]<<16,this.words[te]|=ie<>>26-ue&67108863,ue+=24,ue>=26&&(ue-=26,te++);else if(Y==="le")for(j=0,te=0;j>>26-ue&67108863,ue+=24,ue>=26&&(ue-=26,te++);return this.strip()};function m(B,O){var V=B.charCodeAt(O);return V>=65&&V<=70?V-55:V>=97&&V<=102?V-87:V-48&15}function h(B,O,V){var Y=m(B,V);return V-1>=O&&(Y|=m(B,V-1)<<4),Y}c.prototype._parseHex=function(O,V,Y){this.length=Math.ceil((O.length-V)/6),this.words=new Array(this.length);for(var j=0;j=V;j-=2)ue=h(O,V,j)<=18?(te-=18,ie+=1,this.words[ie]|=ue>>>26):te+=8;else{var J=O.length-V;for(j=J%2===0?V+1:V;j=18?(te-=18,ie+=1,this.words[ie]|=ue>>>26):te+=8}this.strip()};function b(B,O,V,Y){for(var j=0,te=Math.min(B.length,V),ie=O;ie=49?j+=ue-49+10:ue>=17?j+=ue-17+10:j+=ue}return j}c.prototype._parseBase=function(O,V,Y){this.words=[0],this.length=1;for(var j=0,te=1;te<=67108863;te*=V)j++;j--,te=te/V|0;for(var ie=O.length-Y,ue=ie%j,J=Math.min(ie,ie-ue)+Y,X=0,ee=Y;ee1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],o=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(O,V){O=O||10,V=V|0||1;var Y;if(O===16||O==="hex"){Y="";for(var j=0,te=0,ie=0;ie>>24-j&16777215,te!==0||ie!==this.length-1?Y=u[6-J.length]+J+Y:Y=J+Y,j+=2,j>=26&&(j-=26,ie--)}for(te!==0&&(Y=te.toString(16)+Y);Y.length%V!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}if(O===(O|0)&&O>=2&&O<=36){var X=o[O],ee=d[O];Y="";var G=this.clone();for(G.negative=0;!G.isZero();){var Q=G.modn(ee).toString(O);G=G.idivn(ee),G.isZero()?Y=Q+Y:Y=u[X-Q.length]+Q+Y}for(this.isZero()&&(Y="0"+Y);Y.length%V!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}n(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var O=this.words[0];return this.length===2?O+=this.words[1]*67108864:this.length===3&&this.words[2]===1?O+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-O:O},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(O,V){return n(typeof l<"u"),this.toArrayLike(l,O,V)},c.prototype.toArray=function(O,V){return this.toArrayLike(Array,O,V)},c.prototype.toArrayLike=function(O,V,Y){var j=this.byteLength(),te=Y||Math.max(1,j);n(j<=te,"byte array longer than desired length"),n(te>0,"Requested array length <= 0"),this.strip();var ie=V==="le",ue=new O(te),J,X,ee=this.clone();if(ie){for(X=0;!ee.isZero();X++)J=ee.andln(255),ee.iushrn(8),ue[X]=J;for(;X=4096&&(Y+=13,V>>>=13),V>=64&&(Y+=7,V>>>=7),V>=8&&(Y+=4,V>>>=4),V>=2&&(Y+=2,V>>>=2),Y+V},c.prototype._zeroBits=function(O){if(O===0)return 26;var V=O,Y=0;return V&8191||(Y+=13,V>>>=13),V&127||(Y+=7,V>>>=7),V&15||(Y+=4,V>>>=4),V&3||(Y+=2,V>>>=2),V&1||Y++,Y},c.prototype.bitLength=function(){var O=this.words[this.length-1],V=this._countBits(O);return(this.length-1)*26+V};function w(B){for(var O=new Array(B.bitLength()),V=0;V>>j}return O}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,V=0;VO.length?this.clone().ior(O):O.clone().ior(this)},c.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},c.prototype.iuand=function(O){var V;this.length>O.length?V=O:V=this;for(var Y=0;YO.length?this.clone().iand(O):O.clone().iand(this)},c.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},c.prototype.iuxor=function(O){var V,Y;this.length>O.length?(V=this,Y=O):(V=O,Y=this);for(var j=0;jO.length?this.clone().ixor(O):O.clone().ixor(this)},c.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},c.prototype.inotn=function(O){n(typeof O=="number"&&O>=0);var V=Math.ceil(O/26)|0,Y=O%26;this._expand(V),Y>0&&V--;for(var j=0;j0&&(this.words[j]=~this.words[j]&67108863>>26-Y),this.strip()},c.prototype.notn=function(O){return this.clone().inotn(O)},c.prototype.setn=function(O,V){n(typeof O=="number"&&O>=0);var Y=O/26|0,j=O%26;return this._expand(Y+1),V?this.words[Y]=this.words[Y]|1<O.length?(Y=this,j=O):(Y=O,j=this);for(var te=0,ie=0;ie>>26;for(;te!==0&&ie>>26;if(this.length=Y.length,te!==0)this.words[this.length]=te,this.length++;else if(Y!==this)for(;ieO.length?this.clone().iadd(O):O.clone().iadd(this)},c.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var V=this.iadd(O);return O.negative=1,V._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var Y=this.cmp(O);if(Y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var j,te;Y>0?(j=this,te=O):(j=O,te=this);for(var ie=0,ue=0;ue>26,this.words[ue]=V&67108863;for(;ie!==0&&ue>26,this.words[ue]=V&67108863;if(ie===0&&ue>>26,G=J&67108863,Q=Math.min(X,O.length-1),oe=Math.max(0,X-B.length+1);oe<=Q;oe++){var $=X-oe|0;j=B.words[$]|0,te=O.words[oe]|0,ie=j*te+G,ee+=ie/67108864|0,G=ie&67108863}V.words[X]=G|0,J=ee|0}return J!==0?V.words[X]=J|0:V.length--,V.strip()}var _=function(O,V,Y){var j=O.words,te=V.words,ie=Y.words,ue=0,J,X,ee,G=j[0]|0,Q=G&8191,oe=G>>>13,$=j[1]|0,Z=$&8191,se=$>>>13,ne=j[2]|0,ce=ne&8191,ge=ne>>>13,Te=j[3]|0,we=Te&8191,Re=Te>>>13,be=j[4]|0,Ae=be&8191,me=be>>>13,Le=j[5]|0,Ve=Le&8191,Ue=Le>>>13,ke=j[6]|0,He=ke&8191,Ie=ke>>>13,rt=j[7]|0,Ke=rt&8191,$e=rt>>>13,lt=j[8]|0,ht=lt&8191,dt=lt>>>13,xt=j[9]|0,St=xt&8191,nt=xt>>>13,ze=te[0]|0,Ze=ze&8191,Je=ze>>>13,We=te[1]|0,Fe=We&8191,xe=We>>>13,ye=te[2]|0,Ee=ye&8191,Me=ye>>>13,Ne=te[3]|0,je=Ne&8191,it=Ne>>>13,mt=te[4]|0,bt=mt&8191,vt=mt>>>13,Lt=te[5]|0,ct=Lt&8191,Tt=Lt>>>13,Bt=te[6]|0,ir=Bt&8191,pt=Bt>>>13,Xt=te[7]|0,Kt=Xt&8191,or=Xt>>>13,$t=te[8]|0,gt=$t&8191,st=$t>>>13,At=te[9]|0,Ct=At&8191,It=At>>>13;Y.negative=O.negative^V.negative,Y.length=19,J=Math.imul(Q,Ze),X=Math.imul(Q,Je),X=X+Math.imul(oe,Ze)|0,ee=Math.imul(oe,Je);var Pt=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,J=Math.imul(Z,Ze),X=Math.imul(Z,Je),X=X+Math.imul(se,Ze)|0,ee=Math.imul(se,Je),J=J+Math.imul(Q,Fe)|0,X=X+Math.imul(Q,xe)|0,X=X+Math.imul(oe,Fe)|0,ee=ee+Math.imul(oe,xe)|0;var kt=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(kt>>>26)|0,kt&=67108863,J=Math.imul(ce,Ze),X=Math.imul(ce,Je),X=X+Math.imul(ge,Ze)|0,ee=Math.imul(ge,Je),J=J+Math.imul(Z,Fe)|0,X=X+Math.imul(Z,xe)|0,X=X+Math.imul(se,Fe)|0,ee=ee+Math.imul(se,xe)|0,J=J+Math.imul(Q,Ee)|0,X=X+Math.imul(Q,Me)|0,X=X+Math.imul(oe,Ee)|0,ee=ee+Math.imul(oe,Me)|0;var Ht=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,J=Math.imul(we,Ze),X=Math.imul(we,Je),X=X+Math.imul(Re,Ze)|0,ee=Math.imul(Re,Je),J=J+Math.imul(ce,Fe)|0,X=X+Math.imul(ce,xe)|0,X=X+Math.imul(ge,Fe)|0,ee=ee+Math.imul(ge,xe)|0,J=J+Math.imul(Z,Ee)|0,X=X+Math.imul(Z,Me)|0,X=X+Math.imul(se,Ee)|0,ee=ee+Math.imul(se,Me)|0,J=J+Math.imul(Q,je)|0,X=X+Math.imul(Q,it)|0,X=X+Math.imul(oe,je)|0,ee=ee+Math.imul(oe,it)|0;var Jt=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,J=Math.imul(Ae,Ze),X=Math.imul(Ae,Je),X=X+Math.imul(me,Ze)|0,ee=Math.imul(me,Je),J=J+Math.imul(we,Fe)|0,X=X+Math.imul(we,xe)|0,X=X+Math.imul(Re,Fe)|0,ee=ee+Math.imul(Re,xe)|0,J=J+Math.imul(ce,Ee)|0,X=X+Math.imul(ce,Me)|0,X=X+Math.imul(ge,Ee)|0,ee=ee+Math.imul(ge,Me)|0,J=J+Math.imul(Z,je)|0,X=X+Math.imul(Z,it)|0,X=X+Math.imul(se,je)|0,ee=ee+Math.imul(se,it)|0,J=J+Math.imul(Q,bt)|0,X=X+Math.imul(Q,vt)|0,X=X+Math.imul(oe,bt)|0,ee=ee+Math.imul(oe,vt)|0;var ur=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(ur>>>26)|0,ur&=67108863,J=Math.imul(Ve,Ze),X=Math.imul(Ve,Je),X=X+Math.imul(Ue,Ze)|0,ee=Math.imul(Ue,Je),J=J+Math.imul(Ae,Fe)|0,X=X+Math.imul(Ae,xe)|0,X=X+Math.imul(me,Fe)|0,ee=ee+Math.imul(me,xe)|0,J=J+Math.imul(we,Ee)|0,X=X+Math.imul(we,Me)|0,X=X+Math.imul(Re,Ee)|0,ee=ee+Math.imul(Re,Me)|0,J=J+Math.imul(ce,je)|0,X=X+Math.imul(ce,it)|0,X=X+Math.imul(ge,je)|0,ee=ee+Math.imul(ge,it)|0,J=J+Math.imul(Z,bt)|0,X=X+Math.imul(Z,vt)|0,X=X+Math.imul(se,bt)|0,ee=ee+Math.imul(se,vt)|0,J=J+Math.imul(Q,ct)|0,X=X+Math.imul(Q,Tt)|0,X=X+Math.imul(oe,ct)|0,ee=ee+Math.imul(oe,Tt)|0;var hr=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(hr>>>26)|0,hr&=67108863,J=Math.imul(He,Ze),X=Math.imul(He,Je),X=X+Math.imul(Ie,Ze)|0,ee=Math.imul(Ie,Je),J=J+Math.imul(Ve,Fe)|0,X=X+Math.imul(Ve,xe)|0,X=X+Math.imul(Ue,Fe)|0,ee=ee+Math.imul(Ue,xe)|0,J=J+Math.imul(Ae,Ee)|0,X=X+Math.imul(Ae,Me)|0,X=X+Math.imul(me,Ee)|0,ee=ee+Math.imul(me,Me)|0,J=J+Math.imul(we,je)|0,X=X+Math.imul(we,it)|0,X=X+Math.imul(Re,je)|0,ee=ee+Math.imul(Re,it)|0,J=J+Math.imul(ce,bt)|0,X=X+Math.imul(ce,vt)|0,X=X+Math.imul(ge,bt)|0,ee=ee+Math.imul(ge,vt)|0,J=J+Math.imul(Z,ct)|0,X=X+Math.imul(Z,Tt)|0,X=X+Math.imul(se,ct)|0,ee=ee+Math.imul(se,Tt)|0,J=J+Math.imul(Q,ir)|0,X=X+Math.imul(Q,pt)|0,X=X+Math.imul(oe,ir)|0,ee=ee+Math.imul(oe,pt)|0;var vr=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(vr>>>26)|0,vr&=67108863,J=Math.imul(Ke,Ze),X=Math.imul(Ke,Je),X=X+Math.imul($e,Ze)|0,ee=Math.imul($e,Je),J=J+Math.imul(He,Fe)|0,X=X+Math.imul(He,xe)|0,X=X+Math.imul(Ie,Fe)|0,ee=ee+Math.imul(Ie,xe)|0,J=J+Math.imul(Ve,Ee)|0,X=X+Math.imul(Ve,Me)|0,X=X+Math.imul(Ue,Ee)|0,ee=ee+Math.imul(Ue,Me)|0,J=J+Math.imul(Ae,je)|0,X=X+Math.imul(Ae,it)|0,X=X+Math.imul(me,je)|0,ee=ee+Math.imul(me,it)|0,J=J+Math.imul(we,bt)|0,X=X+Math.imul(we,vt)|0,X=X+Math.imul(Re,bt)|0,ee=ee+Math.imul(Re,vt)|0,J=J+Math.imul(ce,ct)|0,X=X+Math.imul(ce,Tt)|0,X=X+Math.imul(ge,ct)|0,ee=ee+Math.imul(ge,Tt)|0,J=J+Math.imul(Z,ir)|0,X=X+Math.imul(Z,pt)|0,X=X+Math.imul(se,ir)|0,ee=ee+Math.imul(se,pt)|0,J=J+Math.imul(Q,Kt)|0,X=X+Math.imul(Q,or)|0,X=X+Math.imul(oe,Kt)|0,ee=ee+Math.imul(oe,or)|0;var Ye=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(Ye>>>26)|0,Ye&=67108863,J=Math.imul(ht,Ze),X=Math.imul(ht,Je),X=X+Math.imul(dt,Ze)|0,ee=Math.imul(dt,Je),J=J+Math.imul(Ke,Fe)|0,X=X+Math.imul(Ke,xe)|0,X=X+Math.imul($e,Fe)|0,ee=ee+Math.imul($e,xe)|0,J=J+Math.imul(He,Ee)|0,X=X+Math.imul(He,Me)|0,X=X+Math.imul(Ie,Ee)|0,ee=ee+Math.imul(Ie,Me)|0,J=J+Math.imul(Ve,je)|0,X=X+Math.imul(Ve,it)|0,X=X+Math.imul(Ue,je)|0,ee=ee+Math.imul(Ue,it)|0,J=J+Math.imul(Ae,bt)|0,X=X+Math.imul(Ae,vt)|0,X=X+Math.imul(me,bt)|0,ee=ee+Math.imul(me,vt)|0,J=J+Math.imul(we,ct)|0,X=X+Math.imul(we,Tt)|0,X=X+Math.imul(Re,ct)|0,ee=ee+Math.imul(Re,Tt)|0,J=J+Math.imul(ce,ir)|0,X=X+Math.imul(ce,pt)|0,X=X+Math.imul(ge,ir)|0,ee=ee+Math.imul(ge,pt)|0,J=J+Math.imul(Z,Kt)|0,X=X+Math.imul(Z,or)|0,X=X+Math.imul(se,Kt)|0,ee=ee+Math.imul(se,or)|0,J=J+Math.imul(Q,gt)|0,X=X+Math.imul(Q,st)|0,X=X+Math.imul(oe,gt)|0,ee=ee+Math.imul(oe,st)|0;var Ge=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,J=Math.imul(St,Ze),X=Math.imul(St,Je),X=X+Math.imul(nt,Ze)|0,ee=Math.imul(nt,Je),J=J+Math.imul(ht,Fe)|0,X=X+Math.imul(ht,xe)|0,X=X+Math.imul(dt,Fe)|0,ee=ee+Math.imul(dt,xe)|0,J=J+Math.imul(Ke,Ee)|0,X=X+Math.imul(Ke,Me)|0,X=X+Math.imul($e,Ee)|0,ee=ee+Math.imul($e,Me)|0,J=J+Math.imul(He,je)|0,X=X+Math.imul(He,it)|0,X=X+Math.imul(Ie,je)|0,ee=ee+Math.imul(Ie,it)|0,J=J+Math.imul(Ve,bt)|0,X=X+Math.imul(Ve,vt)|0,X=X+Math.imul(Ue,bt)|0,ee=ee+Math.imul(Ue,vt)|0,J=J+Math.imul(Ae,ct)|0,X=X+Math.imul(Ae,Tt)|0,X=X+Math.imul(me,ct)|0,ee=ee+Math.imul(me,Tt)|0,J=J+Math.imul(we,ir)|0,X=X+Math.imul(we,pt)|0,X=X+Math.imul(Re,ir)|0,ee=ee+Math.imul(Re,pt)|0,J=J+Math.imul(ce,Kt)|0,X=X+Math.imul(ce,or)|0,X=X+Math.imul(ge,Kt)|0,ee=ee+Math.imul(ge,or)|0,J=J+Math.imul(Z,gt)|0,X=X+Math.imul(Z,st)|0,X=X+Math.imul(se,gt)|0,ee=ee+Math.imul(se,st)|0,J=J+Math.imul(Q,Ct)|0,X=X+Math.imul(Q,It)|0,X=X+Math.imul(oe,Ct)|0,ee=ee+Math.imul(oe,It)|0;var Nt=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,J=Math.imul(St,Fe),X=Math.imul(St,xe),X=X+Math.imul(nt,Fe)|0,ee=Math.imul(nt,xe),J=J+Math.imul(ht,Ee)|0,X=X+Math.imul(ht,Me)|0,X=X+Math.imul(dt,Ee)|0,ee=ee+Math.imul(dt,Me)|0,J=J+Math.imul(Ke,je)|0,X=X+Math.imul(Ke,it)|0,X=X+Math.imul($e,je)|0,ee=ee+Math.imul($e,it)|0,J=J+Math.imul(He,bt)|0,X=X+Math.imul(He,vt)|0,X=X+Math.imul(Ie,bt)|0,ee=ee+Math.imul(Ie,vt)|0,J=J+Math.imul(Ve,ct)|0,X=X+Math.imul(Ve,Tt)|0,X=X+Math.imul(Ue,ct)|0,ee=ee+Math.imul(Ue,Tt)|0,J=J+Math.imul(Ae,ir)|0,X=X+Math.imul(Ae,pt)|0,X=X+Math.imul(me,ir)|0,ee=ee+Math.imul(me,pt)|0,J=J+Math.imul(we,Kt)|0,X=X+Math.imul(we,or)|0,X=X+Math.imul(Re,Kt)|0,ee=ee+Math.imul(Re,or)|0,J=J+Math.imul(ce,gt)|0,X=X+Math.imul(ce,st)|0,X=X+Math.imul(ge,gt)|0,ee=ee+Math.imul(ge,st)|0,J=J+Math.imul(Z,Ct)|0,X=X+Math.imul(Z,It)|0,X=X+Math.imul(se,Ct)|0,ee=ee+Math.imul(se,It)|0;var Ot=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,J=Math.imul(St,Ee),X=Math.imul(St,Me),X=X+Math.imul(nt,Ee)|0,ee=Math.imul(nt,Me),J=J+Math.imul(ht,je)|0,X=X+Math.imul(ht,it)|0,X=X+Math.imul(dt,je)|0,ee=ee+Math.imul(dt,it)|0,J=J+Math.imul(Ke,bt)|0,X=X+Math.imul(Ke,vt)|0,X=X+Math.imul($e,bt)|0,ee=ee+Math.imul($e,vt)|0,J=J+Math.imul(He,ct)|0,X=X+Math.imul(He,Tt)|0,X=X+Math.imul(Ie,ct)|0,ee=ee+Math.imul(Ie,Tt)|0,J=J+Math.imul(Ve,ir)|0,X=X+Math.imul(Ve,pt)|0,X=X+Math.imul(Ue,ir)|0,ee=ee+Math.imul(Ue,pt)|0,J=J+Math.imul(Ae,Kt)|0,X=X+Math.imul(Ae,or)|0,X=X+Math.imul(me,Kt)|0,ee=ee+Math.imul(me,or)|0,J=J+Math.imul(we,gt)|0,X=X+Math.imul(we,st)|0,X=X+Math.imul(Re,gt)|0,ee=ee+Math.imul(Re,st)|0,J=J+Math.imul(ce,Ct)|0,X=X+Math.imul(ce,It)|0,X=X+Math.imul(ge,Ct)|0,ee=ee+Math.imul(ge,It)|0;var Qt=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,J=Math.imul(St,je),X=Math.imul(St,it),X=X+Math.imul(nt,je)|0,ee=Math.imul(nt,it),J=J+Math.imul(ht,bt)|0,X=X+Math.imul(ht,vt)|0,X=X+Math.imul(dt,bt)|0,ee=ee+Math.imul(dt,vt)|0,J=J+Math.imul(Ke,ct)|0,X=X+Math.imul(Ke,Tt)|0,X=X+Math.imul($e,ct)|0,ee=ee+Math.imul($e,Tt)|0,J=J+Math.imul(He,ir)|0,X=X+Math.imul(He,pt)|0,X=X+Math.imul(Ie,ir)|0,ee=ee+Math.imul(Ie,pt)|0,J=J+Math.imul(Ve,Kt)|0,X=X+Math.imul(Ve,or)|0,X=X+Math.imul(Ue,Kt)|0,ee=ee+Math.imul(Ue,or)|0,J=J+Math.imul(Ae,gt)|0,X=X+Math.imul(Ae,st)|0,X=X+Math.imul(me,gt)|0,ee=ee+Math.imul(me,st)|0,J=J+Math.imul(we,Ct)|0,X=X+Math.imul(we,It)|0,X=X+Math.imul(Re,Ct)|0,ee=ee+Math.imul(Re,It)|0;var tr=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(tr>>>26)|0,tr&=67108863,J=Math.imul(St,bt),X=Math.imul(St,vt),X=X+Math.imul(nt,bt)|0,ee=Math.imul(nt,vt),J=J+Math.imul(ht,ct)|0,X=X+Math.imul(ht,Tt)|0,X=X+Math.imul(dt,ct)|0,ee=ee+Math.imul(dt,Tt)|0,J=J+Math.imul(Ke,ir)|0,X=X+Math.imul(Ke,pt)|0,X=X+Math.imul($e,ir)|0,ee=ee+Math.imul($e,pt)|0,J=J+Math.imul(He,Kt)|0,X=X+Math.imul(He,or)|0,X=X+Math.imul(Ie,Kt)|0,ee=ee+Math.imul(Ie,or)|0,J=J+Math.imul(Ve,gt)|0,X=X+Math.imul(Ve,st)|0,X=X+Math.imul(Ue,gt)|0,ee=ee+Math.imul(Ue,st)|0,J=J+Math.imul(Ae,Ct)|0,X=X+Math.imul(Ae,It)|0,X=X+Math.imul(me,Ct)|0,ee=ee+Math.imul(me,It)|0;var fr=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(fr>>>26)|0,fr&=67108863,J=Math.imul(St,ct),X=Math.imul(St,Tt),X=X+Math.imul(nt,ct)|0,ee=Math.imul(nt,Tt),J=J+Math.imul(ht,ir)|0,X=X+Math.imul(ht,pt)|0,X=X+Math.imul(dt,ir)|0,ee=ee+Math.imul(dt,pt)|0,J=J+Math.imul(Ke,Kt)|0,X=X+Math.imul(Ke,or)|0,X=X+Math.imul($e,Kt)|0,ee=ee+Math.imul($e,or)|0,J=J+Math.imul(He,gt)|0,X=X+Math.imul(He,st)|0,X=X+Math.imul(Ie,gt)|0,ee=ee+Math.imul(Ie,st)|0,J=J+Math.imul(Ve,Ct)|0,X=X+Math.imul(Ve,It)|0,X=X+Math.imul(Ue,Ct)|0,ee=ee+Math.imul(Ue,It)|0;var rr=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(rr>>>26)|0,rr&=67108863,J=Math.imul(St,ir),X=Math.imul(St,pt),X=X+Math.imul(nt,ir)|0,ee=Math.imul(nt,pt),J=J+Math.imul(ht,Kt)|0,X=X+Math.imul(ht,or)|0,X=X+Math.imul(dt,Kt)|0,ee=ee+Math.imul(dt,or)|0,J=J+Math.imul(Ke,gt)|0,X=X+Math.imul(Ke,st)|0,X=X+Math.imul($e,gt)|0,ee=ee+Math.imul($e,st)|0,J=J+Math.imul(He,Ct)|0,X=X+Math.imul(He,It)|0,X=X+Math.imul(Ie,Ct)|0,ee=ee+Math.imul(Ie,It)|0;var Vt=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,J=Math.imul(St,Kt),X=Math.imul(St,or),X=X+Math.imul(nt,Kt)|0,ee=Math.imul(nt,or),J=J+Math.imul(ht,gt)|0,X=X+Math.imul(ht,st)|0,X=X+Math.imul(dt,gt)|0,ee=ee+Math.imul(dt,st)|0,J=J+Math.imul(Ke,Ct)|0,X=X+Math.imul(Ke,It)|0,X=X+Math.imul($e,Ct)|0,ee=ee+Math.imul($e,It)|0;var dr=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(dr>>>26)|0,dr&=67108863,J=Math.imul(St,gt),X=Math.imul(St,st),X=X+Math.imul(nt,gt)|0,ee=Math.imul(nt,st),J=J+Math.imul(ht,Ct)|0,X=X+Math.imul(ht,It)|0,X=X+Math.imul(dt,Ct)|0,ee=ee+Math.imul(dt,It)|0;var mr=(ue+J|0)+((X&8191)<<13)|0;ue=(ee+(X>>>13)|0)+(mr>>>26)|0,mr&=67108863,J=Math.imul(St,Ct),X=Math.imul(St,It),X=X+Math.imul(nt,Ct)|0,ee=Math.imul(nt,It);var xr=(ue+J|0)+((X&8191)<<13)|0;return ue=(ee+(X>>>13)|0)+(xr>>>26)|0,xr&=67108863,ie[0]=Pt,ie[1]=kt,ie[2]=Ht,ie[3]=Jt,ie[4]=ur,ie[5]=hr,ie[6]=vr,ie[7]=Ye,ie[8]=Ge,ie[9]=Nt,ie[10]=Ot,ie[11]=Qt,ie[12]=tr,ie[13]=fr,ie[14]=rr,ie[15]=Vt,ie[16]=dr,ie[17]=mr,ie[18]=xr,ue!==0&&(ie[19]=ue,Y.length++),Y};Math.imul||(_=A);function y(B,O,V){V.negative=O.negative^B.negative,V.length=B.length+O.length;for(var Y=0,j=0,te=0;te>>26)|0,j+=ie>>>26,ie&=67108863}V.words[te]=ue,Y=ie,ie=j}return Y!==0?V.words[te]=Y:V.length--,V.strip()}function E(B,O,V){var Y=new T;return Y.mulp(B,O,V)}c.prototype.mulTo=function(O,V){var Y,j=this.length+O.length;return this.length===10&&O.length===10?Y=_(this,O,V):j<63?Y=A(this,O,V):j<1024?Y=y(this,O,V):Y=E(this,O,V),Y};function T(B,O){this.x=B,this.y=O}T.prototype.makeRBT=function(O){for(var V=new Array(O),Y=c.prototype._countBits(O)-1,j=0;j>=1;return j},T.prototype.permute=function(O,V,Y,j,te,ie){for(var ue=0;ue>>1)te++;return 1<>>13,Y[2*ie+1]=te&8191,te=te>>>13;for(ie=2*V;ie>=26,V+=j/67108864|0,V+=te>>>26,this.words[Y]=te&67108863}return V!==0&&(this.words[Y]=V,this.length++),this},c.prototype.muln=function(O){return this.clone().imuln(O)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(O){var V=w(O);if(V.length===0)return new c(1);for(var Y=this,j=0;j=0);var V=O%26,Y=(O-V)/26,j=67108863>>>26-V<<26-V,te;if(V!==0){var ie=0;for(te=0;te>>26-V}ie&&(this.words[te]=ie,this.length++)}if(Y!==0){for(te=this.length-1;te>=0;te--)this.words[te+Y]=this.words[te];for(te=0;te=0);var j;V?j=(V-V%26)/26:j=0;var te=O%26,ie=Math.min((O-te)/26,this.length),ue=67108863^67108863>>>te<ie)for(this.length-=ie,X=0;X=0&&(ee!==0||X>=j);X--){var G=this.words[X]|0;this.words[X]=ee<<26-te|G>>>te,ee=G&ue}return J&&ee!==0&&(J.words[J.length++]=ee),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(O,V,Y){return n(this.negative===0),this.iushrn(O,V,Y)},c.prototype.shln=function(O){return this.clone().ishln(O)},c.prototype.ushln=function(O){return this.clone().iushln(O)},c.prototype.shrn=function(O){return this.clone().ishrn(O)},c.prototype.ushrn=function(O){return this.clone().iushrn(O)},c.prototype.testn=function(O){n(typeof O=="number"&&O>=0);var V=O%26,Y=(O-V)/26,j=1<=0);var V=O%26,Y=(O-V)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=Y)return this;if(V!==0&&Y++,this.length=Math.min(Y,this.length),V!==0){var j=67108863^67108863>>>V<=67108864;V++)this.words[V]-=67108864,V===this.length-1?this.words[V+1]=1:this.words[V+1]++;return this.length=Math.max(this.length,V+1),this},c.prototype.isubn=function(O){if(n(typeof O=="number"),n(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var V=0;V>26)-(J/67108864|0),this.words[te+Y]=ie&67108863}for(;te>26,this.words[te+Y]=ie&67108863;if(ue===0)return this.strip();for(n(ue===-1),ue=0,te=0;te>26,this.words[te]=ie&67108863;return this.negative=1,this.strip()},c.prototype._wordDiv=function(O,V){var Y=this.length-O.length,j=this.clone(),te=O,ie=te.words[te.length-1]|0,ue=this._countBits(ie);Y=26-ue,Y!==0&&(te=te.ushln(Y),j.iushln(Y),ie=te.words[te.length-1]|0);var J=j.length-te.length,X;if(V!=="mod"){X=new c(null),X.length=J+1,X.words=new Array(X.length);for(var ee=0;ee=0;Q--){var oe=(j.words[te.length+Q]|0)*67108864+(j.words[te.length+Q-1]|0);for(oe=Math.min(oe/ie|0,67108863),j._ishlnsubmul(te,oe,Q);j.negative!==0;)oe--,j.negative=0,j._ishlnsubmul(te,1,Q),j.isZero()||(j.negative^=1);X&&(X.words[Q]=oe)}return X&&X.strip(),j.strip(),V!=="div"&&Y!==0&&j.iushrn(Y),{div:X||null,mod:j}},c.prototype.divmod=function(O,V,Y){if(n(!O.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var j,te,ie;return this.negative!==0&&O.negative===0?(ie=this.neg().divmod(O,V),V!=="mod"&&(j=ie.div.neg()),V!=="div"&&(te=ie.mod.neg(),Y&&te.negative!==0&&te.iadd(O)),{div:j,mod:te}):this.negative===0&&O.negative!==0?(ie=this.divmod(O.neg(),V),V!=="mod"&&(j=ie.div.neg()),{div:j,mod:ie.mod}):this.negative&O.negative?(ie=this.neg().divmod(O.neg(),V),V!=="div"&&(te=ie.mod.neg(),Y&&te.negative!==0&&te.isub(O)),{div:ie.div,mod:te}):O.length>this.length||this.cmp(O)<0?{div:new c(0),mod:this}:O.length===1?V==="div"?{div:this.divn(O.words[0]),mod:null}:V==="mod"?{div:null,mod:new c(this.modn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new c(this.modn(O.words[0]))}:this._wordDiv(O,V)},c.prototype.div=function(O){return this.divmod(O,"div",!1).div},c.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},c.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},c.prototype.divRound=function(O){var V=this.divmod(O);if(V.mod.isZero())return V.div;var Y=V.div.negative!==0?V.mod.isub(O):V.mod,j=O.ushrn(1),te=O.andln(1),ie=Y.cmp(j);return ie<0||te===1&&ie===0?V.div:V.div.negative!==0?V.div.isubn(1):V.div.iaddn(1)},c.prototype.modn=function(O){n(O<=67108863);for(var V=(1<<26)%O,Y=0,j=this.length-1;j>=0;j--)Y=(V*Y+(this.words[j]|0))%O;return Y},c.prototype.idivn=function(O){n(O<=67108863);for(var V=0,Y=this.length-1;Y>=0;Y--){var j=(this.words[Y]|0)+V*67108864;this.words[Y]=j/O|0,V=j%O}return this.strip()},c.prototype.divn=function(O){return this.clone().idivn(O)},c.prototype.egcd=function(O){n(O.negative===0),n(!O.isZero());var V=this,Y=O.clone();V.negative!==0?V=V.umod(O):V=V.clone();for(var j=new c(1),te=new c(0),ie=new c(0),ue=new c(1),J=0;V.isEven()&&Y.isEven();)V.iushrn(1),Y.iushrn(1),++J;for(var X=Y.clone(),ee=V.clone();!V.isZero();){for(var G=0,Q=1;!(V.words[0]&Q)&&G<26;++G,Q<<=1);if(G>0)for(V.iushrn(G);G-- >0;)(j.isOdd()||te.isOdd())&&(j.iadd(X),te.isub(ee)),j.iushrn(1),te.iushrn(1);for(var oe=0,$=1;!(Y.words[0]&$)&&oe<26;++oe,$<<=1);if(oe>0)for(Y.iushrn(oe);oe-- >0;)(ie.isOdd()||ue.isOdd())&&(ie.iadd(X),ue.isub(ee)),ie.iushrn(1),ue.iushrn(1);V.cmp(Y)>=0?(V.isub(Y),j.isub(ie),te.isub(ue)):(Y.isub(V),ie.isub(j),ue.isub(te))}return{a:ie,b:ue,gcd:Y.iushln(J)}},c.prototype._invmp=function(O){n(O.negative===0),n(!O.isZero());var V=this,Y=O.clone();V.negative!==0?V=V.umod(O):V=V.clone();for(var j=new c(1),te=new c(0),ie=Y.clone();V.cmpn(1)>0&&Y.cmpn(1)>0;){for(var ue=0,J=1;!(V.words[0]&J)&&ue<26;++ue,J<<=1);if(ue>0)for(V.iushrn(ue);ue-- >0;)j.isOdd()&&j.iadd(ie),j.iushrn(1);for(var X=0,ee=1;!(Y.words[0]&ee)&&X<26;++X,ee<<=1);if(X>0)for(Y.iushrn(X);X-- >0;)te.isOdd()&&te.iadd(ie),te.iushrn(1);V.cmp(Y)>=0?(V.isub(Y),j.isub(te)):(Y.isub(V),te.isub(j))}var G;return V.cmpn(1)===0?G=j:G=te,G.cmpn(0)<0&&G.iadd(O),G},c.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var V=this.clone(),Y=O.clone();V.negative=0,Y.negative=0;for(var j=0;V.isEven()&&Y.isEven();j++)V.iushrn(1),Y.iushrn(1);do{for(;V.isEven();)V.iushrn(1);for(;Y.isEven();)Y.iushrn(1);var te=V.cmp(Y);if(te<0){var ie=V;V=Y,Y=ie}else if(te===0||Y.cmpn(1)===0)break;V.isub(Y)}while(!0);return Y.iushln(j)},c.prototype.invm=function(O){return this.egcd(O).a.umod(O)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(O){return this.words[0]&O},c.prototype.bincn=function(O){n(typeof O=="number");var V=O%26,Y=(O-V)/26,j=1<>>26,ue&=67108863,this.words[ie]=ue}return te!==0&&(this.words[ie]=te,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(O){var V=O<0;if(this.negative!==0&&!V)return-1;if(this.negative===0&&V)return 1;this.strip();var Y;if(this.length>1)Y=1;else{V&&(O=-O),n(O<=67108863,"Number is too big");var j=this.words[0]|0;Y=j===O?0:jO.length)return 1;if(this.length=0;Y--){var j=this.words[Y]|0,te=O.words[Y]|0;if(j!==te){jte&&(V=1);break}}return V},c.prototype.gtn=function(O){return this.cmpn(O)===1},c.prototype.gt=function(O){return this.cmp(O)===1},c.prototype.gten=function(O){return this.cmpn(O)>=0},c.prototype.gte=function(O){return this.cmp(O)>=0},c.prototype.ltn=function(O){return this.cmpn(O)===-1},c.prototype.lt=function(O){return this.cmp(O)===-1},c.prototype.lten=function(O){return this.cmpn(O)<=0},c.prototype.lte=function(O){return this.cmp(O)<=0},c.prototype.eqn=function(O){return this.cmpn(O)===0},c.prototype.eq=function(O){return this.cmp(O)===0},c.red=function(O){return new I(O)},c.prototype.toRed=function(O){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(O){return this.red=O,this},c.prototype.forceRed=function(O){return n(!this.red,"Already a number in reduction context"),this._forceRed(O)},c.prototype.redAdd=function(O){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},c.prototype.redIAdd=function(O){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},c.prototype.redSub=function(O){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},c.prototype.redISub=function(O){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},c.prototype.redShl=function(O){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},c.prototype.redMul=function(O){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},c.prototype.redIMul=function(O){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(O){return n(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var s={k256:null,p224:null,p192:null,p25519:null};function L(B,O){this.name=B,this.p=new c(O,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var O=new c(null);return O.words=new Array(Math.ceil(this.n/13)),O},L.prototype.ireduce=function(O){var V=O,Y;do this.split(V,this.tmp),V=this.imulK(V),V=V.iadd(this.tmp),Y=V.bitLength();while(Y>this.n);var j=Y0?V.isub(this.p):V.strip!==void 0?V.strip():V._strip(),V},L.prototype.split=function(O,V){O.iushrn(this.n,0,V)},L.prototype.imulK=function(O){return O.imul(this.k)};function M(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(M,L),M.prototype.split=function(O,V){for(var Y=4194303,j=Math.min(O.length,9),te=0;te>>22,ie=ue}ie>>>=22,O.words[te-10]=ie,ie===0&&O.length>10?O.length-=10:O.length-=9},M.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var V=0,Y=0;Y>>=26,O.words[Y]=te,V=j}return V!==0&&(O.words[O.length++]=V),O},c._prime=function(O){if(s[O])return s[O];var V;if(O==="k256")V=new M;else if(O==="p224")V=new z;else if(O==="p192")V=new D;else if(O==="p25519")V=new N;else throw new Error("Unknown prime "+O);return s[O]=V,V};function I(B){if(typeof B=="string"){var O=c._prime(B);this.m=O.p,this.prime=O}else n(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}I.prototype._verify1=function(O){n(O.negative===0,"red works only with positives"),n(O.red,"red works only with red numbers")},I.prototype._verify2=function(O,V){n((O.negative|V.negative)===0,"red works only with positives"),n(O.red&&O.red===V.red,"red works only with red numbers")},I.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):O.umod(this.m)._forceRed(this)},I.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},I.prototype.add=function(O,V){this._verify2(O,V);var Y=O.add(V);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y._forceRed(this)},I.prototype.iadd=function(O,V){this._verify2(O,V);var Y=O.iadd(V);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y},I.prototype.sub=function(O,V){this._verify2(O,V);var Y=O.sub(V);return Y.cmpn(0)<0&&Y.iadd(this.m),Y._forceRed(this)},I.prototype.isub=function(O,V){this._verify2(O,V);var Y=O.isub(V);return Y.cmpn(0)<0&&Y.iadd(this.m),Y},I.prototype.shl=function(O,V){return this._verify1(O),this.imod(O.ushln(V))},I.prototype.imul=function(O,V){return this._verify2(O,V),this.imod(O.imul(V))},I.prototype.mul=function(O,V){return this._verify2(O,V),this.imod(O.mul(V))},I.prototype.isqr=function(O){return this.imul(O,O.clone())},I.prototype.sqr=function(O){return this.mul(O,O)},I.prototype.sqrt=function(O){if(O.isZero())return O.clone();var V=this.m.andln(3);if(n(V%2===1),V===3){var Y=this.m.add(new c(1)).iushrn(2);return this.pow(O,Y)}for(var j=this.m.subn(1),te=0;!j.isZero()&&j.andln(1)===0;)te++,j.iushrn(1);n(!j.isZero());var ie=new c(1).toRed(this),ue=ie.redNeg(),J=this.m.subn(1).iushrn(1),X=this.m.bitLength();for(X=new c(2*X*X).toRed(this);this.pow(X,J).cmp(ue)!==0;)X.redIAdd(ue);for(var ee=this.pow(X,j),G=this.pow(O,j.addn(1).iushrn(1)),Q=this.pow(O,j),oe=te;Q.cmp(ie)!==0;){for(var $=Q,Z=0;$.cmp(ie)!==0;Z++)$=$.redSqr();n(Z=0;te--){for(var ee=V.words[te],G=X-1;G>=0;G--){var Q=ee>>G&1;if(ie!==j[0]&&(ie=this.sqr(ie)),Q===0&&ue===0){J=0;continue}ue<<=1,ue|=Q,J++,!(J!==Y&&(te!==0||G!==0))&&(ie=this.mul(ie,j[ue]),J=0,ue=0)}X=26}return ie},I.prototype.convertTo=function(O){var V=O.umod(this.m);return V===O?V.clone():V},I.prototype.convertFrom=function(O){var V=O.clone();return V.red=null,V},c.mont=function(O){return new k(O)};function k(B){I.call(this,B),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}f(k,I),k.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},k.prototype.convertFrom=function(O){var V=this.imod(O.mul(this.rinv));return V.red=null,V},k.prototype.imul=function(O,V){if(O.isZero()||V.isZero())return O.words[0]=0,O.length=1,O;var Y=O.imul(V),j=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),te=Y.isub(j).iushrn(this.shift),ie=te;return te.cmp(this.m)>=0?ie=te.isub(this.m):te.cmpn(0)<0&&(ie=te.iadd(this.m)),ie._forceRed(this)},k.prototype.mul=function(O,V){if(O.isZero()||V.isZero())return new c(0)._forceRed(this);var Y=O.mul(V),j=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),te=Y.isub(j).iushrn(this.shift),ie=te;return te.cmp(this.m)>=0?ie=te.isub(this.m):te.cmpn(0)<0&&(ie=te.iadd(this.m)),ie._forceRed(this)},k.prototype.invm=function(O){var V=this.imod(O._invmp(this.m).mul(this.r2));return V._forceRed(this)}}(v,this)},2692:function(v){v.exports=p;function p(r){var t,a,n,f=r.length,c=0;for(t=0;t>>1;if(!(T<=0)){var s,L=t.mallocDouble(2*T*y),M=t.mallocInt32(y);if(y=c(d,T,L,M),y>0){if(T===1&&_)a.init(y),s=a.sweepComplete(T,A,0,y,L,M,0,y,L,M);else{var z=t.mallocDouble(2*T*E),D=t.mallocInt32(E);E=c(w,T,z,D),E>0&&(a.init(y+E),T===1?s=a.sweepBipartite(T,A,0,y,L,M,0,E,z,D):s=n(T,A,_,y,L,M,E,z,D),t.free(z),t.free(D))}t.free(L),t.free(M)}return s}}}var m;function h(d,w){m.push([d,w])}function b(d){return m=[],l(d,d,h,!0),m}function u(d,w){return m=[],l(d,w,h,!1),m}function o(d,w,A){switch(arguments.length){case 1:return b(d);case 2:return typeof w=="function"?l(d,d,w,!0):u(d,w);case 3:return l(d,w,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},7333:function(v,p){function r(){function n(l,m,h,b,u,o,d,w,A,_,y){for(var E=2*l,T=b,s=E*b;TA-w?n(l,m,h,b,u,o,d,w,A,_,y):f(l,m,h,b,u,o,d,w,A,_,y)}return c}function t(){function n(h,b,u,o,d,w,A,_,y,E,T){for(var s=2*h,L=o,M=s*o;LE-y?o?n(h,b,u,d,w,A,_,y,E,T,s):f(h,b,u,d,w,A,_,y,E,T,s):o?c(h,b,u,d,w,A,_,y,E,T,s):l(h,b,u,d,w,A,_,y,E,T,s)}return m}function a(n){return n?r():t()}p.partial=a(!1),p.full=a(!0)},2337:function(v,p,r){v.exports=B;var t=r(5306),a=r(2288),n=r(7333),f=n.partial,c=n.full,l=r(1390),m=r(2464),h=r(122),b=128,u=1<<22,o=1<<22,d=h("!(lo>=p0)&&!(p1>=hi)"),w=h("lo===p0"),A=h("lo0;){ee-=1;var oe=ee*T,$=M[oe],Z=M[oe+1],se=M[oe+2],ne=M[oe+3],ce=M[oe+4],ge=M[oe+5],Te=ee*s,we=z[Te],Re=z[Te+1],be=ge&1,Ae=!!(ge&16),me=te,Le=ie,Ve=J,Ue=X;if(be&&(me=J,Le=X,Ve=te,Ue=ie),!(ge&2&&(se=A(O,$,Z,se,me,Le,Re),Z>=se))&&!(ge&4&&(Z=_(O,$,Z,se,me,Le,we),Z>=se))){var ke=se-Z,He=ce-ne;if(Ae){if(O*ke*(ke+He)h&&u[E+m]>_;--y,E-=d){for(var T=E,s=E+d,L=0;L>>1,_=2*l,y=A,E=u[_*A+m];d=z?(y=M,E=z):L>=N?(y=s,E=L):(y=D,E=N):z>=N?(y=M,E=z):N>=L?(y=s,E=L):(y=D,E=N);for(var B=_*(w-1),O=_*y,I=0;I<_;++I,++B,++O){var k=u[B];u[B]=u[O],u[O]=k}var V=o[w-1];o[w-1]=o[y],o[y]=V,y=a(l,m,d,w-1,u,o,E);for(var B=_*(w-1),O=_*y,I=0;I<_;++I,++B,++O){var k=u[B];u[B]=u[O],u[O]=k}var V=o[w-1];if(o[w-1]=o[y],o[y]=V,A=p0)&&!(p1>=hi)":m};function r(h){return p[h]}function t(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s];if(z===A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function a(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s];if(zD;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function n(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+L];if(z<=A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function f(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+L];if(z<=A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function c(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s],D=d[y+L];if(z<=A&&A<=D)if(T===M)T+=1,E+=_;else{for(var N=0;_>N;++N){var I=d[y+N];d[y+N]=d[E],d[E++]=I}var k=w[M];w[M]=w[T],w[T++]=k}}return T}function l(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s],D=d[y+L];if(zN;++N){var I=d[y+N];d[y+N]=d[E],d[E++]=I}var k=w[M];w[M]=w[T],w[T++]=k}}return T}function m(h,b,u,o,d,w,A,_){for(var y=2*h,E=y*u,T=E,s=u,L=b,M=h+b,z=u;o>z;++z,E+=y){var D=d[E+L],N=d[E+M];if(!(D>=A)&&!(_>=N))if(s===z)s+=1,T+=y;else{for(var I=0;y>I;++I){var k=d[E+I];d[E+I]=d[T],d[T++]=k}var B=w[z];w[z]=w[s],w[s++]=B}}return s}},309:function(v){v.exports=r;var p=32;function r(b,u){u<=4*p?t(0,u-1,b):h(0,u-1,b)}function t(b,u,o){for(var d=2*(b+1),w=b+1;w<=u;++w){for(var A=o[d++],_=o[d++],y=w,E=d-2;y-- >b;){var T=o[E-2],s=o[E-1];if(To[u+1]:!0}function m(b,u,o,d){b*=2;var w=d[b];return w>1,y=_-d,E=_+d,T=w,s=y,L=_,M=E,z=A,D=b+1,N=u-1,I=0;l(T,s,o)&&(I=T,T=s,s=I),l(M,z,o)&&(I=M,M=z,z=I),l(T,L,o)&&(I=T,T=L,L=I),l(s,L,o)&&(I=s,s=L,L=I),l(T,M,o)&&(I=T,T=M,M=I),l(L,M,o)&&(I=L,L=M,M=I),l(s,z,o)&&(I=s,s=z,z=I),l(s,L,o)&&(I=s,s=L,L=I),l(M,z,o)&&(I=M,M=z,z=I);for(var k=o[2*s],B=o[2*s+1],O=o[2*M],V=o[2*M+1],Y=2*T,j=2*L,te=2*z,ie=2*w,ue=2*_,J=2*A,X=0;X<2;++X){var ee=o[Y+X],G=o[j+X],Q=o[te+X];o[ie+X]=ee,o[ue+X]=G,o[J+X]=Q}n(y,b,o),n(E,u,o);for(var oe=D;oe<=N;++oe)if(m(oe,k,B,o))oe!==D&&a(oe,D,o),++D;else if(!m(oe,O,V,o))for(;;)if(m(N,O,V,o)){m(N,k,B,o)?(f(oe,D,N,o),++D,--N):(a(oe,N,o),--N);break}else{if(--N>>1;n(d,G);for(var Q=0,oe=0,ue=0;ue=f)$=$-f|0,A(h,b,oe--,$);else if($>=0)A(l,m,Q--,$);else if($<=-f){$=-$-f|0;for(var Z=0;Z>>1;n(d,G);for(var Q=0,oe=0,$=0,ue=0;ue>1===d[2*ue+3]>>1&&(se=2,ue+=1),Z<0){for(var ne=-(Z>>1)-1,ce=0;ce<$;++ce){var ge=M(u[ce],ne);if(ge!==void 0)return ge}if(se!==0)for(var ce=0;ce>1)-1;se===0?A(l,m,Q--,ne):se===1?A(h,b,oe--,ne):se===2&&A(u,o,$--,ne)}}}function T(L,M,z,D,N,I,k,B,O,V,Y,j){var te=0,ie=2*L,ue=M,J=M+L,X=1,ee=1;D?ee=f:X=f;for(var G=N;G>>1;n(d,Z);for(var se=0,G=0;G=f?(ce=!D,Q-=f):(ce=!!D,Q-=1),ce)_(l,m,se++,Q);else{var ge=j[Q],Te=ie*Q,we=Y[Te+M+1],Re=Y[Te+M+1+L];e:for(var be=0;be>>1;n(d,Q);for(var oe=0,J=0;J=f)l[oe++]=X-f;else{X-=1;var Z=Y[X],se=te*X,ne=V[se+M+1],ce=V[se+M+1+L];e:for(var ge=0;ge=0;--ge)if(l[ge]===X){for(var be=ge+1;be0;){for(var d=l.pop(),b=l.pop(),w=-1,A=-1,u=h[b],y=1;y=0||(c.flip(b,d),a(f,c,l,w,b,A),a(f,c,l,b,A,w),a(f,c,l,A,d,w),a(f,c,l,d,w,A))}}},7098:function(v,p,r){var t=r(5070);v.exports=m;function a(h,b,u,o,d,w,A){this.cells=h,this.neighbor=b,this.flags=o,this.constraint=u,this.active=d,this.next=w,this.boundary=A}var n=a.prototype;function f(h,b){return h[0]-b[0]||h[1]-b[1]||h[2]-b[2]}n.locate=function(){var h=[0,0,0];return function(b,u,o){var d=b,w=u,A=o;return u0||A.length>0;){for(;w.length>0;){var s=w.pop();if(_[s]!==-d){_[s]=d,y[s];for(var L=0;L<3;++L){var M=T[3*s+L];M>=0&&_[M]===0&&(E[3*s+L]?A.push(M):(w.push(M),_[M]=d))}}}var z=A;A=w,w=z,A.length=0,d=-d}var D=l(y,_,b);return u?D.concat(o.boundary):D}},9971:function(v,p,r){var t=r(5070),a=r(417)[3],n=0,f=1,c=2;v.exports=A;function l(_,y,E,T,s){this.a=_,this.b=y,this.idx=E,this.lowerIds=T,this.upperIds=s}function m(_,y,E,T){this.a=_,this.b=y,this.type=E,this.idx=T}function h(_,y){var E=_.a[0]-y.a[0]||_.a[1]-y.a[1]||_.type-y.type;return E||_.type!==n&&(E=a(_.a,_.b,y.b),E)?E:_.idx-y.idx}function b(_,y){return a(_.a,_.b,y)}function u(_,y,E,T,s){for(var L=t.lt(y,T,b),M=t.gt(y,T,b),z=L;z1&&a(E[N[k-2]],E[N[k-1]],T)>0;)_.push([N[k-1],N[k-2],s]),k-=1;N.length=k,N.push(s);for(var I=D.upperIds,k=I.length;k>1&&a(E[I[k-2]],E[I[k-1]],T)<0;)_.push([I[k-2],I[k-1],s]),k-=1;I.length=k,I.push(s)}}function o(_,y){var E;return _.a[0]D[0]&&s.push(new m(D,z,c,L),new m(z,D,f,L))}s.sort(h);for(var N=s[0].a[0]-(1+Math.abs(s[0].a[0]))*Math.pow(2,-52),I=[new l([N,1],[N,0],-1,[],[])],k=[],L=0,B=s.length;L=0}}(),n.removeTriangle=function(l,m,h){var b=this.stars;f(b[l],m,h),f(b[m],h,l),f(b[h],l,m)},n.addTriangle=function(l,m,h){var b=this.stars;b[l].push(m,h),b[m].push(h,l),b[h].push(l,m)},n.opposite=function(l,m){for(var h=this.stars[m],b=1,u=h.length;b=0;--O){var ee=k[O];V=ee[0];var G=N[V],Q=G[0],oe=G[1],$=D[Q],Z=D[oe];if(($[0]-Z[0]||$[1]-Z[1])<0){var se=Q;Q=oe,oe=se}G[0]=Q;var ne=G[1]=ee[1],ce;for(B&&(ce=G[2]);O>0&&k[O-1][0]===V;){var ee=k[--O],ge=ee[1];B?N.push([ne,ge,ce]):N.push([ne,ge]),ne=ge}B?N.push([ne,oe,ce]):N.push([ne,oe])}return Y}function y(D,N,I){for(var k=N.length,B=new t(k),O=[],V=0;VN[2]?1:0)}function s(D,N,I){if(D.length!==0){if(N)for(var k=0;k0||V.length>0}function z(D,N,I){var k;if(I){k=N;for(var B=new Array(N.length),O=0;O_+1)throw new Error(w+" map requires nshades to be at least size "+d.length);Array.isArray(m.alpha)?m.alpha.length!==2?y=[1,1]:y=m.alpha.slice():typeof m.alpha=="number"?y=[m.alpha,m.alpha]:y=[1,1],h=d.map(function(z){return Math.round(z.index*_)}),y[0]=Math.min(Math.max(y[0],0),1),y[1]=Math.min(Math.max(y[1],0),1);var T=d.map(function(z,D){var N=d[D].index,I=d[D].rgb.slice();return I.length===4&&I[3]>=0&&I[3]<=1||(I[3]=y[0]+(y[1]-y[0])*N),I}),s=[];for(E=0;E=0}function m(h,b,u,o){var d=t(b,u,o);if(d===0){var w=a(t(h,b,u)),A=a(t(h,b,o));if(w===A){if(w===0){var _=l(h,b,u),y=l(h,b,o);return _===y?0:_?1:-1}return 0}else{if(A===0)return w>0||l(h,b,o)?-1:1;if(w===0)return A>0||l(h,b,u)?1:-1}return a(A-w)}var E=t(h,b,u);if(E>0)return d>0&&t(h,b,o)>0?1:-1;if(E<0)return d>0||t(h,b,o)>0?1:-1;var T=t(h,b,o);return T>0||l(h,b,u)?1:-1}},7538:function(v){v.exports=function(r){return r<0?-1:r>0?1:0}},9209:function(v){v.exports=t;var p=Math.min;function r(a,n){return a-n}function t(a,n){var f=a.length,c=a.length-n.length;if(c)return c;switch(f){case 0:return 0;case 1:return a[0]-n[0];case 2:return a[0]+a[1]-n[0]-n[1]||p(a[0],a[1])-p(n[0],n[1]);case 3:var l=a[0]+a[1],m=n[0]+n[1];if(c=l+a[2]-(m+n[2]),c)return c;var h=p(a[0],a[1]),b=p(n[0],n[1]);return p(h,a[2])-p(b,n[2])||p(h+a[2],l)-p(b+n[2],m);case 4:var u=a[0],o=a[1],d=a[2],w=a[3],A=n[0],_=n[1],y=n[2],E=n[3];return u+o+d+w-(A+_+y+E)||p(u,o,d,w)-p(A,_,y,E,A)||p(u+o,u+d,u+w,o+d,o+w,d+w)-p(A+_,A+y,A+E,_+y,_+E,y+E)||p(u+o+d,u+o+w,u+d+w,o+d+w)-p(A+_+y,A+_+E,A+y+E,_+y+E);default:for(var T=a.slice().sort(r),s=n.slice().sort(r),L=0;Lr[a][0]&&(a=n);return ta?[[a],[t]]:[[t]]}},8722:function(v,p,r){v.exports=a;var t=r(3266);function a(n){var f=t(n),c=f.length;if(c<=2)return[];for(var l=new Array(c),m=f[c-1],h=0;h=m[A]&&(w+=1);o[d]=w}}return l}function c(l,m){try{return t(l,!0)}catch{var h=a(l);if(h.length<=m)return[];var b=n(l,h),u=t(b,!0);return f(u,h)}}},9680:function(v){function p(t,a,n,f,c,l){var m=6*c*c-6*c,h=3*c*c-4*c+1,b=-6*c*c+6*c,u=3*c*c-2*c;if(t.length){l||(l=new Array(t.length));for(var o=t.length-1;o>=0;--o)l[o]=m*t[o]+h*a[o]+b*n[o]+u*f[o];return l}return m*t+h*a+b*n[o]+u*f}function r(t,a,n,f,c,l){var m=c-1,h=c*c,b=m*m,u=(1+2*c)*b,o=c*b,d=h*(3-2*c),w=h*m;if(t.length){l||(l=new Array(t.length));for(var A=t.length-1;A>=0;--A)l[A]=u*t[A]+o*a[A]+d*n[A]+w*f[A];return l}return u*t+o*a+d*n+w*f}v.exports=r,v.exports.derivative=p},4419:function(v,p,r){var t=r(2183),a=r(1215);v.exports=l;function n(m,h){this.point=m,this.index=h}function f(m,h){for(var b=m.point,u=h.point,o=b.length,d=0;d=2)return!1;I[B]=O}return!0}):N=N.filter(function(I){for(var k=0;k<=u;++k){var B=L[I[k]];if(B<0)return!1;I[k]=B}return!0}),u&1)for(var w=0;w>>31},v.exports.exponent=function(n){var f=v.exports.hi(n);return(f<<1>>>21)-1023},v.exports.fraction=function(n){var f=v.exports.lo(n),c=v.exports.hi(n),l=c&(1<<20)-1;return c&2146435072&&(l+=1048576),[f,l]},v.exports.denormalized=function(n){var f=v.exports.hi(n);return!(f&2146435072)}},3094:function(v){function p(a,n,f){var c=a[f]|0;if(c<=0)return[];var l=new Array(c),m;if(f===a.length-1)for(m=0;m"u"&&(n=0),typeof a){case"number":if(a>0)return r(a|0,n);break;case"object":if(typeof a.length=="number")return p(a,n,0);break}return[]}v.exports=t},8348:function(v,p,r){v.exports=a;var t=r(1215);function a(n,f){var c=n.length;if(typeof f!="number"){f=0;for(var l=0;l=u-1)for(var E=w.length-1,s=h-b[u-1],T=0;T<_;++T,--E)d[T]=w[E]+s*A[E];else{for(var E=_*(o+1)-1,L=b[o],M=b[o+1],z=M-L||1,D=this._scratch[1],N=this._scratch[2],I=this._scratch[3],k=this._scratch[4],B=!0,T=0;T<_;++T,--E)D[T]=w[E],I[T]=A[E]*z,N[T]=w[E+_],k[T]=A[E+_]*z,B=B&&D[T]===N[T]&&I[T]===k[T]&&I[T]===0;if(B)for(var T=0;T<_;++T)d[T]=D[T];else t(D,I,N,k,(h-L)/z,d)}for(var O=y[0],V=y[1],T=0;T<_;++T)d[T]=n(O[T],V[T],d[T]);return d},c.dcurve=function(h){var b=this._time,u=b.length,o=a.le(b,h),d=this._scratch[0],w=this._state,A=this._velocity,_=this.dimension;if(o>=u-1){var y=w.length-1;h-b[u-1];for(var E=0;E<_;++E,--y)d[E]=A[y]}else{for(var y=_*(o+1)-1,T=b[o],s=b[o+1],L=s-T||1,M=this._scratch[1],z=this._scratch[2],D=this._scratch[3],N=this._scratch[4],I=!0,E=0;E<_;++E,--y)M[E]=w[y],D[E]=A[y]*L,z[E]=w[y+_],N[E]=A[y+_]*L,I=I&&M[E]===z[E]&&D[E]===N[E]&&D[E]===0;if(I)for(var E=0;E<_;++E)d[E]=0;else{t.derivative(M,D,z,N,(h-T)/L,d);for(var E=0;E<_;++E)d[E]/=L}}return d},c.lastT=function(){var h=this._time;return h[h.length-1]},c.stable=function(){for(var h=this._velocity,b=h.length,u=this.dimension-1;u>=0;--u)if(h[--b])return!1;return!0},c.jump=function(h){var b=this.lastT(),u=this.dimension;if(!(h0;--T)o.push(n(_[T-1],y[T-1],arguments[T])),d.push(0)}},c.push=function(h){var b=this.lastT(),u=this.dimension;if(!(h1e-6?1/A:0;this._time.push(h);for(var s=u;s>0;--s){var L=n(y[s-1],E[s-1],arguments[s]);o.push(L),d.push((L-o[w++])*T)}}},c.set=function(h){var b=this.dimension;if(!(h0;--_)u.push(n(w[_-1],A[_-1],arguments[_])),o.push(0)}},c.move=function(h){var b=this.lastT(),u=this.dimension;if(!(h<=b||arguments.length!==u+1)){var o=this._state,d=this._velocity,w=o.length-this.dimension,A=this.bounds,_=A[0],y=A[1],E=h-b,T=E>1e-6?1/E:0;this._time.push(h);for(var s=u;s>0;--s){var L=arguments[s];o.push(n(_[s-1],y[s-1],o[w++]+L)),d.push(L*T)}}},c.idle=function(h){var b=this.lastT();if(!(h=0;--T)o.push(n(_[T],y[T],o[w]+E*d[w])),d.push(0),w+=1}};function l(h){for(var b=new Array(h),u=0;u=0;--D){var s=L[D];M[D]<=0?L[D]=new t(s._color,s.key,s.value,L[D+1],s.right,s._count+1):L[D]=new t(s._color,s.key,s.value,s.left,L[D+1],s._count+1)}for(var D=L.length-1;D>1;--D){var N=L[D-1],s=L[D];if(N._color===r||s._color===r)break;var I=L[D-2];if(I.left===N)if(N.left===s){var k=I.right;if(k&&k._color===p)N._color=r,I.right=n(r,k),I._color=p,D-=1;else{if(I._color=p,I.left=N.right,N._color=r,N.right=I,L[D-2]=N,L[D-1]=s,f(I),f(N),D>=3){var B=L[D-3];B.left===I?B.left=N:B.right=N}break}}else{var k=I.right;if(k&&k._color===p)N._color=r,I.right=n(r,k),I._color=p,D-=1;else{if(N.right=s.left,I._color=p,I.left=s.right,s._color=r,s.left=N,s.right=I,L[D-2]=s,L[D-1]=N,f(I),f(N),f(s),D>=3){var B=L[D-3];B.left===I?B.left=s:B.right=s}break}}else if(N.right===s){var k=I.left;if(k&&k._color===p)N._color=r,I.left=n(r,k),I._color=p,D-=1;else{if(I._color=p,I.right=N.left,N._color=r,N.left=I,L[D-2]=N,L[D-1]=s,f(I),f(N),D>=3){var B=L[D-3];B.right===I?B.right=N:B.left=N}break}}else{var k=I.left;if(k&&k._color===p)N._color=r,I.left=n(r,k),I._color=p,D-=1;else{if(N.left=s.right,I._color=p,I.right=s.left,s._color=r,s.right=N,s.left=I,L[D-2]=s,L[D-1]=N,f(I),f(N),f(s),D>=3){var B=L[D-3];B.right===I?B.right=s:B.left=s}break}}}return L[0]._color=r,new c(T,L[0])};function m(y,E){if(E.left){var T=m(y,E.left);if(T)return T}var T=y(E.key,E.value);if(T)return T;if(E.right)return m(y,E.right)}function h(y,E,T,s){var L=E(y,s.key);if(L<=0){if(s.left){var M=h(y,E,T,s.left);if(M)return M}var M=T(s.key,s.value);if(M)return M}if(s.right)return h(y,E,T,s.right)}function b(y,E,T,s,L){var M=T(y,L.key),z=T(E,L.key),D;if(M<=0&&(L.left&&(D=b(y,E,T,s,L.left),D)||z>0&&(D=s(L.key,L.value),D)))return D;if(z>0&&L.right)return b(y,E,T,s,L.right)}l.forEach=function(E,T,s){if(this.root)switch(arguments.length){case 1:return m(E,this.root);case 2:return h(T,this._compare,E,this.root);case 3:return this._compare(T,s)>=0?void 0:b(T,s,this._compare,E,this.root)}},Object.defineProperty(l,"begin",{get:function(){for(var y=[],E=this.root;E;)y.push(E),E=E.left;return new u(this,y)}}),Object.defineProperty(l,"end",{get:function(){for(var y=[],E=this.root;E;)y.push(E),E=E.right;return new u(this,y)}}),l.at=function(y){if(y<0)return new u(this,[]);for(var E=this.root,T=[];;){if(T.push(E),E.left){if(y=E.right._count)break;E=E.right}else break}return new u(this,[])},l.ge=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M<=0&&(L=s.length),M<=0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.gt=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M<0&&(L=s.length),M<0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.lt=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M>0&&(L=s.length),M<=0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.le=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M>=0&&(L=s.length),M<0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.find=function(y){for(var E=this._compare,T=this.root,s=[];T;){var L=E(y,T.key);if(s.push(T),L===0)return new u(this,s);L<=0?T=T.left:T=T.right}return new u(this,[])},l.remove=function(y){var E=this.find(y);return E?E.remove():this},l.get=function(y){for(var E=this._compare,T=this.root;T;){var s=E(y,T.key);if(s===0)return T.value;s<=0?T=T.left:T=T.right}};function u(y,E){this.tree=y,this._stack=E}var o=u.prototype;Object.defineProperty(o,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(o,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),o.clone=function(){return new u(this.tree,this._stack.slice())};function d(y,E){y.key=E.key,y.value=E.value,y.left=E.left,y.right=E.right,y._color=E._color,y._count=E._count}function w(y){for(var E,T,s,L,M=y.length-1;M>=0;--M){if(E=y[M],M===0){E._color=r;return}if(T=y[M-1],T.left===E){if(s=T.right,s.right&&s.right._color===p){if(s=T.right=a(s),L=s.right=a(s.right),T.right=s.left,s.left=T,s.right=L,s._color=T._color,E._color=r,T._color=r,L._color=r,f(T),f(s),M>1){var z=y[M-2];z.left===T?z.left=s:z.right=s}y[M-1]=s;return}else if(s.left&&s.left._color===p){if(s=T.right=a(s),L=s.left=a(s.left),T.right=L.left,s.left=L.right,L.left=T,L.right=s,L._color=T._color,T._color=r,s._color=r,E._color=r,f(T),f(s),f(L),M>1){var z=y[M-2];z.left===T?z.left=L:z.right=L}y[M-1]=L;return}if(s._color===r)if(T._color===p){T._color=r,T.right=n(p,s);return}else{T.right=n(p,s);continue}else{if(s=a(s),T.right=s.left,s.left=T,s._color=T._color,T._color=p,f(T),f(s),M>1){var z=y[M-2];z.left===T?z.left=s:z.right=s}y[M-1]=s,y[M]=T,M+11){var z=y[M-2];z.right===T?z.right=s:z.left=s}y[M-1]=s;return}else if(s.right&&s.right._color===p){if(s=T.left=a(s),L=s.right=a(s.right),T.left=L.right,s.right=L.left,L.right=T,L.left=s,L._color=T._color,T._color=r,s._color=r,E._color=r,f(T),f(s),f(L),M>1){var z=y[M-2];z.right===T?z.right=L:z.left=L}y[M-1]=L;return}if(s._color===r)if(T._color===p){T._color=r,T.left=n(p,s);return}else{T.left=n(p,s);continue}else{if(s=a(s),T.left=s.right,s.right=T,s._color=T._color,T._color=p,f(T),f(s),M>1){var z=y[M-2];z.right===T?z.right=s:z.left=s}y[M-1]=s,y[M]=T,M+1=0;--s){var T=y[s];T.left===y[s+1]?E[s]=new t(T._color,T.key,T.value,E[s+1],T.right,T._count):E[s]=new t(T._color,T.key,T.value,T.left,E[s+1],T._count)}if(T=E[E.length-1],T.left&&T.right){var L=E.length;for(T=T.left;T.right;)E.push(T),T=T.right;var M=E[L-1];E.push(new t(T._color,M.key,M.value,T.left,T.right,T._count)),E[L-1].key=T.key,E[L-1].value=T.value;for(var s=E.length-2;s>=L;--s)T=E[s],E[s]=new t(T._color,T.key,T.value,T.left,E[s+1],T._count);E[L-1].left=E[L]}if(T=E[E.length-1],T._color===p){var z=E[E.length-2];z.left===T?z.left=null:z.right===T&&(z.right=null),E.pop();for(var s=0;s0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(o,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(o,"index",{get:function(){var y=0,E=this._stack;if(E.length===0){var T=this.tree.root;return T?T._count:0}else E[E.length-1].left&&(y=E[E.length-1].left._count);for(var s=E.length-2;s>=0;--s)E[s+1]===E[s].right&&(++y,E[s].left&&(y+=E[s].left._count));return y},enumerable:!0}),o.next=function(){var y=this._stack;if(y.length!==0){var E=y[y.length-1];if(E.right)for(E=E.right;E;)y.push(E),E=E.left;else for(y.pop();y.length>0&&y[y.length-1].right===E;)E=y[y.length-1],y.pop()}},Object.defineProperty(o,"hasNext",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].right)return!0;for(var E=y.length-1;E>0;--E)if(y[E-1].left===y[E])return!0;return!1}}),o.update=function(y){var E=this._stack;if(E.length===0)throw new Error("Can't update empty node!");var T=new Array(E.length),s=E[E.length-1];T[T.length-1]=new t(s._color,s.key,y,s.left,s.right,s._count);for(var L=E.length-2;L>=0;--L)s=E[L],s.left===E[L+1]?T[L]=new t(s._color,s.key,s.value,T[L+1],s.right,s._count):T[L]=new t(s._color,s.key,s.value,s.left,T[L+1],s._count);return new c(this.tree._compare,T[0])},o.prev=function(){var y=this._stack;if(y.length!==0){var E=y[y.length-1];if(E.left)for(E=E.left;E;)y.push(E),E=E.right;else for(y.pop();y.length>0&&y[y.length-1].left===E;)E=y[y.length-1],y.pop()}},Object.defineProperty(o,"hasPrev",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].left)return!0;for(var E=y.length-1;E>0;--E)if(y[E-1].right===y[E])return!0;return!1}});function A(y,E){return yE?1:0}function _(y){return new c(y||A,null)}},7453:function(v,p,r){v.exports=s;var t=r(9557),a=r(1681),n=r(1011),f=r(2864),c=r(8468),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function m(L,M){return L[0]=M[0],L[1]=M[1],L[2]=M[2],L}function h(L){this.gl=L,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=n(L)}var b=h.prototype;b.update=function(L){L=L||{};function M(ie,ue,J){if(J in L){var X=L[J],ee=this[J],G;(ie?Array.isArray(X)&&Array.isArray(X[0]):Array.isArray(X))?this[J]=G=[ue(X[0]),ue(X[1]),ue(X[2])]:this[J]=G=[ue(X),ue(X),ue(X)];for(var Q=0;Q<3;++Q)if(G[Q]!==ee[Q])return!0}return!1}var z=M.bind(this,!1,Number),D=M.bind(this,!1,Boolean),N=M.bind(this,!1,String),I=M.bind(this,!0,function(ie){if(Array.isArray(ie)){if(ie.length===3)return[+ie[0],+ie[1],+ie[2],1];if(ie.length===4)return[+ie[0],+ie[1],+ie[2],+ie[3]]}return[0,0,0,1]}),k,B=!1,O=!1;if("bounds"in L)for(var V=L.bounds,Y=0;Y<2;++Y)for(var j=0;j<3;++j)V[Y][j]!==this.bounds[Y][j]&&(O=!0),this.bounds[Y][j]=V[Y][j];if("ticks"in L){k=L.ticks,B=!0,this.autoTicks=!1;for(var Y=0;Y<3;++Y)this.tickSpacing[Y]=0}else z("tickSpacing")&&(this.autoTicks=!0,O=!0);if(this._firstInit&&("ticks"in L||"tickSpacing"in L||(this.autoTicks=!0),O=!0,B=!0,this._firstInit=!1),O&&this.autoTicks&&(k=c.create(this.bounds,this.tickSpacing),B=!0),B){for(var Y=0;Y<3;++Y)k[Y].sort(function(ue,J){return ue.x-J.x});c.equal(k,this.ticks)?B=!1:this.ticks=k}D("tickEnable"),N("tickFont")&&(B=!0),z("tickSize"),z("tickAngle"),z("tickPad"),I("tickColor");var te=N("labels");N("labelFont")&&(te=!0),D("labelEnable"),z("labelSize"),z("labelPad"),I("labelColor"),D("lineEnable"),D("lineMirror"),z("lineWidth"),I("lineColor"),D("lineTickEnable"),D("lineTickMirror"),z("lineTickLength"),z("lineTickWidth"),I("lineTickColor"),D("gridEnable"),z("gridWidth"),I("gridColor"),D("zeroEnable"),I("zeroLineColor"),z("zeroLineWidth"),D("backgroundEnable"),I("backgroundColor"),this._text?this._text&&(te||B)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=t(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&B&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};function u(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var o=[new u,new u,new u];function d(L,M,z,D,N){for(var I=L.primalOffset,k=L.primalMinor,B=L.mirrorOffset,O=L.mirrorMinor,V=D[M],Y=0;Y<3;++Y)if(M!==Y){var j=I,te=B,ie=k,ue=O;V&1<0?(ie[Y]=-1,ue[Y]=0):(ie[Y]=0,ue[Y]=1)}}var w=[0,0,0],A={model:l,view:l,projection:l,_ortho:!1};b.isOpaque=function(){return!0},b.isTransparent=function(){return!1},b.drawTransparent=function(L){};var _=0,y=[0,0,0],E=[0,0,0],T=[0,0,0];b.draw=function(L){L=L||A;for(var ee=this.gl,M=L.model||l,z=L.view||l,D=L.projection||l,N=this.bounds,I=L._ortho||!1,k=f(M,z,D,N,I),B=k.cubeEdges,O=k.axis,V=z[12],Y=z[13],j=z[14],te=z[15],ie=I?2:1,ue=ie*this.pixelRatio*(D[3]*V+D[7]*Y+D[11]*j+D[15]*te)/ee.drawingBufferHeight,J=0;J<3;++J)this.lastCubeProps.cubeEdges[J]=B[J],this.lastCubeProps.axis[J]=O[J];for(var X=o,J=0;J<3;++J)d(o[J],J,this.bounds,B,O);for(var ee=this.gl,G=w,J=0;J<3;++J)this.backgroundEnable[J]?G[J]=O[J]:G[J]=0;this._background.draw(M,z,D,N,G,this.backgroundColor),this._lines.bind(M,z,D,this);for(var J=0;J<3;++J){var Q=[0,0,0];O[J]>0?Q[J]=N[1][J]:Q[J]=N[0][J];for(var oe=0;oe<2;++oe){var $=(J+1+oe)%3,Z=(J+1+(oe^1))%3;this.gridEnable[$]&&this._lines.drawGrid($,Z,this.bounds,Q,this.gridColor[$],this.gridWidth[$]*this.pixelRatio)}for(var oe=0;oe<2;++oe){var $=(J+1+oe)%3,Z=(J+1+(oe^1))%3;this.zeroEnable[Z]&&Math.min(N[0][Z],N[1][Z])<=0&&Math.max(N[0][Z],N[1][Z])>=0&&this._lines.drawZero($,Z,this.bounds,Q,this.zeroLineColor[Z],this.zeroLineWidth[Z]*this.pixelRatio)}}for(var J=0;J<3;++J){this.lineEnable[J]&&this._lines.drawAxisLine(J,this.bounds,X[J].primalOffset,this.lineColor[J],this.lineWidth[J]*this.pixelRatio),this.lineMirror[J]&&this._lines.drawAxisLine(J,this.bounds,X[J].mirrorOffset,this.lineColor[J],this.lineWidth[J]*this.pixelRatio);for(var se=m(y,X[J].primalMinor),ne=m(E,X[J].mirrorMinor),ce=this.lineTickLength,oe=0;oe<3;++oe){var ge=ue/M[5*oe];se[oe]*=ce[oe]*ge,ne[oe]*=ce[oe]*ge}this.lineTickEnable[J]&&this._lines.drawAxisTicks(J,X[J].primalOffset,se,this.lineTickColor[J],this.lineTickWidth[J]*this.pixelRatio),this.lineTickMirror[J]&&this._lines.drawAxisTicks(J,X[J].mirrorOffset,ne,this.lineTickColor[J],this.lineTickWidth[J]*this.pixelRatio)}this._lines.unbind(),this._text.bind(M,z,D,this.pixelRatio);var Te,we=.5,Re,be;function Ae(He){be=[0,0,0],be[He]=1}function me(He,Ie,rt){var Ke=(He+1)%3,$e=(He+2)%3,lt=Ie[Ke],ht=Ie[$e],dt=rt[Ke],xt=rt[$e];if(lt>0&&xt>0){Ae(Ke);return}else if(lt>0&&xt<0){Ae(Ke);return}else if(lt<0&&xt>0){Ae(Ke);return}else if(lt<0&&xt<0){Ae(Ke);return}else if(ht>0&&dt>0){Ae($e);return}else if(ht>0&&dt<0){Ae($e);return}else if(ht<0&&dt>0){Ae($e);return}else if(ht<0&&dt<0){Ae($e);return}}for(var J=0;J<3;++J){for(var Le=X[J].primalMinor,Ve=X[J].mirrorMinor,Ue=m(T,X[J].primalOffset),oe=0;oe<3;++oe)this.lineTickEnable[J]&&(Ue[oe]+=ue*Le[oe]*Math.max(this.lineTickLength[oe],0)/M[5*oe]);var ke=[0,0,0];if(ke[J]=1,this.tickEnable[J]){this.tickAngle[J]===-3600?(this.tickAngle[J]=0,this.tickAlign[J]="auto"):this.tickAlign[J]=-1,Re=1,Te=[this.tickAlign[J],we,Re],Te[0]==="auto"?Te[0]=_:Te[0]=parseInt(""+Te[0]),be=[0,0,0],me(J,Le,Ve);for(var oe=0;oe<3;++oe)Ue[oe]+=ue*Le[oe]*this.tickPad[oe]/M[5*oe];this._text.drawTicks(J,this.tickSize[J],this.tickAngle[J],Ue,this.tickColor[J],ke,be,Te)}if(this.labelEnable[J]){Re=0,be=[0,0,0],this.labels[J].length>4&&(Ae(J),Re=1),Te=[this.labelAlign[J],we,Re],Te[0]==="auto"?Te[0]=_:Te[0]=parseInt(""+Te[0]);for(var oe=0;oe<3;++oe)Ue[oe]+=ue*Le[oe]*this.labelPad[oe]/M[5*oe];Ue[J]+=.5*(N[0][J]+N[1][J]),this._text.drawLabel(J,this.labelSize[J],this.labelAngle[J],Ue,this.labelColor[J],[0,0,0],be,Te)}}this._text.unbind()},b.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function s(L,M){var z=new h(L);return z.update(M),z}},1011:function(v,p,r){v.exports=l;var t=r(5827),a=r(2944),n=r(1943).bg;function f(m,h,b,u){this.gl=m,this.buffer=h,this.vao=b,this.shader=u}var c=f.prototype;c.draw=function(m,h,b,u,o,d){for(var w=!1,A=0;A<3;++A)w=w||o[A];if(w){var _=this.gl;_.enable(_.POLYGON_OFFSET_FILL),_.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:h,projection:b,bounds:u,enable:o,colors:d},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),_.disable(_.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function l(m){for(var h=[],b=[],u=0,o=0;o<3;++o)for(var d=(o+1)%3,w=(o+2)%3,A=[0,0,0],_=[0,0,0],y=-1;y<=1;y+=2){b.push(u,u+2,u+1,u+1,u+2,u+3),A[o]=y,_[o]=y;for(var E=-1;E<=1;E+=2){A[d]=E;for(var T=-1;T<=1;T+=2)A[w]=T,h.push(A[0],A[1],A[2],_[0],_[1],_[2]),u+=1}var s=d;d=w,w=s}var L=t(m,new Float32Array(h)),M=t(m,new Uint16Array(b),m.ELEMENT_ARRAY_BUFFER),z=a(m,[{buffer:L,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:L,type:m.FLOAT,size:3,offset:12,stride:24}],M),D=n(m);return D.attributes.position.location=0,D.attributes.normal.location=1,new f(m,L,z,D)}},2864:function(v,p,r){v.exports=y;var t=r(2288),a=r(104),n=r(4670),f=r(417),c=new Array(16),l=new Array(8),m=new Array(8),h=new Array(3),b=[0,0,0];(function(){for(var E=0;E<8;++E)l[E]=[1,1,1,1],m[E]=[1,1,1]})();function u(E,T,s){for(var L=0;L<4;++L){E[L]=s[12+L];for(var M=0;M<3;++M)E[L]+=T[M]*s[4*M+L]}}var o=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function d(E){for(var T=0;Tte&&(k|=1<te){k|=1<m[D][1])&&(oe=D);for(var $=-1,D=0;D<3;++D){var Z=oe^1<m[se][0]&&(se=Z)}}var ne=w;ne[0]=ne[1]=ne[2]=0,ne[t.log2($^oe)]=oe&$,ne[t.log2(oe^se)]=oe&se;var ce=se^7;ce===k||ce===Q?(ce=$^7,ne[t.log2(se^ce)]=ce&se):ne[t.log2($^ce)]=ce&$;for(var ge=A,Te=k,V=0;V<3;++V)Te&1<"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u(xt){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Et){return Et.__proto__||Object.getPrototypeOf(Et)},u(xt)}function o(xt){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(yt){return typeof yt}:function(yt){return yt&&typeof Symbol=="function"&&yt.constructor===Symbol&&yt!==Symbol.prototype?"symbol":typeof yt},o(xt)}var d=r(3910),w=r(3187),A=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;p.lW=T,p.h2=50;var _=2147483647;T.TYPED_ARRAY_SUPPORT=y(),!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function y(){try{var xt=new Uint8Array(1),yt={foo:function(){return 42}};return Object.setPrototypeOf(yt,Uint8Array.prototype),Object.setPrototypeOf(xt,yt),xt.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}}),Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function E(xt){if(xt>_)throw new RangeError('The value "'+xt+'" is invalid for option "size"');var yt=new Uint8Array(xt);return Object.setPrototypeOf(yt,T.prototype),yt}function T(xt,yt,Et){if(typeof xt=="number"){if(typeof yt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return z(xt)}return s(xt,yt,Et)}T.poolSize=8192;function s(xt,yt,Et){if(typeof xt=="string")return D(xt,yt);if(ArrayBuffer.isView(xt))return I(xt);if(xt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(xt));if(zt(xt,ArrayBuffer)||xt&&zt(xt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(zt(xt,SharedArrayBuffer)||xt&&zt(xt.buffer,SharedArrayBuffer)))return k(xt,yt,Et);if(typeof xt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Mt=xt.valueOf&&xt.valueOf();if(Mt!=null&&Mt!==xt)return T.from(Mt,yt,Et);var Nt=B(xt);if(Nt)return Nt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof xt[Symbol.toPrimitive]=="function")return T.from(xt[Symbol.toPrimitive]("string"),yt,Et);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+o(xt))}T.from=function(xt,yt,Et){return s(xt,yt,Et)},Object.setPrototypeOf(T.prototype,Uint8Array.prototype),Object.setPrototypeOf(T,Uint8Array);function L(xt){if(typeof xt!="number")throw new TypeError('"size" argument must be of type number');if(xt<0)throw new RangeError('The value "'+xt+'" is invalid for option "size"')}function M(xt,yt,Et){return L(xt),xt<=0?E(xt):yt!==void 0?typeof Et=="string"?E(xt).fill(yt,Et):E(xt).fill(yt):E(xt)}T.alloc=function(xt,yt,Et){return M(xt,yt,Et)};function z(xt){return L(xt),E(xt<0?0:O(xt)|0)}T.allocUnsafe=function(xt){return z(xt)},T.allocUnsafeSlow=function(xt){return z(xt)};function D(xt,yt){if((typeof yt!="string"||yt==="")&&(yt="utf8"),!T.isEncoding(yt))throw new TypeError("Unknown encoding: "+yt);var Et=H(xt,yt)|0,Mt=E(Et),Nt=Mt.write(xt,yt);return Nt!==Et&&(Mt=Mt.slice(0,Nt)),Mt}function N(xt){for(var yt=xt.length<0?0:O(xt.length)|0,Et=E(yt),Mt=0;Mt=_)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+_.toString(16)+" bytes");return xt|0}T.isBuffer=function(yt){return yt!=null&&yt._isBuffer===!0&&yt!==T.prototype},T.compare=function(yt,Et){if(zt(yt,Uint8Array)&&(yt=T.from(yt,yt.offset,yt.byteLength)),zt(Et,Uint8Array)&&(Et=T.from(Et,Et.offset,Et.byteLength)),!T.isBuffer(yt)||!T.isBuffer(Et))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(yt===Et)return 0;for(var Mt=yt.length,Nt=Et.length,jt=0,ie=Math.min(Mt,Nt);jtNt.length?(T.isBuffer(ie)||(ie=T.from(ie)),ie.copy(Nt,jt)):Uint8Array.prototype.set.call(Nt,ie,jt);else if(T.isBuffer(ie))ie.copy(Nt,jt);else throw new TypeError('"list" argument must be an Array of Buffers');jt+=ie.length}return Nt};function H(xt,yt){if(T.isBuffer(xt))return xt.length;if(ArrayBuffer.isView(xt)||zt(xt,ArrayBuffer))return xt.byteLength;if(typeof xt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+o(xt));var Et=xt.length,Mt=arguments.length>2&&arguments[2]===!0;if(!Mt&&Et===0)return 0;for(var Nt=!1;;)switch(yt){case"ascii":case"latin1":case"binary":return Et;case"utf8":case"utf-8":return he(xt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Et*2;case"hex":return Et>>>1;case"base64":return Se(xt).length;default:if(Nt)return Mt?-1:he(xt).length;yt=(""+yt).toLowerCase(),Nt=!0}}T.byteLength=H;function Y(xt,yt,Et){var Mt=!1;if((yt===void 0||yt<0)&&(yt=0),yt>this.length||((Et===void 0||Et>this.length)&&(Et=this.length),Et<=0)||(Et>>>=0,yt>>>=0,Et<=yt))return"";for(xt||(xt="utf8");;)switch(xt){case"hex":return ct(this,yt,Et);case"utf8":case"utf-8":return ot(this,yt,Et);case"ascii":return st(this,yt,Et);case"latin1":case"binary":return nt(this,yt,Et);case"base64":return Q(this,yt,Et);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gt(this,yt,Et);default:if(Mt)throw new TypeError("Unknown encoding: "+xt);xt=(xt+"").toLowerCase(),Mt=!0}}T.prototype._isBuffer=!0;function j(xt,yt,Et){var Mt=xt[yt];xt[yt]=xt[Et],xt[Et]=Mt}T.prototype.swap16=function(){var yt=this.length;if(yt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Et=0;EtEt&&(yt+=" ... "),""},A&&(T.prototype[A]=T.prototype.inspect),T.prototype.compare=function(yt,Et,Mt,Nt,jt){if(zt(yt,Uint8Array)&&(yt=T.from(yt,yt.offset,yt.byteLength)),!T.isBuffer(yt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+o(yt));if(Et===void 0&&(Et=0),Mt===void 0&&(Mt=yt?yt.length:0),Nt===void 0&&(Nt=0),jt===void 0&&(jt=this.length),Et<0||Mt>yt.length||Nt<0||jt>this.length)throw new RangeError("out of range index");if(Nt>=jt&&Et>=Mt)return 0;if(Nt>=jt)return-1;if(Et>=Mt)return 1;if(Et>>>=0,Mt>>>=0,Nt>>>=0,jt>>>=0,this===yt)return 0;for(var ie=jt-Nt,me=Mt-Et,be=Math.min(ie,me),ve=this.slice(Nt,jt),Le=yt.slice(Et,Mt),ce=0;ce2147483647?Et=2147483647:Et<-2147483648&&(Et=-2147483648),Et=+Et,Xt(Et)&&(Et=Nt?0:xt.length-1),Et<0&&(Et=xt.length+Et),Et>=xt.length){if(Nt)return-1;Et=xt.length-1}else if(Et<0)if(Nt)Et=0;else return-1;if(typeof yt=="string"&&(yt=T.from(yt,Mt)),T.isBuffer(yt))return yt.length===0?-1:it(xt,yt,Et,Mt,Nt);if(typeof yt=="number")return yt=yt&255,typeof Uint8Array.prototype.indexOf=="function"?Nt?Uint8Array.prototype.indexOf.call(xt,yt,Et):Uint8Array.prototype.lastIndexOf.call(xt,yt,Et):it(xt,[yt],Et,Mt,Nt);throw new TypeError("val must be string, number or Buffer")}function it(xt,yt,Et,Mt,Nt){var jt=1,ie=xt.length,me=yt.length;if(Mt!==void 0&&(Mt=String(Mt).toLowerCase(),Mt==="ucs2"||Mt==="ucs-2"||Mt==="utf16le"||Mt==="utf-16le")){if(xt.length<2||yt.length<2)return-1;jt=2,ie/=2,me/=2,Et/=2}function be(Be,ir){return jt===1?Be[ir]:Be.readUInt16BE(ir*jt)}var ve;if(Nt){var Le=-1;for(ve=Et;veie&&(Et=ie-me),ve=Et;ve>=0;ve--){for(var ce=!0,Te=0;TeNt&&(Mt=Nt)):Mt=Nt;var jt=yt.length;Mt>jt/2&&(Mt=jt/2);var ie;for(ie=0;ie>>0,isFinite(Mt)?(Mt=Mt>>>0,Nt===void 0&&(Nt="utf8")):(Nt=Mt,Mt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var jt=this.length-Et;if((Mt===void 0||Mt>jt)&&(Mt=jt),yt.length>0&&(Mt<0||Et<0)||Et>this.length)throw new RangeError("Attempt to write outside buffer bounds");Nt||(Nt="utf8");for(var ie=!1;;)switch(Nt){case"hex":return ut(this,yt,Et,Mt);case"utf8":case"utf-8":return J(this,yt,Et,Mt);case"ascii":case"latin1":case"binary":return X(this,yt,Et,Mt);case"base64":return tt(this,yt,Et,Mt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return V(this,yt,Et,Mt);default:if(ie)throw new TypeError("Unknown encoding: "+Nt);Nt=(""+Nt).toLowerCase(),ie=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q(xt,yt,Et){return yt===0&&Et===xt.length?d.fromByteArray(xt):d.fromByteArray(xt.slice(yt,Et))}function ot(xt,yt,Et){Et=Math.min(xt.length,Et);for(var Mt=[],Nt=yt;Nt239?4:jt>223?3:jt>191?2:1;if(Nt+me<=Et){var be=void 0,ve=void 0,Le=void 0,ce=void 0;switch(me){case 1:jt<128&&(ie=jt);break;case 2:be=xt[Nt+1],(be&192)===128&&(ce=(jt&31)<<6|be&63,ce>127&&(ie=ce));break;case 3:be=xt[Nt+1],ve=xt[Nt+2],(be&192)===128&&(ve&192)===128&&(ce=(jt&15)<<12|(be&63)<<6|ve&63,ce>2047&&(ce<55296||ce>57343)&&(ie=ce));break;case 4:be=xt[Nt+1],ve=xt[Nt+2],Le=xt[Nt+3],(be&192)===128&&(ve&192)===128&&(Le&192)===128&&(ce=(jt&15)<<18|(be&63)<<12|(ve&63)<<6|Le&63,ce>65535&&ce<1114112&&(ie=ce))}}ie===null?(ie=65533,me=1):ie>65535&&(ie-=65536,Mt.push(ie>>>10&1023|55296),ie=56320|ie&1023),Mt.push(ie),Nt+=me}return Z(Mt)}var $=4096;function Z(xt){var yt=xt.length;if(yt<=$)return String.fromCharCode.apply(String,xt);for(var Et="",Mt=0;MtMt)&&(Et=Mt);for(var Nt="",jt=yt;jtMt&&(yt=Mt),Et<0?(Et+=Mt,Et<0&&(Et=0)):Et>Mt&&(Et=Mt),EtEt)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(yt,Et,Mt){yt=yt>>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=this[yt],jt=1,ie=0;++ie>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=this[yt+--Et],jt=1;Et>0&&(jt*=256);)Nt+=this[yt+--Et]*jt;return Nt},T.prototype.readUint8=T.prototype.readUInt8=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,1,this.length),this[yt]},T.prototype.readUint16LE=T.prototype.readUInt16LE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,2,this.length),this[yt]|this[yt+1]<<8},T.prototype.readUint16BE=T.prototype.readUInt16BE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,2,this.length),this[yt]<<8|this[yt+1]},T.prototype.readUint32LE=T.prototype.readUInt32LE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),(this[yt]|this[yt+1]<<8|this[yt+2]<<16)+this[yt+3]*16777216},T.prototype.readUint32BE=T.prototype.readUInt32BE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),this[yt]*16777216+(this[yt+1]<<16|this[yt+2]<<8|this[yt+3])},T.prototype.readBigUInt64LE=Wt(function(yt){yt=yt>>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=Et+this[++yt]*Math.pow(2,8)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,24),jt=this[++yt]+this[++yt]*Math.pow(2,8)+this[++yt]*Math.pow(2,16)+Mt*Math.pow(2,24);return BigInt(Nt)+(BigInt(jt)<>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=Et*Math.pow(2,24)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,8)+this[++yt],jt=this[++yt]*Math.pow(2,24)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,8)+Mt;return(BigInt(Nt)<>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=this[yt],jt=1,ie=0;++ie=jt&&(Nt-=Math.pow(2,8*Et)),Nt},T.prototype.readIntBE=function(yt,Et,Mt){yt=yt>>>0,Et=Et>>>0,Mt||Tt(yt,Et,this.length);for(var Nt=Et,jt=1,ie=this[yt+--Nt];Nt>0&&(jt*=256);)ie+=this[yt+--Nt]*jt;return jt*=128,ie>=jt&&(ie-=Math.pow(2,8*Et)),ie},T.prototype.readInt8=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,1,this.length),this[yt]&128?(255-this[yt]+1)*-1:this[yt]},T.prototype.readInt16LE=function(yt,Et){yt=yt>>>0,Et||Tt(yt,2,this.length);var Mt=this[yt]|this[yt+1]<<8;return Mt&32768?Mt|4294901760:Mt},T.prototype.readInt16BE=function(yt,Et){yt=yt>>>0,Et||Tt(yt,2,this.length);var Mt=this[yt+1]|this[yt]<<8;return Mt&32768?Mt|4294901760:Mt},T.prototype.readInt32LE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),this[yt]|this[yt+1]<<8|this[yt+2]<<16|this[yt+3]<<24},T.prototype.readInt32BE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),this[yt]<<24|this[yt+1]<<16|this[yt+2]<<8|this[yt+3]},T.prototype.readBigInt64LE=Wt(function(yt){yt=yt>>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=this[yt+4]+this[yt+5]*Math.pow(2,8)+this[yt+6]*Math.pow(2,16)+(Mt<<24);return(BigInt(Nt)<>>0,re(yt,"offset");var Et=this[yt],Mt=this[yt+7];(Et===void 0||Mt===void 0)&&Kt(yt,this.length-8);var Nt=(Et<<24)+this[++yt]*Math.pow(2,16)+this[++yt]*Math.pow(2,8)+this[++yt];return(BigInt(Nt)<>>0,Et||Tt(yt,4,this.length),w.read(this,yt,!0,23,4)},T.prototype.readFloatBE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,4,this.length),w.read(this,yt,!1,23,4)},T.prototype.readDoubleLE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,8,this.length),w.read(this,yt,!0,52,8)},T.prototype.readDoubleBE=function(yt,Et){return yt=yt>>>0,Et||Tt(yt,8,this.length),w.read(this,yt,!1,52,8)};function wt(xt,yt,Et,Mt,Nt,jt){if(!T.isBuffer(xt))throw new TypeError('"buffer" argument must be a Buffer instance');if(yt>Nt||ytxt.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(yt,Et,Mt,Nt){if(yt=+yt,Et=Et>>>0,Mt=Mt>>>0,!Nt){var jt=Math.pow(2,8*Mt)-1;wt(this,yt,Et,Mt,jt,0)}var ie=1,me=0;for(this[Et]=yt&255;++me>>0,Mt=Mt>>>0,!Nt){var jt=Math.pow(2,8*Mt)-1;wt(this,yt,Et,Mt,jt,0)}var ie=Mt-1,me=1;for(this[Et+ie]=yt&255;--ie>=0&&(me*=256);)this[Et+ie]=yt/me&255;return Et+Mt},T.prototype.writeUint8=T.prototype.writeUInt8=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,1,255,0),this[Et]=yt&255,Et+1},T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,65535,0),this[Et]=yt&255,this[Et+1]=yt>>>8,Et+2},T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,65535,0),this[Et]=yt>>>8,this[Et+1]=yt&255,Et+2},T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,4294967295,0),this[Et+3]=yt>>>24,this[Et+2]=yt>>>16,this[Et+1]=yt>>>8,this[Et]=yt&255,Et+4},T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,4294967295,0),this[Et]=yt>>>24,this[Et+1]=yt>>>16,this[Et+2]=yt>>>8,this[Et+3]=yt&255,Et+4};function Rt(xt,yt,Et,Mt,Nt){It(yt,Mt,Nt,xt,Et,7);var jt=Number(yt&BigInt(4294967295));xt[Et++]=jt,jt=jt>>8,xt[Et++]=jt,jt=jt>>8,xt[Et++]=jt,jt=jt>>8,xt[Et++]=jt;var ie=Number(yt>>BigInt(32)&BigInt(4294967295));return xt[Et++]=ie,ie=ie>>8,xt[Et++]=ie,ie=ie>>8,xt[Et++]=ie,ie=ie>>8,xt[Et++]=ie,Et}function bt(xt,yt,Et,Mt,Nt){It(yt,Mt,Nt,xt,Et,7);var jt=Number(yt&BigInt(4294967295));xt[Et+7]=jt,jt=jt>>8,xt[Et+6]=jt,jt=jt>>8,xt[Et+5]=jt,jt=jt>>8,xt[Et+4]=jt;var ie=Number(yt>>BigInt(32)&BigInt(4294967295));return xt[Et+3]=ie,ie=ie>>8,xt[Et+2]=ie,ie=ie>>8,xt[Et+1]=ie,ie=ie>>8,xt[Et]=ie,Et+8}T.prototype.writeBigUInt64LE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Rt(this,yt,Et,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeBigUInt64BE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return bt(this,yt,Et,BigInt(0),BigInt("0xffffffffffffffff"))}),T.prototype.writeIntLE=function(yt,Et,Mt,Nt){if(yt=+yt,Et=Et>>>0,!Nt){var jt=Math.pow(2,8*Mt-1);wt(this,yt,Et,Mt,jt-1,-jt)}var ie=0,me=1,be=0;for(this[Et]=yt&255;++ie>0)-be&255;return Et+Mt},T.prototype.writeIntBE=function(yt,Et,Mt,Nt){if(yt=+yt,Et=Et>>>0,!Nt){var jt=Math.pow(2,8*Mt-1);wt(this,yt,Et,Mt,jt-1,-jt)}var ie=Mt-1,me=1,be=0;for(this[Et+ie]=yt&255;--ie>=0&&(me*=256);)yt<0&&be===0&&this[Et+ie+1]!==0&&(be=1),this[Et+ie]=(yt/me>>0)-be&255;return Et+Mt},T.prototype.writeInt8=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,1,127,-128),yt<0&&(yt=255+yt+1),this[Et]=yt&255,Et+1},T.prototype.writeInt16LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,32767,-32768),this[Et]=yt&255,this[Et+1]=yt>>>8,Et+2},T.prototype.writeInt16BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,2,32767,-32768),this[Et]=yt>>>8,this[Et+1]=yt&255,Et+2},T.prototype.writeInt32LE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,2147483647,-2147483648),this[Et]=yt&255,this[Et+1]=yt>>>8,this[Et+2]=yt>>>16,this[Et+3]=yt>>>24,Et+4},T.prototype.writeInt32BE=function(yt,Et,Mt){return yt=+yt,Et=Et>>>0,Mt||wt(this,yt,Et,4,2147483647,-2147483648),yt<0&&(yt=4294967295+yt+1),this[Et]=yt>>>24,this[Et+1]=yt>>>16,this[Et+2]=yt>>>8,this[Et+3]=yt&255,Et+4},T.prototype.writeBigInt64LE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Rt(this,yt,Et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),T.prototype.writeBigInt64BE=Wt(function(yt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return bt(this,yt,Et,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function At(xt,yt,Et,Mt,Nt,jt){if(Et+Mt>xt.length)throw new RangeError("Index out of range");if(Et<0)throw new RangeError("Index out of range")}function mt(xt,yt,Et,Mt,Nt){return yt=+yt,Et=Et>>>0,Nt||At(xt,yt,Et,4),w.write(xt,yt,Et,Mt,23,4),Et+4}T.prototype.writeFloatLE=function(yt,Et,Mt){return mt(this,yt,Et,!0,Mt)},T.prototype.writeFloatBE=function(yt,Et,Mt){return mt(this,yt,Et,!1,Mt)};function Lt(xt,yt,Et,Mt,Nt){return yt=+yt,Et=Et>>>0,Nt||At(xt,yt,Et,8),w.write(xt,yt,Et,Mt,52,8),Et+8}T.prototype.writeDoubleLE=function(yt,Et,Mt){return Lt(this,yt,Et,!0,Mt)},T.prototype.writeDoubleBE=function(yt,Et,Mt){return Lt(this,yt,Et,!1,Mt)},T.prototype.copy=function(yt,Et,Mt,Nt){if(!T.isBuffer(yt))throw new TypeError("argument should be a Buffer");if(Mt||(Mt=0),!Nt&&Nt!==0&&(Nt=this.length),Et>=yt.length&&(Et=yt.length),Et||(Et=0),Nt>0&&Nt=this.length)throw new RangeError("Index out of range");if(Nt<0)throw new RangeError("sourceEnd out of bounds");Nt>this.length&&(Nt=this.length),yt.length-Et>>0,Mt=Mt===void 0?this.length:Mt>>>0,yt||(yt=0);var ie;if(typeof yt=="number")for(ie=Et;ieMath.pow(2,32)?Nt=kt(String(Et)):typeof Et=="bigint"&&(Nt=String(Et),(Et>Math.pow(BigInt(2),BigInt(32))||Et<-Math.pow(BigInt(2),BigInt(32)))&&(Nt=kt(Nt)),Nt+="n"),Mt+=" It must be ".concat(yt,". Received ").concat(Nt),Mt},RangeError);function kt(xt){for(var yt="",Et=xt.length,Mt=xt[0]==="-"?1:0;Et>=Mt+4;Et-=3)yt="_".concat(xt.slice(Et-3,Et)).concat(yt);return"".concat(xt.slice(0,Et)).concat(yt)}function Vt(xt,yt,Et){re(yt,"offset"),(xt[yt]===void 0||xt[yt+Et]===void 0)&&Kt(yt,xt.length-(Et+1))}function It(xt,yt,Et,Mt,Nt,jt){if(xt>Et||xt3?yt===0||yt===BigInt(0)?me=">= 0".concat(ie," and < 2").concat(ie," ** ").concat((jt+1)*8).concat(ie):me=">= -(2".concat(ie," ** ").concat((jt+1)*8-1).concat(ie,") and < 2 ** ")+"".concat((jt+1)*8-1).concat(ie):me=">= ".concat(yt).concat(ie," and <= ").concat(Et).concat(ie),new Ht.ERR_OUT_OF_RANGE("value",me,xt)}Vt(Mt,Nt,jt)}function re(xt,yt){if(typeof xt!="number")throw new Ht.ERR_INVALID_ARG_TYPE(yt,"number",xt)}function Kt(xt,yt,Et){throw Math.floor(xt)!==xt?(re(xt,Et),new Ht.ERR_OUT_OF_RANGE(Et||"offset","an integer",xt)):yt<0?new Ht.ERR_BUFFER_OUT_OF_BOUNDS:new Ht.ERR_OUT_OF_RANGE(Et||"offset",">= ".concat(Et?1:0," and <= ").concat(yt),xt)}var $t=/[^+/0-9A-Za-z-_]/g;function le(xt){if(xt=xt.split("=")[0],xt=xt.trim().replace($t,""),xt.length<2)return"";for(;xt.length%4!==0;)xt=xt+"=";return xt}function he(xt,yt){yt=yt||1/0;for(var Et,Mt=xt.length,Nt=null,jt=[],ie=0;ie55295&&Et<57344){if(!Nt){if(Et>56319){(yt-=3)>-1&&jt.push(239,191,189);continue}else if(ie+1===Mt){(yt-=3)>-1&&jt.push(239,191,189);continue}Nt=Et;continue}if(Et<56320){(yt-=3)>-1&&jt.push(239,191,189),Nt=Et;continue}Et=(Nt-55296<<10|Et-56320)+65536}else Nt&&(yt-=3)>-1&&jt.push(239,191,189);if(Nt=null,Et<128){if((yt-=1)<0)break;jt.push(Et)}else if(Et<2048){if((yt-=2)<0)break;jt.push(Et>>6|192,Et&63|128)}else if(Et<65536){if((yt-=3)<0)break;jt.push(Et>>12|224,Et>>6&63|128,Et&63|128)}else if(Et<1114112){if((yt-=4)<0)break;jt.push(Et>>18|240,Et>>12&63|128,Et>>6&63|128,Et&63|128)}else throw new Error("Invalid code point")}return jt}function de(xt){for(var yt=[],Et=0;Et>8,Nt=Et%256,jt.push(Nt),jt.push(Mt);return jt}function Se(xt){return d.toByteArray(le(xt))}function ne(xt,yt,Et,Mt){var Nt;for(Nt=0;Nt=yt.length||Nt>=xt.length);++Nt)yt[Nt+Et]=xt[Nt];return Nt}function zt(xt,yt){return xt instanceof yt||xt!=null&&xt.constructor!=null&&xt.constructor.name!=null&&xt.constructor.name===yt.name}function Xt(xt){return xt!==xt}var Jt=function(){for(var xt="0123456789abcdef",yt=new Array(256),Et=0;Et<16;++Et)for(var Mt=Et*16,Nt=0;Nt<16;++Nt)yt[Mt+Nt]=xt[Et]+xt[Nt];return yt}();function Wt(xt){return typeof BigInt>"u"?Ft:xt}function Ft(){throw new Error("BigInt not supported")}},2321:function(v){v.exports=a,v.exports.isMobile=a,v.exports.default=a;var p=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,e=/android|ipad|playbook|silk/i;function a(n){n||(n={});var f=n.ua;if(!f&&typeof navigator<"u"&&(f=navigator.userAgent),f&&f.headers&&typeof f.headers["user-agent"]=="string"&&(f=f.headers["user-agent"]),typeof f!="string")return!1;var c=p.test(f)&&!r.test(f)||!!n.tablet&&e.test(f);return!c&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&f.indexOf("Macintosh")!==-1&&f.indexOf("Safari")!==-1&&(c=!0),c}},3910:function(v,p){p.byteLength=m,p.toByteArray=b,p.fromByteArray=d;for(var r=[],e=[],a=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,c=n.length;f0)throw new Error("Invalid string. Length must be a multiple of 4");var _=w.indexOf("=");_===-1&&(_=A);var y=_===A?0:4-_%4;return[_,y]}function m(w){var A=l(w),_=A[0],y=A[1];return(_+y)*3/4-y}function h(w,A,_){return(A+_)*3/4-_}function b(w){var A,_=l(w),y=_[0],E=_[1],T=new a(h(w,y,E)),s=0,L=E>0?y-4:y,M;for(M=0;M>16&255,T[s++]=A>>8&255,T[s++]=A&255;return E===2&&(A=e[w.charCodeAt(M)]<<2|e[w.charCodeAt(M+1)]>>4,T[s++]=A&255),E===1&&(A=e[w.charCodeAt(M)]<<10|e[w.charCodeAt(M+1)]<<4|e[w.charCodeAt(M+2)]>>2,T[s++]=A>>8&255,T[s++]=A&255),T}function u(w){return r[w>>18&63]+r[w>>12&63]+r[w>>6&63]+r[w&63]}function o(w,A,_){for(var y,E=[],T=A;T<_;T+=3)y=(w[T]<<16&16711680)+(w[T+1]<<8&65280)+(w[T+2]&255),E.push(u(y));return E.join("")}function d(w){for(var A,_=w.length,y=_%3,E=[],T=16383,s=0,L=_-y;sL?L:s+T));return y===1?(A=w[_-1],E.push(r[A>>2]+r[A<<4&63]+"==")):y===2&&(A=(w[_-2]<<8)+w[_-1],E.push(r[A>>10]+r[A>>4&63]+r[A<<2&63]+"=")),E.join("")}},3187:function(v,p){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */p.read=function(r,e,a,n,f){var c,l,m=f*8-n-1,h=(1<>1,u=-7,o=a?f-1:0,d=a?-1:1,w=r[e+o];for(o+=d,c=w&(1<<-u)-1,w>>=-u,u+=m;u>0;c=c*256+r[e+o],o+=d,u-=8);for(l=c&(1<<-u)-1,c>>=-u,u+=n;u>0;l=l*256+r[e+o],o+=d,u-=8);if(c===0)c=1-b;else{if(c===h)return l?NaN:(w?-1:1)*(1/0);l=l+Math.pow(2,n),c=c-b}return(w?-1:1)*l*Math.pow(2,c-n)},p.write=function(r,e,a,n,f,c){var l,m,h,b=c*8-f-1,u=(1<>1,d=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:c-1,A=n?1:-1,_=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(m=isNaN(e)?1:0,l=u):(l=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-l))<1&&(l--,h*=2),l+o>=1?e+=d/h:e+=d*Math.pow(2,1-o),e*h>=2&&(l++,h/=2),l+o>=u?(m=0,l=u):l+o>=1?(m=(e*h-1)*Math.pow(2,f),l=l+o):(m=e*Math.pow(2,o-1)*Math.pow(2,f),l=0));f>=8;r[a+w]=m&255,w+=A,m/=256,f-=8);for(l=l<0;r[a+w]=l&255,w+=A,l/=256,b-=8);r[a+w-A]|=_*128}},1152:function(v,p,r){v.exports=l;var e=r(3440),a=r(7774),n=r(9298);function f(m,h){this._controllerNames=Object.keys(m),this._controllerList=this._controllerNames.map(function(b){return m[b]}),this._mode=h,this._active=m[h],this._active||(this._mode="turntable",this._active=m.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var c=f.prototype;c.flush=function(m){for(var h=this._controllerList,b=0;b"u"?r(5346):WeakMap,a=r(5827),n=r(2944),f=new e;function c(l){var m=f.get(l),h=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!h||!l.isBuffer(h)){var b=a(l,new Float32Array([-1,-1,-1,4,4,-1]));m=n(l,[{buffer:b,type:l.FLOAT,size:2}]),m._triangleBuffer=b,f.set(l,m)}m.bind(),l.drawArrays(l.TRIANGLES,0,3),m.unbind()}v.exports=c},8008:function(v,p,r){var e=r(4930);v.exports=a;function a(n,f,c){f=typeof f=="number"?f:1,c=c||": ";var l=n.split(/\r?\n/),m=String(l.length+f-1).length;return l.map(function(h,b){var u=b+f,o=String(u).length,d=e(u,m-o);return d+c+h}).join(` +`)}},2153:function(v,p,r){v.exports=n;var e=r(417);function a(f,c){for(var l=new Array(c+1),m=0;m0?o=o.ushln(u):u<0&&(d=d.ushln(-u)),c(o,d)}},234:function(v,p,r){var e=r(3218);v.exports=a;function a(n){return Array.isArray(n)&&n.length===2&&e(n[0])&&e(n[1])}},4275:function(v,p,r){var e=r(1928);v.exports=a;function a(n){return n.cmp(new e(0))}},9958:function(v,p,r){var e=r(4275);v.exports=a;function a(n){var f=n.length,c=n.words,l=0;if(f===1)l=c[0];else if(f===2)l=c[0]+c[1]*67108864;else for(var m=0;m20?52:l+32}},3218:function(v,p,r){r(1928),v.exports=e;function e(a){return a&&typeof a=="object"&&!!a.words}},5514:function(v,p,r){var e=r(1928),a=r(8362);v.exports=n;function n(f){var c=a.exponent(f);return c<52?new e(f):new e(f*Math.pow(2,52-c)).ushln(c-52)}},8524:function(v,p,r){var e=r(5514),a=r(4275);v.exports=n;function n(f,c){var l=a(f),m=a(c);if(l===0)return[e(0),e(1)];if(m===0)return[e(0),e(0)];m<0&&(f=f.neg(),c=c.neg());var h=f.gcd(c);return h.cmpn(1)?[f.div(h),c.div(h)]:[f,c]}},2813:function(v,p,r){var e=r(1928);v.exports=a;function a(n){return new e(n)}},3962:function(v,p,r){var e=r(8524);v.exports=a;function a(n,f){return e(n[0].mul(f[0]),n[1].mul(f[1]))}},4951:function(v,p,r){var e=r(4275);v.exports=a;function a(n){return e(n[0])*e(n[1])}},4354:function(v,p,r){var e=r(8524);v.exports=a;function a(n,f){return e(n[0].mul(f[1]).sub(n[1].mul(f[0])),n[1].mul(f[1]))}},7999:function(v,p,r){var e=r(9958),a=r(1112);v.exports=n;function n(f){var c=f[0],l=f[1];if(c.cmpn(0)===0)return 0;var m=c.abs().divmod(l.abs()),h=m.div,b=e(h),u=m.mod,o=c.negative!==l.negative?-1:1;if(u.cmpn(0)===0)return o*b;if(b){var d=a(b)+4,w=e(u.ushln(d).divRound(l));return o*(b+w*Math.pow(2,-d))}else{var A=l.bitLength()-u.bitLength()+53,w=e(u.ushln(A).divRound(l));return A<1023?o*w*Math.pow(2,-A):(w*=Math.pow(2,-1023),o*w*Math.pow(2,1023-A))}}},5070:function(v){function p(c,l,m,h,b){for(var u=b+1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w>=0?(u=o,b=o-1):h=o+1}return u}function r(c,l,m,h,b){for(var u=b+1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w>0?(u=o,b=o-1):h=o+1}return u}function e(c,l,m,h,b){for(var u=h-1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w<0?(u=o,h=o+1):b=o-1}return u}function a(c,l,m,h,b){for(var u=h-1;h<=b;){var o=h+b>>>1,d=c[o],w=m!==void 0?m(d,l):d-l;w<=0?(u=o,h=o+1):b=o-1}return u}function n(c,l,m,h,b){for(;h<=b;){var u=h+b>>>1,o=c[u],d=m!==void 0?m(o,l):o-l;if(d===0)return u;d<=0?h=u+1:b=u-1}return-1}function f(c,l,m,h,b,u){return typeof m=="function"?u(c,l,m,h===void 0?0:h|0,b===void 0?c.length-1:b|0):u(c,l,void 0,m===void 0?0:m|0,h===void 0?c.length-1:h|0)}v.exports={ge:function(c,l,m,h,b){return f(c,l,m,h,b,p)},gt:function(c,l,m,h,b){return f(c,l,m,h,b,r)},lt:function(c,l,m,h,b){return f(c,l,m,h,b,e)},le:function(c,l,m,h,b){return f(c,l,m,h,b,a)},eq:function(c,l,m,h,b){return f(c,l,m,h,b,n)}}},2288:function(v,p){"use restrict";var r=32;p.INT_BITS=r,p.INT_MAX=2147483647,p.INT_MIN=-1<0)-(n<0)},p.abs=function(n){var f=n>>r-1;return(n^f)-f},p.min=function(n,f){return f^(n^f)&-(n65535)<<4,n>>>=f,c=(n>255)<<3,n>>>=c,f|=c,c=(n>15)<<2,n>>>=c,f|=c,c=(n>3)<<1,n>>>=c,f|=c,f|n>>1},p.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},p.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function e(n){var f=32;return n&=-n,n&&f--,n&65535&&(f-=16),n&16711935&&(f-=8),n&252645135&&(f-=4),n&858993459&&(f-=2),n&1431655765&&(f-=1),f}p.countTrailingZeros=e,p.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},p.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},p.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var f=0;f<256;++f){var c=f,l=f,m=7;for(c>>>=1;c;c>>>=1)l<<=1,l|=c&1,--m;n[f]=l<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},p.interleave2=function(n,f){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,n|f<<1},p.deinterleave2=function(n,f){return n=n>>>f&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},p.interleave3=function(n,f,c){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,n|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,n|c<<2},p.deinterleave3=function(n,f){return n=n>>>f&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},p.nextCombination=function(n){var f=n|n-1;return f+1|(~f&-~f)-1>>>e(n)+1}},1928:function(v,p,r){v=r.nmd(v),function(e,a){function n(B,O){if(!B)throw new Error(O||"Assertion failed")}function f(B,O){B.super_=O;var H=function(){};H.prototype=O.prototype,B.prototype=new H,B.prototype.constructor=B}function c(B,O,H){if(c.isBN(B))return B;this.negative=0,this.words=null,this.length=0,this.red=null,B!==null&&((O==="le"||O==="be")&&(H=O,O=10),this._init(B||0,O||10,H||"be"))}typeof e=="object"?e.exports=c:a.BN=c,c.BN=c,c.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=r(6601).Buffer}catch{}c.isBN=function(O){return O instanceof c?!0:O!==null&&typeof O=="object"&&O.constructor.wordSize===c.wordSize&&Array.isArray(O.words)},c.max=function(O,H){return O.cmp(H)>0?O:H},c.min=function(O,H){return O.cmp(H)<0?O:H},c.prototype._init=function(O,H,Y){if(typeof O=="number")return this._initNumber(O,H,Y);if(typeof O=="object")return this._initArray(O,H,Y);H==="hex"&&(H=16),n(H===(H|0)&&H>=2&&H<=36),O=O.toString().replace(/\s+/g,"");var j=0;O[0]==="-"&&(j++,this.negative=1),j=0;j-=3)it=O[j]|O[j-1]<<8|O[j-2]<<16,this.words[et]|=it<>>26-ut&67108863,ut+=24,ut>=26&&(ut-=26,et++);else if(Y==="le")for(j=0,et=0;j>>26-ut&67108863,ut+=24,ut>=26&&(ut-=26,et++);return this.strip()};function m(B,O){var H=B.charCodeAt(O);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function h(B,O,H){var Y=m(B,H);return H-1>=O&&(Y|=m(B,H-1)<<4),Y}c.prototype._parseHex=function(O,H,Y){this.length=Math.ceil((O.length-H)/6),this.words=new Array(this.length);for(var j=0;j=H;j-=2)ut=h(O,H,j)<=18?(et-=18,it+=1,this.words[it]|=ut>>>26):et+=8;else{var J=O.length-H;for(j=J%2===0?H+1:H;j=18?(et-=18,it+=1,this.words[it]|=ut>>>26):et+=8}this.strip()};function b(B,O,H,Y){for(var j=0,et=Math.min(B.length,H),it=O;it=49?j+=ut-49+10:ut>=17?j+=ut-17+10:j+=ut}return j}c.prototype._parseBase=function(O,H,Y){this.words=[0],this.length=1;for(var j=0,et=1;et<=67108863;et*=H)j++;j--,et=et/H|0;for(var it=O.length-Y,ut=it%j,J=Math.min(it,it-ut)+Y,X=0,tt=Y;tt1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},c.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],o=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(O,H){O=O||10,H=H|0||1;var Y;if(O===16||O==="hex"){Y="";for(var j=0,et=0,it=0;it>>24-j&16777215,et!==0||it!==this.length-1?Y=u[6-J.length]+J+Y:Y=J+Y,j+=2,j>=26&&(j-=26,it--)}for(et!==0&&(Y=et.toString(16)+Y);Y.length%H!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}if(O===(O|0)&&O>=2&&O<=36){var X=o[O],tt=d[O];Y="";var V=this.clone();for(V.negative=0;!V.isZero();){var Q=V.modn(tt).toString(O);V=V.idivn(tt),V.isZero()?Y=Q+Y:Y=u[X-Q.length]+Q+Y}for(this.isZero()&&(Y="0"+Y);Y.length%H!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}n(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var O=this.words[0];return this.length===2?O+=this.words[1]*67108864:this.length===3&&this.words[2]===1?O+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-O:O},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(O,H){return n(typeof l<"u"),this.toArrayLike(l,O,H)},c.prototype.toArray=function(O,H){return this.toArrayLike(Array,O,H)},c.prototype.toArrayLike=function(O,H,Y){var j=this.byteLength(),et=Y||Math.max(1,j);n(j<=et,"byte array longer than desired length"),n(et>0,"Requested array length <= 0"),this.strip();var it=H==="le",ut=new O(et),J,X,tt=this.clone();if(it){for(X=0;!tt.isZero();X++)J=tt.andln(255),tt.iushrn(8),ut[X]=J;for(;X=4096&&(Y+=13,H>>>=13),H>=64&&(Y+=7,H>>>=7),H>=8&&(Y+=4,H>>>=4),H>=2&&(Y+=2,H>>>=2),Y+H},c.prototype._zeroBits=function(O){if(O===0)return 26;var H=O,Y=0;return H&8191||(Y+=13,H>>>=13),H&127||(Y+=7,H>>>=7),H&15||(Y+=4,H>>>=4),H&3||(Y+=2,H>>>=2),H&1||Y++,Y},c.prototype.bitLength=function(){var O=this.words[this.length-1],H=this._countBits(O);return(this.length-1)*26+H};function w(B){for(var O=new Array(B.bitLength()),H=0;H>>j}return O}c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,H=0;HO.length?this.clone().ior(O):O.clone().ior(this)},c.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},c.prototype.iuand=function(O){var H;this.length>O.length?H=O:H=this;for(var Y=0;YO.length?this.clone().iand(O):O.clone().iand(this)},c.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},c.prototype.iuxor=function(O){var H,Y;this.length>O.length?(H=this,Y=O):(H=O,Y=this);for(var j=0;jO.length?this.clone().ixor(O):O.clone().ixor(this)},c.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},c.prototype.inotn=function(O){n(typeof O=="number"&&O>=0);var H=Math.ceil(O/26)|0,Y=O%26;this._expand(H),Y>0&&H--;for(var j=0;j0&&(this.words[j]=~this.words[j]&67108863>>26-Y),this.strip()},c.prototype.notn=function(O){return this.clone().inotn(O)},c.prototype.setn=function(O,H){n(typeof O=="number"&&O>=0);var Y=O/26|0,j=O%26;return this._expand(Y+1),H?this.words[Y]=this.words[Y]|1<O.length?(Y=this,j=O):(Y=O,j=this);for(var et=0,it=0;it>>26;for(;et!==0&&it>>26;if(this.length=Y.length,et!==0)this.words[this.length]=et,this.length++;else if(Y!==this)for(;itO.length?this.clone().iadd(O):O.clone().iadd(this)},c.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var H=this.iadd(O);return O.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var Y=this.cmp(O);if(Y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var j,et;Y>0?(j=this,et=O):(j=O,et=this);for(var it=0,ut=0;ut>26,this.words[ut]=H&67108863;for(;it!==0&&ut>26,this.words[ut]=H&67108863;if(it===0&&ut>>26,V=J&67108863,Q=Math.min(X,O.length-1),ot=Math.max(0,X-B.length+1);ot<=Q;ot++){var $=X-ot|0;j=B.words[$]|0,et=O.words[ot]|0,it=j*et+V,tt+=it/67108864|0,V=it&67108863}H.words[X]=V|0,J=tt|0}return J!==0?H.words[X]=J|0:H.length--,H.strip()}var _=function(O,H,Y){var j=O.words,et=H.words,it=Y.words,ut=0,J,X,tt,V=j[0]|0,Q=V&8191,ot=V>>>13,$=j[1]|0,Z=$&8191,st=$>>>13,nt=j[2]|0,ct=nt&8191,gt=nt>>>13,Tt=j[3]|0,wt=Tt&8191,Rt=Tt>>>13,bt=j[4]|0,At=bt&8191,mt=bt>>>13,Lt=j[5]|0,Ht=Lt&8191,Ut=Lt>>>13,kt=j[6]|0,Vt=kt&8191,It=kt>>>13,re=j[7]|0,Kt=re&8191,$t=re>>>13,le=j[8]|0,he=le&8191,de=le>>>13,xe=j[9]|0,Se=xe&8191,ne=xe>>>13,zt=et[0]|0,Xt=zt&8191,Jt=zt>>>13,Wt=et[1]|0,Ft=Wt&8191,xt=Wt>>>13,yt=et[2]|0,Et=yt&8191,Mt=yt>>>13,Nt=et[3]|0,jt=Nt&8191,ie=Nt>>>13,me=et[4]|0,be=me&8191,ve=me>>>13,Le=et[5]|0,ce=Le&8191,Te=Le>>>13,Be=et[6]|0,ir=Be&8191,pe=Be>>>13,Xe=et[7]|0,Ke=Xe&8191,or=Xe>>>13,$e=et[8]|0,ge=$e&8191,se=$e>>>13,Ae=et[9]|0,Ce=Ae&8191,Ie=Ae>>>13;Y.negative=O.negative^H.negative,Y.length=19,J=Math.imul(Q,Xt),X=Math.imul(Q,Jt),X=X+Math.imul(ot,Xt)|0,tt=Math.imul(ot,Jt);var Pe=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,J=Math.imul(Z,Xt),X=Math.imul(Z,Jt),X=X+Math.imul(st,Xt)|0,tt=Math.imul(st,Jt),J=J+Math.imul(Q,Ft)|0,X=X+Math.imul(Q,xt)|0,X=X+Math.imul(ot,Ft)|0,tt=tt+Math.imul(ot,xt)|0;var ke=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(ke>>>26)|0,ke&=67108863,J=Math.imul(ct,Xt),X=Math.imul(ct,Jt),X=X+Math.imul(gt,Xt)|0,tt=Math.imul(gt,Jt),J=J+Math.imul(Z,Ft)|0,X=X+Math.imul(Z,xt)|0,X=X+Math.imul(st,Ft)|0,tt=tt+Math.imul(st,xt)|0,J=J+Math.imul(Q,Et)|0,X=X+Math.imul(Q,Mt)|0,X=X+Math.imul(ot,Et)|0,tt=tt+Math.imul(ot,Mt)|0;var Ve=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,J=Math.imul(wt,Xt),X=Math.imul(wt,Jt),X=X+Math.imul(Rt,Xt)|0,tt=Math.imul(Rt,Jt),J=J+Math.imul(ct,Ft)|0,X=X+Math.imul(ct,xt)|0,X=X+Math.imul(gt,Ft)|0,tt=tt+Math.imul(gt,xt)|0,J=J+Math.imul(Z,Et)|0,X=X+Math.imul(Z,Mt)|0,X=X+Math.imul(st,Et)|0,tt=tt+Math.imul(st,Mt)|0,J=J+Math.imul(Q,jt)|0,X=X+Math.imul(Q,ie)|0,X=X+Math.imul(ot,jt)|0,tt=tt+Math.imul(ot,ie)|0;var Je=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Je>>>26)|0,Je&=67108863,J=Math.imul(At,Xt),X=Math.imul(At,Jt),X=X+Math.imul(mt,Xt)|0,tt=Math.imul(mt,Jt),J=J+Math.imul(wt,Ft)|0,X=X+Math.imul(wt,xt)|0,X=X+Math.imul(Rt,Ft)|0,tt=tt+Math.imul(Rt,xt)|0,J=J+Math.imul(ct,Et)|0,X=X+Math.imul(ct,Mt)|0,X=X+Math.imul(gt,Et)|0,tt=tt+Math.imul(gt,Mt)|0,J=J+Math.imul(Z,jt)|0,X=X+Math.imul(Z,ie)|0,X=X+Math.imul(st,jt)|0,tt=tt+Math.imul(st,ie)|0,J=J+Math.imul(Q,be)|0,X=X+Math.imul(Q,ve)|0,X=X+Math.imul(ot,be)|0,tt=tt+Math.imul(ot,ve)|0;var ur=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(ur>>>26)|0,ur&=67108863,J=Math.imul(Ht,Xt),X=Math.imul(Ht,Jt),X=X+Math.imul(Ut,Xt)|0,tt=Math.imul(Ut,Jt),J=J+Math.imul(At,Ft)|0,X=X+Math.imul(At,xt)|0,X=X+Math.imul(mt,Ft)|0,tt=tt+Math.imul(mt,xt)|0,J=J+Math.imul(wt,Et)|0,X=X+Math.imul(wt,Mt)|0,X=X+Math.imul(Rt,Et)|0,tt=tt+Math.imul(Rt,Mt)|0,J=J+Math.imul(ct,jt)|0,X=X+Math.imul(ct,ie)|0,X=X+Math.imul(gt,jt)|0,tt=tt+Math.imul(gt,ie)|0,J=J+Math.imul(Z,be)|0,X=X+Math.imul(Z,ve)|0,X=X+Math.imul(st,be)|0,tt=tt+Math.imul(st,ve)|0,J=J+Math.imul(Q,ce)|0,X=X+Math.imul(Q,Te)|0,X=X+Math.imul(ot,ce)|0,tt=tt+Math.imul(ot,Te)|0;var hr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(hr>>>26)|0,hr&=67108863,J=Math.imul(Vt,Xt),X=Math.imul(Vt,Jt),X=X+Math.imul(It,Xt)|0,tt=Math.imul(It,Jt),J=J+Math.imul(Ht,Ft)|0,X=X+Math.imul(Ht,xt)|0,X=X+Math.imul(Ut,Ft)|0,tt=tt+Math.imul(Ut,xt)|0,J=J+Math.imul(At,Et)|0,X=X+Math.imul(At,Mt)|0,X=X+Math.imul(mt,Et)|0,tt=tt+Math.imul(mt,Mt)|0,J=J+Math.imul(wt,jt)|0,X=X+Math.imul(wt,ie)|0,X=X+Math.imul(Rt,jt)|0,tt=tt+Math.imul(Rt,ie)|0,J=J+Math.imul(ct,be)|0,X=X+Math.imul(ct,ve)|0,X=X+Math.imul(gt,be)|0,tt=tt+Math.imul(gt,ve)|0,J=J+Math.imul(Z,ce)|0,X=X+Math.imul(Z,Te)|0,X=X+Math.imul(st,ce)|0,tt=tt+Math.imul(st,Te)|0,J=J+Math.imul(Q,ir)|0,X=X+Math.imul(Q,pe)|0,X=X+Math.imul(ot,ir)|0,tt=tt+Math.imul(ot,pe)|0;var vr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(vr>>>26)|0,vr&=67108863,J=Math.imul(Kt,Xt),X=Math.imul(Kt,Jt),X=X+Math.imul($t,Xt)|0,tt=Math.imul($t,Jt),J=J+Math.imul(Vt,Ft)|0,X=X+Math.imul(Vt,xt)|0,X=X+Math.imul(It,Ft)|0,tt=tt+Math.imul(It,xt)|0,J=J+Math.imul(Ht,Et)|0,X=X+Math.imul(Ht,Mt)|0,X=X+Math.imul(Ut,Et)|0,tt=tt+Math.imul(Ut,Mt)|0,J=J+Math.imul(At,jt)|0,X=X+Math.imul(At,ie)|0,X=X+Math.imul(mt,jt)|0,tt=tt+Math.imul(mt,ie)|0,J=J+Math.imul(wt,be)|0,X=X+Math.imul(wt,ve)|0,X=X+Math.imul(Rt,be)|0,tt=tt+Math.imul(Rt,ve)|0,J=J+Math.imul(ct,ce)|0,X=X+Math.imul(ct,Te)|0,X=X+Math.imul(gt,ce)|0,tt=tt+Math.imul(gt,Te)|0,J=J+Math.imul(Z,ir)|0,X=X+Math.imul(Z,pe)|0,X=X+Math.imul(st,ir)|0,tt=tt+Math.imul(st,pe)|0,J=J+Math.imul(Q,Ke)|0,X=X+Math.imul(Q,or)|0,X=X+Math.imul(ot,Ke)|0,tt=tt+Math.imul(ot,or)|0;var Yt=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Yt>>>26)|0,Yt&=67108863,J=Math.imul(he,Xt),X=Math.imul(he,Jt),X=X+Math.imul(de,Xt)|0,tt=Math.imul(de,Jt),J=J+Math.imul(Kt,Ft)|0,X=X+Math.imul(Kt,xt)|0,X=X+Math.imul($t,Ft)|0,tt=tt+Math.imul($t,xt)|0,J=J+Math.imul(Vt,Et)|0,X=X+Math.imul(Vt,Mt)|0,X=X+Math.imul(It,Et)|0,tt=tt+Math.imul(It,Mt)|0,J=J+Math.imul(Ht,jt)|0,X=X+Math.imul(Ht,ie)|0,X=X+Math.imul(Ut,jt)|0,tt=tt+Math.imul(Ut,ie)|0,J=J+Math.imul(At,be)|0,X=X+Math.imul(At,ve)|0,X=X+Math.imul(mt,be)|0,tt=tt+Math.imul(mt,ve)|0,J=J+Math.imul(wt,ce)|0,X=X+Math.imul(wt,Te)|0,X=X+Math.imul(Rt,ce)|0,tt=tt+Math.imul(Rt,Te)|0,J=J+Math.imul(ct,ir)|0,X=X+Math.imul(ct,pe)|0,X=X+Math.imul(gt,ir)|0,tt=tt+Math.imul(gt,pe)|0,J=J+Math.imul(Z,Ke)|0,X=X+Math.imul(Z,or)|0,X=X+Math.imul(st,Ke)|0,tt=tt+Math.imul(st,or)|0,J=J+Math.imul(Q,ge)|0,X=X+Math.imul(Q,se)|0,X=X+Math.imul(ot,ge)|0,tt=tt+Math.imul(ot,se)|0;var Gt=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,J=Math.imul(Se,Xt),X=Math.imul(Se,Jt),X=X+Math.imul(ne,Xt)|0,tt=Math.imul(ne,Jt),J=J+Math.imul(he,Ft)|0,X=X+Math.imul(he,xt)|0,X=X+Math.imul(de,Ft)|0,tt=tt+Math.imul(de,xt)|0,J=J+Math.imul(Kt,Et)|0,X=X+Math.imul(Kt,Mt)|0,X=X+Math.imul($t,Et)|0,tt=tt+Math.imul($t,Mt)|0,J=J+Math.imul(Vt,jt)|0,X=X+Math.imul(Vt,ie)|0,X=X+Math.imul(It,jt)|0,tt=tt+Math.imul(It,ie)|0,J=J+Math.imul(Ht,be)|0,X=X+Math.imul(Ht,ve)|0,X=X+Math.imul(Ut,be)|0,tt=tt+Math.imul(Ut,ve)|0,J=J+Math.imul(At,ce)|0,X=X+Math.imul(At,Te)|0,X=X+Math.imul(mt,ce)|0,tt=tt+Math.imul(mt,Te)|0,J=J+Math.imul(wt,ir)|0,X=X+Math.imul(wt,pe)|0,X=X+Math.imul(Rt,ir)|0,tt=tt+Math.imul(Rt,pe)|0,J=J+Math.imul(ct,Ke)|0,X=X+Math.imul(ct,or)|0,X=X+Math.imul(gt,Ke)|0,tt=tt+Math.imul(gt,or)|0,J=J+Math.imul(Z,ge)|0,X=X+Math.imul(Z,se)|0,X=X+Math.imul(st,ge)|0,tt=tt+Math.imul(st,se)|0,J=J+Math.imul(Q,Ce)|0,X=X+Math.imul(Q,Ie)|0,X=X+Math.imul(ot,Ce)|0,tt=tt+Math.imul(ot,Ie)|0;var Ne=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,J=Math.imul(Se,Ft),X=Math.imul(Se,xt),X=X+Math.imul(ne,Ft)|0,tt=Math.imul(ne,xt),J=J+Math.imul(he,Et)|0,X=X+Math.imul(he,Mt)|0,X=X+Math.imul(de,Et)|0,tt=tt+Math.imul(de,Mt)|0,J=J+Math.imul(Kt,jt)|0,X=X+Math.imul(Kt,ie)|0,X=X+Math.imul($t,jt)|0,tt=tt+Math.imul($t,ie)|0,J=J+Math.imul(Vt,be)|0,X=X+Math.imul(Vt,ve)|0,X=X+Math.imul(It,be)|0,tt=tt+Math.imul(It,ve)|0,J=J+Math.imul(Ht,ce)|0,X=X+Math.imul(Ht,Te)|0,X=X+Math.imul(Ut,ce)|0,tt=tt+Math.imul(Ut,Te)|0,J=J+Math.imul(At,ir)|0,X=X+Math.imul(At,pe)|0,X=X+Math.imul(mt,ir)|0,tt=tt+Math.imul(mt,pe)|0,J=J+Math.imul(wt,Ke)|0,X=X+Math.imul(wt,or)|0,X=X+Math.imul(Rt,Ke)|0,tt=tt+Math.imul(Rt,or)|0,J=J+Math.imul(ct,ge)|0,X=X+Math.imul(ct,se)|0,X=X+Math.imul(gt,ge)|0,tt=tt+Math.imul(gt,se)|0,J=J+Math.imul(Z,Ce)|0,X=X+Math.imul(Z,Ie)|0,X=X+Math.imul(st,Ce)|0,tt=tt+Math.imul(st,Ie)|0;var Oe=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,J=Math.imul(Se,Et),X=Math.imul(Se,Mt),X=X+Math.imul(ne,Et)|0,tt=Math.imul(ne,Mt),J=J+Math.imul(he,jt)|0,X=X+Math.imul(he,ie)|0,X=X+Math.imul(de,jt)|0,tt=tt+Math.imul(de,ie)|0,J=J+Math.imul(Kt,be)|0,X=X+Math.imul(Kt,ve)|0,X=X+Math.imul($t,be)|0,tt=tt+Math.imul($t,ve)|0,J=J+Math.imul(Vt,ce)|0,X=X+Math.imul(Vt,Te)|0,X=X+Math.imul(It,ce)|0,tt=tt+Math.imul(It,Te)|0,J=J+Math.imul(Ht,ir)|0,X=X+Math.imul(Ht,pe)|0,X=X+Math.imul(Ut,ir)|0,tt=tt+Math.imul(Ut,pe)|0,J=J+Math.imul(At,Ke)|0,X=X+Math.imul(At,or)|0,X=X+Math.imul(mt,Ke)|0,tt=tt+Math.imul(mt,or)|0,J=J+Math.imul(wt,ge)|0,X=X+Math.imul(wt,se)|0,X=X+Math.imul(Rt,ge)|0,tt=tt+Math.imul(Rt,se)|0,J=J+Math.imul(ct,Ce)|0,X=X+Math.imul(ct,Ie)|0,X=X+Math.imul(gt,Ce)|0,tt=tt+Math.imul(gt,Ie)|0;var Qe=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,J=Math.imul(Se,jt),X=Math.imul(Se,ie),X=X+Math.imul(ne,jt)|0,tt=Math.imul(ne,ie),J=J+Math.imul(he,be)|0,X=X+Math.imul(he,ve)|0,X=X+Math.imul(de,be)|0,tt=tt+Math.imul(de,ve)|0,J=J+Math.imul(Kt,ce)|0,X=X+Math.imul(Kt,Te)|0,X=X+Math.imul($t,ce)|0,tt=tt+Math.imul($t,Te)|0,J=J+Math.imul(Vt,ir)|0,X=X+Math.imul(Vt,pe)|0,X=X+Math.imul(It,ir)|0,tt=tt+Math.imul(It,pe)|0,J=J+Math.imul(Ht,Ke)|0,X=X+Math.imul(Ht,or)|0,X=X+Math.imul(Ut,Ke)|0,tt=tt+Math.imul(Ut,or)|0,J=J+Math.imul(At,ge)|0,X=X+Math.imul(At,se)|0,X=X+Math.imul(mt,ge)|0,tt=tt+Math.imul(mt,se)|0,J=J+Math.imul(wt,Ce)|0,X=X+Math.imul(wt,Ie)|0,X=X+Math.imul(Rt,Ce)|0,tt=tt+Math.imul(Rt,Ie)|0;var er=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(er>>>26)|0,er&=67108863,J=Math.imul(Se,be),X=Math.imul(Se,ve),X=X+Math.imul(ne,be)|0,tt=Math.imul(ne,ve),J=J+Math.imul(he,ce)|0,X=X+Math.imul(he,Te)|0,X=X+Math.imul(de,ce)|0,tt=tt+Math.imul(de,Te)|0,J=J+Math.imul(Kt,ir)|0,X=X+Math.imul(Kt,pe)|0,X=X+Math.imul($t,ir)|0,tt=tt+Math.imul($t,pe)|0,J=J+Math.imul(Vt,Ke)|0,X=X+Math.imul(Vt,or)|0,X=X+Math.imul(It,Ke)|0,tt=tt+Math.imul(It,or)|0,J=J+Math.imul(Ht,ge)|0,X=X+Math.imul(Ht,se)|0,X=X+Math.imul(Ut,ge)|0,tt=tt+Math.imul(Ut,se)|0,J=J+Math.imul(At,Ce)|0,X=X+Math.imul(At,Ie)|0,X=X+Math.imul(mt,Ce)|0,tt=tt+Math.imul(mt,Ie)|0;var fr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(fr>>>26)|0,fr&=67108863,J=Math.imul(Se,ce),X=Math.imul(Se,Te),X=X+Math.imul(ne,ce)|0,tt=Math.imul(ne,Te),J=J+Math.imul(he,ir)|0,X=X+Math.imul(he,pe)|0,X=X+Math.imul(de,ir)|0,tt=tt+Math.imul(de,pe)|0,J=J+Math.imul(Kt,Ke)|0,X=X+Math.imul(Kt,or)|0,X=X+Math.imul($t,Ke)|0,tt=tt+Math.imul($t,or)|0,J=J+Math.imul(Vt,ge)|0,X=X+Math.imul(Vt,se)|0,X=X+Math.imul(It,ge)|0,tt=tt+Math.imul(It,se)|0,J=J+Math.imul(Ht,Ce)|0,X=X+Math.imul(Ht,Ie)|0,X=X+Math.imul(Ut,Ce)|0,tt=tt+Math.imul(Ut,Ie)|0;var rr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(rr>>>26)|0,rr&=67108863,J=Math.imul(Se,ir),X=Math.imul(Se,pe),X=X+Math.imul(ne,ir)|0,tt=Math.imul(ne,pe),J=J+Math.imul(he,Ke)|0,X=X+Math.imul(he,or)|0,X=X+Math.imul(de,Ke)|0,tt=tt+Math.imul(de,or)|0,J=J+Math.imul(Kt,ge)|0,X=X+Math.imul(Kt,se)|0,X=X+Math.imul($t,ge)|0,tt=tt+Math.imul($t,se)|0,J=J+Math.imul(Vt,Ce)|0,X=X+Math.imul(Vt,Ie)|0,X=X+Math.imul(It,Ce)|0,tt=tt+Math.imul(It,Ie)|0;var He=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(He>>>26)|0,He&=67108863,J=Math.imul(Se,Ke),X=Math.imul(Se,or),X=X+Math.imul(ne,Ke)|0,tt=Math.imul(ne,or),J=J+Math.imul(he,ge)|0,X=X+Math.imul(he,se)|0,X=X+Math.imul(de,ge)|0,tt=tt+Math.imul(de,se)|0,J=J+Math.imul(Kt,Ce)|0,X=X+Math.imul(Kt,Ie)|0,X=X+Math.imul($t,Ce)|0,tt=tt+Math.imul($t,Ie)|0;var dr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(dr>>>26)|0,dr&=67108863,J=Math.imul(Se,ge),X=Math.imul(Se,se),X=X+Math.imul(ne,ge)|0,tt=Math.imul(ne,se),J=J+Math.imul(he,Ce)|0,X=X+Math.imul(he,Ie)|0,X=X+Math.imul(de,Ce)|0,tt=tt+Math.imul(de,Ie)|0;var mr=(ut+J|0)+((X&8191)<<13)|0;ut=(tt+(X>>>13)|0)+(mr>>>26)|0,mr&=67108863,J=Math.imul(Se,Ce),X=Math.imul(Se,Ie),X=X+Math.imul(ne,Ce)|0,tt=Math.imul(ne,Ie);var xr=(ut+J|0)+((X&8191)<<13)|0;return ut=(tt+(X>>>13)|0)+(xr>>>26)|0,xr&=67108863,it[0]=Pe,it[1]=ke,it[2]=Ve,it[3]=Je,it[4]=ur,it[5]=hr,it[6]=vr,it[7]=Yt,it[8]=Gt,it[9]=Ne,it[10]=Oe,it[11]=Qe,it[12]=er,it[13]=fr,it[14]=rr,it[15]=He,it[16]=dr,it[17]=mr,it[18]=xr,ut!==0&&(it[19]=ut,Y.length++),Y};Math.imul||(_=A);function y(B,O,H){H.negative=O.negative^B.negative,H.length=B.length+O.length;for(var Y=0,j=0,et=0;et>>26)|0,j+=it>>>26,it&=67108863}H.words[et]=ut,Y=it,it=j}return Y!==0?H.words[et]=Y:H.length--,H.strip()}function E(B,O,H){var Y=new T;return Y.mulp(B,O,H)}c.prototype.mulTo=function(O,H){var Y,j=this.length+O.length;return this.length===10&&O.length===10?Y=_(this,O,H):j<63?Y=A(this,O,H):j<1024?Y=y(this,O,H):Y=E(this,O,H),Y};function T(B,O){this.x=B,this.y=O}T.prototype.makeRBT=function(O){for(var H=new Array(O),Y=c.prototype._countBits(O)-1,j=0;j>=1;return j},T.prototype.permute=function(O,H,Y,j,et,it){for(var ut=0;ut>>1)et++;return 1<>>13,Y[2*it+1]=et&8191,et=et>>>13;for(it=2*H;it>=26,H+=j/67108864|0,H+=et>>>26,this.words[Y]=et&67108863}return H!==0&&(this.words[Y]=H,this.length++),this},c.prototype.muln=function(O){return this.clone().imuln(O)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(O){var H=w(O);if(H.length===0)return new c(1);for(var Y=this,j=0;j=0);var H=O%26,Y=(O-H)/26,j=67108863>>>26-H<<26-H,et;if(H!==0){var it=0;for(et=0;et>>26-H}it&&(this.words[et]=it,this.length++)}if(Y!==0){for(et=this.length-1;et>=0;et--)this.words[et+Y]=this.words[et];for(et=0;et=0);var j;H?j=(H-H%26)/26:j=0;var et=O%26,it=Math.min((O-et)/26,this.length),ut=67108863^67108863>>>et<it)for(this.length-=it,X=0;X=0&&(tt!==0||X>=j);X--){var V=this.words[X]|0;this.words[X]=tt<<26-et|V>>>et,tt=V&ut}return J&&tt!==0&&(J.words[J.length++]=tt),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(O,H,Y){return n(this.negative===0),this.iushrn(O,H,Y)},c.prototype.shln=function(O){return this.clone().ishln(O)},c.prototype.ushln=function(O){return this.clone().iushln(O)},c.prototype.shrn=function(O){return this.clone().ishrn(O)},c.prototype.ushrn=function(O){return this.clone().iushrn(O)},c.prototype.testn=function(O){n(typeof O=="number"&&O>=0);var H=O%26,Y=(O-H)/26,j=1<=0);var H=O%26,Y=(O-H)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=Y)return this;if(H!==0&&Y++,this.length=Math.min(Y,this.length),H!==0){var j=67108863^67108863>>>H<=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},c.prototype.isubn=function(O){if(n(typeof O=="number"),n(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H>26)-(J/67108864|0),this.words[et+Y]=it&67108863}for(;et>26,this.words[et+Y]=it&67108863;if(ut===0)return this.strip();for(n(ut===-1),ut=0,et=0;et>26,this.words[et]=it&67108863;return this.negative=1,this.strip()},c.prototype._wordDiv=function(O,H){var Y=this.length-O.length,j=this.clone(),et=O,it=et.words[et.length-1]|0,ut=this._countBits(it);Y=26-ut,Y!==0&&(et=et.ushln(Y),j.iushln(Y),it=et.words[et.length-1]|0);var J=j.length-et.length,X;if(H!=="mod"){X=new c(null),X.length=J+1,X.words=new Array(X.length);for(var tt=0;tt=0;Q--){var ot=(j.words[et.length+Q]|0)*67108864+(j.words[et.length+Q-1]|0);for(ot=Math.min(ot/it|0,67108863),j._ishlnsubmul(et,ot,Q);j.negative!==0;)ot--,j.negative=0,j._ishlnsubmul(et,1,Q),j.isZero()||(j.negative^=1);X&&(X.words[Q]=ot)}return X&&X.strip(),j.strip(),H!=="div"&&Y!==0&&j.iushrn(Y),{div:X||null,mod:j}},c.prototype.divmod=function(O,H,Y){if(n(!O.isZero()),this.isZero())return{div:new c(0),mod:new c(0)};var j,et,it;return this.negative!==0&&O.negative===0?(it=this.neg().divmod(O,H),H!=="mod"&&(j=it.div.neg()),H!=="div"&&(et=it.mod.neg(),Y&&et.negative!==0&&et.iadd(O)),{div:j,mod:et}):this.negative===0&&O.negative!==0?(it=this.divmod(O.neg(),H),H!=="mod"&&(j=it.div.neg()),{div:j,mod:it.mod}):this.negative&O.negative?(it=this.neg().divmod(O.neg(),H),H!=="div"&&(et=it.mod.neg(),Y&&et.negative!==0&&et.isub(O)),{div:it.div,mod:et}):O.length>this.length||this.cmp(O)<0?{div:new c(0),mod:this}:O.length===1?H==="div"?{div:this.divn(O.words[0]),mod:null}:H==="mod"?{div:null,mod:new c(this.modn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new c(this.modn(O.words[0]))}:this._wordDiv(O,H)},c.prototype.div=function(O){return this.divmod(O,"div",!1).div},c.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},c.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},c.prototype.divRound=function(O){var H=this.divmod(O);if(H.mod.isZero())return H.div;var Y=H.div.negative!==0?H.mod.isub(O):H.mod,j=O.ushrn(1),et=O.andln(1),it=Y.cmp(j);return it<0||et===1&&it===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},c.prototype.modn=function(O){n(O<=67108863);for(var H=(1<<26)%O,Y=0,j=this.length-1;j>=0;j--)Y=(H*Y+(this.words[j]|0))%O;return Y},c.prototype.idivn=function(O){n(O<=67108863);for(var H=0,Y=this.length-1;Y>=0;Y--){var j=(this.words[Y]|0)+H*67108864;this.words[Y]=j/O|0,H=j%O}return this.strip()},c.prototype.divn=function(O){return this.clone().idivn(O)},c.prototype.egcd=function(O){n(O.negative===0),n(!O.isZero());var H=this,Y=O.clone();H.negative!==0?H=H.umod(O):H=H.clone();for(var j=new c(1),et=new c(0),it=new c(0),ut=new c(1),J=0;H.isEven()&&Y.isEven();)H.iushrn(1),Y.iushrn(1),++J;for(var X=Y.clone(),tt=H.clone();!H.isZero();){for(var V=0,Q=1;!(H.words[0]&Q)&&V<26;++V,Q<<=1);if(V>0)for(H.iushrn(V);V-- >0;)(j.isOdd()||et.isOdd())&&(j.iadd(X),et.isub(tt)),j.iushrn(1),et.iushrn(1);for(var ot=0,$=1;!(Y.words[0]&$)&&ot<26;++ot,$<<=1);if(ot>0)for(Y.iushrn(ot);ot-- >0;)(it.isOdd()||ut.isOdd())&&(it.iadd(X),ut.isub(tt)),it.iushrn(1),ut.iushrn(1);H.cmp(Y)>=0?(H.isub(Y),j.isub(it),et.isub(ut)):(Y.isub(H),it.isub(j),ut.isub(et))}return{a:it,b:ut,gcd:Y.iushln(J)}},c.prototype._invmp=function(O){n(O.negative===0),n(!O.isZero());var H=this,Y=O.clone();H.negative!==0?H=H.umod(O):H=H.clone();for(var j=new c(1),et=new c(0),it=Y.clone();H.cmpn(1)>0&&Y.cmpn(1)>0;){for(var ut=0,J=1;!(H.words[0]&J)&&ut<26;++ut,J<<=1);if(ut>0)for(H.iushrn(ut);ut-- >0;)j.isOdd()&&j.iadd(it),j.iushrn(1);for(var X=0,tt=1;!(Y.words[0]&tt)&&X<26;++X,tt<<=1);if(X>0)for(Y.iushrn(X);X-- >0;)et.isOdd()&&et.iadd(it),et.iushrn(1);H.cmp(Y)>=0?(H.isub(Y),j.isub(et)):(Y.isub(H),et.isub(j))}var V;return H.cmpn(1)===0?V=j:V=et,V.cmpn(0)<0&&V.iadd(O),V},c.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var H=this.clone(),Y=O.clone();H.negative=0,Y.negative=0;for(var j=0;H.isEven()&&Y.isEven();j++)H.iushrn(1),Y.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;Y.isEven();)Y.iushrn(1);var et=H.cmp(Y);if(et<0){var it=H;H=Y,Y=it}else if(et===0||Y.cmpn(1)===0)break;H.isub(Y)}while(!0);return Y.iushln(j)},c.prototype.invm=function(O){return this.egcd(O).a.umod(O)},c.prototype.isEven=function(){return(this.words[0]&1)===0},c.prototype.isOdd=function(){return(this.words[0]&1)===1},c.prototype.andln=function(O){return this.words[0]&O},c.prototype.bincn=function(O){n(typeof O=="number");var H=O%26,Y=(O-H)/26,j=1<>>26,ut&=67108863,this.words[it]=ut}return et!==0&&(this.words[it]=et,this.length++),this},c.prototype.isZero=function(){return this.length===1&&this.words[0]===0},c.prototype.cmpn=function(O){var H=O<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var Y;if(this.length>1)Y=1;else{H&&(O=-O),n(O<=67108863,"Number is too big");var j=this.words[0]|0;Y=j===O?0:jO.length)return 1;if(this.length=0;Y--){var j=this.words[Y]|0,et=O.words[Y]|0;if(j!==et){jet&&(H=1);break}}return H},c.prototype.gtn=function(O){return this.cmpn(O)===1},c.prototype.gt=function(O){return this.cmp(O)===1},c.prototype.gten=function(O){return this.cmpn(O)>=0},c.prototype.gte=function(O){return this.cmp(O)>=0},c.prototype.ltn=function(O){return this.cmpn(O)===-1},c.prototype.lt=function(O){return this.cmp(O)===-1},c.prototype.lten=function(O){return this.cmpn(O)<=0},c.prototype.lte=function(O){return this.cmp(O)<=0},c.prototype.eqn=function(O){return this.cmpn(O)===0},c.prototype.eq=function(O){return this.cmp(O)===0},c.red=function(O){return new I(O)},c.prototype.toRed=function(O){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},c.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(O){return this.red=O,this},c.prototype.forceRed=function(O){return n(!this.red,"Already a number in reduction context"),this._forceRed(O)},c.prototype.redAdd=function(O){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},c.prototype.redIAdd=function(O){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},c.prototype.redSub=function(O){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},c.prototype.redISub=function(O){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},c.prototype.redShl=function(O){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},c.prototype.redMul=function(O){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},c.prototype.redIMul=function(O){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},c.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(O){return n(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var s={k256:null,p224:null,p192:null,p25519:null};function L(B,O){this.name=B,this.p=new c(O,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}L.prototype._tmp=function(){var O=new c(null);return O.words=new Array(Math.ceil(this.n/13)),O},L.prototype.ireduce=function(O){var H=O,Y;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),Y=H.bitLength();while(Y>this.n);var j=Y0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},L.prototype.split=function(O,H){O.iushrn(this.n,0,H)},L.prototype.imulK=function(O){return O.imul(this.k)};function M(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}f(M,L),M.prototype.split=function(O,H){for(var Y=4194303,j=Math.min(O.length,9),et=0;et>>22,it=ut}it>>>=22,O.words[et-10]=it,it===0&&O.length>10?O.length-=10:O.length-=9},M.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var H=0,Y=0;Y>>=26,O.words[Y]=et,H=j}return H!==0&&(O.words[O.length++]=H),O},c._prime=function(O){if(s[O])return s[O];var H;if(O==="k256")H=new M;else if(O==="p224")H=new z;else if(O==="p192")H=new D;else if(O==="p25519")H=new N;else throw new Error("Unknown prime "+O);return s[O]=H,H};function I(B){if(typeof B=="string"){var O=c._prime(B);this.m=O.p,this.prime=O}else n(B.gtn(1),"modulus must be greater than 1"),this.m=B,this.prime=null}I.prototype._verify1=function(O){n(O.negative===0,"red works only with positives"),n(O.red,"red works only with red numbers")},I.prototype._verify2=function(O,H){n((O.negative|H.negative)===0,"red works only with positives"),n(O.red&&O.red===H.red,"red works only with red numbers")},I.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):O.umod(this.m)._forceRed(this)},I.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},I.prototype.add=function(O,H){this._verify2(O,H);var Y=O.add(H);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y._forceRed(this)},I.prototype.iadd=function(O,H){this._verify2(O,H);var Y=O.iadd(H);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y},I.prototype.sub=function(O,H){this._verify2(O,H);var Y=O.sub(H);return Y.cmpn(0)<0&&Y.iadd(this.m),Y._forceRed(this)},I.prototype.isub=function(O,H){this._verify2(O,H);var Y=O.isub(H);return Y.cmpn(0)<0&&Y.iadd(this.m),Y},I.prototype.shl=function(O,H){return this._verify1(O),this.imod(O.ushln(H))},I.prototype.imul=function(O,H){return this._verify2(O,H),this.imod(O.imul(H))},I.prototype.mul=function(O,H){return this._verify2(O,H),this.imod(O.mul(H))},I.prototype.isqr=function(O){return this.imul(O,O.clone())},I.prototype.sqr=function(O){return this.mul(O,O)},I.prototype.sqrt=function(O){if(O.isZero())return O.clone();var H=this.m.andln(3);if(n(H%2===1),H===3){var Y=this.m.add(new c(1)).iushrn(2);return this.pow(O,Y)}for(var j=this.m.subn(1),et=0;!j.isZero()&&j.andln(1)===0;)et++,j.iushrn(1);n(!j.isZero());var it=new c(1).toRed(this),ut=it.redNeg(),J=this.m.subn(1).iushrn(1),X=this.m.bitLength();for(X=new c(2*X*X).toRed(this);this.pow(X,J).cmp(ut)!==0;)X.redIAdd(ut);for(var tt=this.pow(X,j),V=this.pow(O,j.addn(1).iushrn(1)),Q=this.pow(O,j),ot=et;Q.cmp(it)!==0;){for(var $=Q,Z=0;$.cmp(it)!==0;Z++)$=$.redSqr();n(Z=0;et--){for(var tt=H.words[et],V=X-1;V>=0;V--){var Q=tt>>V&1;if(it!==j[0]&&(it=this.sqr(it)),Q===0&&ut===0){J=0;continue}ut<<=1,ut|=Q,J++,!(J!==Y&&(et!==0||V!==0))&&(it=this.mul(it,j[ut]),J=0,ut=0)}X=26}return it},I.prototype.convertTo=function(O){var H=O.umod(this.m);return H===O?H.clone():H},I.prototype.convertFrom=function(O){var H=O.clone();return H.red=null,H},c.mont=function(O){return new k(O)};function k(B){I.call(this,B),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}f(k,I),k.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},k.prototype.convertFrom=function(O){var H=this.imod(O.mul(this.rinv));return H.red=null,H},k.prototype.imul=function(O,H){if(O.isZero()||H.isZero())return O.words[0]=0,O.length=1,O;var Y=O.imul(H),j=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),et=Y.isub(j).iushrn(this.shift),it=et;return et.cmp(this.m)>=0?it=et.isub(this.m):et.cmpn(0)<0&&(it=et.iadd(this.m)),it._forceRed(this)},k.prototype.mul=function(O,H){if(O.isZero()||H.isZero())return new c(0)._forceRed(this);var Y=O.mul(H),j=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),et=Y.isub(j).iushrn(this.shift),it=et;return et.cmp(this.m)>=0?it=et.isub(this.m):et.cmpn(0)<0&&(it=et.iadd(this.m)),it._forceRed(this)},k.prototype.invm=function(O){var H=this.imod(O._invmp(this.m).mul(this.r2));return H._forceRed(this)}}(v,this)},2692:function(v){v.exports=p;function p(r){var e,a,n,f=r.length,c=0;for(e=0;e>>1;if(!(T<=0)){var s,L=e.mallocDouble(2*T*y),M=e.mallocInt32(y);if(y=c(d,T,L,M),y>0){if(T===1&&_)a.init(y),s=a.sweepComplete(T,A,0,y,L,M,0,y,L,M);else{var z=e.mallocDouble(2*T*E),D=e.mallocInt32(E);E=c(w,T,z,D),E>0&&(a.init(y+E),T===1?s=a.sweepBipartite(T,A,0,y,L,M,0,E,z,D):s=n(T,A,_,y,L,M,E,z,D),e.free(z),e.free(D))}e.free(L),e.free(M)}return s}}}var m;function h(d,w){m.push([d,w])}function b(d){return m=[],l(d,d,h,!0),m}function u(d,w){return m=[],l(d,w,h,!1),m}function o(d,w,A){switch(arguments.length){case 1:return b(d);case 2:return typeof w=="function"?l(d,d,w,!0):u(d,w);case 3:return l(d,w,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},7333:function(v,p){function r(){function n(l,m,h,b,u,o,d,w,A,_,y){for(var E=2*l,T=b,s=E*b;TA-w?n(l,m,h,b,u,o,d,w,A,_,y):f(l,m,h,b,u,o,d,w,A,_,y)}return c}function e(){function n(h,b,u,o,d,w,A,_,y,E,T){for(var s=2*h,L=o,M=s*o;LE-y?o?n(h,b,u,d,w,A,_,y,E,T,s):f(h,b,u,d,w,A,_,y,E,T,s):o?c(h,b,u,d,w,A,_,y,E,T,s):l(h,b,u,d,w,A,_,y,E,T,s)}return m}function a(n){return n?r():e()}p.partial=a(!1),p.full=a(!0)},2337:function(v,p,r){v.exports=B;var e=r(5306),a=r(2288),n=r(7333),f=n.partial,c=n.full,l=r(1390),m=r(2464),h=r(122),b=128,u=1<<22,o=1<<22,d=h("!(lo>=p0)&&!(p1>=hi)"),w=h("lo===p0"),A=h("lo0;){tt-=1;var ot=tt*T,$=M[ot],Z=M[ot+1],st=M[ot+2],nt=M[ot+3],ct=M[ot+4],gt=M[ot+5],Tt=tt*s,wt=z[Tt],Rt=z[Tt+1],bt=gt&1,At=!!(gt&16),mt=et,Lt=it,Ht=J,Ut=X;if(bt&&(mt=J,Lt=X,Ht=et,Ut=it),!(gt&2&&(st=A(O,$,Z,st,mt,Lt,Rt),Z>=st))&&!(gt&4&&(Z=_(O,$,Z,st,mt,Lt,wt),Z>=st))){var kt=st-Z,Vt=ct-nt;if(At){if(O*kt*(kt+Vt)h&&u[E+m]>_;--y,E-=d){for(var T=E,s=E+d,L=0;L>>1,_=2*l,y=A,E=u[_*A+m];d=z?(y=M,E=z):L>=N?(y=s,E=L):(y=D,E=N):z>=N?(y=M,E=z):N>=L?(y=s,E=L):(y=D,E=N);for(var B=_*(w-1),O=_*y,I=0;I<_;++I,++B,++O){var k=u[B];u[B]=u[O],u[O]=k}var H=o[w-1];o[w-1]=o[y],o[y]=H,y=a(l,m,d,w-1,u,o,E);for(var B=_*(w-1),O=_*y,I=0;I<_;++I,++B,++O){var k=u[B];u[B]=u[O],u[O]=k}var H=o[w-1];if(o[w-1]=o[y],o[y]=H,A=p0)&&!(p1>=hi)":m};function r(h){return p[h]}function e(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s];if(z===A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function a(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s];if(zD;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function n(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+L];if(z<=A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function f(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+L];if(z<=A)if(T===M)T+=1,E+=_;else{for(var D=0;_>D;++D){var N=d[y+D];d[y+D]=d[E],d[E++]=N}var I=w[M];w[M]=w[T],w[T++]=I}}return T}function c(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s],D=d[y+L];if(z<=A&&A<=D)if(T===M)T+=1,E+=_;else{for(var N=0;_>N;++N){var I=d[y+N];d[y+N]=d[E],d[E++]=I}var k=w[M];w[M]=w[T],w[T++]=k}}return T}function l(h,b,u,o,d,w,A){for(var _=2*h,y=_*u,E=y,T=u,s=b,L=h+b,M=u;o>M;++M,y+=_){var z=d[y+s],D=d[y+L];if(zN;++N){var I=d[y+N];d[y+N]=d[E],d[E++]=I}var k=w[M];w[M]=w[T],w[T++]=k}}return T}function m(h,b,u,o,d,w,A,_){for(var y=2*h,E=y*u,T=E,s=u,L=b,M=h+b,z=u;o>z;++z,E+=y){var D=d[E+L],N=d[E+M];if(!(D>=A)&&!(_>=N))if(s===z)s+=1,T+=y;else{for(var I=0;y>I;++I){var k=d[E+I];d[E+I]=d[T],d[T++]=k}var B=w[z];w[z]=w[s],w[s++]=B}}return s}},309:function(v){v.exports=r;var p=32;function r(b,u){u<=4*p?e(0,u-1,b):h(0,u-1,b)}function e(b,u,o){for(var d=2*(b+1),w=b+1;w<=u;++w){for(var A=o[d++],_=o[d++],y=w,E=d-2;y-- >b;){var T=o[E-2],s=o[E-1];if(To[u+1]:!0}function m(b,u,o,d){b*=2;var w=d[b];return w>1,y=_-d,E=_+d,T=w,s=y,L=_,M=E,z=A,D=b+1,N=u-1,I=0;l(T,s,o)&&(I=T,T=s,s=I),l(M,z,o)&&(I=M,M=z,z=I),l(T,L,o)&&(I=T,T=L,L=I),l(s,L,o)&&(I=s,s=L,L=I),l(T,M,o)&&(I=T,T=M,M=I),l(L,M,o)&&(I=L,L=M,M=I),l(s,z,o)&&(I=s,s=z,z=I),l(s,L,o)&&(I=s,s=L,L=I),l(M,z,o)&&(I=M,M=z,z=I);for(var k=o[2*s],B=o[2*s+1],O=o[2*M],H=o[2*M+1],Y=2*T,j=2*L,et=2*z,it=2*w,ut=2*_,J=2*A,X=0;X<2;++X){var tt=o[Y+X],V=o[j+X],Q=o[et+X];o[it+X]=tt,o[ut+X]=V,o[J+X]=Q}n(y,b,o),n(E,u,o);for(var ot=D;ot<=N;++ot)if(m(ot,k,B,o))ot!==D&&a(ot,D,o),++D;else if(!m(ot,O,H,o))for(;;)if(m(N,O,H,o)){m(N,k,B,o)?(f(ot,D,N,o),++D,--N):(a(ot,N,o),--N);break}else{if(--N>>1;n(d,V);for(var Q=0,ot=0,ut=0;ut=f)$=$-f|0,A(h,b,ot--,$);else if($>=0)A(l,m,Q--,$);else if($<=-f){$=-$-f|0;for(var Z=0;Z>>1;n(d,V);for(var Q=0,ot=0,$=0,ut=0;ut>1===d[2*ut+3]>>1&&(st=2,ut+=1),Z<0){for(var nt=-(Z>>1)-1,ct=0;ct<$;++ct){var gt=M(u[ct],nt);if(gt!==void 0)return gt}if(st!==0)for(var ct=0;ct>1)-1;st===0?A(l,m,Q--,nt):st===1?A(h,b,ot--,nt):st===2&&A(u,o,$--,nt)}}}function T(L,M,z,D,N,I,k,B,O,H,Y,j){var et=0,it=2*L,ut=M,J=M+L,X=1,tt=1;D?tt=f:X=f;for(var V=N;V>>1;n(d,Z);for(var st=0,V=0;V=f?(ct=!D,Q-=f):(ct=!!D,Q-=1),ct)_(l,m,st++,Q);else{var gt=j[Q],Tt=it*Q,wt=Y[Tt+M+1],Rt=Y[Tt+M+1+L];t:for(var bt=0;bt>>1;n(d,Q);for(var ot=0,J=0;J=f)l[ot++]=X-f;else{X-=1;var Z=Y[X],st=et*X,nt=H[st+M+1],ct=H[st+M+1+L];t:for(var gt=0;gt=0;--gt)if(l[gt]===X){for(var bt=gt+1;bt0;){for(var d=l.pop(),b=l.pop(),w=-1,A=-1,u=h[b],y=1;y=0||(c.flip(b,d),a(f,c,l,w,b,A),a(f,c,l,b,A,w),a(f,c,l,A,d,w),a(f,c,l,d,w,A))}}},7098:function(v,p,r){var e=r(5070);v.exports=m;function a(h,b,u,o,d,w,A){this.cells=h,this.neighbor=b,this.flags=o,this.constraint=u,this.active=d,this.next=w,this.boundary=A}var n=a.prototype;function f(h,b){return h[0]-b[0]||h[1]-b[1]||h[2]-b[2]}n.locate=function(){var h=[0,0,0];return function(b,u,o){var d=b,w=u,A=o;return u0||A.length>0;){for(;w.length>0;){var s=w.pop();if(_[s]!==-d){_[s]=d,y[s];for(var L=0;L<3;++L){var M=T[3*s+L];M>=0&&_[M]===0&&(E[3*s+L]?A.push(M):(w.push(M),_[M]=d))}}}var z=A;A=w,w=z,A.length=0,d=-d}var D=l(y,_,b);return u?D.concat(o.boundary):D}},9971:function(v,p,r){var e=r(5070),a=r(417)[3],n=0,f=1,c=2;v.exports=A;function l(_,y,E,T,s){this.a=_,this.b=y,this.idx=E,this.lowerIds=T,this.upperIds=s}function m(_,y,E,T){this.a=_,this.b=y,this.type=E,this.idx=T}function h(_,y){var E=_.a[0]-y.a[0]||_.a[1]-y.a[1]||_.type-y.type;return E||_.type!==n&&(E=a(_.a,_.b,y.b),E)?E:_.idx-y.idx}function b(_,y){return a(_.a,_.b,y)}function u(_,y,E,T,s){for(var L=e.lt(y,T,b),M=e.gt(y,T,b),z=L;z1&&a(E[N[k-2]],E[N[k-1]],T)>0;)_.push([N[k-1],N[k-2],s]),k-=1;N.length=k,N.push(s);for(var I=D.upperIds,k=I.length;k>1&&a(E[I[k-2]],E[I[k-1]],T)<0;)_.push([I[k-2],I[k-1],s]),k-=1;I.length=k,I.push(s)}}function o(_,y){var E;return _.a[0]D[0]&&s.push(new m(D,z,c,L),new m(z,D,f,L))}s.sort(h);for(var N=s[0].a[0]-(1+Math.abs(s[0].a[0]))*Math.pow(2,-52),I=[new l([N,1],[N,0],-1,[],[])],k=[],L=0,B=s.length;L=0}}(),n.removeTriangle=function(l,m,h){var b=this.stars;f(b[l],m,h),f(b[m],h,l),f(b[h],l,m)},n.addTriangle=function(l,m,h){var b=this.stars;b[l].push(m,h),b[m].push(h,l),b[h].push(l,m)},n.opposite=function(l,m){for(var h=this.stars[m],b=1,u=h.length;b=0;--O){var tt=k[O];H=tt[0];var V=N[H],Q=V[0],ot=V[1],$=D[Q],Z=D[ot];if(($[0]-Z[0]||$[1]-Z[1])<0){var st=Q;Q=ot,ot=st}V[0]=Q;var nt=V[1]=tt[1],ct;for(B&&(ct=V[2]);O>0&&k[O-1][0]===H;){var tt=k[--O],gt=tt[1];B?N.push([nt,gt,ct]):N.push([nt,gt]),nt=gt}B?N.push([nt,ot,ct]):N.push([nt,ot])}return Y}function y(D,N,I){for(var k=N.length,B=new e(k),O=[],H=0;HN[2]?1:0)}function s(D,N,I){if(D.length!==0){if(N)for(var k=0;k0||H.length>0}function z(D,N,I){var k;if(I){k=N;for(var B=new Array(N.length),O=0;O_+1)throw new Error(w+" map requires nshades to be at least size "+d.length);Array.isArray(m.alpha)?m.alpha.length!==2?y=[1,1]:y=m.alpha.slice():typeof m.alpha=="number"?y=[m.alpha,m.alpha]:y=[1,1],h=d.map(function(z){return Math.round(z.index*_)}),y[0]=Math.min(Math.max(y[0],0),1),y[1]=Math.min(Math.max(y[1],0),1);var T=d.map(function(z,D){var N=d[D].index,I=d[D].rgb.slice();return I.length===4&&I[3]>=0&&I[3]<=1||(I[3]=y[0]+(y[1]-y[0])*N),I}),s=[];for(E=0;E=0}function m(h,b,u,o){var d=e(b,u,o);if(d===0){var w=a(e(h,b,u)),A=a(e(h,b,o));if(w===A){if(w===0){var _=l(h,b,u),y=l(h,b,o);return _===y?0:_?1:-1}return 0}else{if(A===0)return w>0||l(h,b,o)?-1:1;if(w===0)return A>0||l(h,b,u)?1:-1}return a(A-w)}var E=e(h,b,u);if(E>0)return d>0&&e(h,b,o)>0?1:-1;if(E<0)return d>0||e(h,b,o)>0?1:-1;var T=e(h,b,o);return T>0||l(h,b,u)?1:-1}},7538:function(v){v.exports=function(r){return r<0?-1:r>0?1:0}},9209:function(v){v.exports=e;var p=Math.min;function r(a,n){return a-n}function e(a,n){var f=a.length,c=a.length-n.length;if(c)return c;switch(f){case 0:return 0;case 1:return a[0]-n[0];case 2:return a[0]+a[1]-n[0]-n[1]||p(a[0],a[1])-p(n[0],n[1]);case 3:var l=a[0]+a[1],m=n[0]+n[1];if(c=l+a[2]-(m+n[2]),c)return c;var h=p(a[0],a[1]),b=p(n[0],n[1]);return p(h,a[2])-p(b,n[2])||p(h+a[2],l)-p(b+n[2],m);case 4:var u=a[0],o=a[1],d=a[2],w=a[3],A=n[0],_=n[1],y=n[2],E=n[3];return u+o+d+w-(A+_+y+E)||p(u,o,d,w)-p(A,_,y,E,A)||p(u+o,u+d,u+w,o+d,o+w,d+w)-p(A+_,A+y,A+E,_+y,_+E,y+E)||p(u+o+d,u+o+w,u+d+w,o+d+w)-p(A+_+y,A+_+E,A+y+E,_+y+E);default:for(var T=a.slice().sort(r),s=n.slice().sort(r),L=0;Lr[a][0]&&(a=n);return ea?[[a],[e]]:[[e]]}},8722:function(v,p,r){v.exports=a;var e=r(3266);function a(n){var f=e(n),c=f.length;if(c<=2)return[];for(var l=new Array(c),m=f[c-1],h=0;h=m[A]&&(w+=1);o[d]=w}}return l}function c(l,m){try{return e(l,!0)}catch{var h=a(l);if(h.length<=m)return[];var b=n(l,h),u=e(b,!0);return f(u,h)}}},9680:function(v){function p(e,a,n,f,c,l){var m=6*c*c-6*c,h=3*c*c-4*c+1,b=-6*c*c+6*c,u=3*c*c-2*c;if(e.length){l||(l=new Array(e.length));for(var o=e.length-1;o>=0;--o)l[o]=m*e[o]+h*a[o]+b*n[o]+u*f[o];return l}return m*e+h*a+b*n[o]+u*f}function r(e,a,n,f,c,l){var m=c-1,h=c*c,b=m*m,u=(1+2*c)*b,o=c*b,d=h*(3-2*c),w=h*m;if(e.length){l||(l=new Array(e.length));for(var A=e.length-1;A>=0;--A)l[A]=u*e[A]+o*a[A]+d*n[A]+w*f[A];return l}return u*e+o*a+d*n+w*f}v.exports=r,v.exports.derivative=p},4419:function(v,p,r){var e=r(2183),a=r(1215);v.exports=l;function n(m,h){this.point=m,this.index=h}function f(m,h){for(var b=m.point,u=h.point,o=b.length,d=0;d=2)return!1;I[B]=O}return!0}):N=N.filter(function(I){for(var k=0;k<=u;++k){var B=L[I[k]];if(B<0)return!1;I[k]=B}return!0}),u&1)for(var w=0;w>>31},v.exports.exponent=function(n){var f=v.exports.hi(n);return(f<<1>>>21)-1023},v.exports.fraction=function(n){var f=v.exports.lo(n),c=v.exports.hi(n),l=c&(1<<20)-1;return c&2146435072&&(l+=1048576),[f,l]},v.exports.denormalized=function(n){var f=v.exports.hi(n);return!(f&2146435072)}},3094:function(v){function p(a,n,f){var c=a[f]|0;if(c<=0)return[];var l=new Array(c),m;if(f===a.length-1)for(m=0;m"u"&&(n=0),typeof a){case"number":if(a>0)return r(a|0,n);break;case"object":if(typeof a.length=="number")return p(a,n,0);break}return[]}v.exports=e},8348:function(v,p,r){v.exports=a;var e=r(1215);function a(n,f){var c=n.length;if(typeof f!="number"){f=0;for(var l=0;l=u-1)for(var E=w.length-1,s=h-b[u-1],T=0;T<_;++T,--E)d[T]=w[E]+s*A[E];else{for(var E=_*(o+1)-1,L=b[o],M=b[o+1],z=M-L||1,D=this._scratch[1],N=this._scratch[2],I=this._scratch[3],k=this._scratch[4],B=!0,T=0;T<_;++T,--E)D[T]=w[E],I[T]=A[E]*z,N[T]=w[E+_],k[T]=A[E+_]*z,B=B&&D[T]===N[T]&&I[T]===k[T]&&I[T]===0;if(B)for(var T=0;T<_;++T)d[T]=D[T];else e(D,I,N,k,(h-L)/z,d)}for(var O=y[0],H=y[1],T=0;T<_;++T)d[T]=n(O[T],H[T],d[T]);return d},c.dcurve=function(h){var b=this._time,u=b.length,o=a.le(b,h),d=this._scratch[0],w=this._state,A=this._velocity,_=this.dimension;if(o>=u-1){var y=w.length-1;h-b[u-1];for(var E=0;E<_;++E,--y)d[E]=A[y]}else{for(var y=_*(o+1)-1,T=b[o],s=b[o+1],L=s-T||1,M=this._scratch[1],z=this._scratch[2],D=this._scratch[3],N=this._scratch[4],I=!0,E=0;E<_;++E,--y)M[E]=w[y],D[E]=A[y]*L,z[E]=w[y+_],N[E]=A[y+_]*L,I=I&&M[E]===z[E]&&D[E]===N[E]&&D[E]===0;if(I)for(var E=0;E<_;++E)d[E]=0;else{e.derivative(M,D,z,N,(h-T)/L,d);for(var E=0;E<_;++E)d[E]/=L}}return d},c.lastT=function(){var h=this._time;return h[h.length-1]},c.stable=function(){for(var h=this._velocity,b=h.length,u=this.dimension-1;u>=0;--u)if(h[--b])return!1;return!0},c.jump=function(h){var b=this.lastT(),u=this.dimension;if(!(h0;--T)o.push(n(_[T-1],y[T-1],arguments[T])),d.push(0)}},c.push=function(h){var b=this.lastT(),u=this.dimension;if(!(h1e-6?1/A:0;this._time.push(h);for(var s=u;s>0;--s){var L=n(y[s-1],E[s-1],arguments[s]);o.push(L),d.push((L-o[w++])*T)}}},c.set=function(h){var b=this.dimension;if(!(h0;--_)u.push(n(w[_-1],A[_-1],arguments[_])),o.push(0)}},c.move=function(h){var b=this.lastT(),u=this.dimension;if(!(h<=b||arguments.length!==u+1)){var o=this._state,d=this._velocity,w=o.length-this.dimension,A=this.bounds,_=A[0],y=A[1],E=h-b,T=E>1e-6?1/E:0;this._time.push(h);for(var s=u;s>0;--s){var L=arguments[s];o.push(n(_[s-1],y[s-1],o[w++]+L)),d.push(L*T)}}},c.idle=function(h){var b=this.lastT();if(!(h=0;--T)o.push(n(_[T],y[T],o[w]+E*d[w])),d.push(0),w+=1}};function l(h){for(var b=new Array(h),u=0;u=0;--D){var s=L[D];M[D]<=0?L[D]=new e(s._color,s.key,s.value,L[D+1],s.right,s._count+1):L[D]=new e(s._color,s.key,s.value,s.left,L[D+1],s._count+1)}for(var D=L.length-1;D>1;--D){var N=L[D-1],s=L[D];if(N._color===r||s._color===r)break;var I=L[D-2];if(I.left===N)if(N.left===s){var k=I.right;if(k&&k._color===p)N._color=r,I.right=n(r,k),I._color=p,D-=1;else{if(I._color=p,I.left=N.right,N._color=r,N.right=I,L[D-2]=N,L[D-1]=s,f(I),f(N),D>=3){var B=L[D-3];B.left===I?B.left=N:B.right=N}break}}else{var k=I.right;if(k&&k._color===p)N._color=r,I.right=n(r,k),I._color=p,D-=1;else{if(N.right=s.left,I._color=p,I.left=s.right,s._color=r,s.left=N,s.right=I,L[D-2]=s,L[D-1]=N,f(I),f(N),f(s),D>=3){var B=L[D-3];B.left===I?B.left=s:B.right=s}break}}else if(N.right===s){var k=I.left;if(k&&k._color===p)N._color=r,I.left=n(r,k),I._color=p,D-=1;else{if(I._color=p,I.right=N.left,N._color=r,N.left=I,L[D-2]=N,L[D-1]=s,f(I),f(N),D>=3){var B=L[D-3];B.right===I?B.right=N:B.left=N}break}}else{var k=I.left;if(k&&k._color===p)N._color=r,I.left=n(r,k),I._color=p,D-=1;else{if(N.left=s.right,I._color=p,I.right=s.left,s._color=r,s.right=N,s.left=I,L[D-2]=s,L[D-1]=N,f(I),f(N),f(s),D>=3){var B=L[D-3];B.right===I?B.right=s:B.left=s}break}}}return L[0]._color=r,new c(T,L[0])};function m(y,E){if(E.left){var T=m(y,E.left);if(T)return T}var T=y(E.key,E.value);if(T)return T;if(E.right)return m(y,E.right)}function h(y,E,T,s){var L=E(y,s.key);if(L<=0){if(s.left){var M=h(y,E,T,s.left);if(M)return M}var M=T(s.key,s.value);if(M)return M}if(s.right)return h(y,E,T,s.right)}function b(y,E,T,s,L){var M=T(y,L.key),z=T(E,L.key),D;if(M<=0&&(L.left&&(D=b(y,E,T,s,L.left),D)||z>0&&(D=s(L.key,L.value),D)))return D;if(z>0&&L.right)return b(y,E,T,s,L.right)}l.forEach=function(E,T,s){if(this.root)switch(arguments.length){case 1:return m(E,this.root);case 2:return h(T,this._compare,E,this.root);case 3:return this._compare(T,s)>=0?void 0:b(T,s,this._compare,E,this.root)}},Object.defineProperty(l,"begin",{get:function(){for(var y=[],E=this.root;E;)y.push(E),E=E.left;return new u(this,y)}}),Object.defineProperty(l,"end",{get:function(){for(var y=[],E=this.root;E;)y.push(E),E=E.right;return new u(this,y)}}),l.at=function(y){if(y<0)return new u(this,[]);for(var E=this.root,T=[];;){if(T.push(E),E.left){if(y=E.right._count)break;E=E.right}else break}return new u(this,[])},l.ge=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M<=0&&(L=s.length),M<=0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.gt=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M<0&&(L=s.length),M<0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.lt=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M>0&&(L=s.length),M<=0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.le=function(y){for(var E=this._compare,T=this.root,s=[],L=0;T;){var M=E(y,T.key);s.push(T),M>=0&&(L=s.length),M<0?T=T.left:T=T.right}return s.length=L,new u(this,s)},l.find=function(y){for(var E=this._compare,T=this.root,s=[];T;){var L=E(y,T.key);if(s.push(T),L===0)return new u(this,s);L<=0?T=T.left:T=T.right}return new u(this,[])},l.remove=function(y){var E=this.find(y);return E?E.remove():this},l.get=function(y){for(var E=this._compare,T=this.root;T;){var s=E(y,T.key);if(s===0)return T.value;s<=0?T=T.left:T=T.right}};function u(y,E){this.tree=y,this._stack=E}var o=u.prototype;Object.defineProperty(o,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(o,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),o.clone=function(){return new u(this.tree,this._stack.slice())};function d(y,E){y.key=E.key,y.value=E.value,y.left=E.left,y.right=E.right,y._color=E._color,y._count=E._count}function w(y){for(var E,T,s,L,M=y.length-1;M>=0;--M){if(E=y[M],M===0){E._color=r;return}if(T=y[M-1],T.left===E){if(s=T.right,s.right&&s.right._color===p){if(s=T.right=a(s),L=s.right=a(s.right),T.right=s.left,s.left=T,s.right=L,s._color=T._color,E._color=r,T._color=r,L._color=r,f(T),f(s),M>1){var z=y[M-2];z.left===T?z.left=s:z.right=s}y[M-1]=s;return}else if(s.left&&s.left._color===p){if(s=T.right=a(s),L=s.left=a(s.left),T.right=L.left,s.left=L.right,L.left=T,L.right=s,L._color=T._color,T._color=r,s._color=r,E._color=r,f(T),f(s),f(L),M>1){var z=y[M-2];z.left===T?z.left=L:z.right=L}y[M-1]=L;return}if(s._color===r)if(T._color===p){T._color=r,T.right=n(p,s);return}else{T.right=n(p,s);continue}else{if(s=a(s),T.right=s.left,s.left=T,s._color=T._color,T._color=p,f(T),f(s),M>1){var z=y[M-2];z.left===T?z.left=s:z.right=s}y[M-1]=s,y[M]=T,M+11){var z=y[M-2];z.right===T?z.right=s:z.left=s}y[M-1]=s;return}else if(s.right&&s.right._color===p){if(s=T.left=a(s),L=s.right=a(s.right),T.left=L.right,s.right=L.left,L.right=T,L.left=s,L._color=T._color,T._color=r,s._color=r,E._color=r,f(T),f(s),f(L),M>1){var z=y[M-2];z.right===T?z.right=L:z.left=L}y[M-1]=L;return}if(s._color===r)if(T._color===p){T._color=r,T.left=n(p,s);return}else{T.left=n(p,s);continue}else{if(s=a(s),T.left=s.right,s.right=T,s._color=T._color,T._color=p,f(T),f(s),M>1){var z=y[M-2];z.right===T?z.right=s:z.left=s}y[M-1]=s,y[M]=T,M+1=0;--s){var T=y[s];T.left===y[s+1]?E[s]=new e(T._color,T.key,T.value,E[s+1],T.right,T._count):E[s]=new e(T._color,T.key,T.value,T.left,E[s+1],T._count)}if(T=E[E.length-1],T.left&&T.right){var L=E.length;for(T=T.left;T.right;)E.push(T),T=T.right;var M=E[L-1];E.push(new e(T._color,M.key,M.value,T.left,T.right,T._count)),E[L-1].key=T.key,E[L-1].value=T.value;for(var s=E.length-2;s>=L;--s)T=E[s],E[s]=new e(T._color,T.key,T.value,T.left,E[s+1],T._count);E[L-1].left=E[L]}if(T=E[E.length-1],T._color===p){var z=E[E.length-2];z.left===T?z.left=null:z.right===T&&(z.right=null),E.pop();for(var s=0;s0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(o,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(o,"index",{get:function(){var y=0,E=this._stack;if(E.length===0){var T=this.tree.root;return T?T._count:0}else E[E.length-1].left&&(y=E[E.length-1].left._count);for(var s=E.length-2;s>=0;--s)E[s+1]===E[s].right&&(++y,E[s].left&&(y+=E[s].left._count));return y},enumerable:!0}),o.next=function(){var y=this._stack;if(y.length!==0){var E=y[y.length-1];if(E.right)for(E=E.right;E;)y.push(E),E=E.left;else for(y.pop();y.length>0&&y[y.length-1].right===E;)E=y[y.length-1],y.pop()}},Object.defineProperty(o,"hasNext",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].right)return!0;for(var E=y.length-1;E>0;--E)if(y[E-1].left===y[E])return!0;return!1}}),o.update=function(y){var E=this._stack;if(E.length===0)throw new Error("Can't update empty node!");var T=new Array(E.length),s=E[E.length-1];T[T.length-1]=new e(s._color,s.key,y,s.left,s.right,s._count);for(var L=E.length-2;L>=0;--L)s=E[L],s.left===E[L+1]?T[L]=new e(s._color,s.key,s.value,T[L+1],s.right,s._count):T[L]=new e(s._color,s.key,s.value,s.left,T[L+1],s._count);return new c(this.tree._compare,T[0])},o.prev=function(){var y=this._stack;if(y.length!==0){var E=y[y.length-1];if(E.left)for(E=E.left;E;)y.push(E),E=E.right;else for(y.pop();y.length>0&&y[y.length-1].left===E;)E=y[y.length-1],y.pop()}},Object.defineProperty(o,"hasPrev",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].left)return!0;for(var E=y.length-1;E>0;--E)if(y[E-1].right===y[E])return!0;return!1}});function A(y,E){return yE?1:0}function _(y){return new c(y||A,null)}},7453:function(v,p,r){v.exports=s;var e=r(9557),a=r(1681),n=r(1011),f=r(2864),c=r(8468),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function m(L,M){return L[0]=M[0],L[1]=M[1],L[2]=M[2],L}function h(L){this.gl=L,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=n(L)}var b=h.prototype;b.update=function(L){L=L||{};function M(it,ut,J){if(J in L){var X=L[J],tt=this[J],V;(it?Array.isArray(X)&&Array.isArray(X[0]):Array.isArray(X))?this[J]=V=[ut(X[0]),ut(X[1]),ut(X[2])]:this[J]=V=[ut(X),ut(X),ut(X)];for(var Q=0;Q<3;++Q)if(V[Q]!==tt[Q])return!0}return!1}var z=M.bind(this,!1,Number),D=M.bind(this,!1,Boolean),N=M.bind(this,!1,String),I=M.bind(this,!0,function(it){if(Array.isArray(it)){if(it.length===3)return[+it[0],+it[1],+it[2],1];if(it.length===4)return[+it[0],+it[1],+it[2],+it[3]]}return[0,0,0,1]}),k,B=!1,O=!1;if("bounds"in L)for(var H=L.bounds,Y=0;Y<2;++Y)for(var j=0;j<3;++j)H[Y][j]!==this.bounds[Y][j]&&(O=!0),this.bounds[Y][j]=H[Y][j];if("ticks"in L){k=L.ticks,B=!0,this.autoTicks=!1;for(var Y=0;Y<3;++Y)this.tickSpacing[Y]=0}else z("tickSpacing")&&(this.autoTicks=!0,O=!0);if(this._firstInit&&("ticks"in L||"tickSpacing"in L||(this.autoTicks=!0),O=!0,B=!0,this._firstInit=!1),O&&this.autoTicks&&(k=c.create(this.bounds,this.tickSpacing),B=!0),B){for(var Y=0;Y<3;++Y)k[Y].sort(function(ut,J){return ut.x-J.x});c.equal(k,this.ticks)?B=!1:this.ticks=k}D("tickEnable"),N("tickFont")&&(B=!0),z("tickSize"),z("tickAngle"),z("tickPad"),I("tickColor");var et=N("labels");N("labelFont")&&(et=!0),D("labelEnable"),z("labelSize"),z("labelPad"),I("labelColor"),D("lineEnable"),D("lineMirror"),z("lineWidth"),I("lineColor"),D("lineTickEnable"),D("lineTickMirror"),z("lineTickLength"),z("lineTickWidth"),I("lineTickColor"),D("gridEnable"),z("gridWidth"),I("gridColor"),D("zeroEnable"),I("zeroLineColor"),z("zeroLineWidth"),D("backgroundEnable"),I("backgroundColor"),this._text?this._text&&(et||B)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=e(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&B&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=a(this.gl,this.bounds,this.ticks))};function u(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var o=[new u,new u,new u];function d(L,M,z,D,N){for(var I=L.primalOffset,k=L.primalMinor,B=L.mirrorOffset,O=L.mirrorMinor,H=D[M],Y=0;Y<3;++Y)if(M!==Y){var j=I,et=B,it=k,ut=O;H&1<0?(it[Y]=-1,ut[Y]=0):(it[Y]=0,ut[Y]=1)}}var w=[0,0,0],A={model:l,view:l,projection:l,_ortho:!1};b.isOpaque=function(){return!0},b.isTransparent=function(){return!1},b.drawTransparent=function(L){};var _=0,y=[0,0,0],E=[0,0,0],T=[0,0,0];b.draw=function(L){L=L||A;for(var tt=this.gl,M=L.model||l,z=L.view||l,D=L.projection||l,N=this.bounds,I=L._ortho||!1,k=f(M,z,D,N,I),B=k.cubeEdges,O=k.axis,H=z[12],Y=z[13],j=z[14],et=z[15],it=I?2:1,ut=it*this.pixelRatio*(D[3]*H+D[7]*Y+D[11]*j+D[15]*et)/tt.drawingBufferHeight,J=0;J<3;++J)this.lastCubeProps.cubeEdges[J]=B[J],this.lastCubeProps.axis[J]=O[J];for(var X=o,J=0;J<3;++J)d(o[J],J,this.bounds,B,O);for(var tt=this.gl,V=w,J=0;J<3;++J)this.backgroundEnable[J]?V[J]=O[J]:V[J]=0;this._background.draw(M,z,D,N,V,this.backgroundColor),this._lines.bind(M,z,D,this);for(var J=0;J<3;++J){var Q=[0,0,0];O[J]>0?Q[J]=N[1][J]:Q[J]=N[0][J];for(var ot=0;ot<2;++ot){var $=(J+1+ot)%3,Z=(J+1+(ot^1))%3;this.gridEnable[$]&&this._lines.drawGrid($,Z,this.bounds,Q,this.gridColor[$],this.gridWidth[$]*this.pixelRatio)}for(var ot=0;ot<2;++ot){var $=(J+1+ot)%3,Z=(J+1+(ot^1))%3;this.zeroEnable[Z]&&Math.min(N[0][Z],N[1][Z])<=0&&Math.max(N[0][Z],N[1][Z])>=0&&this._lines.drawZero($,Z,this.bounds,Q,this.zeroLineColor[Z],this.zeroLineWidth[Z]*this.pixelRatio)}}for(var J=0;J<3;++J){this.lineEnable[J]&&this._lines.drawAxisLine(J,this.bounds,X[J].primalOffset,this.lineColor[J],this.lineWidth[J]*this.pixelRatio),this.lineMirror[J]&&this._lines.drawAxisLine(J,this.bounds,X[J].mirrorOffset,this.lineColor[J],this.lineWidth[J]*this.pixelRatio);for(var st=m(y,X[J].primalMinor),nt=m(E,X[J].mirrorMinor),ct=this.lineTickLength,ot=0;ot<3;++ot){var gt=ut/M[5*ot];st[ot]*=ct[ot]*gt,nt[ot]*=ct[ot]*gt}this.lineTickEnable[J]&&this._lines.drawAxisTicks(J,X[J].primalOffset,st,this.lineTickColor[J],this.lineTickWidth[J]*this.pixelRatio),this.lineTickMirror[J]&&this._lines.drawAxisTicks(J,X[J].mirrorOffset,nt,this.lineTickColor[J],this.lineTickWidth[J]*this.pixelRatio)}this._lines.unbind(),this._text.bind(M,z,D,this.pixelRatio);var Tt,wt=.5,Rt,bt;function At(Vt){bt=[0,0,0],bt[Vt]=1}function mt(Vt,It,re){var Kt=(Vt+1)%3,$t=(Vt+2)%3,le=It[Kt],he=It[$t],de=re[Kt],xe=re[$t];if(le>0&&xe>0){At(Kt);return}else if(le>0&&xe<0){At(Kt);return}else if(le<0&&xe>0){At(Kt);return}else if(le<0&&xe<0){At(Kt);return}else if(he>0&&de>0){At($t);return}else if(he>0&&de<0){At($t);return}else if(he<0&&de>0){At($t);return}else if(he<0&&de<0){At($t);return}}for(var J=0;J<3;++J){for(var Lt=X[J].primalMinor,Ht=X[J].mirrorMinor,Ut=m(T,X[J].primalOffset),ot=0;ot<3;++ot)this.lineTickEnable[J]&&(Ut[ot]+=ut*Lt[ot]*Math.max(this.lineTickLength[ot],0)/M[5*ot]);var kt=[0,0,0];if(kt[J]=1,this.tickEnable[J]){this.tickAngle[J]===-3600?(this.tickAngle[J]=0,this.tickAlign[J]="auto"):this.tickAlign[J]=-1,Rt=1,Tt=[this.tickAlign[J],wt,Rt],Tt[0]==="auto"?Tt[0]=_:Tt[0]=parseInt(""+Tt[0]),bt=[0,0,0],mt(J,Lt,Ht);for(var ot=0;ot<3;++ot)Ut[ot]+=ut*Lt[ot]*this.tickPad[ot]/M[5*ot];this._text.drawTicks(J,this.tickSize[J],this.tickAngle[J],Ut,this.tickColor[J],kt,bt,Tt)}if(this.labelEnable[J]){Rt=0,bt=[0,0,0],this.labels[J].length>4&&(At(J),Rt=1),Tt=[this.labelAlign[J],wt,Rt],Tt[0]==="auto"?Tt[0]=_:Tt[0]=parseInt(""+Tt[0]);for(var ot=0;ot<3;++ot)Ut[ot]+=ut*Lt[ot]*this.labelPad[ot]/M[5*ot];Ut[J]+=.5*(N[0][J]+N[1][J]),this._text.drawLabel(J,this.labelSize[J],this.labelAngle[J],Ut,this.labelColor[J],[0,0,0],bt,Tt)}}this._text.unbind()},b.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function s(L,M){var z=new h(L);return z.update(M),z}},1011:function(v,p,r){v.exports=l;var e=r(5827),a=r(2944),n=r(1943).bg;function f(m,h,b,u){this.gl=m,this.buffer=h,this.vao=b,this.shader=u}var c=f.prototype;c.draw=function(m,h,b,u,o,d){for(var w=!1,A=0;A<3;++A)w=w||o[A];if(w){var _=this.gl;_.enable(_.POLYGON_OFFSET_FILL),_.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:h,projection:b,bounds:u,enable:o,colors:d},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),_.disable(_.POLYGON_OFFSET_FILL)}},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function l(m){for(var h=[],b=[],u=0,o=0;o<3;++o)for(var d=(o+1)%3,w=(o+2)%3,A=[0,0,0],_=[0,0,0],y=-1;y<=1;y+=2){b.push(u,u+2,u+1,u+1,u+2,u+3),A[o]=y,_[o]=y;for(var E=-1;E<=1;E+=2){A[d]=E;for(var T=-1;T<=1;T+=2)A[w]=T,h.push(A[0],A[1],A[2],_[0],_[1],_[2]),u+=1}var s=d;d=w,w=s}var L=e(m,new Float32Array(h)),M=e(m,new Uint16Array(b),m.ELEMENT_ARRAY_BUFFER),z=a(m,[{buffer:L,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:L,type:m.FLOAT,size:3,offset:12,stride:24}],M),D=n(m);return D.attributes.position.location=0,D.attributes.normal.location=1,new f(m,L,z,D)}},2864:function(v,p,r){v.exports=y;var e=r(2288),a=r(104),n=r(4670),f=r(417),c=new Array(16),l=new Array(8),m=new Array(8),h=new Array(3),b=[0,0,0];(function(){for(var E=0;E<8;++E)l[E]=[1,1,1,1],m[E]=[1,1,1]})();function u(E,T,s){for(var L=0;L<4;++L){E[L]=s[12+L];for(var M=0;M<3;++M)E[L]+=T[M]*s[4*M+L]}}var o=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function d(E){for(var T=0;Tet&&(k|=1<et){k|=1<m[D][1])&&(ot=D);for(var $=-1,D=0;D<3;++D){var Z=ot^1<m[st][0]&&(st=Z)}}var nt=w;nt[0]=nt[1]=nt[2]=0,nt[e.log2($^ot)]=ot&$,nt[e.log2(ot^st)]=ot&st;var ct=st^7;ct===k||ct===Q?(ct=$^7,nt[e.log2(st^ct)]=ct&st):nt[e.log2($^ct)]=ct&$;for(var gt=A,Tt=k,H=0;H<3;++H)Tt&1<=0;--Z){var se=ee[$[Z]];T.push(X*se[0],-X*se[1],O)}}for(var L=[0,0,0],M=[0,0,0],z=[0,0,0],D=[0,0,0],N=1.25,I={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},k=0;k<3;++k){z[k]=T.length/m|0,s(.5*(w[0][k]+w[1][k]),A[k],_[k],12,N,I),D[k]=(T.length/m|0)-z[k],L[k]=T.length/m|0;for(var B=0;B=0&&(m=c.length-l-1);var h=Math.pow(10,m),b=Math.round(n*f*h),u=b+"";if(u.indexOf("e")>=0)return u;var o=b/h,d=b%h;b<0?(o=-Math.ceil(o)|0,d=-d|0):(o=Math.floor(o)|0,d=d|0);var w=""+o;if(b<0&&(w="-"+w),m){for(var A=""+d;A.length=n[0][l];--h)m.push({x:h*f[l],text:r(f[l],h)});c.push(m)}return c}function a(n,f){for(var c=0;c<3;++c){if(n[c].length!==f[c].length)return!1;for(var l=0;lw)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return o.bufferSubData(d,y,_),w}function h(o,d){for(var w=t.malloc(o.length,d),A=o.length,_=0;_=0;--A){if(d[A]!==w)return!1;w*=o[A]}return!0}l.update=function(o,d){if(typeof d!="number"&&(d=-1),this.bind(),typeof o=="object"&&typeof o.shape<"u"){var w=o.dtype;if(f.indexOf(w)<0&&(w="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&w!=="uint16"?w="uint32":w="uint16"}if(w===o.dtype&&b(o.shape,o.stride))o.offset===0&&o.data.length===o.shape[0]?this.length=m(this.gl,this.type,this.length,this.usage,o.data,d):this.length=m(this.gl,this.type,this.length,this.usage,o.data.subarray(o.offset,o.shape[0]),d);else{var _=t.malloc(o.size,w),y=n(_,o.shape);a.assign(y,o),d<0?this.length=m(this.gl,this.type,this.length,this.usage,_,d):this.length=m(this.gl,this.type,this.length,this.usage,_.subarray(0,o.size),d),t.free(_)}}else if(Array.isArray(o)){var E;this.type===this.gl.ELEMENT_ARRAY_BUFFER?E=h(o,"uint16"):E=h(o,"float32"),d<0?this.length=m(this.gl,this.type,this.length,this.usage,E,d):this.length=m(this.gl,this.type,this.length,this.usage,E.subarray(0,o.length),d),t.free(E)}else if(typeof o=="object"&&typeof o.length=="number")this.length=m(this.gl,this.type,this.length,this.usage,o,d);else if(typeof o=="number"||o===void 0){if(d>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");o=o|0,o<=0&&(o=1),this.gl.bufferData(this.type,o|0,this.usage),this.length=o}else throw new Error("gl-buffer: Invalid data type")};function u(o,d,w,A){if(w=w||o.ARRAY_BUFFER,A=A||o.DYNAMIC_DRAW,w!==o.ARRAY_BUFFER&&w!==o.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(A!==o.DYNAMIC_DRAW&&A!==o.STATIC_DRAW&&A!==o.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var _=o.createBuffer(),y=new c(o,w,_,0,A);return y.update(d),y}v.exports=u},1140:function(v,p,r){var t=r(2858);v.exports=function(n,f){var c=n.positions,l=n.vectors,m={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return f&&(f[0]=[0,0,0],f[1]=[0,0,0]),m;for(var h=0,b=1/0,u=-1/0,o=1/0,d=-1/0,w=1/0,A=-1/0,_=null,y=null,E=[],T=1/0,s=!1,L=0;Lh&&(h=t.length(z)),L){var D=2*t.distance(_,M)/(t.length(y)+t.length(z));D?(T=Math.min(T,D),s=!1):s=!0}s||(_=M,y=z),E.push(z)}var N=[b,o,w],I=[u,d,A];f&&(f[0]=N,f[1]=I),h===0&&(h=1);var k=1/h;isFinite(T)||(T=1),m.vectorScale=T;var B=n.coneSize||.5;n.absoluteConeSize&&(B=n.absoluteConeSize*k),m.coneScale=B;for(var L=0,O=0;L=1},o.isTransparent=function(){return this.opacity<1},o.pickSlots=1,o.setPickBase=function(E){this.pickId=E};function d(E){for(var T=h({colormap:E,nshades:256,format:"rgba"}),s=new Uint8Array(256*4),L=0;L<256;++L){for(var M=T[L],z=0;z<3;++z)s[4*L+z]=M[z];s[4*L+3]=M[3]*255}return m(s,[256,256,4],[4,0,1])}function w(E){for(var T=E.length,s=new Array(T),L=0;L0){var V=this.triShader;V.bind(),V.uniforms=N,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},o.drawPick=function(E){E=E||{};for(var T=this.gl,s=E.model||b,L=E.view||b,M=E.projection||b,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)z[0][D]=Math.max(z[0][D],this.clipBounds[0][D]),z[1][D]=Math.min(z[1][D],this.clipBounds[1][D]);this._model=[].slice.call(s),this._view=[].slice.call(L),this._projection=[].slice.call(M),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var N={model:s,view:L,projection:M,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},I=this.pickShader;I.bind(),I.uniforms=N,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},o.pick=function(E){if(!E||E.id!==this.pickId)return null;var T=E.value[0]+256*E.value[1]+65536*E.value[2],s=this.cells[T],L=this.positions[s[1]].slice(0,3),M={position:L,dataCoordinate:L,index:Math.floor(s[1]/48)};return this.traceType==="cone"?M.index=Math.floor(s[1]/48):this.traceType==="streamtube"&&(M.intensity=this.intensity[s[1]],M.velocity=this.vectors[s[1]].slice(0,3),M.divergence=this.vectors[s[1]][3],M.index=T),M},o.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function A(E,T){var s=t(E,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return s.attributes.position.location=0,s.attributes.color.location=2,s.attributes.uv.location=3,s.attributes.vector.location=4,s}function _(E,T){var s=t(E,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return s.attributes.position.location=0,s.attributes.id.location=1,s.attributes.vector.location=4,s}function y(E,T,s){var L=s.shaders;arguments.length===1&&(T=E,E=T.gl);var M=A(E,L),z=_(E,L),D=f(E,m(new Uint8Array([255,255,255,255]),[1,1,4]));D.generateMipmap(),D.minFilter=E.LINEAR_MIPMAP_LINEAR,D.magFilter=E.LINEAR;var N=a(E),I=a(E),k=a(E),B=a(E),O=a(E),V=n(E,[{buffer:N,type:E.FLOAT,size:4},{buffer:O,type:E.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:k,type:E.FLOAT,size:4},{buffer:B,type:E.FLOAT,size:2},{buffer:I,type:E.FLOAT,size:4}]),Y=new u(E,D,M,z,N,I,O,k,B,V,s.traceType||"cone");return Y.update(T),Y}v.exports=y},7234:function(v,p,r){var t=r(6832),a=t([`precision highp float; +}`]);p.bg=function(b){return a(b,m,h,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(v,p,r){v.exports=d;var e=r(5827),a=r(2944),n=r(875),f=r(1943).f,c=window||g.global||{},l=c.__TEXT_CACHE||{};c.__TEXT_CACHE={};var m=3;function h(w,A,_,y){this.gl=w,this.shader=A,this.buffer=_,this.vao=y,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var b=h.prototype,u=[0,0];b.bind=function(w,A,_,y){this.vao.bind(),this.shader.bind();var E=this.shader.uniforms;E.model=w,E.view=A,E.projection=_,E.pixelScale=y,u[0]=this.gl.drawingBufferWidth,u[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=u},b.unbind=function(){this.vao.unbind()},b.update=function(w,A,_,y,E){var T=[];function s(O,H,Y,j,et,it){var ut=l[Y];ut||(ut=l[Y]={});var J=ut[H];J||(J=ut[H]=o(H,{triangles:!0,font:Y,textAlign:"center",textBaseline:"middle",lineSpacing:et,styletags:it}));for(var X=(j||12)/12,tt=J.positions,V=J.cells,Q=0,ot=V.length;Q=0;--Z){var st=tt[$[Z]];T.push(X*st[0],-X*st[1],O)}}for(var L=[0,0,0],M=[0,0,0],z=[0,0,0],D=[0,0,0],N=1.25,I={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},k=0;k<3;++k){z[k]=T.length/m|0,s(.5*(w[0][k]+w[1][k]),A[k],_[k],12,N,I),D[k]=(T.length/m|0)-z[k],L[k]=T.length/m|0;for(var B=0;B=0&&(m=c.length-l-1);var h=Math.pow(10,m),b=Math.round(n*f*h),u=b+"";if(u.indexOf("e")>=0)return u;var o=b/h,d=b%h;b<0?(o=-Math.ceil(o)|0,d=-d|0):(o=Math.floor(o)|0,d=d|0);var w=""+o;if(b<0&&(w="-"+w),m){for(var A=""+d;A.length=n[0][l];--h)m.push({x:h*f[l],text:r(f[l],h)});c.push(m)}return c}function a(n,f){for(var c=0;c<3;++c){if(n[c].length!==f[c].length)return!1;for(var l=0;lw)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return o.bufferSubData(d,y,_),w}function h(o,d){for(var w=e.malloc(o.length,d),A=o.length,_=0;_=0;--A){if(d[A]!==w)return!1;w*=o[A]}return!0}l.update=function(o,d){if(typeof d!="number"&&(d=-1),this.bind(),typeof o=="object"&&typeof o.shape<"u"){var w=o.dtype;if(f.indexOf(w)<0&&(w="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&w!=="uint16"?w="uint32":w="uint16"}if(w===o.dtype&&b(o.shape,o.stride))o.offset===0&&o.data.length===o.shape[0]?this.length=m(this.gl,this.type,this.length,this.usage,o.data,d):this.length=m(this.gl,this.type,this.length,this.usage,o.data.subarray(o.offset,o.shape[0]),d);else{var _=e.malloc(o.size,w),y=n(_,o.shape);a.assign(y,o),d<0?this.length=m(this.gl,this.type,this.length,this.usage,_,d):this.length=m(this.gl,this.type,this.length,this.usage,_.subarray(0,o.size),d),e.free(_)}}else if(Array.isArray(o)){var E;this.type===this.gl.ELEMENT_ARRAY_BUFFER?E=h(o,"uint16"):E=h(o,"float32"),d<0?this.length=m(this.gl,this.type,this.length,this.usage,E,d):this.length=m(this.gl,this.type,this.length,this.usage,E.subarray(0,o.length),d),e.free(E)}else if(typeof o=="object"&&typeof o.length=="number")this.length=m(this.gl,this.type,this.length,this.usage,o,d);else if(typeof o=="number"||o===void 0){if(d>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");o=o|0,o<=0&&(o=1),this.gl.bufferData(this.type,o|0,this.usage),this.length=o}else throw new Error("gl-buffer: Invalid data type")};function u(o,d,w,A){if(w=w||o.ARRAY_BUFFER,A=A||o.DYNAMIC_DRAW,w!==o.ARRAY_BUFFER&&w!==o.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(A!==o.DYNAMIC_DRAW&&A!==o.STATIC_DRAW&&A!==o.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var _=o.createBuffer(),y=new c(o,w,_,0,A);return y.update(d),y}v.exports=u},1140:function(v,p,r){var e=r(2858);v.exports=function(n,f){var c=n.positions,l=n.vectors,m={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return f&&(f[0]=[0,0,0],f[1]=[0,0,0]),m;for(var h=0,b=1/0,u=-1/0,o=1/0,d=-1/0,w=1/0,A=-1/0,_=null,y=null,E=[],T=1/0,s=!1,L=0;Lh&&(h=e.length(z)),L){var D=2*e.distance(_,M)/(e.length(y)+e.length(z));D?(T=Math.min(T,D),s=!1):s=!0}s||(_=M,y=z),E.push(z)}var N=[b,o,w],I=[u,d,A];f&&(f[0]=N,f[1]=I),h===0&&(h=1);var k=1/h;isFinite(T)||(T=1),m.vectorScale=T;var B=n.coneSize||.5;n.absoluteConeSize&&(B=n.absoluteConeSize*k),m.coneScale=B;for(var L=0,O=0;L=1},o.isTransparent=function(){return this.opacity<1},o.pickSlots=1,o.setPickBase=function(E){this.pickId=E};function d(E){for(var T=h({colormap:E,nshades:256,format:"rgba"}),s=new Uint8Array(256*4),L=0;L<256;++L){for(var M=T[L],z=0;z<3;++z)s[4*L+z]=M[z];s[4*L+3]=M[3]*255}return m(s,[256,256,4],[4,0,1])}function w(E){for(var T=E.length,s=new Array(T),L=0;L0){var H=this.triShader;H.bind(),H.uniforms=N,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},o.drawPick=function(E){E=E||{};for(var T=this.gl,s=E.model||b,L=E.view||b,M=E.projection||b,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)z[0][D]=Math.max(z[0][D],this.clipBounds[0][D]),z[1][D]=Math.min(z[1][D],this.clipBounds[1][D]);this._model=[].slice.call(s),this._view=[].slice.call(L),this._projection=[].slice.call(M),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var N={model:s,view:L,projection:M,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},I=this.pickShader;I.bind(),I.uniforms=N,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},o.pick=function(E){if(!E||E.id!==this.pickId)return null;var T=E.value[0]+256*E.value[1]+65536*E.value[2],s=this.cells[T],L=this.positions[s[1]].slice(0,3),M={position:L,dataCoordinate:L,index:Math.floor(s[1]/48)};return this.traceType==="cone"?M.index=Math.floor(s[1]/48):this.traceType==="streamtube"&&(M.intensity=this.intensity[s[1]],M.velocity=this.vectors[s[1]].slice(0,3),M.divergence=this.vectors[s[1]][3],M.index=T),M},o.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function A(E,T){var s=e(E,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return s.attributes.position.location=0,s.attributes.color.location=2,s.attributes.uv.location=3,s.attributes.vector.location=4,s}function _(E,T){var s=e(E,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return s.attributes.position.location=0,s.attributes.id.location=1,s.attributes.vector.location=4,s}function y(E,T,s){var L=s.shaders;arguments.length===1&&(T=E,E=T.gl);var M=A(E,L),z=_(E,L),D=f(E,m(new Uint8Array([255,255,255,255]),[1,1,4]));D.generateMipmap(),D.minFilter=E.LINEAR_MIPMAP_LINEAR,D.magFilter=E.LINEAR;var N=a(E),I=a(E),k=a(E),B=a(E),O=a(E),H=n(E,[{buffer:N,type:E.FLOAT,size:4},{buffer:O,type:E.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:k,type:E.FLOAT,size:4},{buffer:B,type:E.FLOAT,size:2},{buffer:I,type:E.FLOAT,size:4}]),Y=new u(E,D,M,z,N,I,O,k,B,H,s.traceType||"cone");return Y.update(T),Y}v.exports=y},7234:function(v,p,r){var e=r(6832),a=e([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -4573,7 +4573,7 @@ void main() { f_position = position.xyz; f_uv = uv; } -`]),n=t([`#extension GL_OES_standard_derivatives : enable +`]),n=e([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 @@ -4664,7 +4664,7 @@ void main() { gl_FragColor = litColor * opacity; } -`]),f=t([`precision highp float; +`]),f=e([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -4763,7 +4763,7 @@ void main() { f_id = id; f_position = position.xyz; } -`]),c=t([`precision highp float; +`]),c=e([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -4796,7 +4796,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);p.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},p.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(v){v.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},6603:function(v,p,r){var t=r(1950);v.exports=function(n){return t[n]}},3110:function(v,p,r){v.exports=u;var t=r(5827),a=r(2944),n=r(7667),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(o,d,w,A){this.gl=o,this.shader=A,this.buffer=d,this.vao=w,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=c.prototype;l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(o){var d=this.gl,w=this.shader.uniforms;this.shader.bind();var A=w.view=o.view||f,_=w.projection=o.projection||f;w.model=o.model||f,w.clipBounds=this.clipBounds,w.opacity=this.opacity;var y=A[12],E=A[13],T=A[14],s=A[15],L=o._ortho||!1,M=L?2:1,z=M*this.pixelRatio*(_[3]*y+_[7]*E+_[11]*T+_[15]*s)/d.drawingBufferHeight;this.vao.bind();for(var D=0;D<3;++D)d.lineWidth(this.lineWidth[D]*this.pixelRatio),w.capSize=this.capSize[D]*z,this.lineCount[D]&&d.drawArrays(d.LINES,this.lineOffset[D],this.lineCount[D]);this.vao.unbind()};function m(o,d){for(var w=0;w<3;++w)o[0][w]=Math.min(o[0][w],d[w]),o[1][w]=Math.max(o[1][w],d[w])}var h=function(){for(var o=new Array(3),d=0;d<3;++d){for(var w=[],A=1;A<=2;++A)for(var _=-1;_<=1;_+=2){var y=(A+d)%3,E=[0,0,0];E[y]=_,w.push(E)}o[d]=w}return o}();function b(o,d,w,A){for(var _=h[A],y=0;y<_.length;++y){var E=_[y];o.push(d[0],d[1],d[2],w[0],w[1],w[2],w[3],E[0],E[1],E[2])}return _.length}l.update=function(o){o=o||{},"lineWidth"in o&&(this.lineWidth=o.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in o&&(this.capSize=o.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in o&&(this.opacity=+o.opacity,this.opacity<1&&(this.hasAlpha=!0));var d=o.color||[[0,0,0],[0,0,0],[0,0,0]],w=o.position,A=o.error;if(Array.isArray(d[0])||(d=[d,d,d]),w&&A){var _=[],y=w.length,E=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var T=0;T<3;++T){this.lineOffset[T]=E;e:for(var s=0;s0){var N=L.slice();N[T]+=z[1][T],_.push(L[0],L[1],L[2],D[0],D[1],D[2],D[3],0,0,0,N[0],N[1],N[2],D[0],D[1],D[2],D[3],0,0,0),m(this.bounds,N),E+=2+b(_,N,D,T)}}}this.lineCount[T]=E-this.lineOffset[T]}this.buffer.update(_)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function u(o){var d=o.gl,w=t(d),A=a(d,[{buffer:w,type:d.FLOAT,size:3,offset:0,stride:40},{buffer:w,type:d.FLOAT,size:4,offset:12,stride:40},{buffer:w,type:d.FLOAT,size:3,offset:28,stride:40}]),_=n(d);_.attributes.position.location=0,_.attributes.color.location=1,_.attributes.offset.location=2;var y=new c(d,w,A,_);return y.update(o),y}},7667:function(v,p,r){var t=r(6832),a=r(5158),n=t([`precision highp float; +}`]);p.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},p.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(v){v.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},6603:function(v,p,r){var e=r(1950);v.exports=function(n){return e[n]}},3110:function(v,p,r){v.exports=u;var e=r(5827),a=r(2944),n=r(7667),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function c(o,d,w,A){this.gl=o,this.shader=A,this.buffer=d,this.vao=w,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=c.prototype;l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(o){var d=this.gl,w=this.shader.uniforms;this.shader.bind();var A=w.view=o.view||f,_=w.projection=o.projection||f;w.model=o.model||f,w.clipBounds=this.clipBounds,w.opacity=this.opacity;var y=A[12],E=A[13],T=A[14],s=A[15],L=o._ortho||!1,M=L?2:1,z=M*this.pixelRatio*(_[3]*y+_[7]*E+_[11]*T+_[15]*s)/d.drawingBufferHeight;this.vao.bind();for(var D=0;D<3;++D)d.lineWidth(this.lineWidth[D]*this.pixelRatio),w.capSize=this.capSize[D]*z,this.lineCount[D]&&d.drawArrays(d.LINES,this.lineOffset[D],this.lineCount[D]);this.vao.unbind()};function m(o,d){for(var w=0;w<3;++w)o[0][w]=Math.min(o[0][w],d[w]),o[1][w]=Math.max(o[1][w],d[w])}var h=function(){for(var o=new Array(3),d=0;d<3;++d){for(var w=[],A=1;A<=2;++A)for(var _=-1;_<=1;_+=2){var y=(A+d)%3,E=[0,0,0];E[y]=_,w.push(E)}o[d]=w}return o}();function b(o,d,w,A){for(var _=h[A],y=0;y<_.length;++y){var E=_[y];o.push(d[0],d[1],d[2],w[0],w[1],w[2],w[3],E[0],E[1],E[2])}return _.length}l.update=function(o){o=o||{},"lineWidth"in o&&(this.lineWidth=o.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in o&&(this.capSize=o.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in o&&(this.opacity=+o.opacity,this.opacity<1&&(this.hasAlpha=!0));var d=o.color||[[0,0,0],[0,0,0],[0,0,0]],w=o.position,A=o.error;if(Array.isArray(d[0])||(d=[d,d,d]),w&&A){var _=[],y=w.length,E=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var T=0;T<3;++T){this.lineOffset[T]=E;t:for(var s=0;s0){var N=L.slice();N[T]+=z[1][T],_.push(L[0],L[1],L[2],D[0],D[1],D[2],D[3],0,0,0,N[0],N[1],N[2],D[0],D[1],D[2],D[3],0,0,0),m(this.bounds,N),E+=2+b(_,N,D,T)}}}this.lineCount[T]=E-this.lineOffset[T]}this.buffer.update(_)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function u(o){var d=o.gl,w=e(d),A=a(d,[{buffer:w,type:d.FLOAT,size:3,offset:0,stride:40},{buffer:w,type:d.FLOAT,size:4,offset:12,stride:40},{buffer:w,type:d.FLOAT,size:3,offset:28,stride:40}]),_=n(d);_.attributes.position.location=0,_.attributes.color.location=1,_.attributes.offset.location=2;var y=new c(d,w,A,_);return y.update(o),y}},7667:function(v,p,r){var e=r(6832),a=r(5158),n=e([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -4812,7 +4812,7 @@ void main() { gl_Position = projection * view * worldPosition; fragColor = color; fragPosition = position; -}`]),f=t([`precision highp float; +}`]),f=e([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -4847,19 +4847,19 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);v.exports=function(c){return a(c,n,f,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(v,p,r){var t=r(8931);v.exports=E;var a=null,n,f,c,l;function m(T){var s=T.getParameter(T.FRAMEBUFFER_BINDING),L=T.getParameter(T.RENDERBUFFER_BINDING),M=T.getParameter(T.TEXTURE_BINDING_2D);return[s,L,M]}function h(T,s){T.bindFramebuffer(T.FRAMEBUFFER,s[0]),T.bindRenderbuffer(T.RENDERBUFFER,s[1]),T.bindTexture(T.TEXTURE_2D,s[2])}function b(T,s){var L=T.getParameter(s.MAX_COLOR_ATTACHMENTS_WEBGL);a=new Array(L+1);for(var M=0;M<=L;++M){for(var z=new Array(L),D=0;D1&&I.drawBuffersWEBGL(a[N]);var Y=L.getExtension("WEBGL_depth_texture");Y?k?T.depth=o(L,z,D,Y.UNSIGNED_INT_24_8_WEBGL,L.DEPTH_STENCIL,L.DEPTH_STENCIL_ATTACHMENT):B&&(T.depth=o(L,z,D,L.UNSIGNED_SHORT,L.DEPTH_COMPONENT,L.DEPTH_ATTACHMENT)):B&&k?T._depth_rb=d(L,z,D,L.DEPTH_STENCIL,L.DEPTH_STENCIL_ATTACHMENT):B?T._depth_rb=d(L,z,D,L.DEPTH_COMPONENT16,L.DEPTH_ATTACHMENT):k&&(T._depth_rb=d(L,z,D,L.STENCIL_INDEX,L.STENCIL_ATTACHMENT));var j=L.checkFramebufferStatus(L.FRAMEBUFFER);if(j!==L.FRAMEBUFFER_COMPLETE){T._destroyed=!0,L.bindFramebuffer(L.FRAMEBUFFER,null),L.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(L.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var V=0;Vz||L<0||L>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=s,T._shape[1]=L;for(var D=m(M),N=0;ND||L<0||L>D)throw new Error("gl-fbo: Parameters are too large for FBO");M=M||{};var N=1;if("color"in M){if(N=Math.max(M.color|0,0),N<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(N>1)if(z){if(N>T.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+N+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var I=T.UNSIGNED_BYTE,k=T.getExtension("OES_texture_float");if(M.float&&N>0){if(!k)throw new Error("gl-fbo: Context does not support floating point textures");I=T.FLOAT}else M.preferFloat&&N>0&&k&&(I=T.FLOAT);var B=!0;"depth"in M&&(B=!!M.depth);var O=!1;return"stencil"in M&&(O=!!M.stencil),new A(T,s,L,I,N,B,O,z)}},3530:function(v,p,r){var t=r(8974).sprintf,a=r(6603),n=r(9365),f=r(8008);v.exports=c;function c(l,m,h){var b=n(m)||"of unknown name (see npm glsl-shader-name)",u="unknown type";h!==void 0&&(u=h===a.FRAGMENT_SHADER?"fragment":"vertex");for(var o=t(`Error compiling %s shader %s: -`,u,b),d=t("%s%s",o,l),w=l.split(` -`),A={},_=0;_1&&I.drawBuffersWEBGL(a[N]);var Y=L.getExtension("WEBGL_depth_texture");Y?k?T.depth=o(L,z,D,Y.UNSIGNED_INT_24_8_WEBGL,L.DEPTH_STENCIL,L.DEPTH_STENCIL_ATTACHMENT):B&&(T.depth=o(L,z,D,L.UNSIGNED_SHORT,L.DEPTH_COMPONENT,L.DEPTH_ATTACHMENT)):B&&k?T._depth_rb=d(L,z,D,L.DEPTH_STENCIL,L.DEPTH_STENCIL_ATTACHMENT):B?T._depth_rb=d(L,z,D,L.DEPTH_COMPONENT16,L.DEPTH_ATTACHMENT):k&&(T._depth_rb=d(L,z,D,L.STENCIL_INDEX,L.STENCIL_ATTACHMENT));var j=L.checkFramebufferStatus(L.FRAMEBUFFER);if(j!==L.FRAMEBUFFER_COMPLETE){T._destroyed=!0,L.bindFramebuffer(L.FRAMEBUFFER,null),L.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(L.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var H=0;Hz||L<0||L>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=s,T._shape[1]=L;for(var D=m(M),N=0;ND||L<0||L>D)throw new Error("gl-fbo: Parameters are too large for FBO");M=M||{};var N=1;if("color"in M){if(N=Math.max(M.color|0,0),N<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(N>1)if(z){if(N>T.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+N+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var I=T.UNSIGNED_BYTE,k=T.getExtension("OES_texture_float");if(M.float&&N>0){if(!k)throw new Error("gl-fbo: Context does not support floating point textures");I=T.FLOAT}else M.preferFloat&&N>0&&k&&(I=T.FLOAT);var B=!0;"depth"in M&&(B=!!M.depth);var O=!1;return"stencil"in M&&(O=!!M.stencil),new A(T,s,L,I,N,B,O,z)}},3530:function(v,p,r){var e=r(8974).sprintf,a=r(6603),n=r(9365),f=r(8008);v.exports=c;function c(l,m,h){var b=n(m)||"of unknown name (see npm glsl-shader-name)",u="unknown type";h!==void 0&&(u=h===a.FRAGMENT_SHADER?"fragment":"vertex");for(var o=e(`Error compiling %s shader %s: +`,u,b),d=e("%s%s",o,l),w=l.split(` +`),A={},_=0;_>N*8&255;this.pickOffset=w,_.bind();var I=_.uniforms;I.viewTransform=o,I.pickOffset=d,I.shape=this.shape;var k=_.attributes;return this.positionBuffer.bind(),k.position.pointer(),this.weightBuffer.bind(),k.weight.pointer(T.UNSIGNED_BYTE,!1),this.idBuffer.bind(),k.pickId.pointer(T.UNSIGNED_BYTE,!1),T.drawArrays(T.TRIANGLES,0,E),w+this.shape[0]*this.shape[1]}}}(),h.pick=function(o,d,w){var A=this.pickOffset,_=this.shape[0]*this.shape[1];if(w=A+_)return null;var y=w-A,E=this.xData,T=this.yData;return{object:this,pointId:y,dataCoord:[E[y%this.shape[0]],T[y/this.shape[0]|0]]}},h.update=function(o){o=o||{};var d=o.shape||[0,0],w=o.x||a(d[0]),A=o.y||a(d[1]),_=o.z||new Float32Array(d[0]*d[1]),y=o.zsmooth!==!1;this.xData=w,this.yData=A;var E=o.colorLevels||[0],T=o.colorValues||[0,0,0,1],s=E.length,L=this.bounds,M,z,D,N;y?(M=L[0]=w[0],z=L[1]=A[0],D=L[2]=w[w.length-1],N=L[3]=A[A.length-1]):(M=L[0]=w[0]+(w[1]-w[0])/2,z=L[1]=A[0]+(A[1]-A[0])/2,D=L[2]=w[w.length-1]+(w[w.length-1]-w[w.length-2])/2,N=L[3]=A[A.length-1]+(A[A.length-1]-A[A.length-2])/2);var I=1/(D-M),k=1/(N-z),B=d[0],O=d[1];this.shape=[B,O];var V=(y?(B-1)*(O-1):B*O)*(b.length>>>1);this.numVertices=V;for(var Y=n.mallocUint8(V*4),j=n.mallocFloat32(V*2),te=n.mallocUint8(V*2),ie=n.mallocUint32(V),ue=0,J=y?B-1:B,X=y?O-1:O,ee=0;ee>N*8&255;this.pickOffset=w,_.bind();var I=_.uniforms;I.viewTransform=o,I.pickOffset=d,I.shape=this.shape;var k=_.attributes;return this.positionBuffer.bind(),k.position.pointer(),this.weightBuffer.bind(),k.weight.pointer(T.UNSIGNED_BYTE,!1),this.idBuffer.bind(),k.pickId.pointer(T.UNSIGNED_BYTE,!1),T.drawArrays(T.TRIANGLES,0,E),w+this.shape[0]*this.shape[1]}}}(),h.pick=function(o,d,w){var A=this.pickOffset,_=this.shape[0]*this.shape[1];if(w=A+_)return null;var y=w-A,E=this.xData,T=this.yData;return{object:this,pointId:y,dataCoord:[E[y%this.shape[0]],T[y/this.shape[0]|0]]}},h.update=function(o){o=o||{};var d=o.shape||[0,0],w=o.x||a(d[0]),A=o.y||a(d[1]),_=o.z||new Float32Array(d[0]*d[1]),y=o.zsmooth!==!1;this.xData=w,this.yData=A;var E=o.colorLevels||[0],T=o.colorValues||[0,0,0,1],s=E.length,L=this.bounds,M,z,D,N;y?(M=L[0]=w[0],z=L[1]=A[0],D=L[2]=w[w.length-1],N=L[3]=A[A.length-1]):(M=L[0]=w[0]+(w[1]-w[0])/2,z=L[1]=A[0]+(A[1]-A[0])/2,D=L[2]=w[w.length-1]+(w[w.length-1]-w[w.length-2])/2,N=L[3]=A[A.length-1]+(A[A.length-1]-A[A.length-2])/2);var I=1/(D-M),k=1/(N-z),B=d[0],O=d[1];this.shape=[B,O];var H=(y?(B-1)*(O-1):B*O)*(b.length>>>1);this.numVertices=H;for(var Y=n.mallocUint8(H*4),j=n.mallocFloat32(H*2),et=n.mallocUint8(H*2),it=n.mallocUint32(H),ut=0,J=y?B-1:B,X=y?O-1:O,tt=0;tt0){for(var J=0;J<24;++J)D.push(D[D.length-12]);B+=2,te=!0}continue e}O[0][M]=Math.min(O[0][M],ie[M],ue[M]),O[1][M]=Math.max(O[1][M],ie[M],ue[M])}var X,ee;Array.isArray(Y[0])?(X=Y.length>L-1?Y[L-1]:Y.length>0?Y[Y.length-1]:[0,0,0,1],ee=Y.length>L?Y[L]:Y.length>0?Y[Y.length-1]:[0,0,0,1]):X=ee=Y,X.length===3&&(X=[X[0],X[1],X[2],1]),ee.length===3&&(ee=[ee[0],ee[1],ee[2],1]),!this.hasAlpha&&X[3]<1&&(this.hasAlpha=!0);var G;Array.isArray(j)?G=j.length>L-1?j[L-1]:j.length>0?j[j.length-1]:[0,0,0,1]:G=j;var Q=k;if(k+=w(ie,ue),te){for(M=0;M<2;++M)D.push(ie[0],ie[1],ie[2],ue[0],ue[1],ue[2],Q,G,X[0],X[1],X[2],X[3]);B+=2,te=!1}D.push(ie[0],ie[1],ie[2],ue[0],ue[1],ue[2],Q,G,X[0],X[1],X[2],X[3],ie[0],ie[1],ie[2],ue[0],ue[1],ue[2],Q,-G,X[0],X[1],X[2],X[3],ue[0],ue[1],ue[2],ie[0],ie[1],ie[2],k,-G,ee[0],ee[1],ee[2],ee[3],ue[0],ue[1],ue[2],ie[0],ie[1],ie[2],k,G,ee[0],ee[1],ee[2],ee[3]),B+=4}}if(this.buffer.update(D),N.push(k),I.push(V[V.length-1].slice()),this.bounds=O,this.vertexCount=B,this.points=I,this.arcLength=N,"dashes"in s){var oe=s.dashes,$=oe.slice();for($.unshift(0),L=1;L<$.length;++L)$[L]=$[L-1]+$[L];var Z=h(new Array(256*4),[256,1,4]);for(L=0;L<256;++L){for(M=0;M<4;++M)Z.set(L,0,M,0);m.le($,$[$.length-1]*L/255)&1?Z.set(L,0,0,0):Z.set(L,0,0,255)}this.texture.setPixels(Z)}},E.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},E.pick=function(s){if(!s||s.id!==this.pickId)return null;var L=l(s.value[0],s.value[1],s.value[2],0),M=m.le(this.arcLength,L);if(M<0)return null;if(M===this.arcLength.length-1)return new _(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),M);for(var z=this.points[M],D=this.points[Math.min(M+1,this.points.length-1)],N=(L-this.arcLength[M])/(this.arcLength[M+1]-this.arcLength[M]),I=1-N,k=[0,0,0],B=0;B<3;++B)k[B]=I*z[B]+N*D[B];var O=Math.min(N<.5?M:M+1,this.points.length-1);return new _(L,k,O,this.points[O])};function T(s){var L=s.gl||s.scene&&s.scene.gl,M=u(L);M.attributes.position.location=0,M.attributes.nextPosition.location=1,M.attributes.arcLength.location=2,M.attributes.lineWidth.location=3,M.attributes.color.location=4;var z=o(L);z.attributes.position.location=0,z.attributes.nextPosition.location=1,z.attributes.arcLength.location=2,z.attributes.lineWidth.location=3,z.attributes.color.location=4;for(var D=t(L),N=a(L,[{buffer:D,size:3,offset:0,stride:48},{buffer:D,size:3,offset:12,stride:48},{buffer:D,size:1,offset:24,stride:48},{buffer:D,size:1,offset:28,stride:48},{buffer:D,size:4,offset:32,stride:48}]),I=h(new Array(256*4),[256,1,4]),k=0;k<1024;++k)I.data[k]=255;var B=n(L,I);B.wrap=L.REPEAT;var O=new y(L,M,z,D,N,B);return O.update(s),O}},7332:function(v){v.exports=p;function p(r){var t=new Float32Array(16);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],t}},9823:function(v){v.exports=p;function p(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7787:function(v){v.exports=p;function p(r){var t=r[0],a=r[1],n=r[2],f=r[3],c=r[4],l=r[5],m=r[6],h=r[7],b=r[8],u=r[9],o=r[10],d=r[11],w=r[12],A=r[13],_=r[14],y=r[15],E=t*l-a*c,T=t*m-n*c,s=t*h-f*c,L=a*m-n*l,M=a*h-f*l,z=n*h-f*m,D=b*A-u*w,N=b*_-o*w,I=b*y-d*w,k=u*_-o*A,B=u*y-d*A,O=o*y-d*_;return E*O-T*B+s*k+L*I-M*N+z*D}},5950:function(v){v.exports=p;function p(r,t){var a=t[0],n=t[1],f=t[2],c=t[3],l=a+a,m=n+n,h=f+f,b=a*l,u=n*l,o=n*m,d=f*l,w=f*m,A=f*h,_=c*l,y=c*m,E=c*h;return r[0]=1-o-A,r[1]=u+E,r[2]=d-y,r[3]=0,r[4]=u-E,r[5]=1-b-A,r[6]=w+_,r[7]=0,r[8]=d+y,r[9]=w-_,r[10]=1-b-o,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7280:function(v){v.exports=p;function p(r,t,a){var n=t[0],f=t[1],c=t[2],l=t[3],m=n+n,h=f+f,b=c+c,u=n*m,o=n*h,d=n*b,w=f*h,A=f*b,_=c*b,y=l*m,E=l*h,T=l*b;return r[0]=1-(w+_),r[1]=o+T,r[2]=d-E,r[3]=0,r[4]=o-T,r[5]=1-(u+_),r[6]=A+y,r[7]=0,r[8]=d+E,r[9]=A-y,r[10]=1-(u+w),r[11]=0,r[12]=a[0],r[13]=a[1],r[14]=a[2],r[15]=1,r}},9947:function(v){v.exports=p;function p(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7437:function(v){v.exports=p;function p(r,t){var a=t[0],n=t[1],f=t[2],c=t[3],l=t[4],m=t[5],h=t[6],b=t[7],u=t[8],o=t[9],d=t[10],w=t[11],A=t[12],_=t[13],y=t[14],E=t[15],T=a*m-n*l,s=a*h-f*l,L=a*b-c*l,M=n*h-f*m,z=n*b-c*m,D=f*b-c*h,N=u*_-o*A,I=u*y-d*A,k=u*E-w*A,B=o*y-d*_,O=o*E-w*_,V=d*E-w*y,Y=T*V-s*O+L*B+M*k-z*I+D*N;return Y?(Y=1/Y,r[0]=(m*V-h*O+b*B)*Y,r[1]=(f*O-n*V-c*B)*Y,r[2]=(_*D-y*z+E*M)*Y,r[3]=(d*z-o*D-w*M)*Y,r[4]=(h*k-l*V-b*I)*Y,r[5]=(a*V-f*k+c*I)*Y,r[6]=(y*L-A*D-E*s)*Y,r[7]=(u*D-d*L+w*s)*Y,r[8]=(l*O-m*k+b*N)*Y,r[9]=(n*k-a*O-c*N)*Y,r[10]=(A*z-_*L+E*T)*Y,r[11]=(o*L-u*z-w*T)*Y,r[12]=(m*I-l*B-h*N)*Y,r[13]=(a*B-n*I+f*N)*Y,r[14]=(_*s-A*M-y*T)*Y,r[15]=(u*M-o*s+d*T)*Y,r):null}},3012:function(v,p,r){var t=r(9947);v.exports=a;function a(n,f,c,l){var m,h,b,u,o,d,w,A,_,y,E=f[0],T=f[1],s=f[2],L=l[0],M=l[1],z=l[2],D=c[0],N=c[1],I=c[2];return Math.abs(E-D)<1e-6&&Math.abs(T-N)<1e-6&&Math.abs(s-I)<1e-6?t(n):(w=E-D,A=T-N,_=s-I,y=1/Math.sqrt(w*w+A*A+_*_),w*=y,A*=y,_*=y,m=M*_-z*A,h=z*w-L*_,b=L*A-M*w,y=Math.sqrt(m*m+h*h+b*b),y?(y=1/y,m*=y,h*=y,b*=y):(m=0,h=0,b=0),u=A*b-_*h,o=_*m-w*b,d=w*h-A*m,y=Math.sqrt(u*u+o*o+d*d),y?(y=1/y,u*=y,o*=y,d*=y):(u=0,o=0,d=0),n[0]=m,n[1]=u,n[2]=w,n[3]=0,n[4]=h,n[5]=o,n[6]=A,n[7]=0,n[8]=b,n[9]=d,n[10]=_,n[11]=0,n[12]=-(m*E+h*T+b*s),n[13]=-(u*E+o*T+d*s),n[14]=-(w*E+A*T+_*s),n[15]=1,n)}},104:function(v){v.exports=p;function p(r,t,a){var n=t[0],f=t[1],c=t[2],l=t[3],m=t[4],h=t[5],b=t[6],u=t[7],o=t[8],d=t[9],w=t[10],A=t[11],_=t[12],y=t[13],E=t[14],T=t[15],s=a[0],L=a[1],M=a[2],z=a[3];return r[0]=s*n+L*m+M*o+z*_,r[1]=s*f+L*h+M*d+z*y,r[2]=s*c+L*b+M*w+z*E,r[3]=s*l+L*u+M*A+z*T,s=a[4],L=a[5],M=a[6],z=a[7],r[4]=s*n+L*m+M*o+z*_,r[5]=s*f+L*h+M*d+z*y,r[6]=s*c+L*b+M*w+z*E,r[7]=s*l+L*u+M*A+z*T,s=a[8],L=a[9],M=a[10],z=a[11],r[8]=s*n+L*m+M*o+z*_,r[9]=s*f+L*h+M*d+z*y,r[10]=s*c+L*b+M*w+z*E,r[11]=s*l+L*u+M*A+z*T,s=a[12],L=a[13],M=a[14],z=a[15],r[12]=s*n+L*m+M*o+z*_,r[13]=s*f+L*h+M*d+z*y,r[14]=s*c+L*b+M*w+z*E,r[15]=s*l+L*u+M*A+z*T,r}},5268:function(v){v.exports=p;function p(r,t,a,n,f,c,l){var m=1/(t-a),h=1/(n-f),b=1/(c-l);return r[0]=-2*m,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*h,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*b,r[11]=0,r[12]=(t+a)*m,r[13]=(f+n)*h,r[14]=(l+c)*b,r[15]=1,r}},1120:function(v){v.exports=p;function p(r,t,a,n,f){var c=1/Math.tan(t/2),l=1/(n-f);return r[0]=c/a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=c,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(f+n)*l,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*f*n*l,r[15]=0,r}},4422:function(v){v.exports=p;function p(r,t,a,n){var f=n[0],c=n[1],l=n[2],m=Math.sqrt(f*f+c*c+l*l),h,b,u,o,d,w,A,_,y,E,T,s,L,M,z,D,N,I,k,B,O,V,Y,j;return Math.abs(m)<1e-6?null:(m=1/m,f*=m,c*=m,l*=m,h=Math.sin(a),b=Math.cos(a),u=1-b,o=t[0],d=t[1],w=t[2],A=t[3],_=t[4],y=t[5],E=t[6],T=t[7],s=t[8],L=t[9],M=t[10],z=t[11],D=f*f*u+b,N=c*f*u+l*h,I=l*f*u-c*h,k=f*c*u-l*h,B=c*c*u+b,O=l*c*u+f*h,V=f*l*u+c*h,Y=c*l*u-f*h,j=l*l*u+b,r[0]=o*D+_*N+s*I,r[1]=d*D+y*N+L*I,r[2]=w*D+E*N+M*I,r[3]=A*D+T*N+z*I,r[4]=o*k+_*B+s*O,r[5]=d*k+y*B+L*O,r[6]=w*k+E*B+M*O,r[7]=A*k+T*B+z*O,r[8]=o*V+_*Y+s*j,r[9]=d*V+y*Y+L*j,r[10]=w*V+E*Y+M*j,r[11]=A*V+T*Y+z*j,t!==r&&(r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r)}},6109:function(v){v.exports=p;function p(r,t,a){var n=Math.sin(a),f=Math.cos(a),c=t[4],l=t[5],m=t[6],h=t[7],b=t[8],u=t[9],o=t[10],d=t[11];return t!==r&&(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[4]=c*f+b*n,r[5]=l*f+u*n,r[6]=m*f+o*n,r[7]=h*f+d*n,r[8]=b*f-c*n,r[9]=u*f-l*n,r[10]=o*f-m*n,r[11]=d*f-h*n,r}},7115:function(v){v.exports=p;function p(r,t,a){var n=Math.sin(a),f=Math.cos(a),c=t[0],l=t[1],m=t[2],h=t[3],b=t[8],u=t[9],o=t[10],d=t[11];return t!==r&&(r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[0]=c*f-b*n,r[1]=l*f-u*n,r[2]=m*f-o*n,r[3]=h*f-d*n,r[8]=c*n+b*f,r[9]=l*n+u*f,r[10]=m*n+o*f,r[11]=h*n+d*f,r}},5240:function(v){v.exports=p;function p(r,t,a){var n=Math.sin(a),f=Math.cos(a),c=t[0],l=t[1],m=t[2],h=t[3],b=t[4],u=t[5],o=t[6],d=t[7];return t!==r&&(r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[0]=c*f+b*n,r[1]=l*f+u*n,r[2]=m*f+o*n,r[3]=h*f+d*n,r[4]=b*f-c*n,r[5]=u*f-l*n,r[6]=o*f-m*n,r[7]=d*f-h*n,r}},3668:function(v){v.exports=p;function p(r,t,a){var n=a[0],f=a[1],c=a[2];return r[0]=t[0]*n,r[1]=t[1]*n,r[2]=t[2]*n,r[3]=t[3]*n,r[4]=t[4]*f,r[5]=t[5]*f,r[6]=t[6]*f,r[7]=t[7]*f,r[8]=t[8]*c,r[9]=t[9]*c,r[10]=t[10]*c,r[11]=t[11]*c,r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r}},998:function(v){v.exports=p;function p(r,t,a){var n=a[0],f=a[1],c=a[2],l,m,h,b,u,o,d,w,A,_,y,E;return t===r?(r[12]=t[0]*n+t[4]*f+t[8]*c+t[12],r[13]=t[1]*n+t[5]*f+t[9]*c+t[13],r[14]=t[2]*n+t[6]*f+t[10]*c+t[14],r[15]=t[3]*n+t[7]*f+t[11]*c+t[15]):(l=t[0],m=t[1],h=t[2],b=t[3],u=t[4],o=t[5],d=t[6],w=t[7],A=t[8],_=t[9],y=t[10],E=t[11],r[0]=l,r[1]=m,r[2]=h,r[3]=b,r[4]=u,r[5]=o,r[6]=d,r[7]=w,r[8]=A,r[9]=_,r[10]=y,r[11]=E,r[12]=l*n+u*f+A*c+t[12],r[13]=m*n+o*f+_*c+t[13],r[14]=h*n+d*f+y*c+t[14],r[15]=b*n+w*f+E*c+t[15]),r}},2142:function(v){v.exports=p;function p(r,t){if(r===t){var a=t[1],n=t[2],f=t[3],c=t[6],l=t[7],m=t[11];r[1]=t[4],r[2]=t[8],r[3]=t[12],r[4]=a,r[6]=t[9],r[7]=t[13],r[8]=n,r[9]=c,r[11]=t[14],r[12]=f,r[13]=l,r[14]=m}else r[0]=t[0],r[1]=t[4],r[2]=t[8],r[3]=t[12],r[4]=t[1],r[5]=t[5],r[6]=t[9],r[7]=t[13],r[8]=t[2],r[9]=t[6],r[10]=t[10],r[11]=t[14],r[12]=t[3],r[13]=t[7],r[14]=t[11],r[15]=t[15];return r}},4340:function(v,p,r){var t=r(957),a=r(7309);v.exports=m;function n(h,b){for(var u=[0,0,0,0],o=0;o<4;++o)for(var d=0;d<4;++d)u[d]+=h[4*o+d]*b[o];return u}function f(h,b,u,o,d){for(var w=n(o,n(u,n(b,[h[0],h[1],h[2],1]))),A=0;A<3;++A)w[A]/=w[3];return[.5*d[0]*(1+w[0]),.5*d[1]*(1-w[1])]}function c(h,b){if(h.length===2){for(var u=0,o=0,d=0;d<2;++d)u+=Math.pow(b[d]-h[0][d],2),o+=Math.pow(b[d]-h[1][d],2);return u=Math.sqrt(u),o=Math.sqrt(o),u+o<1e-6?[1,0]:[o/(u+o),u/(o+u)]}else if(h.length===3){var w=[0,0];return a(h[0],h[1],h[2],b,w),t(h,w)}return[]}function l(h,b){for(var u=[0,0,0],o=0;o1.0001)return null;M+=L[_]}return Math.abs(M-1)>.001?null:[y,l(h,L),L]}},2056:function(v,p,r){var t=r(6832),a=t([`precision highp float; +}`]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];p.createShader=function(m){return a(m,n,f,null,l)},p.createPickShader=function(m){return a(m,n,c,null,l)}},6086:function(v,p,r){v.exports=T;var e=r(5827),a=r(2944),n=r(8931),f=new Uint8Array(4),c=new Float32Array(f.buffer);function l(s,L,M,z){return f[0]=z,f[1]=M,f[2]=L,f[3]=s,c[0]}var m=r(5070),h=r(5050),b=r(248),u=b.createShader,o=b.createPickShader,d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function w(s,L){for(var M=0,z=0;z<3;++z){var D=s[z]-L[z];M+=D*D}return Math.sqrt(M)}function A(s){for(var L=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],M=0;M<3;++M)L[0][M]=Math.max(s[0][M],L[0][M]),L[1][M]=Math.min(s[1][M],L[1][M]);return L}function _(s,L,M,z){this.arcLength=s,this.position=L,this.index=M,this.dataCoordinate=z}function y(s,L,M,z,D,N){this.gl=s,this.shader=L,this.pickShader=M,this.buffer=z,this.vao=D,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=N,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var E=y.prototype;E.isTransparent=function(){return this.hasAlpha},E.isOpaque=function(){return!this.hasAlpha},E.pickSlots=1,E.setPickBase=function(s){this.pickId=s},E.drawTransparent=E.draw=function(s){if(this.vertexCount){var L=this.gl,M=this.shader,z=this.vao;M.bind(),M.uniforms={model:s.model||d,view:s.view||d,projection:s.projection||d,clipBounds:A(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[L.drawingBufferWidth,L.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(L.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},E.drawPick=function(s){if(this.vertexCount){var L=this.gl,M=this.pickShader,z=this.vao;M.bind(),M.uniforms={model:s.model||d,view:s.view||d,projection:s.projection||d,pickId:this.pickId,clipBounds:A(this.clipBounds),screenShape:[L.drawingBufferWidth,L.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(L.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},E.update=function(s){var L,M;this.dirty=!0;var z=!!s.connectGaps;"dashScale"in s&&(this.dashScale=s.dashScale),this.hasAlpha=!1,"opacity"in s&&(this.opacity=+s.opacity,this.opacity<1&&(this.hasAlpha=!0));var D=[],N=[],I=[],k=0,B=0,O=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],H=s.position||s.positions;if(H){var Y=s.color||s.colors||[0,0,0,1],j=s.lineWidth||1,et=!1;t:for(L=1;L0){for(var J=0;J<24;++J)D.push(D[D.length-12]);B+=2,et=!0}continue t}O[0][M]=Math.min(O[0][M],it[M],ut[M]),O[1][M]=Math.max(O[1][M],it[M],ut[M])}var X,tt;Array.isArray(Y[0])?(X=Y.length>L-1?Y[L-1]:Y.length>0?Y[Y.length-1]:[0,0,0,1],tt=Y.length>L?Y[L]:Y.length>0?Y[Y.length-1]:[0,0,0,1]):X=tt=Y,X.length===3&&(X=[X[0],X[1],X[2],1]),tt.length===3&&(tt=[tt[0],tt[1],tt[2],1]),!this.hasAlpha&&X[3]<1&&(this.hasAlpha=!0);var V;Array.isArray(j)?V=j.length>L-1?j[L-1]:j.length>0?j[j.length-1]:[0,0,0,1]:V=j;var Q=k;if(k+=w(it,ut),et){for(M=0;M<2;++M)D.push(it[0],it[1],it[2],ut[0],ut[1],ut[2],Q,V,X[0],X[1],X[2],X[3]);B+=2,et=!1}D.push(it[0],it[1],it[2],ut[0],ut[1],ut[2],Q,V,X[0],X[1],X[2],X[3],it[0],it[1],it[2],ut[0],ut[1],ut[2],Q,-V,X[0],X[1],X[2],X[3],ut[0],ut[1],ut[2],it[0],it[1],it[2],k,-V,tt[0],tt[1],tt[2],tt[3],ut[0],ut[1],ut[2],it[0],it[1],it[2],k,V,tt[0],tt[1],tt[2],tt[3]),B+=4}}if(this.buffer.update(D),N.push(k),I.push(H[H.length-1].slice()),this.bounds=O,this.vertexCount=B,this.points=I,this.arcLength=N,"dashes"in s){var ot=s.dashes,$=ot.slice();for($.unshift(0),L=1;L<$.length;++L)$[L]=$[L-1]+$[L];var Z=h(new Array(256*4),[256,1,4]);for(L=0;L<256;++L){for(M=0;M<4;++M)Z.set(L,0,M,0);m.le($,$[$.length-1]*L/255)&1?Z.set(L,0,0,0):Z.set(L,0,0,255)}this.texture.setPixels(Z)}},E.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},E.pick=function(s){if(!s||s.id!==this.pickId)return null;var L=l(s.value[0],s.value[1],s.value[2],0),M=m.le(this.arcLength,L);if(M<0)return null;if(M===this.arcLength.length-1)return new _(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),M);for(var z=this.points[M],D=this.points[Math.min(M+1,this.points.length-1)],N=(L-this.arcLength[M])/(this.arcLength[M+1]-this.arcLength[M]),I=1-N,k=[0,0,0],B=0;B<3;++B)k[B]=I*z[B]+N*D[B];var O=Math.min(N<.5?M:M+1,this.points.length-1);return new _(L,k,O,this.points[O])};function T(s){var L=s.gl||s.scene&&s.scene.gl,M=u(L);M.attributes.position.location=0,M.attributes.nextPosition.location=1,M.attributes.arcLength.location=2,M.attributes.lineWidth.location=3,M.attributes.color.location=4;var z=o(L);z.attributes.position.location=0,z.attributes.nextPosition.location=1,z.attributes.arcLength.location=2,z.attributes.lineWidth.location=3,z.attributes.color.location=4;for(var D=e(L),N=a(L,[{buffer:D,size:3,offset:0,stride:48},{buffer:D,size:3,offset:12,stride:48},{buffer:D,size:1,offset:24,stride:48},{buffer:D,size:1,offset:28,stride:48},{buffer:D,size:4,offset:32,stride:48}]),I=h(new Array(256*4),[256,1,4]),k=0;k<1024;++k)I.data[k]=255;var B=n(L,I);B.wrap=L.REPEAT;var O=new y(L,M,z,D,N,B);return O.update(s),O}},7332:function(v){v.exports=p;function p(r){var e=new Float32Array(16);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],e[6]=r[6],e[7]=r[7],e[8]=r[8],e[9]=r[9],e[10]=r[10],e[11]=r[11],e[12]=r[12],e[13]=r[13],e[14]=r[14],e[15]=r[15],e}},9823:function(v){v.exports=p;function p(){var r=new Float32Array(16);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7787:function(v){v.exports=p;function p(r){var e=r[0],a=r[1],n=r[2],f=r[3],c=r[4],l=r[5],m=r[6],h=r[7],b=r[8],u=r[9],o=r[10],d=r[11],w=r[12],A=r[13],_=r[14],y=r[15],E=e*l-a*c,T=e*m-n*c,s=e*h-f*c,L=a*m-n*l,M=a*h-f*l,z=n*h-f*m,D=b*A-u*w,N=b*_-o*w,I=b*y-d*w,k=u*_-o*A,B=u*y-d*A,O=o*y-d*_;return E*O-T*B+s*k+L*I-M*N+z*D}},5950:function(v){v.exports=p;function p(r,e){var a=e[0],n=e[1],f=e[2],c=e[3],l=a+a,m=n+n,h=f+f,b=a*l,u=n*l,o=n*m,d=f*l,w=f*m,A=f*h,_=c*l,y=c*m,E=c*h;return r[0]=1-o-A,r[1]=u+E,r[2]=d-y,r[3]=0,r[4]=u-E,r[5]=1-b-A,r[6]=w+_,r[7]=0,r[8]=d+y,r[9]=w-_,r[10]=1-b-o,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7280:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=e[3],m=n+n,h=f+f,b=c+c,u=n*m,o=n*h,d=n*b,w=f*h,A=f*b,_=c*b,y=l*m,E=l*h,T=l*b;return r[0]=1-(w+_),r[1]=o+T,r[2]=d-E,r[3]=0,r[4]=o-T,r[5]=1-(u+_),r[6]=A+y,r[7]=0,r[8]=d+E,r[9]=A-y,r[10]=1-(u+w),r[11]=0,r[12]=a[0],r[13]=a[1],r[14]=a[2],r[15]=1,r}},9947:function(v){v.exports=p;function p(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}},7437:function(v){v.exports=p;function p(r,e){var a=e[0],n=e[1],f=e[2],c=e[3],l=e[4],m=e[5],h=e[6],b=e[7],u=e[8],o=e[9],d=e[10],w=e[11],A=e[12],_=e[13],y=e[14],E=e[15],T=a*m-n*l,s=a*h-f*l,L=a*b-c*l,M=n*h-f*m,z=n*b-c*m,D=f*b-c*h,N=u*_-o*A,I=u*y-d*A,k=u*E-w*A,B=o*y-d*_,O=o*E-w*_,H=d*E-w*y,Y=T*H-s*O+L*B+M*k-z*I+D*N;return Y?(Y=1/Y,r[0]=(m*H-h*O+b*B)*Y,r[1]=(f*O-n*H-c*B)*Y,r[2]=(_*D-y*z+E*M)*Y,r[3]=(d*z-o*D-w*M)*Y,r[4]=(h*k-l*H-b*I)*Y,r[5]=(a*H-f*k+c*I)*Y,r[6]=(y*L-A*D-E*s)*Y,r[7]=(u*D-d*L+w*s)*Y,r[8]=(l*O-m*k+b*N)*Y,r[9]=(n*k-a*O-c*N)*Y,r[10]=(A*z-_*L+E*T)*Y,r[11]=(o*L-u*z-w*T)*Y,r[12]=(m*I-l*B-h*N)*Y,r[13]=(a*B-n*I+f*N)*Y,r[14]=(_*s-A*M-y*T)*Y,r[15]=(u*M-o*s+d*T)*Y,r):null}},3012:function(v,p,r){var e=r(9947);v.exports=a;function a(n,f,c,l){var m,h,b,u,o,d,w,A,_,y,E=f[0],T=f[1],s=f[2],L=l[0],M=l[1],z=l[2],D=c[0],N=c[1],I=c[2];return Math.abs(E-D)<1e-6&&Math.abs(T-N)<1e-6&&Math.abs(s-I)<1e-6?e(n):(w=E-D,A=T-N,_=s-I,y=1/Math.sqrt(w*w+A*A+_*_),w*=y,A*=y,_*=y,m=M*_-z*A,h=z*w-L*_,b=L*A-M*w,y=Math.sqrt(m*m+h*h+b*b),y?(y=1/y,m*=y,h*=y,b*=y):(m=0,h=0,b=0),u=A*b-_*h,o=_*m-w*b,d=w*h-A*m,y=Math.sqrt(u*u+o*o+d*d),y?(y=1/y,u*=y,o*=y,d*=y):(u=0,o=0,d=0),n[0]=m,n[1]=u,n[2]=w,n[3]=0,n[4]=h,n[5]=o,n[6]=A,n[7]=0,n[8]=b,n[9]=d,n[10]=_,n[11]=0,n[12]=-(m*E+h*T+b*s),n[13]=-(u*E+o*T+d*s),n[14]=-(w*E+A*T+_*s),n[15]=1,n)}},104:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=e[3],m=e[4],h=e[5],b=e[6],u=e[7],o=e[8],d=e[9],w=e[10],A=e[11],_=e[12],y=e[13],E=e[14],T=e[15],s=a[0],L=a[1],M=a[2],z=a[3];return r[0]=s*n+L*m+M*o+z*_,r[1]=s*f+L*h+M*d+z*y,r[2]=s*c+L*b+M*w+z*E,r[3]=s*l+L*u+M*A+z*T,s=a[4],L=a[5],M=a[6],z=a[7],r[4]=s*n+L*m+M*o+z*_,r[5]=s*f+L*h+M*d+z*y,r[6]=s*c+L*b+M*w+z*E,r[7]=s*l+L*u+M*A+z*T,s=a[8],L=a[9],M=a[10],z=a[11],r[8]=s*n+L*m+M*o+z*_,r[9]=s*f+L*h+M*d+z*y,r[10]=s*c+L*b+M*w+z*E,r[11]=s*l+L*u+M*A+z*T,s=a[12],L=a[13],M=a[14],z=a[15],r[12]=s*n+L*m+M*o+z*_,r[13]=s*f+L*h+M*d+z*y,r[14]=s*c+L*b+M*w+z*E,r[15]=s*l+L*u+M*A+z*T,r}},5268:function(v){v.exports=p;function p(r,e,a,n,f,c,l){var m=1/(e-a),h=1/(n-f),b=1/(c-l);return r[0]=-2*m,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*h,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*b,r[11]=0,r[12]=(e+a)*m,r[13]=(f+n)*h,r[14]=(l+c)*b,r[15]=1,r}},1120:function(v){v.exports=p;function p(r,e,a,n,f){var c=1/Math.tan(e/2),l=1/(n-f);return r[0]=c/a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=c,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(f+n)*l,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*f*n*l,r[15]=0,r}},4422:function(v){v.exports=p;function p(r,e,a,n){var f=n[0],c=n[1],l=n[2],m=Math.sqrt(f*f+c*c+l*l),h,b,u,o,d,w,A,_,y,E,T,s,L,M,z,D,N,I,k,B,O,H,Y,j;return Math.abs(m)<1e-6?null:(m=1/m,f*=m,c*=m,l*=m,h=Math.sin(a),b=Math.cos(a),u=1-b,o=e[0],d=e[1],w=e[2],A=e[3],_=e[4],y=e[5],E=e[6],T=e[7],s=e[8],L=e[9],M=e[10],z=e[11],D=f*f*u+b,N=c*f*u+l*h,I=l*f*u-c*h,k=f*c*u-l*h,B=c*c*u+b,O=l*c*u+f*h,H=f*l*u+c*h,Y=c*l*u-f*h,j=l*l*u+b,r[0]=o*D+_*N+s*I,r[1]=d*D+y*N+L*I,r[2]=w*D+E*N+M*I,r[3]=A*D+T*N+z*I,r[4]=o*k+_*B+s*O,r[5]=d*k+y*B+L*O,r[6]=w*k+E*B+M*O,r[7]=A*k+T*B+z*O,r[8]=o*H+_*Y+s*j,r[9]=d*H+y*Y+L*j,r[10]=w*H+E*Y+M*j,r[11]=A*H+T*Y+z*j,e!==r&&(r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r)}},6109:function(v){v.exports=p;function p(r,e,a){var n=Math.sin(a),f=Math.cos(a),c=e[4],l=e[5],m=e[6],h=e[7],b=e[8],u=e[9],o=e[10],d=e[11];return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[4]=c*f+b*n,r[5]=l*f+u*n,r[6]=m*f+o*n,r[7]=h*f+d*n,r[8]=b*f-c*n,r[9]=u*f-l*n,r[10]=o*f-m*n,r[11]=d*f-h*n,r}},7115:function(v){v.exports=p;function p(r,e,a){var n=Math.sin(a),f=Math.cos(a),c=e[0],l=e[1],m=e[2],h=e[3],b=e[8],u=e[9],o=e[10],d=e[11];return e!==r&&(r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=c*f-b*n,r[1]=l*f-u*n,r[2]=m*f-o*n,r[3]=h*f-d*n,r[8]=c*n+b*f,r[9]=l*n+u*f,r[10]=m*n+o*f,r[11]=h*n+d*f,r}},5240:function(v){v.exports=p;function p(r,e,a){var n=Math.sin(a),f=Math.cos(a),c=e[0],l=e[1],m=e[2],h=e[3],b=e[4],u=e[5],o=e[6],d=e[7];return e!==r&&(r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=c*f+b*n,r[1]=l*f+u*n,r[2]=m*f+o*n,r[3]=h*f+d*n,r[4]=b*f-c*n,r[5]=u*f-l*n,r[6]=o*f-m*n,r[7]=d*f-h*n,r}},3668:function(v){v.exports=p;function p(r,e,a){var n=a[0],f=a[1],c=a[2];return r[0]=e[0]*n,r[1]=e[1]*n,r[2]=e[2]*n,r[3]=e[3]*n,r[4]=e[4]*f,r[5]=e[5]*f,r[6]=e[6]*f,r[7]=e[7]*f,r[8]=e[8]*c,r[9]=e[9]*c,r[10]=e[10]*c,r[11]=e[11]*c,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}},998:function(v){v.exports=p;function p(r,e,a){var n=a[0],f=a[1],c=a[2],l,m,h,b,u,o,d,w,A,_,y,E;return e===r?(r[12]=e[0]*n+e[4]*f+e[8]*c+e[12],r[13]=e[1]*n+e[5]*f+e[9]*c+e[13],r[14]=e[2]*n+e[6]*f+e[10]*c+e[14],r[15]=e[3]*n+e[7]*f+e[11]*c+e[15]):(l=e[0],m=e[1],h=e[2],b=e[3],u=e[4],o=e[5],d=e[6],w=e[7],A=e[8],_=e[9],y=e[10],E=e[11],r[0]=l,r[1]=m,r[2]=h,r[3]=b,r[4]=u,r[5]=o,r[6]=d,r[7]=w,r[8]=A,r[9]=_,r[10]=y,r[11]=E,r[12]=l*n+u*f+A*c+e[12],r[13]=m*n+o*f+_*c+e[13],r[14]=h*n+d*f+y*c+e[14],r[15]=b*n+w*f+E*c+e[15]),r}},2142:function(v){v.exports=p;function p(r,e){if(r===e){var a=e[1],n=e[2],f=e[3],c=e[6],l=e[7],m=e[11];r[1]=e[4],r[2]=e[8],r[3]=e[12],r[4]=a,r[6]=e[9],r[7]=e[13],r[8]=n,r[9]=c,r[11]=e[14],r[12]=f,r[13]=l,r[14]=m}else r[0]=e[0],r[1]=e[4],r[2]=e[8],r[3]=e[12],r[4]=e[1],r[5]=e[5],r[6]=e[9],r[7]=e[13],r[8]=e[2],r[9]=e[6],r[10]=e[10],r[11]=e[14],r[12]=e[3],r[13]=e[7],r[14]=e[11],r[15]=e[15];return r}},4340:function(v,p,r){var e=r(957),a=r(7309);v.exports=m;function n(h,b){for(var u=[0,0,0,0],o=0;o<4;++o)for(var d=0;d<4;++d)u[d]+=h[4*o+d]*b[o];return u}function f(h,b,u,o,d){for(var w=n(o,n(u,n(b,[h[0],h[1],h[2],1]))),A=0;A<3;++A)w[A]/=w[3];return[.5*d[0]*(1+w[0]),.5*d[1]*(1-w[1])]}function c(h,b){if(h.length===2){for(var u=0,o=0,d=0;d<2;++d)u+=Math.pow(b[d]-h[0][d],2),o+=Math.pow(b[d]-h[1][d],2);return u=Math.sqrt(u),o=Math.sqrt(o),u+o<1e-6?[1,0]:[o/(u+o),u/(o+u)]}else if(h.length===3){var w=[0,0];return a(h[0],h[1],h[2],b,w),e(h,w)}return[]}function l(h,b){for(var u=[0,0,0],o=0;o1.0001)return null;M+=L[_]}return Math.abs(M-1)>.001?null:[y,l(h,L),L]}},2056:function(v,p,r){var e=r(6832),a=e([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -5123,7 +5123,7 @@ void main() { f_data = position; f_uv = uv; } -`]),n=t([`#extension GL_OES_standard_derivatives : enable +`]),n=e([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 @@ -5228,7 +5228,7 @@ void main() { gl_FragColor = litColor * f_color.a; } -`]),f=t([`precision highp float; +`]),f=e([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -5246,7 +5246,7 @@ void main() { f_color = color; f_data = position; f_uv = uv; -}`]),c=t([`precision highp float; +}`]),c=e([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -5281,7 +5281,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),l=t([`precision highp float; +}`]),l=e([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -5325,7 +5325,7 @@ void main() { gl_PointSize = pointSize; f_color = color; f_uv = uv; -}`]),m=t([`precision highp float; +}`]),m=e([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; @@ -5340,7 +5340,7 @@ void main() { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),h=t([`precision highp float; +}`]),h=e([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -5355,7 +5355,7 @@ void main() { gl_Position = projection * view * model * vec4(position, 1.0); f_id = id; f_position = position; -}`]),b=t([`precision highp float; +}`]),b=e([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -5388,7 +5388,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]),u=t([`precision highp float; +}`]),u=e([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -5431,7 +5431,7 @@ void main() { } f_id = id; f_position = position; -}`]),o=t([`precision highp float; +}`]),o=e([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -5440,7 +5440,7 @@ uniform mat4 model, view, projection; void main() { gl_Position = projection * view * model * vec4(position, 1.0); -}`]),d=t([`precision highp float; +}`]),d=e([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; @@ -5448,13 +5448,13 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);p.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},p.wireShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},p.pointShader={vertex:l,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},p.pickShader={vertex:h,fragment:b,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},p.pointPickShader={vertex:u,fragment:b,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},p.contourShader={vertex:o,fragment:d,attributes:[{name:"position",type:"vec3"}]}},8116:function(v,p,r){var t=1e-6,a=1e-6,n=r(5158),f=r(5827),c=r(2944),l=r(8931),m=r(115),h=r(104),b=r(7437),u=r(5050),o=r(9156),d=r(7212),w=r(5306),A=r(2056),_=r(4340),y=A.meshShader,E=A.wireShader,T=A.pointShader,s=A.pickShader,L=A.pointPickShader,M=A.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function D(J,X,ee,G,Q,oe,$,Z,se,ne,ce,ge,Te,we,Re,be,Ae,me,Le,Ve,Ue,ke,He,Ie,rt,Ke,$e){this.gl=J,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=X,this.dirty=!0,this.triShader=ee,this.lineShader=G,this.pointShader=Q,this.pickShader=oe,this.pointPickShader=$,this.contourShader=Z,this.trianglePositions=se,this.triangleColors=ce,this.triangleNormals=Te,this.triangleUVs=ge,this.triangleIds=ne,this.triangleVAO=we,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Re,this.edgeColors=Ae,this.edgeUVs=me,this.edgeIds=be,this.edgeVAO=Le,this.edgeCount=0,this.pointPositions=Ve,this.pointColors=ke,this.pointUVs=He,this.pointSizes=Ie,this.pointIds=Ue,this.pointVAO=rt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Ke,this.contourVAO=$e,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=z,this._view=z,this._projection=z,this._resolution=[1,1]}var N=D.prototype;N.isOpaque=function(){return!this.hasAlpha},N.isTransparent=function(){return this.hasAlpha},N.pickSlots=1,N.setPickBase=function(J){this.pickId=J};function I(J,X){if(!X||!X.length)return 1;for(var ee=0;eeJ&&ee>0){var G=(X[ee][0]-J)/(X[ee][0]-X[ee-1][0]);return X[ee][1]*(1-G)+G*X[ee-1][1]}}return 1}function k(J,X){for(var ee=o({colormap:J,nshades:256,format:"rgba"}),G=new Uint8Array(256*4),Q=0;Q<256;++Q){for(var oe=ee[Q],$=0;$<3;++$)G[4*Q+$]=oe[$];X?G[4*Q+3]=255*I(Q/255,X):G[4*Q+3]=255*oe[3]}return u(G,[256,256,4],[4,0,1])}function B(J){for(var X=J.length,ee=new Array(X),G=0;G0){var Te=this.triShader;Te.bind(),Te.uniforms=Z,this.triangleVAO.bind(),X.drawArrays(X.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Te=this.lineShader;Te.bind(),Te.uniforms=Z,this.edgeVAO.bind(),X.lineWidth(this.lineWidth*this.pixelRatio),X.drawArrays(X.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Te=this.pointShader;Te.bind(),Te.uniforms=Z,this.pointVAO.bind(),X.drawArrays(X.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Te=this.contourShader;Te.bind(),Te.uniforms=Z,this.contourVAO.bind(),X.drawArrays(X.LINES,0,this.contourCount),this.contourVAO.unbind()}},N.drawPick=function(J){J=J||{};for(var X=this.gl,ee=J.model||z,G=J.view||z,Q=J.projection||z,oe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],$=0;$<3;++$)oe[0][$]=Math.max(oe[0][$],this.clipBounds[0][$]),oe[1][$]=Math.min(oe[1][$],this.clipBounds[1][$]);this._model=[].slice.call(ee),this._view=[].slice.call(G),this._projection=[].slice.call(Q),this._resolution=[X.drawingBufferWidth,X.drawingBufferHeight];var Z={model:ee,view:G,projection:Q,clipBounds:oe,pickId:this.pickId/255},se=this.pickShader;if(se.bind(),se.uniforms=Z,this.triangleCount>0&&(this.triangleVAO.bind(),X.drawArrays(X.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),X.lineWidth(this.lineWidth*this.pixelRatio),X.drawArrays(X.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var se=this.pointPickShader;se.bind(),se.uniforms=Z,this.pointVAO.bind(),X.drawArrays(X.POINTS,0,this.pointCount),this.pointVAO.unbind()}},N.pick=function(J){if(!J||J.id!==this.pickId)return null;for(var X=J.value[0]+256*J.value[1]+65536*J.value[2],ee=this.cells[X],G=this.positions,Q=new Array(ee.length),oe=0;oeJ&&tt>0){var V=(X[tt][0]-J)/(X[tt][0]-X[tt-1][0]);return X[tt][1]*(1-V)+V*X[tt-1][1]}}return 1}function k(J,X){for(var tt=o({colormap:J,nshades:256,format:"rgba"}),V=new Uint8Array(256*4),Q=0;Q<256;++Q){for(var ot=tt[Q],$=0;$<3;++$)V[4*Q+$]=ot[$];X?V[4*Q+3]=255*I(Q/255,X):V[4*Q+3]=255*ot[3]}return u(V,[256,256,4],[4,0,1])}function B(J){for(var X=J.length,tt=new Array(X),V=0;V0){var Tt=this.triShader;Tt.bind(),Tt.uniforms=Z,this.triangleVAO.bind(),X.drawArrays(X.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var Tt=this.lineShader;Tt.bind(),Tt.uniforms=Z,this.edgeVAO.bind(),X.lineWidth(this.lineWidth*this.pixelRatio),X.drawArrays(X.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var Tt=this.pointShader;Tt.bind(),Tt.uniforms=Z,this.pointVAO.bind(),X.drawArrays(X.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var Tt=this.contourShader;Tt.bind(),Tt.uniforms=Z,this.contourVAO.bind(),X.drawArrays(X.LINES,0,this.contourCount),this.contourVAO.unbind()}},N.drawPick=function(J){J=J||{};for(var X=this.gl,tt=J.model||z,V=J.view||z,Q=J.projection||z,ot=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],$=0;$<3;++$)ot[0][$]=Math.max(ot[0][$],this.clipBounds[0][$]),ot[1][$]=Math.min(ot[1][$],this.clipBounds[1][$]);this._model=[].slice.call(tt),this._view=[].slice.call(V),this._projection=[].slice.call(Q),this._resolution=[X.drawingBufferWidth,X.drawingBufferHeight];var Z={model:tt,view:V,projection:Q,clipBounds:ot,pickId:this.pickId/255},st=this.pickShader;if(st.bind(),st.uniforms=Z,this.triangleCount>0&&(this.triangleVAO.bind(),X.drawArrays(X.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),X.lineWidth(this.lineWidth*this.pixelRatio),X.drawArrays(X.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var st=this.pointPickShader;st.bind(),st.uniforms=Z,this.pointVAO.bind(),X.drawArrays(X.POINTS,0,this.pointCount),this.pointVAO.unbind()}},N.pick=function(J){if(!J||J.id!==this.pickId)return null;for(var X=J.value[0]+256*J.value[1]+65536*J.value[2],tt=this.cells[X],V=this.positions,Q=new Array(tt.length),ot=0;oty[te]&&(A.uniforms.dataAxis=b,A.uniforms.screenOffset=u,A.uniforms.color=N[d],A.uniforms.angle=I[d],E.drawArrays(E.TRIANGLES,y[te],y[ie]-y[te]))),k[d]&&j&&(u[d^1]-=ue*M*B[d],A.uniforms.dataAxis=o,A.uniforms.screenOffset=u,A.uniforms.color=O[d],A.uniforms.angle=V[d],E.drawArrays(E.TRIANGLES,Y,j)),u[d^1]=ue*T[2+(d^1)]-1,z[d+2]&&(u[d^1]+=ue*M*D[d+2],tey[te]&&(A.uniforms.dataAxis=b,A.uniforms.screenOffset=u,A.uniforms.color=N[d+2],A.uniforms.angle=I[d+2],E.drawArrays(E.TRIANGLES,y[te],y[ie]-y[te]))),k[d+2]&&j&&(u[d^1]+=ue*M*B[d+2],A.uniforms.dataAxis=o,A.uniforms.screenOffset=u,A.uniforms.color=O[d+2],A.uniforms.angle=V[d+2],E.drawArrays(E.TRIANGLES,Y,j))}}(),m.drawTitle=function(){var b=[0,0],u=[0,0];return function(){var o=this.plot,d=this.shader,w=o.gl,A=o.screenBox,_=o.titleCenter,y=o.titleAngle,E=o.titleColor,T=o.pixelRatio;if(this.titleCount){for(var s=0;s<2;++s)u[s]=2*(_[s]*T-A[s])/(A[2+s]-A[s])-1;d.bind(),d.uniforms.dataAxis=b,d.uniforms.screenOffset=u,d.uniforms.angle=y,d.uniforms.color=E,w.drawArrays(w.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=function(){var b=[0,0],u=[0,0],o=[0,0];return function(){var d=this.plot,w=this.shader,A=d._tickBounds,_=d.dataBox,y=d.screenBox,E=d.viewBox;w.bind();for(var T=0;T<2;++T){var s=A[T],L=A[T+2],M=L-s,z=.5*(_[T+2]+_[T]),D=_[T+2]-_[T],N=E[T],I=E[T+2],k=I-N,B=y[T],O=y[T+2],V=O-B;u[T]=2*M/D*k/V,b[T]=2*(s-z)/D*k/V}o[1]=2*d.pixelRatio/(y[3]-y[1]),o[0]=o[1]*(y[3]-y[1])/(y[2]-y[0]),w.uniforms.dataScale=u,w.uniforms.dataShift=b,w.uniforms.textScale=o,this.vbo.bind(),w.attributes.textCoordinate.pointer()}}(),m.update=function(b){var u=[],o=b.ticks,d=b.bounds,w,A,_,y,E;for(E=0;E<2;++E){var T=[Math.floor(u.length/3)],s=[-1/0],L=o[E];for(w=0;w=0))){var k=d[I]-A[I]*(d[I+2]-d[I])/(A[I+2]-A[I]);I===0?E.drawLine(k,d[1],k,d[3],N[I],D[I]):E.drawLine(d[0],k,d[2],k,N[I],D[I])}}for(var I=0;I=0;--o)this.objects[o].dispose();this.objects.length=0;for(var o=this.overlays.length-1;o>=0;--o)this.overlays[o].dispose();this.overlays.length=0,this.gl=null},m.addObject=function(o){this.objects.indexOf(o)<0&&(this.objects.push(o),this.setDirty())},m.removeObject=function(o){for(var d=this.objects,w=0;wMath.abs(s))o.rotate(z,0,0,-T*L*Math.PI*y.rotateSpeed/window.innerWidth);else if(!y._ortho){var D=-y.zoomSpeed*M*s/window.innerHeight*(z-o.lastT())/20;o.pan(z,0,0,w*(Math.exp(D)-1))}}},!0)},y.enableMouseListeners(),y}},8245:function(v,p,r){var t=r(6832),a=r(5158),n=t([`precision mediump float; +`])}},5613:function(v,p,r){v.exports=h;var e=r(5827),a=r(5158),n=r(6946),f=r(5070),c=r(2709);function l(b,u,o){this.plot=b,this.vbo=u,this.shader=o,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var m=l.prototype;m.drawTicks=function(){var b=[0,0],u=[0,0],o=[0,0];return function(d){var w=this.plot,A=this.shader,_=this.tickX[d],y=this.tickOffset[d],E=w.gl,T=w.viewBox,s=w.dataBox,L=w.screenBox,M=w.pixelRatio,z=w.tickEnable,D=w.tickPad,N=w.tickColor,I=w.tickAngle,k=w.labelEnable,B=w.labelPad,O=w.labelColor,H=w.labelAngle,Y=this.labelOffset[d],j=this.labelCount[d],et=f.lt(_,s[d]),it=f.le(_,s[d+2]);b[0]=b[1]=0,b[d]=1,u[d]=(T[2+d]+T[d])/(L[2+d]-L[d])-1;var ut=2/L[2+(d^1)]-L[d^1];u[d^1]=ut*T[d^1]-1,z[d]&&(u[d^1]-=ut*M*D[d],ety[et]&&(A.uniforms.dataAxis=b,A.uniforms.screenOffset=u,A.uniforms.color=N[d],A.uniforms.angle=I[d],E.drawArrays(E.TRIANGLES,y[et],y[it]-y[et]))),k[d]&&j&&(u[d^1]-=ut*M*B[d],A.uniforms.dataAxis=o,A.uniforms.screenOffset=u,A.uniforms.color=O[d],A.uniforms.angle=H[d],E.drawArrays(E.TRIANGLES,Y,j)),u[d^1]=ut*T[2+(d^1)]-1,z[d+2]&&(u[d^1]+=ut*M*D[d+2],ety[et]&&(A.uniforms.dataAxis=b,A.uniforms.screenOffset=u,A.uniforms.color=N[d+2],A.uniforms.angle=I[d+2],E.drawArrays(E.TRIANGLES,y[et],y[it]-y[et]))),k[d+2]&&j&&(u[d^1]+=ut*M*B[d+2],A.uniforms.dataAxis=o,A.uniforms.screenOffset=u,A.uniforms.color=O[d+2],A.uniforms.angle=H[d+2],E.drawArrays(E.TRIANGLES,Y,j))}}(),m.drawTitle=function(){var b=[0,0],u=[0,0];return function(){var o=this.plot,d=this.shader,w=o.gl,A=o.screenBox,_=o.titleCenter,y=o.titleAngle,E=o.titleColor,T=o.pixelRatio;if(this.titleCount){for(var s=0;s<2;++s)u[s]=2*(_[s]*T-A[s])/(A[2+s]-A[s])-1;d.bind(),d.uniforms.dataAxis=b,d.uniforms.screenOffset=u,d.uniforms.angle=y,d.uniforms.color=E,w.drawArrays(w.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=function(){var b=[0,0],u=[0,0],o=[0,0];return function(){var d=this.plot,w=this.shader,A=d._tickBounds,_=d.dataBox,y=d.screenBox,E=d.viewBox;w.bind();for(var T=0;T<2;++T){var s=A[T],L=A[T+2],M=L-s,z=.5*(_[T+2]+_[T]),D=_[T+2]-_[T],N=E[T],I=E[T+2],k=I-N,B=y[T],O=y[T+2],H=O-B;u[T]=2*M/D*k/H,b[T]=2*(s-z)/D*k/H}o[1]=2*d.pixelRatio/(y[3]-y[1]),o[0]=o[1]*(y[3]-y[1])/(y[2]-y[0]),w.uniforms.dataScale=u,w.uniforms.dataShift=b,w.uniforms.textScale=o,this.vbo.bind(),w.attributes.textCoordinate.pointer()}}(),m.update=function(b){var u=[],o=b.ticks,d=b.bounds,w,A,_,y,E;for(E=0;E<2;++E){var T=[Math.floor(u.length/3)],s=[-1/0],L=o[E];for(w=0;w=0))){var k=d[I]-A[I]*(d[I+2]-d[I])/(A[I+2]-A[I]);I===0?E.drawLine(k,d[1],k,d[3],N[I],D[I]):E.drawLine(d[0],k,d[2],k,N[I],D[I])}}for(var I=0;I=0;--o)this.objects[o].dispose();this.objects.length=0;for(var o=this.overlays.length-1;o>=0;--o)this.overlays[o].dispose();this.overlays.length=0,this.gl=null},m.addObject=function(o){this.objects.indexOf(o)<0&&(this.objects.push(o),this.setDirty())},m.removeObject=function(o){for(var d=this.objects,w=0;wMath.abs(s))o.rotate(z,0,0,-T*L*Math.PI*y.rotateSpeed/window.innerWidth);else if(!y._ortho){var D=-y.zoomSpeed*M*s/window.innerHeight*(z-o.lastT())/20;o.pan(z,0,0,w*(Math.exp(D)-1))}}},!0)},y.enableMouseListeners(),y}},8245:function(v,p,r){var e=r(6832),a=r(5158),n=e([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); -}`]),f=t([`precision mediump float; +}`]),f=e([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; @@ -5546,7 +5546,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);v.exports=function(c){return a(c,n,f,null,[{name:"position",type:"vec2"}])}},1059:function(v,p,r){var t=r(4296),a=r(7453),n=r(2771),f=r(6496),c=r(2611),l=r(4234),m=r(8126),h=r(6145),b=r(1120),u=r(5268),o=r(8245),d=r(2321)({tablet:!0,featureDetect:!0});v.exports={createScene:E,createCamera:t};function w(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function A(s,L){var M=null;try{M=s.getContext("webgl",L),M||(M=s.getContext("experimental-webgl",L))}catch{return null}return M}function _(s){var L=Math.round(Math.log(Math.abs(s))/Math.log(10));if(L<0){var M=Math.round(Math.pow(10,-L));return Math.ceil(s*M)/M}else if(L>0){var M=Math.round(Math.pow(10,L));return Math.ceil(s/M)*M}return Math.ceil(s)}function y(s){return typeof s=="boolean"?s:!0}function E(s){s=s||{},s.camera=s.camera||{};var L=s.canvas;if(!L)if(L=document.createElement("canvas"),s.container){var M=s.container;M.appendChild(L)}else document.body.appendChild(L);var z=s.gl;if(z||(s.glOptions&&(d=!!s.glOptions.preserveDrawingBuffer),z=A(L,s.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d})),!z)throw new Error("webgl not supported");var D=s.bounds||[[-10,-10,-10],[10,10,10]],N=new w,I=l(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!d}),k=o(z),B=s.cameraObject&&s.cameraObject._ortho===!0||s.camera.projection&&s.camera.projection.type==="orthographic"||!1,O={eye:s.camera.eye||[2,0,0],center:s.camera.center||[0,0,0],up:s.camera.up||[0,1,0],zoomMin:s.camera.zoomMax||.1,zoomMax:s.camera.zoomMin||100,mode:s.camera.mode||"turntable",_ortho:B},V=s.axes||{},Y=a(z,V);Y.enable=!V.disable;var j=s.spikes||{},te=f(z,j),ie=[],ue=[],J=[],X=[],ee=!0,$=!0,G=new Array(16),Q=new Array(16),oe={view:null,projection:G,model:Q,_ortho:!1},$=!0,Z=[z.drawingBufferWidth,z.drawingBufferHeight],se=s.cameraObject||t(L,O),ne={gl:z,contextLost:!1,pixelRatio:s.pixelRatio||1,canvas:L,selection:N,camera:se,axes:Y,axesPixels:null,spikes:te,bounds:D,objects:ie,shape:Z,aspect:s.aspectRatio||[1,1,1],pickRadius:s.pickRadius||10,zNear:s.zNear||.01,zFar:s.zFar||1e3,fovy:s.fovy||Math.PI/4,clearColor:s.clearColor||[0,0,0,0],autoResize:y(s.autoResize),autoBounds:y(s.autoBounds),autoScale:!!s.autoScale,autoCenter:y(s.autoCenter),clipToBounds:y(s.clipToBounds),snapToData:!!s.snapToData,onselect:s.onselect||null,onrender:s.onrender||null,onclick:s.onclick||null,cameraParams:oe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ve){this.aspect[0]=Ve.x,this.aspect[1]=Ve.y,this.aspect[2]=Ve.z,$=!0},setBounds:function(Ve,Ue){this.bounds[0][Ve]=Ue.min,this.bounds[1][Ve]=Ue.max},setClearColor:function(Ve){this.clearColor=Ve},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},ce=[z.drawingBufferWidth/ne.pixelRatio|0,z.drawingBufferHeight/ne.pixelRatio|0];function ge(){if(!ne._stopped&&ne.autoResize){var Ve=L.parentNode,Ue=1,ke=1;Ve&&Ve!==document.body?(Ue=Ve.clientWidth,ke=Ve.clientHeight):(Ue=window.innerWidth,ke=window.innerHeight);var He=Math.ceil(Ue*ne.pixelRatio)|0,Ie=Math.ceil(ke*ne.pixelRatio)|0;if(He!==L.width||Ie!==L.height){L.width=He,L.height=Ie;var rt=L.style;rt.position=rt.position||"absolute",rt.left="0px",rt.top="0px",rt.width=Ue+"px",rt.height=ke+"px",ee=!0}}}ne.autoResize&&ge(),window.addEventListener("resize",ge);function Te(){for(var Ve=ie.length,Ue=X.length,ke=0;ke0&&J[Ue-1]===0;)J.pop(),X.pop().dispose()}ne.update=function(Ve){ne._stopped||(ee=!0,$=!0)},ne.add=function(Ve){ne._stopped||(Ve.axes=Y,ie.push(Ve),ue.push(-1),ee=!0,$=!0,Te())},ne.remove=function(Ve){if(!ne._stopped){var Ue=ie.indexOf(Ve);Ue<0||(ie.splice(Ue,1),ue.pop(),ee=!0,$=!0,Te())}},ne.dispose=function(){if(!ne._stopped&&(ne._stopped=!0,window.removeEventListener("resize",ge),L.removeEventListener("webglcontextlost",we),ne.mouseListener.enabled=!1,!ne.contextLost)){Y.dispose(),te.dispose();for(var Ve=0;VeN.distance)continue;for(var ht=0;ht0){var M=Math.round(Math.pow(10,L));return Math.ceil(s/M)*M}return Math.ceil(s)}function y(s){return typeof s=="boolean"?s:!0}function E(s){s=s||{},s.camera=s.camera||{};var L=s.canvas;if(!L)if(L=document.createElement("canvas"),s.container){var M=s.container;M.appendChild(L)}else document.body.appendChild(L);var z=s.gl;if(z||(s.glOptions&&(d=!!s.glOptions.preserveDrawingBuffer),z=A(L,s.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d})),!z)throw new Error("webgl not supported");var D=s.bounds||[[-10,-10,-10],[10,10,10]],N=new w,I=l(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!d}),k=o(z),B=s.cameraObject&&s.cameraObject._ortho===!0||s.camera.projection&&s.camera.projection.type==="orthographic"||!1,O={eye:s.camera.eye||[2,0,0],center:s.camera.center||[0,0,0],up:s.camera.up||[0,1,0],zoomMin:s.camera.zoomMax||.1,zoomMax:s.camera.zoomMin||100,mode:s.camera.mode||"turntable",_ortho:B},H=s.axes||{},Y=a(z,H);Y.enable=!H.disable;var j=s.spikes||{},et=f(z,j),it=[],ut=[],J=[],X=[],tt=!0,$=!0,V=new Array(16),Q=new Array(16),ot={view:null,projection:V,model:Q,_ortho:!1},$=!0,Z=[z.drawingBufferWidth,z.drawingBufferHeight],st=s.cameraObject||e(L,O),nt={gl:z,contextLost:!1,pixelRatio:s.pixelRatio||1,canvas:L,selection:N,camera:st,axes:Y,axesPixels:null,spikes:et,bounds:D,objects:it,shape:Z,aspect:s.aspectRatio||[1,1,1],pickRadius:s.pickRadius||10,zNear:s.zNear||.01,zFar:s.zFar||1e3,fovy:s.fovy||Math.PI/4,clearColor:s.clearColor||[0,0,0,0],autoResize:y(s.autoResize),autoBounds:y(s.autoBounds),autoScale:!!s.autoScale,autoCenter:y(s.autoCenter),clipToBounds:y(s.clipToBounds),snapToData:!!s.snapToData,onselect:s.onselect||null,onrender:s.onrender||null,onclick:s.onclick||null,cameraParams:ot,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Ht){this.aspect[0]=Ht.x,this.aspect[1]=Ht.y,this.aspect[2]=Ht.z,$=!0},setBounds:function(Ht,Ut){this.bounds[0][Ht]=Ut.min,this.bounds[1][Ht]=Ut.max},setClearColor:function(Ht){this.clearColor=Ht},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},ct=[z.drawingBufferWidth/nt.pixelRatio|0,z.drawingBufferHeight/nt.pixelRatio|0];function gt(){if(!nt._stopped&&nt.autoResize){var Ht=L.parentNode,Ut=1,kt=1;Ht&&Ht!==document.body?(Ut=Ht.clientWidth,kt=Ht.clientHeight):(Ut=window.innerWidth,kt=window.innerHeight);var Vt=Math.ceil(Ut*nt.pixelRatio)|0,It=Math.ceil(kt*nt.pixelRatio)|0;if(Vt!==L.width||It!==L.height){L.width=Vt,L.height=It;var re=L.style;re.position=re.position||"absolute",re.left="0px",re.top="0px",re.width=Ut+"px",re.height=kt+"px",tt=!0}}}nt.autoResize&>(),window.addEventListener("resize",gt);function Tt(){for(var Ht=it.length,Ut=X.length,kt=0;kt0&&J[Ut-1]===0;)J.pop(),X.pop().dispose()}nt.update=function(Ht){nt._stopped||(tt=!0,$=!0)},nt.add=function(Ht){nt._stopped||(Ht.axes=Y,it.push(Ht),ut.push(-1),tt=!0,$=!0,Tt())},nt.remove=function(Ht){if(!nt._stopped){var Ut=it.indexOf(Ht);Ut<0||(it.splice(Ut,1),ut.pop(),tt=!0,$=!0,Tt())}},nt.dispose=function(){if(!nt._stopped&&(nt._stopped=!0,window.removeEventListener("resize",gt),L.removeEventListener("webglcontextlost",wt),nt.mouseListener.enabled=!1,!nt.contextLost)){Y.dispose(),et.dispose();for(var Ht=0;HtN.distance)continue;for(var he=0;he>>1,w=b.positions instanceof Float32Array,A=b.idToIndex instanceof Int32Array&&b.idToIndex.length>=d,_=b.positions,y=w?_:n.mallocFloat32(_.length),E=A?b.idToIndex:n.mallocInt32(d);if(w||y.set(_),!A)for(y.set(_),u=0;u>>1,w;for(w=0;w=u[0]&&A<=u[2]&&_>=u[1]&&_<=u[3]&&o++}return o}l.unifiedDraw=function(){var b=[1,0,0,0,1,0,0,0,1],u=[0,0,0,0];return function(o){var d=o!==void 0,w=d?this.pickShader:this.shader,A=this.plot.gl,_=this.plot.dataBox;if(this.pointCount===0)return o;var y=_[2]-_[0],E=_[3]-_[1],T=m(this.points,_),s=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(T,.33333)));b[0]=2/y,b[4]=2/E,b[6]=-2*_[0]/y-1,b[7]=-2*_[1]/E-1,this.offsetBuffer.bind(),w.bind(),w.attributes.position.pointer(),w.uniforms.matrix=b,w.uniforms.color=this.color,w.uniforms.borderColor=this.borderColor,w.uniforms.pointCloud=s<5,w.uniforms.pointSize=s,w.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),d&&(u[0]=o&255,u[1]=o>>8&255,u[2]=o>>16&255,u[3]=o>>24&255,this.pickBuffer.bind(),w.attributes.pickId.pointer(A.UNSIGNED_BYTE),w.uniforms.pickOffset=u,this.pickOffset=o);var L=A.getParameter(A.BLEND),M=A.getParameter(A.DITHER);return L&&!this.blend&&A.disable(A.BLEND),M&&A.disable(A.DITHER),A.drawArrays(A.POINTS,0,this.pointCount),L&&!this.blend&&A.enable(A.BLEND),M&&A.enable(A.DITHER),o+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(b,u,o){var d=this.pickOffset,w=this.pointCount;if(o=d+w)return null;var A=o-d,_=this.points;return{object:this,pointId:A,dataCoord:[_[2*A],_[2*A+1]]}};function h(b,u){var o=b.gl,d=a(o),w=a(o),A=t(o,f.pointVertex,f.pointFragment),_=t(o,f.pickVertex,f.pickFragment),y=new c(b,d,w,A,_);return y.update(u),b.addObject(y),y}},6093:function(v){v.exports=p;function p(r,t,a,n){var f=t[0],c=t[1],l=t[2],m=t[3],h=a[0],b=a[1],u=a[2],o=a[3],d,w,A,_,y;return w=f*h+c*b+l*u+m*o,w<0&&(w=-w,h=-h,b=-b,u=-u,o=-o),1-w>1e-6?(d=Math.acos(w),A=Math.sin(d),_=Math.sin((1-n)*d)/A,y=Math.sin(n*d)/A):(_=1-n,y=n),r[0]=_*f+y*h,r[1]=_*c+y*b,r[2]=_*l+y*u,r[3]=_*m+y*o,r}},8240:function(v){v.exports=function(p){return!p&&p!==0?"":p.toString()}},4123:function(v,p,r){var t=r(875);v.exports=n;var a={};function n(f,c,l){var m=a[c];if(m||(m=a[c]={}),f in m)return m[f];var h={textAlign:"center",textBaseline:"middle",lineHeight:1,font:c,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};h.triangles=!0;var b=t(f,h);h.triangles=!1;var u=t(f,h),o,d;if(l&&l!==1){for(o=0;o>>1,w=b.positions instanceof Float32Array,A=b.idToIndex instanceof Int32Array&&b.idToIndex.length>=d,_=b.positions,y=w?_:n.mallocFloat32(_.length),E=A?b.idToIndex:n.mallocInt32(d);if(w||y.set(_),!A)for(y.set(_),u=0;u>>1,w;for(w=0;w=u[0]&&A<=u[2]&&_>=u[1]&&_<=u[3]&&o++}return o}l.unifiedDraw=function(){var b=[1,0,0,0,1,0,0,0,1],u=[0,0,0,0];return function(o){var d=o!==void 0,w=d?this.pickShader:this.shader,A=this.plot.gl,_=this.plot.dataBox;if(this.pointCount===0)return o;var y=_[2]-_[0],E=_[3]-_[1],T=m(this.points,_),s=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(T,.33333)));b[0]=2/y,b[4]=2/E,b[6]=-2*_[0]/y-1,b[7]=-2*_[1]/E-1,this.offsetBuffer.bind(),w.bind(),w.attributes.position.pointer(),w.uniforms.matrix=b,w.uniforms.color=this.color,w.uniforms.borderColor=this.borderColor,w.uniforms.pointCloud=s<5,w.uniforms.pointSize=s,w.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),d&&(u[0]=o&255,u[1]=o>>8&255,u[2]=o>>16&255,u[3]=o>>24&255,this.pickBuffer.bind(),w.attributes.pickId.pointer(A.UNSIGNED_BYTE),w.uniforms.pickOffset=u,this.pickOffset=o);var L=A.getParameter(A.BLEND),M=A.getParameter(A.DITHER);return L&&!this.blend&&A.disable(A.BLEND),M&&A.disable(A.DITHER),A.drawArrays(A.POINTS,0,this.pointCount),L&&!this.blend&&A.enable(A.BLEND),M&&A.enable(A.DITHER),o+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(b,u,o){var d=this.pickOffset,w=this.pointCount;if(o=d+w)return null;var A=o-d,_=this.points;return{object:this,pointId:A,dataCoord:[_[2*A],_[2*A+1]]}};function h(b,u){var o=b.gl,d=a(o),w=a(o),A=e(o,f.pointVertex,f.pointFragment),_=e(o,f.pickVertex,f.pickFragment),y=new c(b,d,w,A,_);return y.update(u),b.addObject(y),y}},6093:function(v){v.exports=p;function p(r,e,a,n){var f=e[0],c=e[1],l=e[2],m=e[3],h=a[0],b=a[1],u=a[2],o=a[3],d,w,A,_,y;return w=f*h+c*b+l*u+m*o,w<0&&(w=-w,h=-h,b=-b,u=-u,o=-o),1-w>1e-6?(d=Math.acos(w),A=Math.sin(d),_=Math.sin((1-n)*d)/A,y=Math.sin(n*d)/A):(_=1-n,y=n),r[0]=_*f+y*h,r[1]=_*c+y*b,r[2]=_*l+y*u,r[3]=_*m+y*o,r}},8240:function(v){v.exports=function(p){return!p&&p!==0?"":p.toString()}},4123:function(v,p,r){var e=r(875);v.exports=n;var a={};function n(f,c,l){var m=a[c];if(m||(m=a[c]={}),f in m)return m[f];var h={textAlign:"center",textBaseline:"middle",lineHeight:1,font:c,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};h.triangles=!0;var b=e(f,h);h.triangles=!1;var u=e(f,h),o,d;if(l&&l!==1){for(o=0;o1?1:J}function A(J,X,ee,G,Q,oe,$,Z,se,ne,ce,ge){this.gl=J,this.pixelRatio=1,this.shader=X,this.orthoShader=ee,this.projectShader=G,this.pointBuffer=Q,this.colorBuffer=oe,this.glyphBuffer=$,this.idBuffer=Z,this.vao=se,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=ne,this.pickOrthoShader=ce,this.pickProjectShader=ge,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var _=A.prototype;_.pickSlots=1,_.setPickBase=function(J){this.pickId=J},_.isTransparent=function(){if(this.hasAlpha)return!0;for(var J=0;J<3;++J)if(this.axesProject[J]&&this.projectHasAlpha)return!0;return!1},_.isOpaque=function(){if(!this.hasAlpha)return!0;for(var J=0;J<3;++J)if(this.axesProject[J]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],E=[0,0,0],T=[0,0,0],s=[0,0,0,1],L=[0,0,0,1],M=b.slice(),z=[0,0,0],D=[[0,0,0],[0,0,0]];function N(J){return J[0]=J[1]=J[2]=0,J}function I(J,X){return J[0]=X[0],J[1]=X[1],J[2]=X[2],J[3]=1,J}function k(J,X,ee,G){return J[0]=X[0],J[1]=X[1],J[2]=X[2],J[ee]=G,J}function B(J){for(var X=D,ee=0;ee<2;++ee)for(var G=0;G<3;++G)X[ee][G]=Math.max(Math.min(J[ee][G],1e8),-1e8);return X}function O(J,X,ee,G){var Q=X.axesProject,oe=X.gl,$=J.uniforms,Z=ee.model||b,se=ee.view||b,ne=ee.projection||b,ce=X.axesBounds,ge=B(X.clipBounds),Te;X.axes&&X.axes.lastCubeProps?Te=X.axes.lastCubeProps.axis:Te=[1,1,1],y[0]=2/oe.drawingBufferWidth,y[1]=2/oe.drawingBufferHeight,J.bind(),$.view=se,$.projection=ne,$.screenSize=y,$.highlightId=X.highlightId,$.highlightScale=X.highlightScale,$.clipBounds=ge,$.pickGroup=X.pickId/255,$.pixelRatio=G;for(var we=0;we<3;++we)if(Q[we]){$.scale=X.projectScale[we],$.opacity=X.projectOpacity[we];for(var Re=M,be=0;be<16;++be)Re[be]=0;for(var be=0;be<4;++be)Re[5*be]=1;Re[5*we]=0,Te[we]<0?Re[12+we]=ce[0][we]:Re[12+we]=ce[1][we],c(Re,Z,Re),$.model=Re;var Ae=(we+1)%3,me=(we+2)%3,Le=N(E),Ve=N(T);Le[Ae]=1,Ve[me]=1;var Ue=o(ne,se,Z,I(s,Le)),ke=o(ne,se,Z,I(L,Ve));if(Math.abs(Ue[1])>Math.abs(ke[1])){var He=Ue;Ue=ke,ke=He,He=Le,Le=Ve,Ve=He;var Ie=Ae;Ae=me,me=Ie}Ue[0]<0&&(Le[Ae]=-1),ke[1]>0&&(Ve[me]=-1);for(var rt=0,Ke=0,be=0;be<4;++be)rt+=Math.pow(Z[4*Ae+be],2),Ke+=Math.pow(Z[4*me+be],2);Le[Ae]/=Math.sqrt(rt),Ve[me]/=Math.sqrt(Ke),$.axes[0]=Le,$.axes[1]=Ve,$.fragClipBounds[0]=k(z,ge[0],we,-1e8),$.fragClipBounds[1]=k(z,ge[1],we,1e8),X.vao.bind(),X.vao.draw(oe.TRIANGLES,X.vertexCount),X.lineWidth>0&&(oe.lineWidth(X.lineWidth*G),X.vao.draw(oe.LINES,X.lineVertexCount,X.vertexCount)),X.vao.unbind()}}var V=[-1e8,-1e8,-1e8],Y=[1e8,1e8,1e8],j=[V,Y];function te(J,X,ee,G,Q,oe,$){var Z=ee.gl;if((oe===ee.projectHasAlpha||$)&&O(X,ee,G,Q),oe===ee.hasAlpha||$){J.bind();var se=J.uniforms;se.model=G.model||b,se.view=G.view||b,se.projection=G.projection||b,y[0]=2/Z.drawingBufferWidth,y[1]=2/Z.drawingBufferHeight,se.screenSize=y,se.highlightId=ee.highlightId,se.highlightScale=ee.highlightScale,se.fragClipBounds=j,se.clipBounds=ee.axes.bounds,se.opacity=ee.opacity,se.pickGroup=ee.pickId/255,se.pixelRatio=Q,ee.vao.bind(),ee.vao.draw(Z.TRIANGLES,ee.vertexCount),ee.lineWidth>0&&(Z.lineWidth(ee.lineWidth*Q),ee.vao.draw(Z.LINES,ee.lineVertexCount,ee.vertexCount)),ee.vao.unbind()}}_.draw=function(J){var X=this.useOrtho?this.orthoShader:this.shader;te(X,this.projectShader,this,J,this.pixelRatio,!1,!1)},_.drawTransparent=function(J){var X=this.useOrtho?this.orthoShader:this.shader;te(X,this.projectShader,this,J,this.pixelRatio,!0,!1)},_.drawPick=function(J){var X=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;te(X,this.pickProjectShader,this,J,1,!0,!0)},_.pick=function(J){if(!J||J.id!==this.pickId)return null;var X=J.value[2]+(J.value[1]<<8)+(J.value[0]<<16);if(X>=this.pointCount||X<0)return null;var ee=this.points[X],G=this._selectResult;G.index=X;for(var Q=0;Q<3;++Q)G.position[Q]=G.dataCoordinate[Q]=ee[Q];return G},_.highlight=function(J){if(!J)this.highlightId=[1,1,1,1];else{var X=J.index,ee=X&255,G=X>>8&255,Q=X>>16&255;this.highlightId=[ee/255,G/255,Q/255,0]}};function ie(J,X,ee,G){var Q;Array.isArray(J)?X0){var St=0,nt=me,ze=[0,0,0,1],Ze=[0,0,0,1],Je=Array.isArray(Te)&&Array.isArray(Te[0]),We=Array.isArray(be)&&Array.isArray(be[0]);e:for(var G=0;G0?1-Ke[0][0]:je<0?1+Ke[1][0]:1,it*=it>0?1-Ke[0][1]:it<0?1+Ke[1][1]:1;for(var mt=[je,it],Tt=Ie.cells||[],Bt=Ie.positions||[],ke=0;ke1?1:J}function A(J,X,tt,V,Q,ot,$,Z,st,nt,ct,gt){this.gl=J,this.pixelRatio=1,this.shader=X,this.orthoShader=tt,this.projectShader=V,this.pointBuffer=Q,this.colorBuffer=ot,this.glyphBuffer=$,this.idBuffer=Z,this.vao=st,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=nt,this.pickOrthoShader=ct,this.pickProjectShader=gt,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}var _=A.prototype;_.pickSlots=1,_.setPickBase=function(J){this.pickId=J},_.isTransparent=function(){if(this.hasAlpha)return!0;for(var J=0;J<3;++J)if(this.axesProject[J]&&this.projectHasAlpha)return!0;return!1},_.isOpaque=function(){if(!this.hasAlpha)return!0;for(var J=0;J<3;++J)if(this.axesProject[J]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],E=[0,0,0],T=[0,0,0],s=[0,0,0,1],L=[0,0,0,1],M=b.slice(),z=[0,0,0],D=[[0,0,0],[0,0,0]];function N(J){return J[0]=J[1]=J[2]=0,J}function I(J,X){return J[0]=X[0],J[1]=X[1],J[2]=X[2],J[3]=1,J}function k(J,X,tt,V){return J[0]=X[0],J[1]=X[1],J[2]=X[2],J[tt]=V,J}function B(J){for(var X=D,tt=0;tt<2;++tt)for(var V=0;V<3;++V)X[tt][V]=Math.max(Math.min(J[tt][V],1e8),-1e8);return X}function O(J,X,tt,V){var Q=X.axesProject,ot=X.gl,$=J.uniforms,Z=tt.model||b,st=tt.view||b,nt=tt.projection||b,ct=X.axesBounds,gt=B(X.clipBounds),Tt;X.axes&&X.axes.lastCubeProps?Tt=X.axes.lastCubeProps.axis:Tt=[1,1,1],y[0]=2/ot.drawingBufferWidth,y[1]=2/ot.drawingBufferHeight,J.bind(),$.view=st,$.projection=nt,$.screenSize=y,$.highlightId=X.highlightId,$.highlightScale=X.highlightScale,$.clipBounds=gt,$.pickGroup=X.pickId/255,$.pixelRatio=V;for(var wt=0;wt<3;++wt)if(Q[wt]){$.scale=X.projectScale[wt],$.opacity=X.projectOpacity[wt];for(var Rt=M,bt=0;bt<16;++bt)Rt[bt]=0;for(var bt=0;bt<4;++bt)Rt[5*bt]=1;Rt[5*wt]=0,Tt[wt]<0?Rt[12+wt]=ct[0][wt]:Rt[12+wt]=ct[1][wt],c(Rt,Z,Rt),$.model=Rt;var At=(wt+1)%3,mt=(wt+2)%3,Lt=N(E),Ht=N(T);Lt[At]=1,Ht[mt]=1;var Ut=o(nt,st,Z,I(s,Lt)),kt=o(nt,st,Z,I(L,Ht));if(Math.abs(Ut[1])>Math.abs(kt[1])){var Vt=Ut;Ut=kt,kt=Vt,Vt=Lt,Lt=Ht,Ht=Vt;var It=At;At=mt,mt=It}Ut[0]<0&&(Lt[At]=-1),kt[1]>0&&(Ht[mt]=-1);for(var re=0,Kt=0,bt=0;bt<4;++bt)re+=Math.pow(Z[4*At+bt],2),Kt+=Math.pow(Z[4*mt+bt],2);Lt[At]/=Math.sqrt(re),Ht[mt]/=Math.sqrt(Kt),$.axes[0]=Lt,$.axes[1]=Ht,$.fragClipBounds[0]=k(z,gt[0],wt,-1e8),$.fragClipBounds[1]=k(z,gt[1],wt,1e8),X.vao.bind(),X.vao.draw(ot.TRIANGLES,X.vertexCount),X.lineWidth>0&&(ot.lineWidth(X.lineWidth*V),X.vao.draw(ot.LINES,X.lineVertexCount,X.vertexCount)),X.vao.unbind()}}var H=[-1e8,-1e8,-1e8],Y=[1e8,1e8,1e8],j=[H,Y];function et(J,X,tt,V,Q,ot,$){var Z=tt.gl;if((ot===tt.projectHasAlpha||$)&&O(X,tt,V,Q),ot===tt.hasAlpha||$){J.bind();var st=J.uniforms;st.model=V.model||b,st.view=V.view||b,st.projection=V.projection||b,y[0]=2/Z.drawingBufferWidth,y[1]=2/Z.drawingBufferHeight,st.screenSize=y,st.highlightId=tt.highlightId,st.highlightScale=tt.highlightScale,st.fragClipBounds=j,st.clipBounds=tt.axes.bounds,st.opacity=tt.opacity,st.pickGroup=tt.pickId/255,st.pixelRatio=Q,tt.vao.bind(),tt.vao.draw(Z.TRIANGLES,tt.vertexCount),tt.lineWidth>0&&(Z.lineWidth(tt.lineWidth*Q),tt.vao.draw(Z.LINES,tt.lineVertexCount,tt.vertexCount)),tt.vao.unbind()}}_.draw=function(J){var X=this.useOrtho?this.orthoShader:this.shader;et(X,this.projectShader,this,J,this.pixelRatio,!1,!1)},_.drawTransparent=function(J){var X=this.useOrtho?this.orthoShader:this.shader;et(X,this.projectShader,this,J,this.pixelRatio,!0,!1)},_.drawPick=function(J){var X=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;et(X,this.pickProjectShader,this,J,1,!0,!0)},_.pick=function(J){if(!J||J.id!==this.pickId)return null;var X=J.value[2]+(J.value[1]<<8)+(J.value[0]<<16);if(X>=this.pointCount||X<0)return null;var tt=this.points[X],V=this._selectResult;V.index=X;for(var Q=0;Q<3;++Q)V.position[Q]=V.dataCoordinate[Q]=tt[Q];return V},_.highlight=function(J){if(!J)this.highlightId=[1,1,1,1];else{var X=J.index,tt=X&255,V=X>>8&255,Q=X>>16&255;this.highlightId=[tt/255,V/255,Q/255,0]}};function it(J,X,tt,V){var Q;Array.isArray(J)?X0){var Se=0,ne=mt,zt=[0,0,0,1],Xt=[0,0,0,1],Jt=Array.isArray(Tt)&&Array.isArray(Tt[0]),Wt=Array.isArray(bt)&&Array.isArray(bt[0]);t:for(var V=0;V0?1-Kt[0][0]:jt<0?1+Kt[1][0]:1,ie*=ie>0?1-Kt[0][1]:ie<0?1+Kt[1][1]:1;for(var me=[jt,ie],Te=It.cells||[],Be=It.positions||[],kt=0;kt0){var N=b*E;w.drawBox(T-N,s-N,L+N,s+N,d),w.drawBox(T-N,M-N,L+N,M+N,d),w.drawBox(T-N,s-N,T+N,M+N,d),w.drawBox(L-N,s-N,L+N,M+N,d)}}}},c.update=function(m){m=m||{},this.innerFill=!!m.innerFill,this.outerFill=!!m.outerFill,this.innerColor=(m.innerColor||[0,0,0,.5]).slice(),this.outerColor=(m.outerColor||[0,0,0,.5]).slice(),this.borderColor=(m.borderColor||[0,0,0,1]).slice(),this.borderWidth=m.borderWidth||0,this.selectBox=(m.selectBox||this.selectBox).slice()},c.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)};function l(m,h){var b=m.gl,u=a(b,[0,0,0,1,1,0,1,1]),o=t(b,n.boxVertex,n.boxFragment),d=new f(m,u,o);return d.update(h),m.addOverlay(d),d}},2611:function(v,p,r){v.exports=b;var t=r(4234),a=r(5306),n=r(5050),f=r(2288).nextPow2,c=function(u,o,d){for(var w=1e8,A=-1,_=-1,y=u.shape[0],E=u.shape[1],T=0;Tthis.buffer.length){a.free(this.buffer);for(var w=this.buffer=a.mallocUint8(f(d*o*4)),A=0;Aw)for(o=w;od)for(o=d;o=0){for(var B=k.type.charAt(k.type.length-1)|0,O=new Array(B),V=0;V=0;)Y+=1;N[I]=Y}var j=new Array(w.length);function te(){y.program=f.program(E,y._vref,y._fref,D,N);for(var ie=0;ie=0){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new t("","Invalid data type for attribute "+y+": "+E);c(h,b,T[0],o,s,d,y)}else if(E.indexOf("mat")>=0){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new t("","Invalid data type for attribute "+y+": "+E);l(h,b,T,o,s,d,y)}else throw new t("","Unknown data type for attribute "+y+": "+E);break}}return d}},9016:function(v,p,r){var t=r(3984),a=r(9068);v.exports=c;function n(l){return function(){return l}}function f(l,m){for(var h=new Array(l),b=0;b4)throw new a("","Invalid data type");switch(Y.charAt(0)){case"b":case"i":l["uniform"+j+"iv"](b[N],I);break;case"v":l["uniform"+j+"fv"](b[N],I);break;default:throw new a("","Unrecognized data type for vector "+name+": "+Y)}}else if(Y.indexOf("mat")===0&&Y.length===4){if(j=Y.charCodeAt(Y.length-1)-48,j<2||j>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+Y);l["uniformMatrix"+j+"fv"](b[N],!1,I);break}else throw new a("","Unknown uniform data type for "+name+": "+Y)}}}}}function d(E,T){if(typeof T!="object")return[[E,T]];var s=[];for(var L in T){var M=T[L],z=E;parseInt(L)+""===L?z+="["+L+"]":z+="."+L,typeof M=="object"?s.push.apply(s,d(z,M)):s.push([z,M])}return s}function w(E){switch(E){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=E.indexOf("vec");if(0<=T&&T<=1&&E.length===4+T){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new a("","Invalid data type");return E.charAt(0)==="b"?f(s,!1):f(s,0)}else if(E.indexOf("mat")===0&&E.length===4){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+E);return f(s*s,0)}else throw new a("","Unknown uniform data type for "+name+": "+E)}}function A(E,T,s){if(typeof s=="object"){var L=_(s);Object.defineProperty(E,T,{get:n(L),set:o(s),enumerable:!0,configurable:!1})}else b[s]?Object.defineProperty(E,T,{get:u(s),set:o(s),enumerable:!0,configurable:!1}):E[T]=w(h[s].type)}function _(E){var T;if(Array.isArray(E)){T=new Array(E.length);for(var s=0;s1){h[0]in l||(l[h[0]]=[]),l=l[h[0]];for(var b=1;b1)for(var d=0;d"u"?r(4037):WeakMap,f=new n,c=0;function l(A,_,y,E,T,s,L){this.id=A,this.src=_,this.type=y,this.shader=E,this.count=s,this.programs=[],this.cache=L}l.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,_=A.gl,y=this.programs,E=0,T=y.length;E0){var N=b*E;w.drawBox(T-N,s-N,L+N,s+N,d),w.drawBox(T-N,M-N,L+N,M+N,d),w.drawBox(T-N,s-N,T+N,M+N,d),w.drawBox(L-N,s-N,L+N,M+N,d)}}}},c.update=function(m){m=m||{},this.innerFill=!!m.innerFill,this.outerFill=!!m.outerFill,this.innerColor=(m.innerColor||[0,0,0,.5]).slice(),this.outerColor=(m.outerColor||[0,0,0,.5]).slice(),this.borderColor=(m.borderColor||[0,0,0,1]).slice(),this.borderWidth=m.borderWidth||0,this.selectBox=(m.selectBox||this.selectBox).slice()},c.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)};function l(m,h){var b=m.gl,u=a(b,[0,0,0,1,1,0,1,1]),o=e(b,n.boxVertex,n.boxFragment),d=new f(m,u,o);return d.update(h),m.addOverlay(d),d}},2611:function(v,p,r){v.exports=b;var e=r(4234),a=r(5306),n=r(5050),f=r(2288).nextPow2,c=function(u,o,d){for(var w=1e8,A=-1,_=-1,y=u.shape[0],E=u.shape[1],T=0;Tthis.buffer.length){a.free(this.buffer);for(var w=this.buffer=a.mallocUint8(f(d*o*4)),A=0;Aw)for(o=w;od)for(o=d;o=0){for(var B=k.type.charAt(k.type.length-1)|0,O=new Array(B),H=0;H=0;)Y+=1;N[I]=Y}var j=new Array(w.length);function et(){y.program=f.program(E,y._vref,y._fref,D,N);for(var it=0;it=0){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new e("","Invalid data type for attribute "+y+": "+E);c(h,b,T[0],o,s,d,y)}else if(E.indexOf("mat")>=0){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new e("","Invalid data type for attribute "+y+": "+E);l(h,b,T,o,s,d,y)}else throw new e("","Unknown data type for attribute "+y+": "+E);break}}return d}},9016:function(v,p,r){var e=r(3984),a=r(9068);v.exports=c;function n(l){return function(){return l}}function f(l,m){for(var h=new Array(l),b=0;b4)throw new a("","Invalid data type");switch(Y.charAt(0)){case"b":case"i":l["uniform"+j+"iv"](b[N],I);break;case"v":l["uniform"+j+"fv"](b[N],I);break;default:throw new a("","Unrecognized data type for vector "+name+": "+Y)}}else if(Y.indexOf("mat")===0&&Y.length===4){if(j=Y.charCodeAt(Y.length-1)-48,j<2||j>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+Y);l["uniformMatrix"+j+"fv"](b[N],!1,I);break}else throw new a("","Unknown uniform data type for "+name+": "+Y)}}}}}function d(E,T){if(typeof T!="object")return[[E,T]];var s=[];for(var L in T){var M=T[L],z=E;parseInt(L)+""===L?z+="["+L+"]":z+="."+L,typeof M=="object"?s.push.apply(s,d(z,M)):s.push([z,M])}return s}function w(E){switch(E){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=E.indexOf("vec");if(0<=T&&T<=1&&E.length===4+T){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new a("","Invalid data type");return E.charAt(0)==="b"?f(s,!1):f(s,0)}else if(E.indexOf("mat")===0&&E.length===4){var s=E.charCodeAt(E.length-1)-48;if(s<2||s>4)throw new a("","Invalid uniform dimension type for matrix "+name+": "+E);return f(s*s,0)}else throw new a("","Unknown uniform data type for "+name+": "+E)}}function A(E,T,s){if(typeof s=="object"){var L=_(s);Object.defineProperty(E,T,{get:n(L),set:o(s),enumerable:!0,configurable:!1})}else b[s]?Object.defineProperty(E,T,{get:u(s),set:o(s),enumerable:!0,configurable:!1}):E[T]=w(h[s].type)}function _(E){var T;if(Array.isArray(E)){T=new Array(E.length);for(var s=0;s1){h[0]in l||(l[h[0]]=[]),l=l[h[0]];for(var b=1;b1)for(var d=0;d"u"?r(4037):WeakMap,f=new n,c=0;function l(A,_,y,E,T,s,L){this.id=A,this.src=_,this.type=y,this.shader=E,this.count=s,this.programs=[],this.cache=L}l.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,_=A.gl,y=this.programs,E=0,T=y.length;E0)for(var J=0;JA)return y-1}return y},m=function(w,A,_){return w_?_:w},h=function(w,A,_){var y=A.vectors,E=A.meshgrid,T=w[0],s=w[1],L=w[2],M=E[0].length,z=E[1].length,D=E[2].length,N=l(E[0],T),I=l(E[1],s),k=l(E[2],L),B=N+1,O=I+1,V=k+1;if(N=m(N,0,M-1),B=m(B,0,M-1),I=m(I,0,z-1),O=m(O,0,z-1),k=m(k,0,D-1),V=m(V,0,D-1),N<0||I<0||k<0||B>M-1||O>z-1||V>D-1)return t.create();var Y=E[0][N],j=E[0][B],te=E[1][I],ie=E[1][O],ue=E[2][k],J=E[2][V],X=(T-Y)/(j-Y),ee=(s-te)/(ie-te),G=(L-ue)/(J-ue);isFinite(X)||(X=.5),isFinite(ee)||(ee=.5),isFinite(G)||(G=.5);var Q,oe,$,Z,se,ne;switch(_.reversedX&&(N=M-1-N,B=M-1-B),_.reversedY&&(I=z-1-I,O=z-1-O),_.reversedZ&&(k=D-1-k,V=D-1-V),_.filled){case 5:se=k,ne=V,$=I*D,Z=O*D,Q=N*D*z,oe=B*D*z;break;case 4:se=k,ne=V,Q=N*D,oe=B*D,$=I*D*M,Z=O*D*M;break;case 3:$=I,Z=O,se=k*z,ne=V*z,Q=N*z*D,oe=B*z*D;break;case 2:$=I,Z=O,Q=N*z,oe=B*z,se=k*z*M,ne=V*z*M;break;case 1:Q=N,oe=B,se=k*M,ne=V*M,$=I*M*D,Z=O*M*D;break;default:Q=N,oe=B,$=I*M,Z=O*M,se=k*M*z,ne=V*M*z;break}var ce=y[Q+$+se],ge=y[Q+$+ne],Te=y[Q+Z+se],we=y[Q+Z+ne],Re=y[oe+$+se],be=y[oe+$+ne],Ae=y[oe+Z+se],me=y[oe+Z+ne],Le=t.create(),Ve=t.create(),Ue=t.create(),ke=t.create();t.lerp(Le,ce,Re,X),t.lerp(Ve,ge,be,X),t.lerp(Ue,Te,Ae,X),t.lerp(ke,we,me,X);var He=t.create(),Ie=t.create();t.lerp(He,Le,Ue,ee),t.lerp(Ie,Ve,ke,ee);var rt=t.create();return t.lerp(rt,He,Ie,G),rt},b=function(w){var A=1/0;w.sort(function(T,s){return T-s});for(var _=w.length,y=1;y<_;y++){var E=Math.abs(w[y]-w[y-1]);EB||meO||LeV)},j=t.distance(A[0],A[1]),te=10*j/y,ie=te*te,ue=1,J=0,X=_.length;X>1&&(ue=u(_));for(var ee=0;eeJ&&(J=ce),se.push(ce),D.push({points:Q,velocities:oe,divergences:se});for(var ge=0;geie&&t.scale(Te,Te,te/Math.sqrt(we)),t.add(Te,Te,G),$=M(Te),t.squaredDistance(Z,Te)-ie>-1e-4*ie){Q.push(Te),Z=Te,oe.push($);var ne=z(Te,$),ce=t.length(ne);isFinite(ce)&&ce>J&&(J=ce),se.push(ce)}G=Te}}var Re=c(D,w.colormap,J,ue);return T?Re.tubeScale=T:(J===0&&(J=1),Re.tubeScale=E*.5*ue/J),Re};var o=r(9578),d=r(1140).createMesh;v.exports.createTubeMesh=function(w,A){return d(w,A,{shaders:o,traceType:"streamtube"})}},9054:function(v,p,r){var t=r(5158),a=r(6832),n=a([`precision highp float; +}`]);p.meshShader={vertex:a,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},p.pickShader={vertex:f,fragment:c,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(v,p,r){var e=r(2858),a=r(4020),n=["xyz","xzy","yxz","yzx","zxy","zyx"],f=function(w,A,_,y){for(var E=w.points,T=w.velocities,s=w.divergences,L=[],M=[],z=[],D=[],N=[],I=[],k=0,B=0,O=a.create(),H=a.create(),Y=8,j=0;j0)for(var J=0;JA)return y-1}return y},m=function(w,A,_){return w_?_:w},h=function(w,A,_){var y=A.vectors,E=A.meshgrid,T=w[0],s=w[1],L=w[2],M=E[0].length,z=E[1].length,D=E[2].length,N=l(E[0],T),I=l(E[1],s),k=l(E[2],L),B=N+1,O=I+1,H=k+1;if(N=m(N,0,M-1),B=m(B,0,M-1),I=m(I,0,z-1),O=m(O,0,z-1),k=m(k,0,D-1),H=m(H,0,D-1),N<0||I<0||k<0||B>M-1||O>z-1||H>D-1)return e.create();var Y=E[0][N],j=E[0][B],et=E[1][I],it=E[1][O],ut=E[2][k],J=E[2][H],X=(T-Y)/(j-Y),tt=(s-et)/(it-et),V=(L-ut)/(J-ut);isFinite(X)||(X=.5),isFinite(tt)||(tt=.5),isFinite(V)||(V=.5);var Q,ot,$,Z,st,nt;switch(_.reversedX&&(N=M-1-N,B=M-1-B),_.reversedY&&(I=z-1-I,O=z-1-O),_.reversedZ&&(k=D-1-k,H=D-1-H),_.filled){case 5:st=k,nt=H,$=I*D,Z=O*D,Q=N*D*z,ot=B*D*z;break;case 4:st=k,nt=H,Q=N*D,ot=B*D,$=I*D*M,Z=O*D*M;break;case 3:$=I,Z=O,st=k*z,nt=H*z,Q=N*z*D,ot=B*z*D;break;case 2:$=I,Z=O,Q=N*z,ot=B*z,st=k*z*M,nt=H*z*M;break;case 1:Q=N,ot=B,st=k*M,nt=H*M,$=I*M*D,Z=O*M*D;break;default:Q=N,ot=B,$=I*M,Z=O*M,st=k*M*z,nt=H*M*z;break}var ct=y[Q+$+st],gt=y[Q+$+nt],Tt=y[Q+Z+st],wt=y[Q+Z+nt],Rt=y[ot+$+st],bt=y[ot+$+nt],At=y[ot+Z+st],mt=y[ot+Z+nt],Lt=e.create(),Ht=e.create(),Ut=e.create(),kt=e.create();e.lerp(Lt,ct,Rt,X),e.lerp(Ht,gt,bt,X),e.lerp(Ut,Tt,At,X),e.lerp(kt,wt,mt,X);var Vt=e.create(),It=e.create();e.lerp(Vt,Lt,Ut,tt),e.lerp(It,Ht,kt,tt);var re=e.create();return e.lerp(re,Vt,It,V),re},b=function(w){var A=1/0;w.sort(function(T,s){return T-s});for(var _=w.length,y=1;y<_;y++){var E=Math.abs(w[y]-w[y-1]);EB||mtO||LtH)},j=e.distance(A[0],A[1]),et=10*j/y,it=et*et,ut=1,J=0,X=_.length;X>1&&(ut=u(_));for(var tt=0;ttJ&&(J=ct),st.push(ct),D.push({points:Q,velocities:ot,divergences:st});for(var gt=0;gtit&&e.scale(Tt,Tt,et/Math.sqrt(wt)),e.add(Tt,Tt,V),$=M(Tt),e.squaredDistance(Z,Tt)-it>-1e-4*it){Q.push(Tt),Z=Tt,ot.push($);var nt=z(Tt,$),ct=e.length(nt);isFinite(ct)&&ct>J&&(J=ct),st.push(ct)}V=Tt}}var Rt=c(D,w.colormap,J,ut);return T?Rt.tubeScale=T:(J===0&&(J=1),Rt.tubeScale=E*.5*ut/J),Rt};var o=r(9578),d=r(1140).createMesh;v.exports.createTubeMesh=function(w,A){return d(w,A,{shaders:o,traceType:"streamtube"})}},9054:function(v,p,r){var e=r(5158),a=r(6832),n=a([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -6403,36 +6403,36 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);p.createShader=function(m){var h=t(m,n,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},p.createPickShader=function(m){var h=t(m,n,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},p.createContourShader=function(m){var h=t(m,c,f,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h},p.createPickContourShader=function(m){var h=t(m,c,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h}},3754:function(v,p,r){v.exports=oe;var t=r(2288),a=r(5827),n=r(2944),f=r(8931),c=r(5306),l=r(9156),m=r(7498),h=r(7382),b=r(5050),u=r(4162),o=r(104),d=r(7437),w=r(5070),A=r(9144),_=r(9054),y=_.createShader,E=_.createContourShader,T=_.createPickShader,s=_.createPickContourShader,L=4*10,M=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],D=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var $=0;$<3;++$){var Z=D[$],se=($+1)%3,ne=($+2)%3;Z[se+0]=1,Z[ne+3]=1,Z[$+6]=1}})();function N($,Z,se,ne,ce){this.position=$,this.index=Z,this.uv=se,this.level=ne,this.dataCoordinate=ce}var I=256;function k($,Z,se,ne,ce,ge,Te,we,Re,be,Ae,me,Le,Ve,Ue){this.gl=$,this.shape=Z,this.bounds=se,this.objectOffset=Ue,this.intensityBounds=[],this._shader=ne,this._pickShader=ce,this._coordinateBuffer=ge,this._vao=Te,this._colorMap=we,this._contourShader=Re,this._contourPickShader=be,this._contourBuffer=Ae,this._contourVAO=me,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new N([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Le,this._dynamicVAO=Ve,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[b(c.mallocFloat(1024),[0,0]),b(c.mallocFloat(1024),[0,0]),b(c.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var B=k.prototype;B.genColormap=function($,Z){var se=!1,ne=h([l({colormap:$,nshades:I,format:"rgba"}).map(function(ce,ge){var Te=Z?O(ge/255,Z):ce[3];return Te<1&&(se=!0),[ce[0],ce[1],ce[2],255*Te]})]);return m.divseq(ne,255),this.hasAlphaScale=se,ne},B.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},B.isOpaque=function(){return!this.isTransparent()},B.pickSlots=1,B.setPickBase=function($){this.pickId=$};function O($,Z){if(!Z||!Z.length)return 1;for(var se=0;se$&&se>0){var ne=(Z[se][0]-$)/(Z[se][0]-Z[se-1][0]);return Z[se][1]*(1-ne)+ne*Z[se-1][1]}}return 1}var V=[0,0,0],Y={showSurface:!1,showContour:!1,projections:[M.slice(),M.slice(),M.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function j($,Z){var se,ne,ce,ge=Z.axes&&Z.axes.lastCubeProps.axis||V,Te=Z.showSurface,we=Z.showContour;for(se=0;se<3;++se)for(Te=Te||Z.surfaceProject[se],ne=0;ne<3;++ne)we=we||Z.contourProject[se][ne];for(se=0;se<3;++se){var Re=Y.projections[se];for(ne=0;ne<16;++ne)Re[ne]=0;for(ne=0;ne<4;++ne)Re[5*ne]=1;Re[5*se]=0,Re[12+se]=Z.axesBounds[+(ge[se]>0)][se],o(Re,$.model,Re);var be=Y.clipBounds[se];for(ce=0;ce<2;++ce)for(ne=0;ne<3;++ne)be[ce][ne]=$.clipBounds[ce][ne];be[0][se]=-1e8,be[1][se]=1e8}return Y.showSurface=Te,Y.showContour=we,Y}var te={model:M,view:M,projection:M,inverseModel:M.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},ie=M.slice(),ue=[1,0,0,0,1,0,0,0,1];function J($,Z){$=$||{};var se=this.gl;se.disable(se.CULL_FACE),this._colorMap.bind(0);var ne=te;ne.model=$.model||M,ne.view=$.view||M,ne.projection=$.projection||M,ne.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ne.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ne.objectOffset=this.objectOffset,ne.contourColor=this.contourColor[0],ne.inverseModel=d(ne.inverseModel,ne.model);for(var ce=0;ce<2;++ce)for(var ge=ne.clipBounds[ce],Te=0;Te<3;++Te)ge[Te]=Math.min(Math.max(this.clipBounds[ce][Te],-1e8),1e8);ne.kambient=this.ambientLight,ne.kdiffuse=this.diffuseLight,ne.kspecular=this.specularLight,ne.roughness=this.roughness,ne.fresnel=this.fresnel,ne.opacity=this.opacity,ne.height=0,ne.permutation=ue,ne.vertexColor=this.vertexColor;var we=ie;for(o(we,ne.view,ne.model),o(we,ne.projection,we),d(we,we),ce=0;ce<3;++ce)ne.eyePosition[ce]=we[12+ce]/we[15];var Re=we[15];for(ce=0;ce<3;++ce)Re+=this.lightPosition[ce]*we[4*ce+3];for(ce=0;ce<3;++ce){var be=we[12+ce];for(Te=0;Te<3;++Te)be+=we[4*Te+ce]*this.lightPosition[Te];ne.lightPosition[ce]=be/Re}var Ae=j(ne,this);if(Ae.showSurface){for(this._shader.bind(),this._shader.uniforms=ne,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(se.TRIANGLES,this._vertexCount),ce=0;ce<3;++ce)!this.surfaceProject[ce]||!this.vertexCount||(this._shader.uniforms.model=Ae.projections[ce],this._shader.uniforms.clipBounds=Ae.clipBounds[ce],this._vao.draw(se.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ae.showContour){var me=this._contourShader;ne.kambient=1,ne.kdiffuse=0,ne.kspecular=0,ne.opacity=1,me.bind(),me.uniforms=ne;var Le=this._contourVAO;for(Le.bind(),ce=0;ce<3;++ce)for(me.uniforms.permutation=D[ce],se.lineWidth(this.contourWidth[ce]*this.pixelRatio),Te=0;Te>4)/16)/255,ce=Math.floor(ne),ge=ne-ce,Te=Z[1]*($.value[1]+($.value[2]&15)/16)/255,we=Math.floor(Te),Re=Te-we;ce+=1,we+=1;var be=se.position;be[0]=be[1]=be[2]=0;for(var Ae=0;Ae<2;++Ae)for(var me=Ae?ge:1-ge,Le=0;Le<2;++Le)for(var Ve=Le?Re:1-Re,Ue=ce+Ae,ke=we+Le,He=me*Ve,Ie=0;Ie<3;++Ie)be[Ie]+=this._field[Ie].get(Ue,ke)*He;for(var rt=this._pickResult.level,Ke=0;Ke<3;++Ke)if(rt[Ke]=w.le(this.contourLevels[Ke],be[Ke]),rt[Ke]<0)this.contourLevels[Ke].length>0&&(rt[Ke]=0);else if(rt[Ke]Math.abs(lt-be[Ke])&&(rt[Ke]+=1)}for(se.index[0]=ge<.5?ce:ce+1,se.index[1]=Re<.5?we:we+1,se.uv[0]=ne/Z[0],se.uv[1]=Te/Z[1],Ie=0;Ie<3;++Ie)se.dataCoordinate[Ie]=this._field[Ie].get(se.index[0],se.index[1]);return se},B.padField=function($,Z){var se=Z.shape.slice(),ne=$.shape.slice();m.assign($.lo(1,1).hi(se[0],se[1]),Z),m.assign($.lo(1).hi(se[0],1),Z.hi(se[0],1)),m.assign($.lo(1,ne[1]-1).hi(se[0],1),Z.lo(0,se[1]-1).hi(se[0],1)),m.assign($.lo(0,1).hi(1,se[1]),Z.hi(1)),m.assign($.lo(ne[0]-1,1).hi(1,se[1]),Z.lo(se[0]-1)),$.set(0,0,Z.get(0,0)),$.set(0,ne[1]-1,Z.get(0,se[1]-1)),$.set(ne[0]-1,0,Z.get(se[0]-1,0)),$.set(ne[0]-1,ne[1]-1,Z.get(se[0]-1,se[1]-1))};function ee($,Z){return Array.isArray($)?[Z($[0]),Z($[1]),Z($[2])]:[Z($),Z($),Z($)]}function G($){return Array.isArray($)?$.length===3?[$[0],$[1],$[2],1]:[$[0],$[1],$[2],$[3]]:[0,0,0,1]}function Q($){if(Array.isArray($)){if(Array.isArray($))return[G($[0]),G($[1]),G($[2])];var Z=G($);return[Z.slice(),Z.slice(),Z.slice()]}}B.update=function($){$=$||{},this.objectOffset=$.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in $&&(this.contourWidth=ee($.contourWidth,Number)),"showContour"in $&&(this.showContour=ee($.showContour,Boolean)),"showSurface"in $&&(this.showSurface=!!$.showSurface),"contourTint"in $&&(this.contourTint=ee($.contourTint,Boolean)),"contourColor"in $&&(this.contourColor=Q($.contourColor)),"contourProject"in $&&(this.contourProject=ee($.contourProject,function(Ot){return ee(Ot,Boolean)})),"surfaceProject"in $&&(this.surfaceProject=$.surfaceProject),"dynamicColor"in $&&(this.dynamicColor=Q($.dynamicColor)),"dynamicTint"in $&&(this.dynamicTint=ee($.dynamicTint,Number)),"dynamicWidth"in $&&(this.dynamicWidth=ee($.dynamicWidth,Number)),"opacity"in $&&(this.opacity=$.opacity),"opacityscale"in $&&(this.opacityscale=$.opacityscale),"colorBounds"in $&&(this.colorBounds=$.colorBounds),"vertexColor"in $&&(this.vertexColor=$.vertexColor?1:0),"colormap"in $&&this._colorMap.setPixels(this.genColormap($.colormap,this.opacityscale));var Z=$.field||$.coords&&$.coords[2]||null,se=!1;if(Z||(this._field[2].shape[0]||this._field[2].shape[2]?Z=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Z=this._field[2].hi(0,0)),"field"in $||"coords"in $){var ne=(Z.shape[0]+2)*(Z.shape[1]+2);ne>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(t.nextPow2(ne))),this._field[2]=b(this._field[2].data,[Z.shape[0]+2,Z.shape[1]+2]),this.padField(this._field[2],Z),this.shape=Z.shape.slice();for(var ce=this.shape,ge=0;ge<2;++ge)this._field[2].size>this._field[ge].data.length&&(c.freeFloat(this._field[ge].data),this._field[ge].data=c.mallocFloat(this._field[2].size)),this._field[ge]=b(this._field[ge].data,[ce[0]+2,ce[1]+2]);if($.coords){var Te=$.coords;if(!Array.isArray(Te)||Te.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ge=0;ge<2;++ge){var we=Te[ge];for(Le=0;Le<2;++Le)if(we.shape[Le]!==ce[Le])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ge],we)}}else if($.ticks){var Re=$.ticks;if(!Array.isArray(Re)||Re.length!==2)throw new Error("gl-surface: invalid ticks");for(ge=0;ge<2;++ge){var be=Re[ge];if((Array.isArray(be)||be.length)&&(be=b(be)),be.shape[0]!==ce[ge])throw new Error("gl-surface: invalid tick length");var Ae=b(be.data,ce);Ae.stride[ge]=be.stride[0],Ae.stride[ge^1]=0,this.padField(this._field[ge],Ae)}}else{for(ge=0;ge<2;++ge){var me=[0,0];me[ge]=1,this._field[ge]=b(this._field[ge].data,[ce[0]+2,ce[1]+2],me,0)}this._field[0].set(0,0,0);for(var Le=0;Le0){for(var Ge=0;Ge<5;++Ge)Tt.pop();ye-=1}continue e}}}Xt.push(ye)}this._contourOffsets[Bt]=pt,this._contourCounts[Bt]=Xt}var Nt=c.mallocFloat(Tt.length);for(ge=0;geN||z<0||z>N)throw new Error("gl-texture2d: Invalid texture size");return L._shape=[M,z],L.bind(),D.texImage2D(D.TEXTURE_2D,0,L.format,M,z,0,L.format,L.type,null),L._mipLevels=[0],L}function o(L,M,z,D,N,I){this.gl=L,this.handle=M,this.format=N,this.type=I,this._shape=[z,D],this._mipLevels=[0],this._magFilter=L.NEAREST,this._minFilter=L.NEAREST,this._wrapS=L.CLAMP_TO_EDGE,this._wrapT=L.CLAMP_TO_EDGE,this._anisoSamples=1;var k=this,B=[this._wrapS,this._wrapT];Object.defineProperties(B,[{get:function(){return k._wrapS},set:function(V){return k.wrapS=V}},{get:function(){return k._wrapT},set:function(V){return k.wrapT=V}}]),this._wrapVector=B;var O=[this._shape[0],this._shape[1]];Object.defineProperties(O,[{get:function(){return k._shape[0]},set:function(V){return k.width=V}},{get:function(){return k._shape[1]},set:function(V){return k.height=V}}]),this._shapeVector=O}var d=o.prototype;Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(L){this.bind();var M=this.gl;if(this.type===M.FLOAT&&f.indexOf(L)>=0&&(M.getExtension("OES_texture_float_linear")||(L=M.NEAREST)),c.indexOf(L)<0)throw new Error("gl-texture2d: Unknown filter mode "+L);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,L),this._minFilter=L}},magFilter:{get:function(){return this._magFilter},set:function(L){this.bind();var M=this.gl;if(this.type===M.FLOAT&&f.indexOf(L)>=0&&(M.getExtension("OES_texture_float_linear")||(L=M.NEAREST)),c.indexOf(L)<0)throw new Error("gl-texture2d: Unknown filter mode "+L);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MAG_FILTER,L),this._magFilter=L}},mipSamples:{get:function(){return this._anisoSamples},set:function(L){var M=this._anisoSamples;if(this._anisoSamples=Math.max(L,1)|0,M!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(L){if(this.bind(),l.indexOf(L)<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,L),this._wrapS=L}},wrapT:{get:function(){return this._wrapT},set:function(L){if(this.bind(),l.indexOf(L)<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,L),this._wrapT=L}},wrap:{get:function(){return this._wrapVector},set:function(L){if(Array.isArray(L)||(L=[L,L]),L.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var M=0;M<2;++M)if(l.indexOf(L[M])<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);this._wrapS=L[0],this._wrapT=L[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),L}},shape:{get:function(){return this._shapeVector},set:function(L){if(!Array.isArray(L))L=[L|0,L|0];else if(L.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return u(this,L[0]|0,L[1]|0),[L[0]|0,L[1]|0]}},width:{get:function(){return this._shape[0]},set:function(L){return L=L|0,u(this,L,this._shape[1]),L}},height:{get:function(){return this._shape[1]},set:function(L){return L=L|0,u(this,this._shape[0],L),L}}}),d.bind=function(L){var M=this.gl;return L!==void 0&&M.activeTexture(M.TEXTURE0+(L|0)),M.bindTexture(M.TEXTURE_2D,this.handle),L!==void 0?L|0:M.getParameter(M.ACTIVE_TEXTURE)-M.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var L=Math.min(this._shape[0],this._shape[1]),M=0;L>0;++M,L>>>=1)this._mipLevels.indexOf(M)<0&&this._mipLevels.push(M)},d.setPixels=function(L,M,z,D){var N=this.gl;this.bind(),Array.isArray(M)?(D=z,z=M[1]|0,M=M[0]|0):(M=M||0,z=z||0),D=D||0;var I=h(L)?L:L.raw;if(I){var k=this._mipLevels.indexOf(D)<0;k?(N.texImage2D(N.TEXTURE_2D,0,this.format,this.format,this.type,I),this._mipLevels.push(D)):N.texSubImage2D(N.TEXTURE_2D,D,M,z,this.format,this.type,I)}else if(L.shape&&L.stride&&L.data){if(L.shape.length<2||M+L.shape[1]>this._shape[1]>>>D||z+L.shape[0]>this._shape[0]>>>D||M<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(N,M,z,D,this.format,this.type,this._mipLevels,L)}else throw new Error("gl-texture2d: Unsupported data type")};function w(L,M){return L.length===3?M[2]===1&&M[1]===L[0]*L[2]&&M[0]===L[2]:M[0]===1&&M[1]===L[0]}function A(L,M,z,D,N,I,k,B){var O=B.dtype,V=B.shape.slice();if(V.length<2||V.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var Y=0,j=0,te=w(V,B.stride.slice());if(O==="float32"?Y=L.FLOAT:O==="float64"?(Y=L.FLOAT,te=!1,O="float32"):O==="uint8"?Y=L.UNSIGNED_BYTE:(Y=L.UNSIGNED_BYTE,te=!1,O="uint8"),V.length===2)j=L.LUMINANCE,V=[V[0],V[1],1],B=t(B.data,V,[B.stride[0],B.stride[1],1],B.offset);else if(V.length===3){if(V[2]===1)j=L.ALPHA;else if(V[2]===2)j=L.LUMINANCE_ALPHA;else if(V[2]===3)j=L.RGB;else if(V[2]===4)j=L.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");V[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((j===L.LUMINANCE||j===L.ALPHA)&&(N===L.LUMINANCE||N===L.ALPHA)&&(j=N),j!==N)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ie=B.size,ue=k.indexOf(D)<0;if(ue&&k.push(D),Y===I&&te)B.offset===0&&B.data.length===ie?ue?L.texImage2D(L.TEXTURE_2D,D,N,V[0],V[1],0,N,I,B.data):L.texSubImage2D(L.TEXTURE_2D,D,M,z,V[0],V[1],N,I,B.data):ue?L.texImage2D(L.TEXTURE_2D,D,N,V[0],V[1],0,N,I,B.data.subarray(B.offset,B.offset+ie)):L.texSubImage2D(L.TEXTURE_2D,D,M,z,V[0],V[1],N,I,B.data.subarray(B.offset,B.offset+ie));else{var J;I===L.FLOAT?J=n.mallocFloat32(ie):J=n.mallocUint8(ie);var X=t(J,V,[V[2],V[2]*V[0],1]);Y===L.FLOAT&&I===L.UNSIGNED_BYTE?b(X,B):a.assign(X,B),ue?L.texImage2D(L.TEXTURE_2D,D,N,V[0],V[1],0,N,I,J.subarray(0,ie)):L.texSubImage2D(L.TEXTURE_2D,D,M,z,V[0],V[1],N,I,J.subarray(0,ie)),I===L.FLOAT?n.freeFloat32(J):n.freeUint8(J)}}function _(L){var M=L.createTexture();return L.bindTexture(L.TEXTURE_2D,M),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_MIN_FILTER,L.NEAREST),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_MAG_FILTER,L.NEAREST),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,L.CLAMP_TO_EDGE),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,L.CLAMP_TO_EDGE),M}function y(L,M,z,D,N){var I=L.getParameter(L.MAX_TEXTURE_SIZE);if(M<0||M>I||z<0||z>I)throw new Error("gl-texture2d: Invalid texture shape");if(N===L.FLOAT&&!L.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var k=_(L);return L.texImage2D(L.TEXTURE_2D,0,D,M,z,0,D,N,null),new o(L,k,M,z,D,N)}function E(L,M,z,D,N,I){var k=_(L);return L.texImage2D(L.TEXTURE_2D,0,N,N,I,M),new o(L,k,z,D,N,I)}function T(L,M){var z=M.dtype,D=M.shape.slice(),N=L.getParameter(L.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>N||D[1]<0||D[1]>N)throw new Error("gl-texture2d: Invalid texture size");var I=w(D,M.stride.slice()),k=0;z==="float32"?k=L.FLOAT:z==="float64"?(k=L.FLOAT,I=!1,z="float32"):z==="uint8"?k=L.UNSIGNED_BYTE:(k=L.UNSIGNED_BYTE,I=!1,z="uint8");var B=0;if(D.length===2)B=L.LUMINANCE,D=[D[0],D[1],1],M=t(M.data,D,[M.stride[0],M.stride[1],1],M.offset);else if(D.length===3)if(D[2]===1)B=L.ALPHA;else if(D[2]===2)B=L.LUMINANCE_ALPHA;else if(D[2]===3)B=L.RGB;else if(D[2]===4)B=L.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");k===L.FLOAT&&!L.getExtension("OES_texture_float")&&(k=L.UNSIGNED_BYTE,I=!1);var O,V,Y=M.size;if(I)M.offset===0&&M.data.length===Y?O=M.data:O=M.data.subarray(M.offset,M.offset+Y);else{var j=[D[2],D[2]*D[0],1];V=n.malloc(Y,z);var te=t(V,D,j,0);(z==="float32"||z==="float64")&&k===L.UNSIGNED_BYTE?b(te,M):a.assign(te,M),O=V.subarray(0,Y)}var ie=_(L);return L.texImage2D(L.TEXTURE_2D,0,B,D[0],D[1],0,B,k,O),I||n.free(V),new o(L,ie,D[0],D[1],B,k)}function s(L){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(f||m(L),typeof arguments[1]=="number")return y(L,arguments[1],arguments[2],arguments[3]||L.RGBA,arguments[4]||L.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return y(L,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||L.RGBA,arguments[3]||L.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var M=arguments[1],z=h(M)?M:M.raw;if(z)return E(L,z,M.width|0,M.height|0,arguments[2]||L.RGBA,arguments[3]||L.UNSIGNED_BYTE);if(M.shape&&M.data&&M.stride)return T(L,M)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},3056:function(v){function p(r,t,a){t?t.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var n=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(a){if(a.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var f=0;f1?0:Math.acos(b)}},8827:function(v){v.exports=p;function p(r,t){return r[0]=Math.ceil(t[0]),r[1]=Math.ceil(t[1]),r[2]=Math.ceil(t[2]),r}},7622:function(v){v.exports=p;function p(r){var t=new Float32Array(3);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t}},8782:function(v){v.exports=p;function p(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r}},8501:function(v){v.exports=p;function p(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},903:function(v){v.exports=p;function p(r,t,a){var n=t[0],f=t[1],c=t[2],l=a[0],m=a[1],h=a[2];return r[0]=f*h-c*m,r[1]=c*l-n*h,r[2]=n*m-f*l,r}},5981:function(v,p,r){v.exports=r(8288)},8288:function(v){v.exports=p;function p(r,t){var a=t[0]-r[0],n=t[1]-r[1],f=t[2]-r[2];return Math.sqrt(a*a+n*n+f*f)}},8629:function(v,p,r){v.exports=r(7979)},7979:function(v){v.exports=p;function p(r,t,a){return r[0]=t[0]/a[0],r[1]=t[1]/a[1],r[2]=t[2]/a[2],r}},9305:function(v){v.exports=p;function p(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}},154:function(v){v.exports=1e-6},4932:function(v,p,r){v.exports=a;var t=r(154);function a(n,f){var c=n[0],l=n[1],m=n[2],h=f[0],b=f[1],u=f[2];return Math.abs(c-h)<=t*Math.max(1,Math.abs(c),Math.abs(h))&&Math.abs(l-b)<=t*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(m-u)<=t*Math.max(1,Math.abs(m),Math.abs(u))}},5777:function(v){v.exports=p;function p(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]}},3306:function(v){v.exports=p;function p(r,t){return r[0]=Math.floor(t[0]),r[1]=Math.floor(t[1]),r[2]=Math.floor(t[2]),r}},7447:function(v,p,r){v.exports=a;var t=r(8501)();function a(n,f,c,l,m,h){var b,u;for(f||(f=3),c||(c=0),l?u=Math.min(l*f+c,n.length):u=n.length,b=c;b0&&(c=1/Math.sqrt(c),r[0]=t[0]*c,r[1]=t[1]*c,r[2]=t[2]*c),r}},6660:function(v){v.exports=p;function p(r,t){t=t||1;var a=Math.random()*2*Math.PI,n=Math.random()*2-1,f=Math.sqrt(1-n*n)*t;return r[0]=Math.cos(a)*f,r[1]=Math.sin(a)*f,r[2]=n*t,r}},392:function(v){v.exports=p;function p(r,t,a,n){var f=a[1],c=a[2],l=t[1]-f,m=t[2]-c,h=Math.sin(n),b=Math.cos(n);return r[0]=t[0],r[1]=f+l*b-m*h,r[2]=c+l*h+m*b,r}},3222:function(v){v.exports=p;function p(r,t,a,n){var f=a[0],c=a[2],l=t[0]-f,m=t[2]-c,h=Math.sin(n),b=Math.cos(n);return r[0]=f+m*h+l*b,r[1]=t[1],r[2]=c+m*b-l*h,r}},3388:function(v){v.exports=p;function p(r,t,a,n){var f=a[0],c=a[1],l=t[0]-f,m=t[1]-c,h=Math.sin(n),b=Math.cos(n);return r[0]=f+l*b-m*h,r[1]=c+l*h+m*b,r[2]=t[2],r}},1624:function(v){v.exports=p;function p(r,t){return r[0]=Math.round(t[0]),r[1]=Math.round(t[1]),r[2]=Math.round(t[2]),r}},5685:function(v){v.exports=p;function p(r,t,a){return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r}},6722:function(v){v.exports=p;function p(r,t,a,n){return r[0]=t[0]+a[0]*n,r[1]=t[1]+a[1]*n,r[2]=t[2]+a[2]*n,r}},831:function(v){v.exports=p;function p(r,t,a,n){return r[0]=t,r[1]=a,r[2]=n,r}},5294:function(v,p,r){v.exports=r(6403)},3303:function(v,p,r){v.exports=r(4337)},6403:function(v){v.exports=p;function p(r,t){var a=t[0]-r[0],n=t[1]-r[1],f=t[2]-r[2];return a*a+n*n+f*f}},4337:function(v){v.exports=p;function p(r){var t=r[0],a=r[1],n=r[2];return t*t+a*a+n*n}},8921:function(v,p,r){v.exports=r(911)},911:function(v){v.exports=p;function p(r,t,a){return r[0]=t[0]-a[0],r[1]=t[1]-a[1],r[2]=t[2]-a[2],r}},9908:function(v){v.exports=p;function p(r,t,a){var n=t[0],f=t[1],c=t[2];return r[0]=n*a[0]+f*a[3]+c*a[6],r[1]=n*a[1]+f*a[4]+c*a[7],r[2]=n*a[2]+f*a[5]+c*a[8],r}},3255:function(v){v.exports=p;function p(r,t,a){var n=t[0],f=t[1],c=t[2],l=a[3]*n+a[7]*f+a[11]*c+a[15];return l=l||1,r[0]=(a[0]*n+a[4]*f+a[8]*c+a[12])/l,r[1]=(a[1]*n+a[5]*f+a[9]*c+a[13])/l,r[2]=(a[2]*n+a[6]*f+a[10]*c+a[14])/l,r}},6568:function(v){v.exports=p;function p(r,t,a){var n=t[0],f=t[1],c=t[2],l=a[0],m=a[1],h=a[2],b=a[3],u=b*n+m*c-h*f,o=b*f+h*n-l*c,d=b*c+l*f-m*n,w=-l*n-m*f-h*c;return r[0]=u*b+w*-l+o*-h-d*-m,r[1]=o*b+w*-m+d*-l-u*-h,r[2]=d*b+w*-h+u*-m-o*-l,r}},3433:function(v){v.exports=p;function p(r,t,a){return r[0]=t[0]+a[0],r[1]=t[1]+a[1],r[2]=t[2]+a[2],r[3]=t[3]+a[3],r}},1413:function(v){v.exports=p;function p(r){var t=new Float32Array(4);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t}},3470:function(v){v.exports=p;function p(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}},5313:function(v){v.exports=p;function p(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},5446:function(v){v.exports=p;function p(r,t){var a=t[0]-r[0],n=t[1]-r[1],f=t[2]-r[2],c=t[3]-r[3];return Math.sqrt(a*a+n*n+f*f+c*c)}},205:function(v){v.exports=p;function p(r,t,a){return r[0]=t[0]/a[0],r[1]=t[1]/a[1],r[2]=t[2]/a[2],r[3]=t[3]/a[3],r}},4242:function(v){v.exports=p;function p(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]+r[3]*t[3]}},5680:function(v){v.exports=p;function p(r,t,a,n){var f=new Float32Array(4);return f[0]=r,f[1]=t,f[2]=a,f[3]=n,f}},4020:function(v,p,r){v.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(v){v.exports=p;function p(r,t){return r[0]=1/t[0],r[1]=1/t[1],r[2]=1/t[2],r[3]=1/t[3],r}},8177:function(v){v.exports=p;function p(r){var t=r[0],a=r[1],n=r[2],f=r[3];return Math.sqrt(t*t+a*a+n*n+f*f)}},8746:function(v){v.exports=p;function p(r,t,a,n){var f=t[0],c=t[1],l=t[2],m=t[3];return r[0]=f+n*(a[0]-f),r[1]=c+n*(a[1]-c),r[2]=l+n*(a[2]-l),r[3]=m+n*(a[3]-m),r}},3030:function(v){v.exports=p;function p(r,t,a){return r[0]=Math.max(t[0],a[0]),r[1]=Math.max(t[1],a[1]),r[2]=Math.max(t[2],a[2]),r[3]=Math.max(t[3],a[3]),r}},2170:function(v){v.exports=p;function p(r,t,a){return r[0]=Math.min(t[0],a[0]),r[1]=Math.min(t[1],a[1]),r[2]=Math.min(t[2],a[2]),r[3]=Math.min(t[3],a[3]),r}},746:function(v){v.exports=p;function p(r,t,a){return r[0]=t[0]*a[0],r[1]=t[1]*a[1],r[2]=t[2]*a[2],r[3]=t[3]*a[3],r}},6459:function(v){v.exports=p;function p(r,t){return r[0]=-t[0],r[1]=-t[1],r[2]=-t[2],r[3]=-t[3],r}},381:function(v){v.exports=p;function p(r,t){var a=t[0],n=t[1],f=t[2],c=t[3],l=a*a+n*n+f*f+c*c;return l>0&&(l=1/Math.sqrt(l),r[0]=a*l,r[1]=n*l,r[2]=f*l,r[3]=c*l),r}},3770:function(v,p,r){var t=r(381),a=r(5510);v.exports=n;function n(f,c){return c=c||1,f[0]=Math.random(),f[1]=Math.random(),f[2]=Math.random(),f[3]=Math.random(),t(f,f),a(f,f,c),f}},5510:function(v){v.exports=p;function p(r,t,a){return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=t[3]*a,r}},4224:function(v){v.exports=p;function p(r,t,a,n){return r[0]=t[0]+a[0]*n,r[1]=t[1]+a[1]*n,r[2]=t[2]+a[2]*n,r[3]=t[3]+a[3]*n,r}},6453:function(v){v.exports=p;function p(r,t,a,n,f){return r[0]=t,r[1]=a,r[2]=n,r[3]=f,r}},1542:function(v){v.exports=p;function p(r,t){var a=t[0]-r[0],n=t[1]-r[1],f=t[2]-r[2],c=t[3]-r[3];return a*a+n*n+f*f+c*c}},9037:function(v){v.exports=p;function p(r){var t=r[0],a=r[1],n=r[2],f=r[3];return t*t+a*a+n*n+f*f}},2705:function(v){v.exports=p;function p(r,t,a){return r[0]=t[0]-a[0],r[1]=t[1]-a[1],r[2]=t[2]-a[2],r[3]=t[3]-a[3],r}},6342:function(v){v.exports=p;function p(r,t,a){var n=t[0],f=t[1],c=t[2],l=t[3];return r[0]=a[0]*n+a[4]*f+a[8]*c+a[12]*l,r[1]=a[1]*n+a[5]*f+a[9]*c+a[13]*l,r[2]=a[2]*n+a[6]*f+a[10]*c+a[14]*l,r[3]=a[3]*n+a[7]*f+a[11]*c+a[15]*l,r}},5022:function(v){v.exports=p;function p(r,t,a){var n=t[0],f=t[1],c=t[2],l=a[0],m=a[1],h=a[2],b=a[3],u=b*n+m*c-h*f,o=b*f+h*n-l*c,d=b*c+l*f-m*n,w=-l*n-m*f-h*c;return r[0]=u*b+w*-l+o*-h-d*-m,r[1]=o*b+w*-m+d*-l-u*-h,r[2]=d*b+w*-h+u*-m-o*-l,r[3]=t[3],r}},9365:function(v,p,r){var t=r(8096),a=r(7896);v.exports=n;function n(f){for(var c=Array.isArray(f)?f:t(f),l=0;l0)continue;Ie=Ue.slice(0,1).join("")}return $(Ie),te+=Ie.length,O=O.slice(Ie.length),O.length}while(!0)}function Ae(){return/[^a-fA-F0-9]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function me(){return k==="."||/[eE]/.test(k)?(O.push(k),I=w,B=k,D+1):k==="x"&&O.length===1&&O[0]==="0"?(I=s,O.push(k),B=k,D+1):/[^\d]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function Le(){return k==="f"&&(O.push(k),B=k,D+=1),/[eE]/.test(k)||(k==="-"||k==="+")&&/[eE]/.test(B)?(O.push(k),B=k,D+1):/[^\d]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function Ve(){if(/[^\d\w_]/.test(k)){var Ue=O.join("");return oe[Ue]?I=y:Q[Ue]?I=_:I=A,$(O.join("")),I=l,D}return O.push(k),B=k,D+1}}},3585:function(v,p,r){var t=r(9525);t=t.slice().filter(function(a){return!/^(gl\_|texture)/.test(a)}),v.exports=t.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},9525:function(v){v.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},9458:function(v,p,r){var t=r(399);v.exports=t.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},399:function(v){v.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},9746:function(v){v.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(v,p,r){var t=r(3193);v.exports=a;function a(n,f){var c=t(f),l=[];return l=l.concat(c(n)),l=l.concat(c(null)),l}},6832:function(v){v.exports=function(p){typeof p=="string"&&(p=[p]);for(var r=[].slice.call(arguments,1),t=[],a=0;a0;){d=T.pop();for(var s=d.adjacent,L=0;L<=A;++L){var M=s[L];if(!(!M.boundary||M.lastVisited<=-_)){for(var z=M.vertices,D=0;D<=A;++D){var N=z[D];N<0?y[D]=w:y[D]=E[N]}var I=this.orient();if(I>0)return M;M.lastVisited=-_,I===0&&T.push(M)}}}return null},u.walk=function(d,w){var A=this.vertices.length-1,_=this.dimension,y=this.vertices,E=this.tuple,T=w?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[T];e:for(;!s.boundary;){for(var L=s.vertices,M=s.adjacent,z=0;z<=_;++z)E[z]=y[L[z]];s.lastVisited=A;for(var z=0;z<=_;++z){var D=M[z];if(!(D.lastVisited>=A)){var N=E[z];E[z]=d;var I=this.orient();if(E[z]=N,I<0){s=D;continue e}else D.boundary?D.lastVisited=-A:D.lastVisited=A}}return}return s},u.addPeaks=function(d,w){var A=this.vertices.length-1,_=this.dimension,y=this.vertices,E=this.tuple,T=this.interior,s=this.simplices,L=[w];w.lastVisited=A,w.vertices[w.vertices.indexOf(-1)]=A,w.boundary=!1,T.push(w);for(var M=[];L.length>0;){var w=L.pop(),z=w.vertices,D=w.adjacent,N=z.indexOf(A);if(!(N<0)){for(var I=0;I<=_;++I)if(I!==N){var k=D[I];if(!(!k.boundary||k.lastVisited>=A)){var B=k.vertices;if(k.lastVisited!==-A){for(var O=0,V=0;V<=_;++V)B[V]<0?(O=V,E[V]=d):E[V]=y[B[V]];var Y=this.orient();if(Y>0){B[O]=A,k.boundary=!1,T.push(k),L.push(k),k.lastVisited=A;continue}else k.lastVisited=-A}var j=k.adjacent,te=z.slice(),ie=D.slice(),ue=new n(te,ie,!0);s.push(ue);var J=j.indexOf(w);if(!(J<0)){j[J]=ue,ie[N]=k,te[I]=-1,ie[I]=w,D[I]=ue,ue.flip();for(var V=0;V<=_;++V){var X=te[V];if(!(X<0||X===A)){for(var ee=new Array(_-1),G=0,Q=0;Q<=_;++Q){var oe=te[Q];oe<0||Q===V||(ee[G++]=oe)}M.push(new f(ee,ue,V))}}}}}}}M.sort(c);for(var I=0;I+1=0?T[L++]=s[z]:M=z&1;if(M===(d&1)){var D=T[0];T[0]=T[1],T[1]=D}w.push(T)}}return w};function o(d,w){var A=d.length;if(A===0)throw new Error("Must have at least d+1 points");var _=d[0].length;if(A<=_)throw new Error("Must input at least d+1 points");var y=d.slice(0,_+1),E=t.apply(void 0,y);if(E===0)throw new Error("Input not in general position");for(var T=new Array(_+1),s=0;s<=_;++s)T[s]=s;E<0&&(T[0]=1,T[1]=0);for(var L=new n(T,new Array(_+1),!1),M=L.adjacent,z=new Array(_+2),s=0;s<=_;++s){for(var D=T.slice(),N=0;N<=_;++N)N===s&&(D[N]=-1);var I=D[0];D[0]=D[1],D[1]=I;var k=new n(D,new Array(_+1),!0);M[s]=k,z[s]=k}z[_+1]=L;for(var s=0;s<=_;++s)for(var D=M[s].vertices,B=M[s].adjacent,N=0;N<=_;++N){var O=D[N];if(O<0){B[N]=L;continue}for(var V=0;V<=_;++V)M[V].vertices.indexOf(O)<0&&(B[N]=M[V])}for(var Y=new b(_,y,z),j=!!w,s=_+1;s3*(z+1)?b(this,M):this.left.insert(M):this.left=E([M]);else if(M[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?b(this,M):this.right.insert(M):this.right=E([M]);else{var D=t.ge(this.leftPoints,M,_),N=t.ge(this.rightPoints,M,y);this.leftPoints.splice(D,0,M),this.rightPoints.splice(N,0,M)}},l.remove=function(M){var z=this.count-this.leftPoints;if(M[1]3*(z-1))return u(this,M);var N=this.left.remove(M);return N===f?(this.left=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else if(M[0]>this.mid){if(!this.right)return a;var I=this.left?this.left.count:0;if(4*I>3*(z-1))return u(this,M);var N=this.right.remove(M);return N===f?(this.right=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else{if(this.count===1)return this.leftPoints[0]===M?f:a;if(this.leftPoints.length===1&&this.leftPoints[0]===M){if(this.left&&this.right){for(var k=this,B=this.left;B.right;)k=B,B=B.right;if(k===this)B.right=this.right;else{var O=this.left,N=this.right;k.count-=B.count,k.right=B.left,B.left=O,B.right=N}m(this,B),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return n}for(var O=t.ge(this.leftPoints,M,_);O=0&&M[N][1]>=z;--N){var I=D(M[N]);if(I)return I}}function w(M,z){for(var D=0;Dthis.mid){if(this.right){var D=this.right.queryPoint(M,z);if(D)return D}return d(this.rightPoints,M,z)}else return w(this.leftPoints,z)},l.queryInterval=function(M,z,D){if(Mthis.mid&&this.right){var N=this.right.queryInterval(M,z,D);if(N)return N}return zthis.mid?d(this.rightPoints,M,D):w(this.leftPoints,D)};function A(M,z){return M-z}function _(M,z){var D=M[0]-z[0];return D||M[1]-z[1]}function y(M,z){var D=M[1]-z[1];return D||M[0]-z[0]}function E(M){if(M.length===0)return null;for(var z=[],D=0;D>1],I=[],k=[],B=[],D=0;D$&&st>0){var nt=(Z[st][0]-$)/(Z[st][0]-Z[st-1][0]);return Z[st][1]*(1-nt)+nt*Z[st-1][1]}}return 1}var H=[0,0,0],Y={showSurface:!1,showContour:!1,projections:[M.slice(),M.slice(),M.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function j($,Z){var st,nt,ct,gt=Z.axes&&Z.axes.lastCubeProps.axis||H,Tt=Z.showSurface,wt=Z.showContour;for(st=0;st<3;++st)for(Tt=Tt||Z.surfaceProject[st],nt=0;nt<3;++nt)wt=wt||Z.contourProject[st][nt];for(st=0;st<3;++st){var Rt=Y.projections[st];for(nt=0;nt<16;++nt)Rt[nt]=0;for(nt=0;nt<4;++nt)Rt[5*nt]=1;Rt[5*st]=0,Rt[12+st]=Z.axesBounds[+(gt[st]>0)][st],o(Rt,$.model,Rt);var bt=Y.clipBounds[st];for(ct=0;ct<2;++ct)for(nt=0;nt<3;++nt)bt[ct][nt]=$.clipBounds[ct][nt];bt[0][st]=-1e8,bt[1][st]=1e8}return Y.showSurface=Tt,Y.showContour=wt,Y}var et={model:M,view:M,projection:M,inverseModel:M.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},it=M.slice(),ut=[1,0,0,0,1,0,0,0,1];function J($,Z){$=$||{};var st=this.gl;st.disable(st.CULL_FACE),this._colorMap.bind(0);var nt=et;nt.model=$.model||M,nt.view=$.view||M,nt.projection=$.projection||M,nt.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],nt.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],nt.objectOffset=this.objectOffset,nt.contourColor=this.contourColor[0],nt.inverseModel=d(nt.inverseModel,nt.model);for(var ct=0;ct<2;++ct)for(var gt=nt.clipBounds[ct],Tt=0;Tt<3;++Tt)gt[Tt]=Math.min(Math.max(this.clipBounds[ct][Tt],-1e8),1e8);nt.kambient=this.ambientLight,nt.kdiffuse=this.diffuseLight,nt.kspecular=this.specularLight,nt.roughness=this.roughness,nt.fresnel=this.fresnel,nt.opacity=this.opacity,nt.height=0,nt.permutation=ut,nt.vertexColor=this.vertexColor;var wt=it;for(o(wt,nt.view,nt.model),o(wt,nt.projection,wt),d(wt,wt),ct=0;ct<3;++ct)nt.eyePosition[ct]=wt[12+ct]/wt[15];var Rt=wt[15];for(ct=0;ct<3;++ct)Rt+=this.lightPosition[ct]*wt[4*ct+3];for(ct=0;ct<3;++ct){var bt=wt[12+ct];for(Tt=0;Tt<3;++Tt)bt+=wt[4*Tt+ct]*this.lightPosition[Tt];nt.lightPosition[ct]=bt/Rt}var At=j(nt,this);if(At.showSurface){for(this._shader.bind(),this._shader.uniforms=nt,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(st.TRIANGLES,this._vertexCount),ct=0;ct<3;++ct)!this.surfaceProject[ct]||!this.vertexCount||(this._shader.uniforms.model=At.projections[ct],this._shader.uniforms.clipBounds=At.clipBounds[ct],this._vao.draw(st.TRIANGLES,this._vertexCount));this._vao.unbind()}if(At.showContour){var mt=this._contourShader;nt.kambient=1,nt.kdiffuse=0,nt.kspecular=0,nt.opacity=1,mt.bind(),mt.uniforms=nt;var Lt=this._contourVAO;for(Lt.bind(),ct=0;ct<3;++ct)for(mt.uniforms.permutation=D[ct],st.lineWidth(this.contourWidth[ct]*this.pixelRatio),Tt=0;Tt>4)/16)/255,ct=Math.floor(nt),gt=nt-ct,Tt=Z[1]*($.value[1]+($.value[2]&15)/16)/255,wt=Math.floor(Tt),Rt=Tt-wt;ct+=1,wt+=1;var bt=st.position;bt[0]=bt[1]=bt[2]=0;for(var At=0;At<2;++At)for(var mt=At?gt:1-gt,Lt=0;Lt<2;++Lt)for(var Ht=Lt?Rt:1-Rt,Ut=ct+At,kt=wt+Lt,Vt=mt*Ht,It=0;It<3;++It)bt[It]+=this._field[It].get(Ut,kt)*Vt;for(var re=this._pickResult.level,Kt=0;Kt<3;++Kt)if(re[Kt]=w.le(this.contourLevels[Kt],bt[Kt]),re[Kt]<0)this.contourLevels[Kt].length>0&&(re[Kt]=0);else if(re[Kt]Math.abs(le-bt[Kt])&&(re[Kt]+=1)}for(st.index[0]=gt<.5?ct:ct+1,st.index[1]=Rt<.5?wt:wt+1,st.uv[0]=nt/Z[0],st.uv[1]=Tt/Z[1],It=0;It<3;++It)st.dataCoordinate[It]=this._field[It].get(st.index[0],st.index[1]);return st},B.padField=function($,Z){var st=Z.shape.slice(),nt=$.shape.slice();m.assign($.lo(1,1).hi(st[0],st[1]),Z),m.assign($.lo(1).hi(st[0],1),Z.hi(st[0],1)),m.assign($.lo(1,nt[1]-1).hi(st[0],1),Z.lo(0,st[1]-1).hi(st[0],1)),m.assign($.lo(0,1).hi(1,st[1]),Z.hi(1)),m.assign($.lo(nt[0]-1,1).hi(1,st[1]),Z.lo(st[0]-1)),$.set(0,0,Z.get(0,0)),$.set(0,nt[1]-1,Z.get(0,st[1]-1)),$.set(nt[0]-1,0,Z.get(st[0]-1,0)),$.set(nt[0]-1,nt[1]-1,Z.get(st[0]-1,st[1]-1))};function tt($,Z){return Array.isArray($)?[Z($[0]),Z($[1]),Z($[2])]:[Z($),Z($),Z($)]}function V($){return Array.isArray($)?$.length===3?[$[0],$[1],$[2],1]:[$[0],$[1],$[2],$[3]]:[0,0,0,1]}function Q($){if(Array.isArray($)){if(Array.isArray($))return[V($[0]),V($[1]),V($[2])];var Z=V($);return[Z.slice(),Z.slice(),Z.slice()]}}B.update=function($){$=$||{},this.objectOffset=$.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in $&&(this.contourWidth=tt($.contourWidth,Number)),"showContour"in $&&(this.showContour=tt($.showContour,Boolean)),"showSurface"in $&&(this.showSurface=!!$.showSurface),"contourTint"in $&&(this.contourTint=tt($.contourTint,Boolean)),"contourColor"in $&&(this.contourColor=Q($.contourColor)),"contourProject"in $&&(this.contourProject=tt($.contourProject,function(Oe){return tt(Oe,Boolean)})),"surfaceProject"in $&&(this.surfaceProject=$.surfaceProject),"dynamicColor"in $&&(this.dynamicColor=Q($.dynamicColor)),"dynamicTint"in $&&(this.dynamicTint=tt($.dynamicTint,Number)),"dynamicWidth"in $&&(this.dynamicWidth=tt($.dynamicWidth,Number)),"opacity"in $&&(this.opacity=$.opacity),"opacityscale"in $&&(this.opacityscale=$.opacityscale),"colorBounds"in $&&(this.colorBounds=$.colorBounds),"vertexColor"in $&&(this.vertexColor=$.vertexColor?1:0),"colormap"in $&&this._colorMap.setPixels(this.genColormap($.colormap,this.opacityscale));var Z=$.field||$.coords&&$.coords[2]||null,st=!1;if(Z||(this._field[2].shape[0]||this._field[2].shape[2]?Z=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Z=this._field[2].hi(0,0)),"field"in $||"coords"in $){var nt=(Z.shape[0]+2)*(Z.shape[1]+2);nt>this._field[2].data.length&&(c.freeFloat(this._field[2].data),this._field[2].data=c.mallocFloat(e.nextPow2(nt))),this._field[2]=b(this._field[2].data,[Z.shape[0]+2,Z.shape[1]+2]),this.padField(this._field[2],Z),this.shape=Z.shape.slice();for(var ct=this.shape,gt=0;gt<2;++gt)this._field[2].size>this._field[gt].data.length&&(c.freeFloat(this._field[gt].data),this._field[gt].data=c.mallocFloat(this._field[2].size)),this._field[gt]=b(this._field[gt].data,[ct[0]+2,ct[1]+2]);if($.coords){var Tt=$.coords;if(!Array.isArray(Tt)||Tt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(gt=0;gt<2;++gt){var wt=Tt[gt];for(Lt=0;Lt<2;++Lt)if(wt.shape[Lt]!==ct[Lt])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[gt],wt)}}else if($.ticks){var Rt=$.ticks;if(!Array.isArray(Rt)||Rt.length!==2)throw new Error("gl-surface: invalid ticks");for(gt=0;gt<2;++gt){var bt=Rt[gt];if((Array.isArray(bt)||bt.length)&&(bt=b(bt)),bt.shape[0]!==ct[gt])throw new Error("gl-surface: invalid tick length");var At=b(bt.data,ct);At.stride[gt]=bt.stride[0],At.stride[gt^1]=0,this.padField(this._field[gt],At)}}else{for(gt=0;gt<2;++gt){var mt=[0,0];mt[gt]=1,this._field[gt]=b(this._field[gt].data,[ct[0]+2,ct[1]+2],mt,0)}this._field[0].set(0,0,0);for(var Lt=0;Lt0){for(var Gt=0;Gt<5;++Gt)Te.pop();yt-=1}continue t}}}Xe.push(yt)}this._contourOffsets[Be]=pe,this._contourCounts[Be]=Xe}var Ne=c.mallocFloat(Te.length);for(gt=0;gtN||z<0||z>N)throw new Error("gl-texture2d: Invalid texture size");return L._shape=[M,z],L.bind(),D.texImage2D(D.TEXTURE_2D,0,L.format,M,z,0,L.format,L.type,null),L._mipLevels=[0],L}function o(L,M,z,D,N,I){this.gl=L,this.handle=M,this.format=N,this.type=I,this._shape=[z,D],this._mipLevels=[0],this._magFilter=L.NEAREST,this._minFilter=L.NEAREST,this._wrapS=L.CLAMP_TO_EDGE,this._wrapT=L.CLAMP_TO_EDGE,this._anisoSamples=1;var k=this,B=[this._wrapS,this._wrapT];Object.defineProperties(B,[{get:function(){return k._wrapS},set:function(H){return k.wrapS=H}},{get:function(){return k._wrapT},set:function(H){return k.wrapT=H}}]),this._wrapVector=B;var O=[this._shape[0],this._shape[1]];Object.defineProperties(O,[{get:function(){return k._shape[0]},set:function(H){return k.width=H}},{get:function(){return k._shape[1]},set:function(H){return k.height=H}}]),this._shapeVector=O}var d=o.prototype;Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(L){this.bind();var M=this.gl;if(this.type===M.FLOAT&&f.indexOf(L)>=0&&(M.getExtension("OES_texture_float_linear")||(L=M.NEAREST)),c.indexOf(L)<0)throw new Error("gl-texture2d: Unknown filter mode "+L);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MIN_FILTER,L),this._minFilter=L}},magFilter:{get:function(){return this._magFilter},set:function(L){this.bind();var M=this.gl;if(this.type===M.FLOAT&&f.indexOf(L)>=0&&(M.getExtension("OES_texture_float_linear")||(L=M.NEAREST)),c.indexOf(L)<0)throw new Error("gl-texture2d: Unknown filter mode "+L);return M.texParameteri(M.TEXTURE_2D,M.TEXTURE_MAG_FILTER,L),this._magFilter=L}},mipSamples:{get:function(){return this._anisoSamples},set:function(L){var M=this._anisoSamples;if(this._anisoSamples=Math.max(L,1)|0,M!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(L){if(this.bind(),l.indexOf(L)<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,L),this._wrapS=L}},wrapT:{get:function(){return this._wrapT},set:function(L){if(this.bind(),l.indexOf(L)<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,L),this._wrapT=L}},wrap:{get:function(){return this._wrapVector},set:function(L){if(Array.isArray(L)||(L=[L,L]),L.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var M=0;M<2;++M)if(l.indexOf(L[M])<0)throw new Error("gl-texture2d: Unknown wrap mode "+L);this._wrapS=L[0],this._wrapT=L[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),L}},shape:{get:function(){return this._shapeVector},set:function(L){if(!Array.isArray(L))L=[L|0,L|0];else if(L.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return u(this,L[0]|0,L[1]|0),[L[0]|0,L[1]|0]}},width:{get:function(){return this._shape[0]},set:function(L){return L=L|0,u(this,L,this._shape[1]),L}},height:{get:function(){return this._shape[1]},set:function(L){return L=L|0,u(this,this._shape[0],L),L}}}),d.bind=function(L){var M=this.gl;return L!==void 0&&M.activeTexture(M.TEXTURE0+(L|0)),M.bindTexture(M.TEXTURE_2D,this.handle),L!==void 0?L|0:M.getParameter(M.ACTIVE_TEXTURE)-M.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var L=Math.min(this._shape[0],this._shape[1]),M=0;L>0;++M,L>>>=1)this._mipLevels.indexOf(M)<0&&this._mipLevels.push(M)},d.setPixels=function(L,M,z,D){var N=this.gl;this.bind(),Array.isArray(M)?(D=z,z=M[1]|0,M=M[0]|0):(M=M||0,z=z||0),D=D||0;var I=h(L)?L:L.raw;if(I){var k=this._mipLevels.indexOf(D)<0;k?(N.texImage2D(N.TEXTURE_2D,0,this.format,this.format,this.type,I),this._mipLevels.push(D)):N.texSubImage2D(N.TEXTURE_2D,D,M,z,this.format,this.type,I)}else if(L.shape&&L.stride&&L.data){if(L.shape.length<2||M+L.shape[1]>this._shape[1]>>>D||z+L.shape[0]>this._shape[0]>>>D||M<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(N,M,z,D,this.format,this.type,this._mipLevels,L)}else throw new Error("gl-texture2d: Unsupported data type")};function w(L,M){return L.length===3?M[2]===1&&M[1]===L[0]*L[2]&&M[0]===L[2]:M[0]===1&&M[1]===L[0]}function A(L,M,z,D,N,I,k,B){var O=B.dtype,H=B.shape.slice();if(H.length<2||H.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var Y=0,j=0,et=w(H,B.stride.slice());if(O==="float32"?Y=L.FLOAT:O==="float64"?(Y=L.FLOAT,et=!1,O="float32"):O==="uint8"?Y=L.UNSIGNED_BYTE:(Y=L.UNSIGNED_BYTE,et=!1,O="uint8"),H.length===2)j=L.LUMINANCE,H=[H[0],H[1],1],B=e(B.data,H,[B.stride[0],B.stride[1],1],B.offset);else if(H.length===3){if(H[2]===1)j=L.ALPHA;else if(H[2]===2)j=L.LUMINANCE_ALPHA;else if(H[2]===3)j=L.RGB;else if(H[2]===4)j=L.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");H[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((j===L.LUMINANCE||j===L.ALPHA)&&(N===L.LUMINANCE||N===L.ALPHA)&&(j=N),j!==N)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var it=B.size,ut=k.indexOf(D)<0;if(ut&&k.push(D),Y===I&&et)B.offset===0&&B.data.length===it?ut?L.texImage2D(L.TEXTURE_2D,D,N,H[0],H[1],0,N,I,B.data):L.texSubImage2D(L.TEXTURE_2D,D,M,z,H[0],H[1],N,I,B.data):ut?L.texImage2D(L.TEXTURE_2D,D,N,H[0],H[1],0,N,I,B.data.subarray(B.offset,B.offset+it)):L.texSubImage2D(L.TEXTURE_2D,D,M,z,H[0],H[1],N,I,B.data.subarray(B.offset,B.offset+it));else{var J;I===L.FLOAT?J=n.mallocFloat32(it):J=n.mallocUint8(it);var X=e(J,H,[H[2],H[2]*H[0],1]);Y===L.FLOAT&&I===L.UNSIGNED_BYTE?b(X,B):a.assign(X,B),ut?L.texImage2D(L.TEXTURE_2D,D,N,H[0],H[1],0,N,I,J.subarray(0,it)):L.texSubImage2D(L.TEXTURE_2D,D,M,z,H[0],H[1],N,I,J.subarray(0,it)),I===L.FLOAT?n.freeFloat32(J):n.freeUint8(J)}}function _(L){var M=L.createTexture();return L.bindTexture(L.TEXTURE_2D,M),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_MIN_FILTER,L.NEAREST),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_MAG_FILTER,L.NEAREST),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,L.CLAMP_TO_EDGE),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,L.CLAMP_TO_EDGE),M}function y(L,M,z,D,N){var I=L.getParameter(L.MAX_TEXTURE_SIZE);if(M<0||M>I||z<0||z>I)throw new Error("gl-texture2d: Invalid texture shape");if(N===L.FLOAT&&!L.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var k=_(L);return L.texImage2D(L.TEXTURE_2D,0,D,M,z,0,D,N,null),new o(L,k,M,z,D,N)}function E(L,M,z,D,N,I){var k=_(L);return L.texImage2D(L.TEXTURE_2D,0,N,N,I,M),new o(L,k,z,D,N,I)}function T(L,M){var z=M.dtype,D=M.shape.slice(),N=L.getParameter(L.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>N||D[1]<0||D[1]>N)throw new Error("gl-texture2d: Invalid texture size");var I=w(D,M.stride.slice()),k=0;z==="float32"?k=L.FLOAT:z==="float64"?(k=L.FLOAT,I=!1,z="float32"):z==="uint8"?k=L.UNSIGNED_BYTE:(k=L.UNSIGNED_BYTE,I=!1,z="uint8");var B=0;if(D.length===2)B=L.LUMINANCE,D=[D[0],D[1],1],M=e(M.data,D,[M.stride[0],M.stride[1],1],M.offset);else if(D.length===3)if(D[2]===1)B=L.ALPHA;else if(D[2]===2)B=L.LUMINANCE_ALPHA;else if(D[2]===3)B=L.RGB;else if(D[2]===4)B=L.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");k===L.FLOAT&&!L.getExtension("OES_texture_float")&&(k=L.UNSIGNED_BYTE,I=!1);var O,H,Y=M.size;if(I)M.offset===0&&M.data.length===Y?O=M.data:O=M.data.subarray(M.offset,M.offset+Y);else{var j=[D[2],D[2]*D[0],1];H=n.malloc(Y,z);var et=e(H,D,j,0);(z==="float32"||z==="float64")&&k===L.UNSIGNED_BYTE?b(et,M):a.assign(et,M),O=H.subarray(0,Y)}var it=_(L);return L.texImage2D(L.TEXTURE_2D,0,B,D[0],D[1],0,B,k,O),I||n.free(H),new o(L,it,D[0],D[1],B,k)}function s(L){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(f||m(L),typeof arguments[1]=="number")return y(L,arguments[1],arguments[2],arguments[3]||L.RGBA,arguments[4]||L.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return y(L,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||L.RGBA,arguments[3]||L.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var M=arguments[1],z=h(M)?M:M.raw;if(z)return E(L,z,M.width|0,M.height|0,arguments[2]||L.RGBA,arguments[3]||L.UNSIGNED_BYTE);if(M.shape&&M.data&&M.stride)return T(L,M)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},3056:function(v){function p(r,e,a){e?e.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var n=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(a){if(a.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var f=0;f1?0:Math.acos(b)}},8827:function(v){v.exports=p;function p(r,e){return r[0]=Math.ceil(e[0]),r[1]=Math.ceil(e[1]),r[2]=Math.ceil(e[2]),r}},7622:function(v){v.exports=p;function p(r){var e=new Float32Array(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}},8782:function(v){v.exports=p;function p(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}},8501:function(v){v.exports=p;function p(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},903:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[0],m=a[1],h=a[2];return r[0]=f*h-c*m,r[1]=c*l-n*h,r[2]=n*m-f*l,r}},5981:function(v,p,r){v.exports=r(8288)},8288:function(v){v.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2];return Math.sqrt(a*a+n*n+f*f)}},8629:function(v,p,r){v.exports=r(7979)},7979:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]/a[0],r[1]=e[1]/a[1],r[2]=e[2]/a[2],r}},9305:function(v){v.exports=p;function p(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}},154:function(v){v.exports=1e-6},4932:function(v,p,r){v.exports=a;var e=r(154);function a(n,f){var c=n[0],l=n[1],m=n[2],h=f[0],b=f[1],u=f[2];return Math.abs(c-h)<=e*Math.max(1,Math.abs(c),Math.abs(h))&&Math.abs(l-b)<=e*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(m-u)<=e*Math.max(1,Math.abs(m),Math.abs(u))}},5777:function(v){v.exports=p;function p(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}},3306:function(v){v.exports=p;function p(r,e){return r[0]=Math.floor(e[0]),r[1]=Math.floor(e[1]),r[2]=Math.floor(e[2]),r}},7447:function(v,p,r){v.exports=a;var e=r(8501)();function a(n,f,c,l,m,h){var b,u;for(f||(f=3),c||(c=0),l?u=Math.min(l*f+c,n.length):u=n.length,b=c;b0&&(c=1/Math.sqrt(c),r[0]=e[0]*c,r[1]=e[1]*c,r[2]=e[2]*c),r}},6660:function(v){v.exports=p;function p(r,e){e=e||1;var a=Math.random()*2*Math.PI,n=Math.random()*2-1,f=Math.sqrt(1-n*n)*e;return r[0]=Math.cos(a)*f,r[1]=Math.sin(a)*f,r[2]=n*e,r}},392:function(v){v.exports=p;function p(r,e,a,n){var f=a[1],c=a[2],l=e[1]-f,m=e[2]-c,h=Math.sin(n),b=Math.cos(n);return r[0]=e[0],r[1]=f+l*b-m*h,r[2]=c+l*h+m*b,r}},3222:function(v){v.exports=p;function p(r,e,a,n){var f=a[0],c=a[2],l=e[0]-f,m=e[2]-c,h=Math.sin(n),b=Math.cos(n);return r[0]=f+m*h+l*b,r[1]=e[1],r[2]=c+m*b-l*h,r}},3388:function(v){v.exports=p;function p(r,e,a,n){var f=a[0],c=a[1],l=e[0]-f,m=e[1]-c,h=Math.sin(n),b=Math.cos(n);return r[0]=f+l*b-m*h,r[1]=c+l*h+m*b,r[2]=e[2],r}},1624:function(v){v.exports=p;function p(r,e){return r[0]=Math.round(e[0]),r[1]=Math.round(e[1]),r[2]=Math.round(e[2]),r}},5685:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]*a,r[1]=e[1]*a,r[2]=e[2]*a,r}},6722:function(v){v.exports=p;function p(r,e,a,n){return r[0]=e[0]+a[0]*n,r[1]=e[1]+a[1]*n,r[2]=e[2]+a[2]*n,r}},831:function(v){v.exports=p;function p(r,e,a,n){return r[0]=e,r[1]=a,r[2]=n,r}},5294:function(v,p,r){v.exports=r(6403)},3303:function(v,p,r){v.exports=r(4337)},6403:function(v){v.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2];return a*a+n*n+f*f}},4337:function(v){v.exports=p;function p(r){var e=r[0],a=r[1],n=r[2];return e*e+a*a+n*n}},8921:function(v,p,r){v.exports=r(911)},911:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]-a[0],r[1]=e[1]-a[1],r[2]=e[2]-a[2],r}},9908:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2];return r[0]=n*a[0]+f*a[3]+c*a[6],r[1]=n*a[1]+f*a[4]+c*a[7],r[2]=n*a[2]+f*a[5]+c*a[8],r}},3255:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[3]*n+a[7]*f+a[11]*c+a[15];return l=l||1,r[0]=(a[0]*n+a[4]*f+a[8]*c+a[12])/l,r[1]=(a[1]*n+a[5]*f+a[9]*c+a[13])/l,r[2]=(a[2]*n+a[6]*f+a[10]*c+a[14])/l,r}},6568:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[0],m=a[1],h=a[2],b=a[3],u=b*n+m*c-h*f,o=b*f+h*n-l*c,d=b*c+l*f-m*n,w=-l*n-m*f-h*c;return r[0]=u*b+w*-l+o*-h-d*-m,r[1]=o*b+w*-m+d*-l-u*-h,r[2]=d*b+w*-h+u*-m-o*-l,r}},3433:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]+a[0],r[1]=e[1]+a[1],r[2]=e[2]+a[2],r[3]=e[3]+a[3],r}},1413:function(v){v.exports=p;function p(r){var e=new Float32Array(4);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e}},3470:function(v){v.exports=p;function p(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}},5313:function(v){v.exports=p;function p(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},5446:function(v){v.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2],c=e[3]-r[3];return Math.sqrt(a*a+n*n+f*f+c*c)}},205:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]/a[0],r[1]=e[1]/a[1],r[2]=e[2]/a[2],r[3]=e[3]/a[3],r}},4242:function(v){v.exports=p;function p(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]}},5680:function(v){v.exports=p;function p(r,e,a,n){var f=new Float32Array(4);return f[0]=r,f[1]=e,f[2]=a,f[3]=n,f}},4020:function(v,p,r){v.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(v){v.exports=p;function p(r,e){return r[0]=1/e[0],r[1]=1/e[1],r[2]=1/e[2],r[3]=1/e[3],r}},8177:function(v){v.exports=p;function p(r){var e=r[0],a=r[1],n=r[2],f=r[3];return Math.sqrt(e*e+a*a+n*n+f*f)}},8746:function(v){v.exports=p;function p(r,e,a,n){var f=e[0],c=e[1],l=e[2],m=e[3];return r[0]=f+n*(a[0]-f),r[1]=c+n*(a[1]-c),r[2]=l+n*(a[2]-l),r[3]=m+n*(a[3]-m),r}},3030:function(v){v.exports=p;function p(r,e,a){return r[0]=Math.max(e[0],a[0]),r[1]=Math.max(e[1],a[1]),r[2]=Math.max(e[2],a[2]),r[3]=Math.max(e[3],a[3]),r}},2170:function(v){v.exports=p;function p(r,e,a){return r[0]=Math.min(e[0],a[0]),r[1]=Math.min(e[1],a[1]),r[2]=Math.min(e[2],a[2]),r[3]=Math.min(e[3],a[3]),r}},746:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]*a[0],r[1]=e[1]*a[1],r[2]=e[2]*a[2],r[3]=e[3]*a[3],r}},6459:function(v){v.exports=p;function p(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r[3]=-e[3],r}},381:function(v){v.exports=p;function p(r,e){var a=e[0],n=e[1],f=e[2],c=e[3],l=a*a+n*n+f*f+c*c;return l>0&&(l=1/Math.sqrt(l),r[0]=a*l,r[1]=n*l,r[2]=f*l,r[3]=c*l),r}},3770:function(v,p,r){var e=r(381),a=r(5510);v.exports=n;function n(f,c){return c=c||1,f[0]=Math.random(),f[1]=Math.random(),f[2]=Math.random(),f[3]=Math.random(),e(f,f),a(f,f,c),f}},5510:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]*a,r[1]=e[1]*a,r[2]=e[2]*a,r[3]=e[3]*a,r}},4224:function(v){v.exports=p;function p(r,e,a,n){return r[0]=e[0]+a[0]*n,r[1]=e[1]+a[1]*n,r[2]=e[2]+a[2]*n,r[3]=e[3]+a[3]*n,r}},6453:function(v){v.exports=p;function p(r,e,a,n,f){return r[0]=e,r[1]=a,r[2]=n,r[3]=f,r}},1542:function(v){v.exports=p;function p(r,e){var a=e[0]-r[0],n=e[1]-r[1],f=e[2]-r[2],c=e[3]-r[3];return a*a+n*n+f*f+c*c}},9037:function(v){v.exports=p;function p(r){var e=r[0],a=r[1],n=r[2],f=r[3];return e*e+a*a+n*n+f*f}},2705:function(v){v.exports=p;function p(r,e,a){return r[0]=e[0]-a[0],r[1]=e[1]-a[1],r[2]=e[2]-a[2],r[3]=e[3]-a[3],r}},6342:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=e[3];return r[0]=a[0]*n+a[4]*f+a[8]*c+a[12]*l,r[1]=a[1]*n+a[5]*f+a[9]*c+a[13]*l,r[2]=a[2]*n+a[6]*f+a[10]*c+a[14]*l,r[3]=a[3]*n+a[7]*f+a[11]*c+a[15]*l,r}},5022:function(v){v.exports=p;function p(r,e,a){var n=e[0],f=e[1],c=e[2],l=a[0],m=a[1],h=a[2],b=a[3],u=b*n+m*c-h*f,o=b*f+h*n-l*c,d=b*c+l*f-m*n,w=-l*n-m*f-h*c;return r[0]=u*b+w*-l+o*-h-d*-m,r[1]=o*b+w*-m+d*-l-u*-h,r[2]=d*b+w*-h+u*-m-o*-l,r[3]=e[3],r}},9365:function(v,p,r){var e=r(8096),a=r(7896);v.exports=n;function n(f){for(var c=Array.isArray(f)?f:e(f),l=0;l0)continue;It=Ut.slice(0,1).join("")}return $(It),et+=It.length,O=O.slice(It.length),O.length}while(!0)}function At(){return/[^a-fA-F0-9]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function mt(){return k==="."||/[eE]/.test(k)?(O.push(k),I=w,B=k,D+1):k==="x"&&O.length===1&&O[0]==="0"?(I=s,O.push(k),B=k,D+1):/[^\d]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function Lt(){return k==="f"&&(O.push(k),B=k,D+=1),/[eE]/.test(k)||(k==="-"||k==="+")&&/[eE]/.test(B)?(O.push(k),B=k,D+1):/[^\d]/.test(k)?($(O.join("")),I=l,D):(O.push(k),B=k,D+1)}function Ht(){if(/[^\d\w_]/.test(k)){var Ut=O.join("");return ot[Ut]?I=y:Q[Ut]?I=_:I=A,$(O.join("")),I=l,D}return O.push(k),B=k,D+1}}},3585:function(v,p,r){var e=r(9525);e=e.slice().filter(function(a){return!/^(gl\_|texture)/.test(a)}),v.exports=e.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},9525:function(v){v.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},9458:function(v,p,r){var e=r(399);v.exports=e.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},399:function(v){v.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},9746:function(v){v.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(v,p,r){var e=r(3193);v.exports=a;function a(n,f){var c=e(f),l=[];return l=l.concat(c(n)),l=l.concat(c(null)),l}},6832:function(v){v.exports=function(p){typeof p=="string"&&(p=[p]);for(var r=[].slice.call(arguments,1),e=[],a=0;a0;){d=T.pop();for(var s=d.adjacent,L=0;L<=A;++L){var M=s[L];if(!(!M.boundary||M.lastVisited<=-_)){for(var z=M.vertices,D=0;D<=A;++D){var N=z[D];N<0?y[D]=w:y[D]=E[N]}var I=this.orient();if(I>0)return M;M.lastVisited=-_,I===0&&T.push(M)}}}return null},u.walk=function(d,w){var A=this.vertices.length-1,_=this.dimension,y=this.vertices,E=this.tuple,T=w?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[T];t:for(;!s.boundary;){for(var L=s.vertices,M=s.adjacent,z=0;z<=_;++z)E[z]=y[L[z]];s.lastVisited=A;for(var z=0;z<=_;++z){var D=M[z];if(!(D.lastVisited>=A)){var N=E[z];E[z]=d;var I=this.orient();if(E[z]=N,I<0){s=D;continue t}else D.boundary?D.lastVisited=-A:D.lastVisited=A}}return}return s},u.addPeaks=function(d,w){var A=this.vertices.length-1,_=this.dimension,y=this.vertices,E=this.tuple,T=this.interior,s=this.simplices,L=[w];w.lastVisited=A,w.vertices[w.vertices.indexOf(-1)]=A,w.boundary=!1,T.push(w);for(var M=[];L.length>0;){var w=L.pop(),z=w.vertices,D=w.adjacent,N=z.indexOf(A);if(!(N<0)){for(var I=0;I<=_;++I)if(I!==N){var k=D[I];if(!(!k.boundary||k.lastVisited>=A)){var B=k.vertices;if(k.lastVisited!==-A){for(var O=0,H=0;H<=_;++H)B[H]<0?(O=H,E[H]=d):E[H]=y[B[H]];var Y=this.orient();if(Y>0){B[O]=A,k.boundary=!1,T.push(k),L.push(k),k.lastVisited=A;continue}else k.lastVisited=-A}var j=k.adjacent,et=z.slice(),it=D.slice(),ut=new n(et,it,!0);s.push(ut);var J=j.indexOf(w);if(!(J<0)){j[J]=ut,it[N]=k,et[I]=-1,it[I]=w,D[I]=ut,ut.flip();for(var H=0;H<=_;++H){var X=et[H];if(!(X<0||X===A)){for(var tt=new Array(_-1),V=0,Q=0;Q<=_;++Q){var ot=et[Q];ot<0||Q===H||(tt[V++]=ot)}M.push(new f(tt,ut,H))}}}}}}}M.sort(c);for(var I=0;I+1=0?T[L++]=s[z]:M=z&1;if(M===(d&1)){var D=T[0];T[0]=T[1],T[1]=D}w.push(T)}}return w};function o(d,w){var A=d.length;if(A===0)throw new Error("Must have at least d+1 points");var _=d[0].length;if(A<=_)throw new Error("Must input at least d+1 points");var y=d.slice(0,_+1),E=e.apply(void 0,y);if(E===0)throw new Error("Input not in general position");for(var T=new Array(_+1),s=0;s<=_;++s)T[s]=s;E<0&&(T[0]=1,T[1]=0);for(var L=new n(T,new Array(_+1),!1),M=L.adjacent,z=new Array(_+2),s=0;s<=_;++s){for(var D=T.slice(),N=0;N<=_;++N)N===s&&(D[N]=-1);var I=D[0];D[0]=D[1],D[1]=I;var k=new n(D,new Array(_+1),!0);M[s]=k,z[s]=k}z[_+1]=L;for(var s=0;s<=_;++s)for(var D=M[s].vertices,B=M[s].adjacent,N=0;N<=_;++N){var O=D[N];if(O<0){B[N]=L;continue}for(var H=0;H<=_;++H)M[H].vertices.indexOf(O)<0&&(B[N]=M[H])}for(var Y=new b(_,y,z),j=!!w,s=_+1;s3*(z+1)?b(this,M):this.left.insert(M):this.left=E([M]);else if(M[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?b(this,M):this.right.insert(M):this.right=E([M]);else{var D=e.ge(this.leftPoints,M,_),N=e.ge(this.rightPoints,M,y);this.leftPoints.splice(D,0,M),this.rightPoints.splice(N,0,M)}},l.remove=function(M){var z=this.count-this.leftPoints;if(M[1]3*(z-1))return u(this,M);var N=this.left.remove(M);return N===f?(this.left=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else if(M[0]>this.mid){if(!this.right)return a;var I=this.left?this.left.count:0;if(4*I>3*(z-1))return u(this,M);var N=this.right.remove(M);return N===f?(this.right=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else{if(this.count===1)return this.leftPoints[0]===M?f:a;if(this.leftPoints.length===1&&this.leftPoints[0]===M){if(this.left&&this.right){for(var k=this,B=this.left;B.right;)k=B,B=B.right;if(k===this)B.right=this.right;else{var O=this.left,N=this.right;k.count-=B.count,k.right=B.left,B.left=O,B.right=N}m(this,B),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return n}for(var O=e.ge(this.leftPoints,M,_);O=0&&M[N][1]>=z;--N){var I=D(M[N]);if(I)return I}}function w(M,z){for(var D=0;Dthis.mid){if(this.right){var D=this.right.queryPoint(M,z);if(D)return D}return d(this.rightPoints,M,z)}else return w(this.leftPoints,z)},l.queryInterval=function(M,z,D){if(Mthis.mid&&this.right){var N=this.right.queryInterval(M,z,D);if(N)return N}return zthis.mid?d(this.rightPoints,M,D):w(this.leftPoints,D)};function A(M,z){return M-z}function _(M,z){var D=M[0]-z[0];return D||M[1]-z[1]}function y(M,z){var D=M[1]-z[1];return D||M[0]-z[0]}function E(M){if(M.length===0)return null;for(var z=[],D=0;D>1],I=[],k=[],B=[],D=0;D * @license MIT -*/v.exports=function(t){return t!=null&&(p(t)||r(t)||!!t._isBuffer)};function p(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function r(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&p(t.slice(0,0))}},3596:function(v){v.exports=function(p){for(var r=p.length,t,a=0;a13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}},3578:function(v){function p(r,t,a){return r*(1-a)+t*a}v.exports=p},7191:function(v,p,r){var t=r(4690),a=r(9823),n=r(7332),f=r(7787),c=r(7437),l=r(2142),m={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},h=a(),b=a(),u=[0,0,0,0],o=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];v.exports=function(E,T,s,L,M,z){if(T||(T=[0,0,0]),s||(s=[0,0,0]),L||(L=[0,0,0]),M||(M=[0,0,0,1]),z||(z=[0,0,0,1]),!t(h,E)||(n(b,h),b[3]=0,b[7]=0,b[11]=0,b[15]=1,Math.abs(f(b)<1e-8)))return!1;var D=h[3],N=h[7],I=h[11],k=h[12],B=h[13],O=h[14],V=h[15];if(D!==0||N!==0||I!==0){u[0]=D,u[1]=N,u[2]=I,u[3]=V;var Y=c(b,b);if(!Y)return!1;l(b,b),w(M,u,b)}else M[0]=M[1]=M[2]=0,M[3]=1;if(T[0]=k,T[1]=B,T[2]=O,A(o,h),s[0]=m.length(o[0]),m.normalize(o[0],o[0]),L[0]=m.dot(o[0],o[1]),_(o[1],o[1],o[0],1,-L[0]),s[1]=m.length(o[1]),m.normalize(o[1],o[1]),L[0]/=s[1],L[1]=m.dot(o[0],o[2]),_(o[2],o[2],o[0],1,-L[1]),L[2]=m.dot(o[1],o[2]),_(o[2],o[2],o[1],1,-L[2]),s[2]=m.length(o[2]),m.normalize(o[2],o[2]),L[1]/=s[2],L[2]/=s[2],m.cross(d,o[1],o[2]),m.dot(o[0],d)<0)for(var j=0;j<3;j++)s[j]*=-1,o[j][0]*=-1,o[j][1]*=-1,o[j][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+o[0][0]-o[1][1]-o[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-o[0][0]+o[1][1]-o[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-o[0][0]-o[1][1]+o[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+o[0][0]+o[1][1]+o[2][2],0)),o[2][1]>o[1][2]&&(z[0]=-z[0]),o[0][2]>o[2][0]&&(z[1]=-z[1]),o[1][0]>o[0][1]&&(z[2]=-z[2]),!0};function w(y,E,T){var s=E[0],L=E[1],M=E[2],z=E[3];return y[0]=T[0]*s+T[4]*L+T[8]*M+T[12]*z,y[1]=T[1]*s+T[5]*L+T[9]*M+T[13]*z,y[2]=T[2]*s+T[6]*L+T[10]*M+T[14]*z,y[3]=T[3]*s+T[7]*L+T[11]*M+T[15]*z,y}function A(y,E){y[0][0]=E[0],y[0][1]=E[1],y[0][2]=E[2],y[1][0]=E[4],y[1][1]=E[5],y[1][2]=E[6],y[2][0]=E[8],y[2][1]=E[9],y[2][2]=E[10]}function _(y,E,T,s,L){y[0]=E[0]*s+T[0]*L,y[1]=E[1]*s+T[1]*L,y[2]=E[2]*s+T[2]*L}},4690:function(v){v.exports=function(r,t){var a=t[15];if(a===0)return!1;for(var n=1/a,f=0;f<16;f++)r[f]=t[f]*n;return!0}},7649:function(v,p,r){var t=r(1868),a=r(1102),n=r(7191),f=r(7787),c=r(1116),l=u(),m=u(),h=u();v.exports=b;function b(w,A,_,y){if(f(A)===0||f(_)===0)return!1;var E=n(A,l.translate,l.scale,l.skew,l.perspective,l.quaternion),T=n(_,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!E||!T?!1:(t(h.translate,l.translate,m.translate,y),t(h.skew,l.skew,m.skew,y),t(h.scale,l.scale,m.scale,y),t(h.perspective,l.perspective,m.perspective,y),c(h.quaternion,l.quaternion,m.quaternion,y),a(w,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function u(){return{translate:o(),scale:o(1),skew:o(),perspective:d(),quaternion:d()}}function o(w){return[w||0,w||0,w||0]}function d(){return[0,0,0,1]}},1102:function(v,p,r){var t={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)};t.create();var a=t.create();v.exports=function(f,c,l,m,h,b){return t.identity(f),t.fromRotationTranslation(f,b,c),f[3]=h[0],f[7]=h[1],f[11]=h[2],f[15]=h[3],t.identity(a),m[2]!==0&&(a[9]=m[2],t.multiply(f,f,a)),m[1]!==0&&(a[9]=0,a[8]=m[1],t.multiply(f,f,a)),m[0]!==0&&(a[8]=0,a[4]=m[0],t.multiply(f,f,a)),t.scale(f,f,l),f}},9298:function(v,p,r){var t=r(5070),a=r(7649),n=r(7437),f=r(6109),c=r(7115),l=r(5240),m=r(3012),h=r(998);r(3668);var b=r(899),u=[0,0,0];v.exports=A;function o(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var d=o.prototype;d.recalcMatrix=function(_){var y=this._time,E=t.le(y,_),T=this.computedMatrix;if(!(E<0)){var s=this._components;if(E===y.length-1)for(var L=16*E,M=0;M<16;++M)T[M]=s[L++];else{for(var z=y[E+1]-y[E],L=16*E,D=this.prevMatrix,N=!0,M=0;M<16;++M)D[M]=s[L++];for(var I=this.nextMatrix,M=0;M<16;++M)I[M]=s[L++],N=N&&D[M]===I[M];if(z<1e-6||N)for(var M=0;M<16;++M)T[M]=D[M];else a(T,D,I,(_-y[E])/z)}var k=this.computedUp;k[0]=T[1],k[1]=T[5],k[2]=T[9],b(k,k);var B=this.computedInverse;n(B,T);var O=this.computedEye,V=B[15];O[0]=B[12]/V,O[1]=B[13]/V,O[2]=B[14]/V;for(var Y=this.computedCenter,j=Math.exp(this.computedRadius[0]),M=0;M<3;++M)Y[M]=O[M]-T[2+4*M]*j}},d.idle=function(_){if(!(_1&&t(n[m[o-2]],n[m[o-1]],u)<=0;)o-=1,m.pop();for(m.push(b),o=h.length;o>1&&t(n[h[o-2]],n[h[o-1]],u)>=0;)o-=1,h.pop();h.push(b)}for(var d=new Array(h.length+m.length-2),w=0,c=0,A=m.length;c0;--_)d[w++]=h[_];return d}},6145:function(v,p,r){v.exports=a;var t=r(4110);function a(n,f){f||(f=n,n=window);var c=0,l=0,m=0,h={shift:!1,alt:!1,control:!1,meta:!1},b=!1;function u(M){var z=!1;return"altKey"in M&&(z=z||M.altKey!==h.alt,h.alt=!!M.altKey),"shiftKey"in M&&(z=z||M.shiftKey!==h.shift,h.shift=!!M.shiftKey),"ctrlKey"in M&&(z=z||M.ctrlKey!==h.control,h.control=!!M.ctrlKey),"metaKey"in M&&(z=z||M.metaKey!==h.meta,h.meta=!!M.metaKey),z}function o(M,z){var D=t.x(z),N=t.y(z);"buttons"in z&&(M=z.buttons|0),(M!==c||D!==l||N!==m||u(z))&&(c=M|0,l=D||0,m=N||0,f&&f(c,l,m,h))}function d(M){o(0,M)}function w(){(c||l||m||h.shift||h.alt||h.meta||h.control)&&(l=m=0,c=0,h.shift=h.alt=h.control=h.meta=!1,f&&f(0,0,0,h))}function A(M){u(M)&&f&&f(c,l,m,h)}function _(M){t.buttons(M)===0?o(0,M):o(c,M)}function y(M){o(c|t.buttons(M),M)}function E(M){o(c&~t.buttons(M),M)}function T(){b||(b=!0,n.addEventListener("mousemove",_),n.addEventListener("mousedown",y),n.addEventListener("mouseup",E),n.addEventListener("mouseleave",d),n.addEventListener("mouseenter",d),n.addEventListener("mouseout",d),n.addEventListener("mouseover",d),n.addEventListener("blur",w),n.addEventListener("keyup",A),n.addEventListener("keydown",A),n.addEventListener("keypress",A),n!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function s(){b&&(b=!1,n.removeEventListener("mousemove",_),n.removeEventListener("mousedown",y),n.removeEventListener("mouseup",E),n.removeEventListener("mouseleave",d),n.removeEventListener("mouseenter",d),n.removeEventListener("mouseout",d),n.removeEventListener("mouseover",d),n.removeEventListener("blur",w),n.removeEventListener("keyup",A),n.removeEventListener("keydown",A),n.removeEventListener("keypress",A),n!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}T();var L={element:n};return Object.defineProperties(L,{enabled:{get:function(){return b},set:function(M){M?T():s()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return l},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),L}},2565:function(v){var p={left:0,top:0};v.exports=r;function r(a,n,f){n=n||a.currentTarget||a.srcElement,Array.isArray(f)||(f=[0,0]);var c=a.clientX||0,l=a.clientY||0,m=t(n);return f[0]=c-m.left,f[1]=l-m.top,f}function t(a){return a===window||a===document||a===document.body?p:a.getBoundingClientRect()}},4110:function(v,p){function r(f){if(typeof f=="object"){if("buttons"in f)return f.buttons;if("which"in f){var c=f.which;if(c===2)return 4;if(c===3)return 2;if(c>0)return 1<=0)return 1<0){if(ie=1,X[G++]=h(T[z],w,A,_),z+=Y,y>0)for(te=1,D=T[z],Q=X[G]=h(D,w,A,_),Z=X[G+oe],ce=X[G+se],we=X[G+ge],(Q!==Z||Q!==ce||Q!==we)&&(I=T[z+N],B=T[z+k],V=T[z+O],l(te,ie,D,I,B,V,Q,Z,ce,we,w,A,_),Re=ee[G]=ue++),G+=1,z+=Y,te=2;te0)for(te=1,D=T[z],Q=X[G]=h(D,w,A,_),Z=X[G+oe],ce=X[G+se],we=X[G+ge],(Q!==Z||Q!==ce||Q!==we)&&(I=T[z+N],B=T[z+k],V=T[z+O],l(te,ie,D,I,B,V,Q,Z,ce,we,w,A,_),Re=ee[G]=ue++,we!==ce&&m(ee[G+se],Re,B,V,ce,we,w,A,_)),G+=1,z+=Y,te=2;te0){if(te=1,X[G++]=h(T[z],w,A,_),z+=Y,E>0)for(ie=1,D=T[z],Q=X[G]=h(D,w,A,_),ce=X[G+se],Z=X[G+oe],we=X[G+ge],(Q!==ce||Q!==Z||Q!==we)&&(I=T[z+N],B=T[z+k],V=T[z+O],l(te,ie,D,I,B,V,Q,ce,Z,we,w,A,_),Re=ee[G]=ue++),G+=1,z+=Y,ie=2;ie0)for(ie=1,D=T[z],Q=X[G]=h(D,w,A,_),ce=X[G+se],Z=X[G+oe],we=X[G+ge],(Q!==ce||Q!==Z||Q!==we)&&(I=T[z+N],B=T[z+k],V=T[z+O],l(te,ie,D,I,B,V,Q,ce,Z,we,w,A,_),Re=ee[G]=ue++,we!==ce&&m(ee[G+se],Re,V,I,we,ce,w,A,_)),G+=1,z+=Y,ie=2;ie 0"),typeof c.vertex!="function"&&l("Must specify vertex creation function"),typeof c.cell!="function"&&l("Must specify cell creation function"),typeof c.phase!="function"&&l("Must specify phase function");for(var u=c.getters||[],o=new Array(h),d=0;d=0?o[d]=!0:o[d]=!1;return n(c.vertex,c.cell,c.phase,b,m,o)}},9144:function(v,p,r){var t=r(3094),a={zero:function(A,_,y,E){var T=A[0],s=y[0];E|=0;var L=0,M=s;for(L=0;L2&&L[1]>2&&E(s.pick(-1,-1).lo(1,1).hi(L[0]-2,L[1]-2),T.pick(-1,-1,0).lo(1,1).hi(L[0]-2,L[1]-2),T.pick(-1,-1,1).lo(1,1).hi(L[0]-2,L[1]-2)),L[1]>2&&(y(s.pick(0,-1).lo(1).hi(L[1]-2),T.pick(0,-1,1).lo(1).hi(L[1]-2)),_(T.pick(0,-1,0).lo(1).hi(L[1]-2))),L[1]>2&&(y(s.pick(L[0]-1,-1).lo(1).hi(L[1]-2),T.pick(L[0]-1,-1,1).lo(1).hi(L[1]-2)),_(T.pick(L[0]-1,-1,0).lo(1).hi(L[1]-2))),L[0]>2&&(y(s.pick(-1,0).lo(1).hi(L[0]-2),T.pick(-1,0,0).lo(1).hi(L[0]-2)),_(T.pick(-1,0,1).lo(1).hi(L[0]-2))),L[0]>2&&(y(s.pick(-1,L[1]-1).lo(1).hi(L[0]-2),T.pick(-1,L[1]-1,0).lo(1).hi(L[0]-2)),_(T.pick(-1,L[1]-1,1).lo(1).hi(L[0]-2))),T.set(0,0,0,0),T.set(0,0,1,0),T.set(L[0]-1,0,0,0),T.set(L[0]-1,0,1,0),T.set(0,L[1]-1,0,0),T.set(0,L[1]-1,1,0),T.set(L[0]-1,L[1]-1,0,0),T.set(L[0]-1,L[1]-1,1,0),T}}function w(A){var _=A.join(),L=h[_];if(L)return L;for(var y=A.length,E=[b,u],T=1;T<=y;++T)E.push(o(T));var s=d,L=s.apply(void 0,E);return h[_]=L,L}v.exports=function(_,y,E){if(Array.isArray(E)||(typeof E=="string"?E=t(y.dimension,E):E=t(y.dimension,"clamp")),y.size===0)return _;if(y.dimension===0)return _.set(0),_;var T=w(E);return T(_,y)}},3581:function(v){function p(f,c){var l=Math.floor(c),m=c-l,h=0<=l&&l0;){B<64?(y=B,B=0):(y=64,B-=64);for(var O=h[1]|0;O>0;){O<64?(E=O,O=0):(E=64,O-=64),o=I+B*s+O*L,A=k+B*z+O*D;var V=0,Y=0,j=0,te=M,ie=s-T*M,ue=L-y*s,J=N,X=z-T*N,ee=D-y*z;for(j=0;j0;){D<64?(y=D,D=0):(y=64,D-=64);for(var N=h[0]|0;N>0;){N<64?(_=N,N=0):(_=64,N-=64),o=M+D*T+N*E,A=z+D*L+N*s;var I=0,k=0,B=T,O=E-y*T,V=L,Y=s-y*L;for(k=0;k<_;++k){for(I=0;I0;){k<64?(E=k,k=0):(E=64,k-=64);for(var B=h[0]|0;B>0;){B<64?(_=B,B=0):(_=64,B-=64);for(var O=h[1]|0;O>0;){O<64?(y=O,O=0):(y=64,O-=64),o=N+k*L+B*T+O*s,A=I+k*D+B*M+O*z;var V=0,Y=0,j=0,te=L,ie=T-E*L,ue=s-_*T,J=D,X=M-E*D,ee=z-_*M;for(j=0;jd;){V=0,Y=I-y;t:for(B=0;Bte)break t;Y+=M,V+=z}for(V=I,Y=I-y,B=0;B>1,O=B-N,V=B+N,Y=I,j=O,te=B,ie=V,ue=k,J=w+1,X=A-1,ee=!0,G,Q,oe,$,Z,se,ne,ce,ge,Te=0,we=0,Re=0,be,Ae,me,Le,Ve,Ue,ke,He,Ie,rt,Ke,$e,lt,ht,dt,xt,St=L,nt=u(St),ze=u(St);Ae=E*Y,me=E*j,xt=y;e:for(be=0;be0){Q=Y,Y=j,j=Q;break e}if(Re<0)break e;xt+=z}Ae=E*ie,me=E*ue,xt=y;e:for(be=0;be0){Q=ie,ie=ue,ue=Q;break e}if(Re<0)break e;xt+=z}Ae=E*Y,me=E*te,xt=y;e:for(be=0;be0){Q=Y,Y=te,te=Q;break e}if(Re<0)break e;xt+=z}Ae=E*j,me=E*te,xt=y;e:for(be=0;be0){Q=j,j=te,te=Q;break e}if(Re<0)break e;xt+=z}Ae=E*Y,me=E*ie,xt=y;e:for(be=0;be0){Q=Y,Y=ie,ie=Q;break e}if(Re<0)break e;xt+=z}Ae=E*te,me=E*ie,xt=y;e:for(be=0;be0){Q=te,te=ie,ie=Q;break e}if(Re<0)break e;xt+=z}Ae=E*j,me=E*ue,xt=y;e:for(be=0;be0){Q=j,j=ue,ue=Q;break e}if(Re<0)break e;xt+=z}Ae=E*j,me=E*te,xt=y;e:for(be=0;be0){Q=j,j=te,te=Q;break e}if(Re<0)break e;xt+=z}Ae=E*ie,me=E*ue,xt=y;e:for(be=0;be0){Q=ie,ie=ue,ue=Q;break e}if(Re<0)break e;xt+=z}for(Ae=E*Y,me=E*j,Le=E*te,Ve=E*ie,Ue=E*ue,ke=E*I,He=E*B,Ie=E*k,dt=0,xt=y,be=0;be0)X--;else if(Re<0){for(Ae=E*se,me=E*J,Le=E*X,xt=y,be=0;be0)for(;;){ne=y+X*E,dt=0;e:for(be=0;be0){if(--Xk){e:for(;;){for(ne=y+J*E,dt=0,xt=y,be=0;be1&&d?A(o,d[0],d[1]):A(o)}var m={"uint32,1,0":function(b,u){return function(o){var d=o.data,w=o.offset|0,A=o.shape,_=o.stride,y=_[0]|0,E=A[0]|0,T=_[1]|0,s=A[1]|0,L=T,M=T,z=1;E<=32?b(0,E-1,d,w,y,T,E,s,L,M,z):u(0,E-1,d,w,y,T,E,s,L,M,z)}}};function h(b,u){var o=[u,b].join(","),d=m[o],w=f(b,u),A=l(b,u,w);return d(w,A)}v.exports=h},8729:function(v,p,r){var t=r(8139),a={};function n(f){var c=f.order,l=f.dtype,m=[c,l],h=m.join(":"),b=a[h];return b||(a[h]=b=t(c,l)),b(f),f}v.exports=n},5050:function(v,p,r){var t=r(4780),a=typeof Float64Array<"u";function n(u,o){return u[0]-o[0]}function f(){var u=this.stride,o=new Array(u.length),d;for(d=0;d=0&&(T=y|0,E+=L*T,s-=T),new w(this.data,s,L,E)},A.step=function(y){var E=this.shape[0],T=this.stride[0],s=this.offset,L=0,M=Math.ceil;return typeof y=="number"&&(L=y|0,L<0?(s+=T*(E-1),E=M(-E/L)):E=M(E/L),T*=L),new w(this.data,E,T,s)},A.transpose=function(y){y=y===void 0?0:y|0;var E=this.shape,T=this.stride;return new w(this.data,E[y],T[y],this.offset)},A.pick=function(y){var E=[],T=[],s=this.offset;typeof y=="number"&&y>=0?s=s+this.stride[0]*y|0:(E.push(this.shape[0]),T.push(this.stride[0]));var L=o[E.length+1];return L(this.data,E,T,s)},function(y,E,T,s){return new w(y,E[0],T[0],s)}},2:function(u,o,d){function w(_,y,E,T,s,L){this.data=_,this.shape=[y,E],this.stride=[T,s],this.offset=L|0}var A=w.prototype;return A.dtype=u,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(y,E,T){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E,T):this.data[this.offset+this.stride[0]*y+this.stride[1]*E]=T},A.get=function(y,E){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E):this.data[this.offset+this.stride[0]*y+this.stride[1]*E]},A.index=function(y,E){return this.offset+this.stride[0]*y+this.stride[1]*E},A.hi=function(y,E){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(y,E){var T=this.offset,s=0,L=this.shape[0],M=this.shape[1],z=this.stride[0],D=this.stride[1];return typeof y=="number"&&y>=0&&(s=y|0,T+=z*s,L-=s),typeof E=="number"&&E>=0&&(s=E|0,T+=D*s,M-=s),new w(this.data,L,M,z,D,T)},A.step=function(y,E){var T=this.shape[0],s=this.shape[1],L=this.stride[0],M=this.stride[1],z=this.offset,D=0,N=Math.ceil;return typeof y=="number"&&(D=y|0,D<0?(z+=L*(T-1),T=N(-T/D)):T=N(T/D),L*=D),typeof E=="number"&&(D=E|0,D<0?(z+=M*(s-1),s=N(-s/D)):s=N(s/D),M*=D),new w(this.data,T,s,L,M,z)},A.transpose=function(y,E){y=y===void 0?0:y|0,E=E===void 0?1:E|0;var T=this.shape,s=this.stride;return new w(this.data,T[y],T[E],s[y],s[E],this.offset)},A.pick=function(y,E){var T=[],s=[],L=this.offset;typeof y=="number"&&y>=0?L=L+this.stride[0]*y|0:(T.push(this.shape[0]),s.push(this.stride[0])),typeof E=="number"&&E>=0?L=L+this.stride[1]*E|0:(T.push(this.shape[1]),s.push(this.stride[1]));var M=o[T.length+1];return M(this.data,T,s,L)},function(y,E,T,s){return new w(y,E[0],E[1],T[0],T[1],s)}},3:function(u,o,d){function w(_,y,E,T,s,L,M,z){this.data=_,this.shape=[y,E,T],this.stride=[s,L,M],this.offset=z|0}var A=w.prototype;return A.dtype=u,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var y=Math.abs(this.stride[0]),E=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return y>E?E>T?[2,1,0]:y>T?[1,2,0]:[1,0,2]:y>T?[2,0,1]:T>E?[0,1,2]:[0,2,1]}}),A.set=function(y,E,T,s){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T,s):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T]=s},A.get=function(y,E,T){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T]},A.index=function(y,E,T){return this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T},A.hi=function(y,E,T){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(y,E,T){var s=this.offset,L=0,M=this.shape[0],z=this.shape[1],D=this.shape[2],N=this.stride[0],I=this.stride[1],k=this.stride[2];return typeof y=="number"&&y>=0&&(L=y|0,s+=N*L,M-=L),typeof E=="number"&&E>=0&&(L=E|0,s+=I*L,z-=L),typeof T=="number"&&T>=0&&(L=T|0,s+=k*L,D-=L),new w(this.data,M,z,D,N,I,k,s)},A.step=function(y,E,T){var s=this.shape[0],L=this.shape[1],M=this.shape[2],z=this.stride[0],D=this.stride[1],N=this.stride[2],I=this.offset,k=0,B=Math.ceil;return typeof y=="number"&&(k=y|0,k<0?(I+=z*(s-1),s=B(-s/k)):s=B(s/k),z*=k),typeof E=="number"&&(k=E|0,k<0?(I+=D*(L-1),L=B(-L/k)):L=B(L/k),D*=k),typeof T=="number"&&(k=T|0,k<0?(I+=N*(M-1),M=B(-M/k)):M=B(M/k),N*=k),new w(this.data,s,L,M,z,D,N,I)},A.transpose=function(y,E,T){y=y===void 0?0:y|0,E=E===void 0?1:E|0,T=T===void 0?2:T|0;var s=this.shape,L=this.stride;return new w(this.data,s[y],s[E],s[T],L[y],L[E],L[T],this.offset)},A.pick=function(y,E,T){var s=[],L=[],M=this.offset;typeof y=="number"&&y>=0?M=M+this.stride[0]*y|0:(s.push(this.shape[0]),L.push(this.stride[0])),typeof E=="number"&&E>=0?M=M+this.stride[1]*E|0:(s.push(this.shape[1]),L.push(this.stride[1])),typeof T=="number"&&T>=0?M=M+this.stride[2]*T|0:(s.push(this.shape[2]),L.push(this.stride[2]));var z=o[s.length+1];return z(this.data,s,L,M)},function(y,E,T,s){return new w(y,E[0],E[1],E[2],T[0],T[1],T[2],s)}},4:function(u,o,d){function w(_,y,E,T,s,L,M,z,D,N){this.data=_,this.shape=[y,E,T,s],this.stride=[L,M,z,D],this.offset=N|0}var A=w.prototype;return A.dtype=u,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:d}),A.set=function(y,E,T,s,L){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s,L):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s]=L},A.get=function(y,E,T,s){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s]},A.index=function(y,E,T,s){return this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s},A.hi=function(y,E,T,s){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof s!="number"||s<0?this.shape[3]:s|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(y,E,T,s){var L=this.offset,M=0,z=this.shape[0],D=this.shape[1],N=this.shape[2],I=this.shape[3],k=this.stride[0],B=this.stride[1],O=this.stride[2],V=this.stride[3];return typeof y=="number"&&y>=0&&(M=y|0,L+=k*M,z-=M),typeof E=="number"&&E>=0&&(M=E|0,L+=B*M,D-=M),typeof T=="number"&&T>=0&&(M=T|0,L+=O*M,N-=M),typeof s=="number"&&s>=0&&(M=s|0,L+=V*M,I-=M),new w(this.data,z,D,N,I,k,B,O,V,L)},A.step=function(y,E,T,s){var L=this.shape[0],M=this.shape[1],z=this.shape[2],D=this.shape[3],N=this.stride[0],I=this.stride[1],k=this.stride[2],B=this.stride[3],O=this.offset,V=0,Y=Math.ceil;return typeof y=="number"&&(V=y|0,V<0?(O+=N*(L-1),L=Y(-L/V)):L=Y(L/V),N*=V),typeof E=="number"&&(V=E|0,V<0?(O+=I*(M-1),M=Y(-M/V)):M=Y(M/V),I*=V),typeof T=="number"&&(V=T|0,V<0?(O+=k*(z-1),z=Y(-z/V)):z=Y(z/V),k*=V),typeof s=="number"&&(V=s|0,V<0?(O+=B*(D-1),D=Y(-D/V)):D=Y(D/V),B*=V),new w(this.data,L,M,z,D,N,I,k,B,O)},A.transpose=function(y,E,T,s){y=y===void 0?0:y|0,E=E===void 0?1:E|0,T=T===void 0?2:T|0,s=s===void 0?3:s|0;var L=this.shape,M=this.stride;return new w(this.data,L[y],L[E],L[T],L[s],M[y],M[E],M[T],M[s],this.offset)},A.pick=function(y,E,T,s){var L=[],M=[],z=this.offset;typeof y=="number"&&y>=0?z=z+this.stride[0]*y|0:(L.push(this.shape[0]),M.push(this.stride[0])),typeof E=="number"&&E>=0?z=z+this.stride[1]*E|0:(L.push(this.shape[1]),M.push(this.stride[1])),typeof T=="number"&&T>=0?z=z+this.stride[2]*T|0:(L.push(this.shape[2]),M.push(this.stride[2])),typeof s=="number"&&s>=0?z=z+this.stride[3]*s|0:(L.push(this.shape[3]),M.push(this.stride[3]));var D=o[L.length+1];return D(this.data,L,M,z)},function(y,E,T,s){return new w(y,E[0],E[1],E[2],E[3],T[0],T[1],T[2],T[3],s)}},5:function(o,d,w){function A(y,E,T,s,L,M,z,D,N,I,k,B){this.data=y,this.shape=[E,T,s,L,M],this.stride=[z,D,N,I,k],this.offset=B|0}var _=A.prototype;return _.dtype=o,_.dimension=5,Object.defineProperty(_,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(_,"order",{get:w}),_.set=function(E,T,s,L,M,z){return o==="generic"?this.data.set(this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M,z):this.data[this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M]=z},_.get=function(E,T,s,L,M){return o==="generic"?this.data.get(this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M):this.data[this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M]},_.index=function(E,T,s,L,M){return this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M},_.hi=function(E,T,s,L,M){return new A(this.data,typeof E!="number"||E<0?this.shape[0]:E|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof s!="number"||s<0?this.shape[2]:s|0,typeof L!="number"||L<0?this.shape[3]:L|0,typeof M!="number"||M<0?this.shape[4]:M|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},_.lo=function(E,T,s,L,M){var z=this.offset,D=0,N=this.shape[0],I=this.shape[1],k=this.shape[2],B=this.shape[3],O=this.shape[4],V=this.stride[0],Y=this.stride[1],j=this.stride[2],te=this.stride[3],ie=this.stride[4];return typeof E=="number"&&E>=0&&(D=E|0,z+=V*D,N-=D),typeof T=="number"&&T>=0&&(D=T|0,z+=Y*D,I-=D),typeof s=="number"&&s>=0&&(D=s|0,z+=j*D,k-=D),typeof L=="number"&&L>=0&&(D=L|0,z+=te*D,B-=D),typeof M=="number"&&M>=0&&(D=M|0,z+=ie*D,O-=D),new A(this.data,N,I,k,B,O,V,Y,j,te,ie,z)},_.step=function(E,T,s,L,M){var z=this.shape[0],D=this.shape[1],N=this.shape[2],I=this.shape[3],k=this.shape[4],B=this.stride[0],O=this.stride[1],V=this.stride[2],Y=this.stride[3],j=this.stride[4],te=this.offset,ie=0,ue=Math.ceil;return typeof E=="number"&&(ie=E|0,ie<0?(te+=B*(z-1),z=ue(-z/ie)):z=ue(z/ie),B*=ie),typeof T=="number"&&(ie=T|0,ie<0?(te+=O*(D-1),D=ue(-D/ie)):D=ue(D/ie),O*=ie),typeof s=="number"&&(ie=s|0,ie<0?(te+=V*(N-1),N=ue(-N/ie)):N=ue(N/ie),V*=ie),typeof L=="number"&&(ie=L|0,ie<0?(te+=Y*(I-1),I=ue(-I/ie)):I=ue(I/ie),Y*=ie),typeof M=="number"&&(ie=M|0,ie<0?(te+=j*(k-1),k=ue(-k/ie)):k=ue(k/ie),j*=ie),new A(this.data,z,D,N,I,k,B,O,V,Y,j,te)},_.transpose=function(E,T,s,L,M){E=E===void 0?0:E|0,T=T===void 0?1:T|0,s=s===void 0?2:s|0,L=L===void 0?3:L|0,M=M===void 0?4:M|0;var z=this.shape,D=this.stride;return new A(this.data,z[E],z[T],z[s],z[L],z[M],D[E],D[T],D[s],D[L],D[M],this.offset)},_.pick=function(E,T,s,L,M){var z=[],D=[],N=this.offset;typeof E=="number"&&E>=0?N=N+this.stride[0]*E|0:(z.push(this.shape[0]),D.push(this.stride[0])),typeof T=="number"&&T>=0?N=N+this.stride[1]*T|0:(z.push(this.shape[1]),D.push(this.stride[1])),typeof s=="number"&&s>=0?N=N+this.stride[2]*s|0:(z.push(this.shape[2]),D.push(this.stride[2])),typeof L=="number"&&L>=0?N=N+this.stride[3]*L|0:(z.push(this.shape[3]),D.push(this.stride[3])),typeof M=="number"&&M>=0?N=N+this.stride[4]*M|0:(z.push(this.shape[4]),D.push(this.stride[4]));var I=d[z.length+1];return I(this.data,z,D,N)},function(E,T,s,L){return new A(E,T[0],T[1],T[2],T[3],T[4],s[0],s[1],s[2],s[3],s[4],L)}}};function l(u,o){var d=o===-1?"T":String(o),w=c[d];return o===-1?w(u):o===0?w(u,h[u][0]):w(u,h[u],f)}function m(u){if(t(u))return"buffer";if(a)switch(Object.prototype.toString.call(u)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(u)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function b(u,o,d,w){if(u===void 0){var s=h.array[0];return s([])}else typeof u=="number"&&(u=[u]);o===void 0&&(o=[u.length]);var A=o.length;if(d===void 0){d=new Array(A);for(var _=A-1,y=1;_>=0;--_)d[_]=y,y*=o[_]}if(w===void 0){w=0;for(var _=0;_>>0;v.exports=f;function f(c,l){if(isNaN(c)||isNaN(l))return NaN;if(c===l)return c;if(c===0)return l<0?-a:a;var m=t.hi(c),h=t.lo(c);return l>c==c>0?h===n?(m+=1,h=0):h+=1:h===0?(h=n,m-=1):h-=1,t.pack(h,m)}},115:function(v,p){var r=1e-6,t=1e-6;p.vertexNormals=function(a,n,f){for(var c=n.length,l=new Array(c),m=f===void 0?r:f,h=0;hm)for(var z=l[o],D=1/Math.sqrt(T*L),M=0;M<3;++M){var N=(M+1)%3,I=(M+2)%3;z[M]+=D*(s[N]*E[I]-s[I]*E[N])}}for(var h=0;hm)for(var D=1/Math.sqrt(k),M=0;M<3;++M)z[M]*=D;else for(var M=0;M<3;++M)z[M]=0}return l},p.faceNormals=function(a,n,f){for(var c=a.length,l=new Array(c),m=f===void 0?t:f,h=0;hm?_=1/Math.sqrt(_):_=0;for(var o=0;o<3;++o)A[o]*=_;l[h]=A}return l}},567:function(v){v.exports=p;function p(r,t,a,n,f,c,l,m,h,b){var u=t+c+b;if(o>0){var o=Math.sqrt(u+1);r[0]=.5*(l-h)/o,r[1]=.5*(m-n)/o,r[2]=.5*(a-c)/o,r[3]=.5*o}else{var d=Math.max(t,c,b),o=Math.sqrt(2*d-u+1);t>=d?(r[0]=.5*o,r[1]=.5*(f+a)/o,r[2]=.5*(m+n)/o,r[3]=.5*(l-h)/o):c>=d?(r[0]=.5*(a+f)/o,r[1]=.5*o,r[2]=.5*(h+l)/o,r[3]=.5*(m-n)/o):(r[0]=.5*(n+m)/o,r[1]=.5*(l+h)/o,r[2]=.5*o,r[3]=.5*(a-f)/o)}return r}},7774:function(v,p,r){v.exports=o;var t=r(8444),a=r(3012),n=r(5950),f=r(7437),c=r(567);function l(d,w,A){return Math.sqrt(Math.pow(d,2)+Math.pow(w,2)+Math.pow(A,2))}function m(d,w,A,_){return Math.sqrt(Math.pow(d,2)+Math.pow(w,2)+Math.pow(A,2)+Math.pow(_,2))}function h(d,w){var A=w[0],_=w[1],y=w[2],E=w[3],T=m(A,_,y,E);T>1e-6?(d[0]=A/T,d[1]=_/T,d[2]=y/T,d[3]=E/T):(d[0]=d[1]=d[2]=0,d[3]=1)}function b(d,w,A){this.radius=t([A]),this.center=t(w),this.rotation=t(d),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var u=b.prototype;u.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},u.recalcMatrix=function(d){this.radius.curve(d),this.center.curve(d),this.rotation.curve(d);var w=this.computedRotation;h(w,w);var A=this.computedMatrix;n(A,w);var _=this.computedCenter,y=this.computedEye,E=this.computedUp,T=Math.exp(this.computedRadius[0]);y[0]=_[0]+T*A[2],y[1]=_[1]+T*A[6],y[2]=_[2]+T*A[10],E[0]=A[1],E[1]=A[5],E[2]=A[9];for(var s=0;s<3;++s){for(var L=0,M=0;M<3;++M)L+=A[s+4*M]*y[M];A[12+s]=-L}},u.getMatrix=function(d,w){this.recalcMatrix(d);var A=this.computedMatrix;if(w){for(var _=0;_<16;++_)w[_]=A[_];return w}return A},u.idle=function(d){this.center.idle(d),this.radius.idle(d),this.rotation.idle(d)},u.flush=function(d){this.center.flush(d),this.radius.flush(d),this.rotation.flush(d)},u.pan=function(d,w,A,_){w=w||0,A=A||0,_=_||0,this.recalcMatrix(d);var y=this.computedMatrix,E=y[1],T=y[5],s=y[9],L=l(E,T,s);E/=L,T/=L,s/=L;var M=y[0],z=y[4],D=y[8],N=M*E+z*T+D*s;M-=E*N,z-=T*N,D-=s*N;var I=l(M,z,D);M/=I,z/=I,D/=I,y[2],y[6],y[10];var k=M*w+E*A,B=z*w+T*A,O=D*w+s*A;this.center.move(d,k,B,O);var V=Math.exp(this.computedRadius[0]);V=Math.max(1e-4,V+_),this.radius.set(d,Math.log(V))},u.rotate=function(d,w,A,_){this.recalcMatrix(d),w=w||0,A=A||0;var y=this.computedMatrix,E=y[0],T=y[4],s=y[8],L=y[1],M=y[5],z=y[9],D=y[2],N=y[6],I=y[10],k=w*E+A*L,B=w*T+A*M,O=w*s+A*z,V=-(N*O-I*B),Y=-(I*k-D*O),j=-(D*B-N*k),te=Math.sqrt(Math.max(0,1-Math.pow(V,2)-Math.pow(Y,2)-Math.pow(j,2))),ie=m(V,Y,j,te);ie>1e-6?(V/=ie,Y/=ie,j/=ie,te/=ie):(V=Y=j=0,te=1);var ue=this.computedRotation,J=ue[0],X=ue[1],ee=ue[2],G=ue[3],Q=J*te+G*V+X*j-ee*Y,oe=X*te+G*Y+ee*V-J*j,$=ee*te+G*j+J*Y-X*V,Z=G*te-J*V-X*Y-ee*j;if(_){V=D,Y=N,j=I;var se=Math.sin(_)/l(V,Y,j);V*=se,Y*=se,j*=se,te=Math.cos(w),Q=Q*te+Z*V+oe*j-$*Y,oe=oe*te+Z*Y+$*V-Q*j,$=$*te+Z*j+Q*Y-oe*V,Z=Z*te-Q*V-oe*Y-$*j}var ne=m(Q,oe,$,Z);ne>1e-6?(Q/=ne,oe/=ne,$/=ne,Z/=ne):(Q=oe=$=0,Z=1),this.rotation.set(d,Q,oe,$,Z)},u.lookAt=function(d,w,A,_){this.recalcMatrix(d),A=A||this.computedCenter,w=w||this.computedEye,_=_||this.computedUp;var y=this.computedMatrix;a(y,w,A,_);var E=this.computedRotation;c(E,y[0],y[1],y[2],y[4],y[5],y[6],y[8],y[9],y[10]),h(E,E),this.rotation.set(d,E[0],E[1],E[2],E[3]);for(var T=0,s=0;s<3;++s)T+=Math.pow(A[s]-w[s],2);this.radius.set(d,.5*Math.log(Math.max(T,1e-6))),this.center.set(d,A[0],A[1],A[2])},u.translate=function(d,w,A,_){this.center.move(d,w||0,A||0,_||0)},u.setMatrix=function(d,w){var A=this.computedRotation;c(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),h(A,A),this.rotation.set(d,A[0],A[1],A[2],A[3]);var _=this.computedMatrix;f(_,w);var y=_[15];if(Math.abs(y)>1e-6){var E=_[12]/y,T=_[13]/y,s=_[14]/y;this.recalcMatrix(d);var L=Math.exp(this.computedRadius[0]);this.center.set(d,E-_[2]*L,T-_[6]*L,s-_[10]*L),this.radius.idle(d)}else this.center.idle(d),this.radius.idle(d)},u.setDistance=function(d,w){w>0&&this.radius.set(d,Math.log(w))},u.setDistanceLimits=function(d,w){d>0?d=Math.log(d):d=-1/0,w>0?w=Math.log(w):w=1/0,w=Math.max(w,d),this.radius.bounds[0][0]=d,this.radius.bounds[1][0]=w},u.getDistanceLimits=function(d){var w=this.radius.bounds;return d?(d[0]=Math.exp(w[0][0]),d[1]=Math.exp(w[1][0]),d):[Math.exp(w[0][0]),Math.exp(w[1][0])]},u.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},u.fromJSON=function(d){var w=this.lastT(),A=d.center;A&&this.center.set(w,A[0],A[1],A[2]);var _=d.rotation;_&&this.rotation.set(w,_[0],_[1],_[2],_[3]);var y=d.distance;y&&y>0&&this.radius.set(w,Math.log(y)),this.setDistanceLimits(d.zoomMin,d.zoomMax)};function o(d){d=d||{};var w=d.center||[0,0,0],A=d.rotation||[0,0,0,1],_=d.radius||1;w=[].slice.call(w,0,3),A=[].slice.call(A,0,4),h(A,A);var y=new b(A,w,Math.log(_));return y.setDistanceLimits(d.zoomMin,d.zoomMax),("eye"in d||"up"in d)&&y.lookAt(0,d.eye,d.center,d.up),y}},4930:function(v,p,r){/*! +*/v.exports=function(e){return e!=null&&(p(e)||r(e)||!!e._isBuffer)};function p(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function r(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&p(e.slice(0,0))}},3596:function(v){v.exports=function(p){for(var r=p.length,e,a=0;a13)&&e!==32&&e!==133&&e!==160&&e!==5760&&e!==6158&&(e<8192||e>8205)&&e!==8232&&e!==8233&&e!==8239&&e!==8287&&e!==8288&&e!==12288&&e!==65279)return!1;return!0}},3578:function(v){function p(r,e,a){return r*(1-a)+e*a}v.exports=p},7191:function(v,p,r){var e=r(4690),a=r(9823),n=r(7332),f=r(7787),c=r(7437),l=r(2142),m={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},h=a(),b=a(),u=[0,0,0,0],o=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];v.exports=function(E,T,s,L,M,z){if(T||(T=[0,0,0]),s||(s=[0,0,0]),L||(L=[0,0,0]),M||(M=[0,0,0,1]),z||(z=[0,0,0,1]),!e(h,E)||(n(b,h),b[3]=0,b[7]=0,b[11]=0,b[15]=1,Math.abs(f(b)<1e-8)))return!1;var D=h[3],N=h[7],I=h[11],k=h[12],B=h[13],O=h[14],H=h[15];if(D!==0||N!==0||I!==0){u[0]=D,u[1]=N,u[2]=I,u[3]=H;var Y=c(b,b);if(!Y)return!1;l(b,b),w(M,u,b)}else M[0]=M[1]=M[2]=0,M[3]=1;if(T[0]=k,T[1]=B,T[2]=O,A(o,h),s[0]=m.length(o[0]),m.normalize(o[0],o[0]),L[0]=m.dot(o[0],o[1]),_(o[1],o[1],o[0],1,-L[0]),s[1]=m.length(o[1]),m.normalize(o[1],o[1]),L[0]/=s[1],L[1]=m.dot(o[0],o[2]),_(o[2],o[2],o[0],1,-L[1]),L[2]=m.dot(o[1],o[2]),_(o[2],o[2],o[1],1,-L[2]),s[2]=m.length(o[2]),m.normalize(o[2],o[2]),L[1]/=s[2],L[2]/=s[2],m.cross(d,o[1],o[2]),m.dot(o[0],d)<0)for(var j=0;j<3;j++)s[j]*=-1,o[j][0]*=-1,o[j][1]*=-1,o[j][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+o[0][0]-o[1][1]-o[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-o[0][0]+o[1][1]-o[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-o[0][0]-o[1][1]+o[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+o[0][0]+o[1][1]+o[2][2],0)),o[2][1]>o[1][2]&&(z[0]=-z[0]),o[0][2]>o[2][0]&&(z[1]=-z[1]),o[1][0]>o[0][1]&&(z[2]=-z[2]),!0};function w(y,E,T){var s=E[0],L=E[1],M=E[2],z=E[3];return y[0]=T[0]*s+T[4]*L+T[8]*M+T[12]*z,y[1]=T[1]*s+T[5]*L+T[9]*M+T[13]*z,y[2]=T[2]*s+T[6]*L+T[10]*M+T[14]*z,y[3]=T[3]*s+T[7]*L+T[11]*M+T[15]*z,y}function A(y,E){y[0][0]=E[0],y[0][1]=E[1],y[0][2]=E[2],y[1][0]=E[4],y[1][1]=E[5],y[1][2]=E[6],y[2][0]=E[8],y[2][1]=E[9],y[2][2]=E[10]}function _(y,E,T,s,L){y[0]=E[0]*s+T[0]*L,y[1]=E[1]*s+T[1]*L,y[2]=E[2]*s+T[2]*L}},4690:function(v){v.exports=function(r,e){var a=e[15];if(a===0)return!1;for(var n=1/a,f=0;f<16;f++)r[f]=e[f]*n;return!0}},7649:function(v,p,r){var e=r(1868),a=r(1102),n=r(7191),f=r(7787),c=r(1116),l=u(),m=u(),h=u();v.exports=b;function b(w,A,_,y){if(f(A)===0||f(_)===0)return!1;var E=n(A,l.translate,l.scale,l.skew,l.perspective,l.quaternion),T=n(_,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!E||!T?!1:(e(h.translate,l.translate,m.translate,y),e(h.skew,l.skew,m.skew,y),e(h.scale,l.scale,m.scale,y),e(h.perspective,l.perspective,m.perspective,y),c(h.quaternion,l.quaternion,m.quaternion,y),a(w,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function u(){return{translate:o(),scale:o(1),skew:o(),perspective:d(),quaternion:d()}}function o(w){return[w||0,w||0,w||0]}function d(){return[0,0,0,1]}},1102:function(v,p,r){var e={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)};e.create();var a=e.create();v.exports=function(f,c,l,m,h,b){return e.identity(f),e.fromRotationTranslation(f,b,c),f[3]=h[0],f[7]=h[1],f[11]=h[2],f[15]=h[3],e.identity(a),m[2]!==0&&(a[9]=m[2],e.multiply(f,f,a)),m[1]!==0&&(a[9]=0,a[8]=m[1],e.multiply(f,f,a)),m[0]!==0&&(a[8]=0,a[4]=m[0],e.multiply(f,f,a)),e.scale(f,f,l),f}},9298:function(v,p,r){var e=r(5070),a=r(7649),n=r(7437),f=r(6109),c=r(7115),l=r(5240),m=r(3012),h=r(998);r(3668);var b=r(899),u=[0,0,0];v.exports=A;function o(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}var d=o.prototype;d.recalcMatrix=function(_){var y=this._time,E=e.le(y,_),T=this.computedMatrix;if(!(E<0)){var s=this._components;if(E===y.length-1)for(var L=16*E,M=0;M<16;++M)T[M]=s[L++];else{for(var z=y[E+1]-y[E],L=16*E,D=this.prevMatrix,N=!0,M=0;M<16;++M)D[M]=s[L++];for(var I=this.nextMatrix,M=0;M<16;++M)I[M]=s[L++],N=N&&D[M]===I[M];if(z<1e-6||N)for(var M=0;M<16;++M)T[M]=D[M];else a(T,D,I,(_-y[E])/z)}var k=this.computedUp;k[0]=T[1],k[1]=T[5],k[2]=T[9],b(k,k);var B=this.computedInverse;n(B,T);var O=this.computedEye,H=B[15];O[0]=B[12]/H,O[1]=B[13]/H,O[2]=B[14]/H;for(var Y=this.computedCenter,j=Math.exp(this.computedRadius[0]),M=0;M<3;++M)Y[M]=O[M]-T[2+4*M]*j}},d.idle=function(_){if(!(_1&&e(n[m[o-2]],n[m[o-1]],u)<=0;)o-=1,m.pop();for(m.push(b),o=h.length;o>1&&e(n[h[o-2]],n[h[o-1]],u)>=0;)o-=1,h.pop();h.push(b)}for(var d=new Array(h.length+m.length-2),w=0,c=0,A=m.length;c0;--_)d[w++]=h[_];return d}},6145:function(v,p,r){v.exports=a;var e=r(4110);function a(n,f){f||(f=n,n=window);var c=0,l=0,m=0,h={shift:!1,alt:!1,control:!1,meta:!1},b=!1;function u(M){var z=!1;return"altKey"in M&&(z=z||M.altKey!==h.alt,h.alt=!!M.altKey),"shiftKey"in M&&(z=z||M.shiftKey!==h.shift,h.shift=!!M.shiftKey),"ctrlKey"in M&&(z=z||M.ctrlKey!==h.control,h.control=!!M.ctrlKey),"metaKey"in M&&(z=z||M.metaKey!==h.meta,h.meta=!!M.metaKey),z}function o(M,z){var D=e.x(z),N=e.y(z);"buttons"in z&&(M=z.buttons|0),(M!==c||D!==l||N!==m||u(z))&&(c=M|0,l=D||0,m=N||0,f&&f(c,l,m,h))}function d(M){o(0,M)}function w(){(c||l||m||h.shift||h.alt||h.meta||h.control)&&(l=m=0,c=0,h.shift=h.alt=h.control=h.meta=!1,f&&f(0,0,0,h))}function A(M){u(M)&&f&&f(c,l,m,h)}function _(M){e.buttons(M)===0?o(0,M):o(c,M)}function y(M){o(c|e.buttons(M),M)}function E(M){o(c&~e.buttons(M),M)}function T(){b||(b=!0,n.addEventListener("mousemove",_),n.addEventListener("mousedown",y),n.addEventListener("mouseup",E),n.addEventListener("mouseleave",d),n.addEventListener("mouseenter",d),n.addEventListener("mouseout",d),n.addEventListener("mouseover",d),n.addEventListener("blur",w),n.addEventListener("keyup",A),n.addEventListener("keydown",A),n.addEventListener("keypress",A),n!==window&&(window.addEventListener("blur",w),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function s(){b&&(b=!1,n.removeEventListener("mousemove",_),n.removeEventListener("mousedown",y),n.removeEventListener("mouseup",E),n.removeEventListener("mouseleave",d),n.removeEventListener("mouseenter",d),n.removeEventListener("mouseout",d),n.removeEventListener("mouseover",d),n.removeEventListener("blur",w),n.removeEventListener("keyup",A),n.removeEventListener("keydown",A),n.removeEventListener("keypress",A),n!==window&&(window.removeEventListener("blur",w),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}T();var L={element:n};return Object.defineProperties(L,{enabled:{get:function(){return b},set:function(M){M?T():s()},enumerable:!0},buttons:{get:function(){return c},enumerable:!0},x:{get:function(){return l},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),L}},2565:function(v){var p={left:0,top:0};v.exports=r;function r(a,n,f){n=n||a.currentTarget||a.srcElement,Array.isArray(f)||(f=[0,0]);var c=a.clientX||0,l=a.clientY||0,m=e(n);return f[0]=c-m.left,f[1]=l-m.top,f}function e(a){return a===window||a===document||a===document.body?p:a.getBoundingClientRect()}},4110:function(v,p){function r(f){if(typeof f=="object"){if("buttons"in f)return f.buttons;if("which"in f){var c=f.which;if(c===2)return 4;if(c===3)return 2;if(c>0)return 1<=0)return 1<0){if(it=1,X[V++]=h(T[z],w,A,_),z+=Y,y>0)for(et=1,D=T[z],Q=X[V]=h(D,w,A,_),Z=X[V+ot],ct=X[V+st],wt=X[V+gt],(Q!==Z||Q!==ct||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,Z,ct,wt,w,A,_),Rt=tt[V]=ut++),V+=1,z+=Y,et=2;et0)for(et=1,D=T[z],Q=X[V]=h(D,w,A,_),Z=X[V+ot],ct=X[V+st],wt=X[V+gt],(Q!==Z||Q!==ct||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,Z,ct,wt,w,A,_),Rt=tt[V]=ut++,wt!==ct&&m(tt[V+st],Rt,B,H,ct,wt,w,A,_)),V+=1,z+=Y,et=2;et0){if(et=1,X[V++]=h(T[z],w,A,_),z+=Y,E>0)for(it=1,D=T[z],Q=X[V]=h(D,w,A,_),ct=X[V+st],Z=X[V+ot],wt=X[V+gt],(Q!==ct||Q!==Z||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,ct,Z,wt,w,A,_),Rt=tt[V]=ut++),V+=1,z+=Y,it=2;it0)for(it=1,D=T[z],Q=X[V]=h(D,w,A,_),ct=X[V+st],Z=X[V+ot],wt=X[V+gt],(Q!==ct||Q!==Z||Q!==wt)&&(I=T[z+N],B=T[z+k],H=T[z+O],l(et,it,D,I,B,H,Q,ct,Z,wt,w,A,_),Rt=tt[V]=ut++,wt!==ct&&m(tt[V+st],Rt,H,I,wt,ct,w,A,_)),V+=1,z+=Y,it=2;it 0"),typeof c.vertex!="function"&&l("Must specify vertex creation function"),typeof c.cell!="function"&&l("Must specify cell creation function"),typeof c.phase!="function"&&l("Must specify phase function");for(var u=c.getters||[],o=new Array(h),d=0;d=0?o[d]=!0:o[d]=!1;return n(c.vertex,c.cell,c.phase,b,m,o)}},9144:function(v,p,r){var e=r(3094),a={zero:function(A,_,y,E){var T=A[0],s=y[0];E|=0;var L=0,M=s;for(L=0;L2&&L[1]>2&&E(s.pick(-1,-1).lo(1,1).hi(L[0]-2,L[1]-2),T.pick(-1,-1,0).lo(1,1).hi(L[0]-2,L[1]-2),T.pick(-1,-1,1).lo(1,1).hi(L[0]-2,L[1]-2)),L[1]>2&&(y(s.pick(0,-1).lo(1).hi(L[1]-2),T.pick(0,-1,1).lo(1).hi(L[1]-2)),_(T.pick(0,-1,0).lo(1).hi(L[1]-2))),L[1]>2&&(y(s.pick(L[0]-1,-1).lo(1).hi(L[1]-2),T.pick(L[0]-1,-1,1).lo(1).hi(L[1]-2)),_(T.pick(L[0]-1,-1,0).lo(1).hi(L[1]-2))),L[0]>2&&(y(s.pick(-1,0).lo(1).hi(L[0]-2),T.pick(-1,0,0).lo(1).hi(L[0]-2)),_(T.pick(-1,0,1).lo(1).hi(L[0]-2))),L[0]>2&&(y(s.pick(-1,L[1]-1).lo(1).hi(L[0]-2),T.pick(-1,L[1]-1,0).lo(1).hi(L[0]-2)),_(T.pick(-1,L[1]-1,1).lo(1).hi(L[0]-2))),T.set(0,0,0,0),T.set(0,0,1,0),T.set(L[0]-1,0,0,0),T.set(L[0]-1,0,1,0),T.set(0,L[1]-1,0,0),T.set(0,L[1]-1,1,0),T.set(L[0]-1,L[1]-1,0,0),T.set(L[0]-1,L[1]-1,1,0),T}}function w(A){var _=A.join(),L=h[_];if(L)return L;for(var y=A.length,E=[b,u],T=1;T<=y;++T)E.push(o(T));var s=d,L=s.apply(void 0,E);return h[_]=L,L}v.exports=function(_,y,E){if(Array.isArray(E)||(typeof E=="string"?E=e(y.dimension,E):E=e(y.dimension,"clamp")),y.size===0)return _;if(y.dimension===0)return _.set(0),_;var T=w(E);return T(_,y)}},3581:function(v){function p(f,c){var l=Math.floor(c),m=c-l,h=0<=l&&l0;){B<64?(y=B,B=0):(y=64,B-=64);for(var O=h[1]|0;O>0;){O<64?(E=O,O=0):(E=64,O-=64),o=I+B*s+O*L,A=k+B*z+O*D;var H=0,Y=0,j=0,et=M,it=s-T*M,ut=L-y*s,J=N,X=z-T*N,tt=D-y*z;for(j=0;j0;){D<64?(y=D,D=0):(y=64,D-=64);for(var N=h[0]|0;N>0;){N<64?(_=N,N=0):(_=64,N-=64),o=M+D*T+N*E,A=z+D*L+N*s;var I=0,k=0,B=T,O=E-y*T,H=L,Y=s-y*L;for(k=0;k<_;++k){for(I=0;I0;){k<64?(E=k,k=0):(E=64,k-=64);for(var B=h[0]|0;B>0;){B<64?(_=B,B=0):(_=64,B-=64);for(var O=h[1]|0;O>0;){O<64?(y=O,O=0):(y=64,O-=64),o=N+k*L+B*T+O*s,A=I+k*D+B*M+O*z;var H=0,Y=0,j=0,et=L,it=T-E*L,ut=s-_*T,J=D,X=M-E*D,tt=z-_*M;for(j=0;jd;){H=0,Y=I-y;e:for(B=0;Bet)break e;Y+=M,H+=z}for(H=I,Y=I-y,B=0;B>1,O=B-N,H=B+N,Y=I,j=O,et=B,it=H,ut=k,J=w+1,X=A-1,tt=!0,V,Q,ot,$,Z,st,nt,ct,gt,Tt=0,wt=0,Rt=0,bt,At,mt,Lt,Ht,Ut,kt,Vt,It,re,Kt,$t,le,he,de,xe,Se=L,ne=u(Se),zt=u(Se);At=E*Y,mt=E*j,xe=y;t:for(bt=0;bt0){Q=Y,Y=j,j=Q;break t}if(Rt<0)break t;xe+=z}At=E*it,mt=E*ut,xe=y;t:for(bt=0;bt0){Q=it,it=ut,ut=Q;break t}if(Rt<0)break t;xe+=z}At=E*Y,mt=E*et,xe=y;t:for(bt=0;bt0){Q=Y,Y=et,et=Q;break t}if(Rt<0)break t;xe+=z}At=E*j,mt=E*et,xe=y;t:for(bt=0;bt0){Q=j,j=et,et=Q;break t}if(Rt<0)break t;xe+=z}At=E*Y,mt=E*it,xe=y;t:for(bt=0;bt0){Q=Y,Y=it,it=Q;break t}if(Rt<0)break t;xe+=z}At=E*et,mt=E*it,xe=y;t:for(bt=0;bt0){Q=et,et=it,it=Q;break t}if(Rt<0)break t;xe+=z}At=E*j,mt=E*ut,xe=y;t:for(bt=0;bt0){Q=j,j=ut,ut=Q;break t}if(Rt<0)break t;xe+=z}At=E*j,mt=E*et,xe=y;t:for(bt=0;bt0){Q=j,j=et,et=Q;break t}if(Rt<0)break t;xe+=z}At=E*it,mt=E*ut,xe=y;t:for(bt=0;bt0){Q=it,it=ut,ut=Q;break t}if(Rt<0)break t;xe+=z}for(At=E*Y,mt=E*j,Lt=E*et,Ht=E*it,Ut=E*ut,kt=E*I,Vt=E*B,It=E*k,de=0,xe=y,bt=0;bt0)X--;else if(Rt<0){for(At=E*st,mt=E*J,Lt=E*X,xe=y,bt=0;bt0)for(;;){nt=y+X*E,de=0;t:for(bt=0;bt0){if(--Xk){t:for(;;){for(nt=y+J*E,de=0,xe=y,bt=0;bt1&&d?A(o,d[0],d[1]):A(o)}var m={"uint32,1,0":function(b,u){return function(o){var d=o.data,w=o.offset|0,A=o.shape,_=o.stride,y=_[0]|0,E=A[0]|0,T=_[1]|0,s=A[1]|0,L=T,M=T,z=1;E<=32?b(0,E-1,d,w,y,T,E,s,L,M,z):u(0,E-1,d,w,y,T,E,s,L,M,z)}}};function h(b,u){var o=[u,b].join(","),d=m[o],w=f(b,u),A=l(b,u,w);return d(w,A)}v.exports=h},8729:function(v,p,r){var e=r(8139),a={};function n(f){var c=f.order,l=f.dtype,m=[c,l],h=m.join(":"),b=a[h];return b||(a[h]=b=e(c,l)),b(f),f}v.exports=n},5050:function(v,p,r){var e=r(4780),a=typeof Float64Array<"u";function n(u,o){return u[0]-o[0]}function f(){var u=this.stride,o=new Array(u.length),d;for(d=0;d=0&&(T=y|0,E+=L*T,s-=T),new w(this.data,s,L,E)},A.step=function(y){var E=this.shape[0],T=this.stride[0],s=this.offset,L=0,M=Math.ceil;return typeof y=="number"&&(L=y|0,L<0?(s+=T*(E-1),E=M(-E/L)):E=M(E/L),T*=L),new w(this.data,E,T,s)},A.transpose=function(y){y=y===void 0?0:y|0;var E=this.shape,T=this.stride;return new w(this.data,E[y],T[y],this.offset)},A.pick=function(y){var E=[],T=[],s=this.offset;typeof y=="number"&&y>=0?s=s+this.stride[0]*y|0:(E.push(this.shape[0]),T.push(this.stride[0]));var L=o[E.length+1];return L(this.data,E,T,s)},function(y,E,T,s){return new w(y,E[0],T[0],s)}},2:function(u,o,d){function w(_,y,E,T,s,L){this.data=_,this.shape=[y,E],this.stride=[T,s],this.offset=L|0}var A=w.prototype;return A.dtype=u,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(y,E,T){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E,T):this.data[this.offset+this.stride[0]*y+this.stride[1]*E]=T},A.get=function(y,E){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E):this.data[this.offset+this.stride[0]*y+this.stride[1]*E]},A.index=function(y,E){return this.offset+this.stride[0]*y+this.stride[1]*E},A.hi=function(y,E){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(y,E){var T=this.offset,s=0,L=this.shape[0],M=this.shape[1],z=this.stride[0],D=this.stride[1];return typeof y=="number"&&y>=0&&(s=y|0,T+=z*s,L-=s),typeof E=="number"&&E>=0&&(s=E|0,T+=D*s,M-=s),new w(this.data,L,M,z,D,T)},A.step=function(y,E){var T=this.shape[0],s=this.shape[1],L=this.stride[0],M=this.stride[1],z=this.offset,D=0,N=Math.ceil;return typeof y=="number"&&(D=y|0,D<0?(z+=L*(T-1),T=N(-T/D)):T=N(T/D),L*=D),typeof E=="number"&&(D=E|0,D<0?(z+=M*(s-1),s=N(-s/D)):s=N(s/D),M*=D),new w(this.data,T,s,L,M,z)},A.transpose=function(y,E){y=y===void 0?0:y|0,E=E===void 0?1:E|0;var T=this.shape,s=this.stride;return new w(this.data,T[y],T[E],s[y],s[E],this.offset)},A.pick=function(y,E){var T=[],s=[],L=this.offset;typeof y=="number"&&y>=0?L=L+this.stride[0]*y|0:(T.push(this.shape[0]),s.push(this.stride[0])),typeof E=="number"&&E>=0?L=L+this.stride[1]*E|0:(T.push(this.shape[1]),s.push(this.stride[1]));var M=o[T.length+1];return M(this.data,T,s,L)},function(y,E,T,s){return new w(y,E[0],E[1],T[0],T[1],s)}},3:function(u,o,d){function w(_,y,E,T,s,L,M,z){this.data=_,this.shape=[y,E,T],this.stride=[s,L,M],this.offset=z|0}var A=w.prototype;return A.dtype=u,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var y=Math.abs(this.stride[0]),E=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return y>E?E>T?[2,1,0]:y>T?[1,2,0]:[1,0,2]:y>T?[2,0,1]:T>E?[0,1,2]:[0,2,1]}}),A.set=function(y,E,T,s){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T,s):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T]=s},A.get=function(y,E,T){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T]},A.index=function(y,E,T){return this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T},A.hi=function(y,E,T){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(y,E,T){var s=this.offset,L=0,M=this.shape[0],z=this.shape[1],D=this.shape[2],N=this.stride[0],I=this.stride[1],k=this.stride[2];return typeof y=="number"&&y>=0&&(L=y|0,s+=N*L,M-=L),typeof E=="number"&&E>=0&&(L=E|0,s+=I*L,z-=L),typeof T=="number"&&T>=0&&(L=T|0,s+=k*L,D-=L),new w(this.data,M,z,D,N,I,k,s)},A.step=function(y,E,T){var s=this.shape[0],L=this.shape[1],M=this.shape[2],z=this.stride[0],D=this.stride[1],N=this.stride[2],I=this.offset,k=0,B=Math.ceil;return typeof y=="number"&&(k=y|0,k<0?(I+=z*(s-1),s=B(-s/k)):s=B(s/k),z*=k),typeof E=="number"&&(k=E|0,k<0?(I+=D*(L-1),L=B(-L/k)):L=B(L/k),D*=k),typeof T=="number"&&(k=T|0,k<0?(I+=N*(M-1),M=B(-M/k)):M=B(M/k),N*=k),new w(this.data,s,L,M,z,D,N,I)},A.transpose=function(y,E,T){y=y===void 0?0:y|0,E=E===void 0?1:E|0,T=T===void 0?2:T|0;var s=this.shape,L=this.stride;return new w(this.data,s[y],s[E],s[T],L[y],L[E],L[T],this.offset)},A.pick=function(y,E,T){var s=[],L=[],M=this.offset;typeof y=="number"&&y>=0?M=M+this.stride[0]*y|0:(s.push(this.shape[0]),L.push(this.stride[0])),typeof E=="number"&&E>=0?M=M+this.stride[1]*E|0:(s.push(this.shape[1]),L.push(this.stride[1])),typeof T=="number"&&T>=0?M=M+this.stride[2]*T|0:(s.push(this.shape[2]),L.push(this.stride[2]));var z=o[s.length+1];return z(this.data,s,L,M)},function(y,E,T,s){return new w(y,E[0],E[1],E[2],T[0],T[1],T[2],s)}},4:function(u,o,d){function w(_,y,E,T,s,L,M,z,D,N){this.data=_,this.shape=[y,E,T,s],this.stride=[L,M,z,D],this.offset=N|0}var A=w.prototype;return A.dtype=u,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:d}),A.set=function(y,E,T,s,L){return u==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s,L):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s]=L},A.get=function(y,E,T,s){return u==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s):this.data[this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s]},A.index=function(y,E,T,s){return this.offset+this.stride[0]*y+this.stride[1]*E+this.stride[2]*T+this.stride[3]*s},A.hi=function(y,E,T,s){return new w(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof E!="number"||E<0?this.shape[1]:E|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof s!="number"||s<0?this.shape[3]:s|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(y,E,T,s){var L=this.offset,M=0,z=this.shape[0],D=this.shape[1],N=this.shape[2],I=this.shape[3],k=this.stride[0],B=this.stride[1],O=this.stride[2],H=this.stride[3];return typeof y=="number"&&y>=0&&(M=y|0,L+=k*M,z-=M),typeof E=="number"&&E>=0&&(M=E|0,L+=B*M,D-=M),typeof T=="number"&&T>=0&&(M=T|0,L+=O*M,N-=M),typeof s=="number"&&s>=0&&(M=s|0,L+=H*M,I-=M),new w(this.data,z,D,N,I,k,B,O,H,L)},A.step=function(y,E,T,s){var L=this.shape[0],M=this.shape[1],z=this.shape[2],D=this.shape[3],N=this.stride[0],I=this.stride[1],k=this.stride[2],B=this.stride[3],O=this.offset,H=0,Y=Math.ceil;return typeof y=="number"&&(H=y|0,H<0?(O+=N*(L-1),L=Y(-L/H)):L=Y(L/H),N*=H),typeof E=="number"&&(H=E|0,H<0?(O+=I*(M-1),M=Y(-M/H)):M=Y(M/H),I*=H),typeof T=="number"&&(H=T|0,H<0?(O+=k*(z-1),z=Y(-z/H)):z=Y(z/H),k*=H),typeof s=="number"&&(H=s|0,H<0?(O+=B*(D-1),D=Y(-D/H)):D=Y(D/H),B*=H),new w(this.data,L,M,z,D,N,I,k,B,O)},A.transpose=function(y,E,T,s){y=y===void 0?0:y|0,E=E===void 0?1:E|0,T=T===void 0?2:T|0,s=s===void 0?3:s|0;var L=this.shape,M=this.stride;return new w(this.data,L[y],L[E],L[T],L[s],M[y],M[E],M[T],M[s],this.offset)},A.pick=function(y,E,T,s){var L=[],M=[],z=this.offset;typeof y=="number"&&y>=0?z=z+this.stride[0]*y|0:(L.push(this.shape[0]),M.push(this.stride[0])),typeof E=="number"&&E>=0?z=z+this.stride[1]*E|0:(L.push(this.shape[1]),M.push(this.stride[1])),typeof T=="number"&&T>=0?z=z+this.stride[2]*T|0:(L.push(this.shape[2]),M.push(this.stride[2])),typeof s=="number"&&s>=0?z=z+this.stride[3]*s|0:(L.push(this.shape[3]),M.push(this.stride[3]));var D=o[L.length+1];return D(this.data,L,M,z)},function(y,E,T,s){return new w(y,E[0],E[1],E[2],E[3],T[0],T[1],T[2],T[3],s)}},5:function(o,d,w){function A(y,E,T,s,L,M,z,D,N,I,k,B){this.data=y,this.shape=[E,T,s,L,M],this.stride=[z,D,N,I,k],this.offset=B|0}var _=A.prototype;return _.dtype=o,_.dimension=5,Object.defineProperty(_,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(_,"order",{get:w}),_.set=function(E,T,s,L,M,z){return o==="generic"?this.data.set(this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M,z):this.data[this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M]=z},_.get=function(E,T,s,L,M){return o==="generic"?this.data.get(this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M):this.data[this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M]},_.index=function(E,T,s,L,M){return this.offset+this.stride[0]*E+this.stride[1]*T+this.stride[2]*s+this.stride[3]*L+this.stride[4]*M},_.hi=function(E,T,s,L,M){return new A(this.data,typeof E!="number"||E<0?this.shape[0]:E|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof s!="number"||s<0?this.shape[2]:s|0,typeof L!="number"||L<0?this.shape[3]:L|0,typeof M!="number"||M<0?this.shape[4]:M|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},_.lo=function(E,T,s,L,M){var z=this.offset,D=0,N=this.shape[0],I=this.shape[1],k=this.shape[2],B=this.shape[3],O=this.shape[4],H=this.stride[0],Y=this.stride[1],j=this.stride[2],et=this.stride[3],it=this.stride[4];return typeof E=="number"&&E>=0&&(D=E|0,z+=H*D,N-=D),typeof T=="number"&&T>=0&&(D=T|0,z+=Y*D,I-=D),typeof s=="number"&&s>=0&&(D=s|0,z+=j*D,k-=D),typeof L=="number"&&L>=0&&(D=L|0,z+=et*D,B-=D),typeof M=="number"&&M>=0&&(D=M|0,z+=it*D,O-=D),new A(this.data,N,I,k,B,O,H,Y,j,et,it,z)},_.step=function(E,T,s,L,M){var z=this.shape[0],D=this.shape[1],N=this.shape[2],I=this.shape[3],k=this.shape[4],B=this.stride[0],O=this.stride[1],H=this.stride[2],Y=this.stride[3],j=this.stride[4],et=this.offset,it=0,ut=Math.ceil;return typeof E=="number"&&(it=E|0,it<0?(et+=B*(z-1),z=ut(-z/it)):z=ut(z/it),B*=it),typeof T=="number"&&(it=T|0,it<0?(et+=O*(D-1),D=ut(-D/it)):D=ut(D/it),O*=it),typeof s=="number"&&(it=s|0,it<0?(et+=H*(N-1),N=ut(-N/it)):N=ut(N/it),H*=it),typeof L=="number"&&(it=L|0,it<0?(et+=Y*(I-1),I=ut(-I/it)):I=ut(I/it),Y*=it),typeof M=="number"&&(it=M|0,it<0?(et+=j*(k-1),k=ut(-k/it)):k=ut(k/it),j*=it),new A(this.data,z,D,N,I,k,B,O,H,Y,j,et)},_.transpose=function(E,T,s,L,M){E=E===void 0?0:E|0,T=T===void 0?1:T|0,s=s===void 0?2:s|0,L=L===void 0?3:L|0,M=M===void 0?4:M|0;var z=this.shape,D=this.stride;return new A(this.data,z[E],z[T],z[s],z[L],z[M],D[E],D[T],D[s],D[L],D[M],this.offset)},_.pick=function(E,T,s,L,M){var z=[],D=[],N=this.offset;typeof E=="number"&&E>=0?N=N+this.stride[0]*E|0:(z.push(this.shape[0]),D.push(this.stride[0])),typeof T=="number"&&T>=0?N=N+this.stride[1]*T|0:(z.push(this.shape[1]),D.push(this.stride[1])),typeof s=="number"&&s>=0?N=N+this.stride[2]*s|0:(z.push(this.shape[2]),D.push(this.stride[2])),typeof L=="number"&&L>=0?N=N+this.stride[3]*L|0:(z.push(this.shape[3]),D.push(this.stride[3])),typeof M=="number"&&M>=0?N=N+this.stride[4]*M|0:(z.push(this.shape[4]),D.push(this.stride[4]));var I=d[z.length+1];return I(this.data,z,D,N)},function(E,T,s,L){return new A(E,T[0],T[1],T[2],T[3],T[4],s[0],s[1],s[2],s[3],s[4],L)}}};function l(u,o){var d=o===-1?"T":String(o),w=c[d];return o===-1?w(u):o===0?w(u,h[u][0]):w(u,h[u],f)}function m(u){if(e(u))return"buffer";if(a)switch(Object.prototype.toString.call(u)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(u)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function b(u,o,d,w){if(u===void 0){var s=h.array[0];return s([])}else typeof u=="number"&&(u=[u]);o===void 0&&(o=[u.length]);var A=o.length;if(d===void 0){d=new Array(A);for(var _=A-1,y=1;_>=0;--_)d[_]=y,y*=o[_]}if(w===void 0){w=0;for(var _=0;_>>0;v.exports=f;function f(c,l){if(isNaN(c)||isNaN(l))return NaN;if(c===l)return c;if(c===0)return l<0?-a:a;var m=e.hi(c),h=e.lo(c);return l>c==c>0?h===n?(m+=1,h=0):h+=1:h===0?(h=n,m-=1):h-=1,e.pack(h,m)}},115:function(v,p){var r=1e-6,e=1e-6;p.vertexNormals=function(a,n,f){for(var c=n.length,l=new Array(c),m=f===void 0?r:f,h=0;hm)for(var z=l[o],D=1/Math.sqrt(T*L),M=0;M<3;++M){var N=(M+1)%3,I=(M+2)%3;z[M]+=D*(s[N]*E[I]-s[I]*E[N])}}for(var h=0;hm)for(var D=1/Math.sqrt(k),M=0;M<3;++M)z[M]*=D;else for(var M=0;M<3;++M)z[M]=0}return l},p.faceNormals=function(a,n,f){for(var c=a.length,l=new Array(c),m=f===void 0?e:f,h=0;hm?_=1/Math.sqrt(_):_=0;for(var o=0;o<3;++o)A[o]*=_;l[h]=A}return l}},567:function(v){v.exports=p;function p(r,e,a,n,f,c,l,m,h,b){var u=e+c+b;if(o>0){var o=Math.sqrt(u+1);r[0]=.5*(l-h)/o,r[1]=.5*(m-n)/o,r[2]=.5*(a-c)/o,r[3]=.5*o}else{var d=Math.max(e,c,b),o=Math.sqrt(2*d-u+1);e>=d?(r[0]=.5*o,r[1]=.5*(f+a)/o,r[2]=.5*(m+n)/o,r[3]=.5*(l-h)/o):c>=d?(r[0]=.5*(a+f)/o,r[1]=.5*o,r[2]=.5*(h+l)/o,r[3]=.5*(m-n)/o):(r[0]=.5*(n+m)/o,r[1]=.5*(l+h)/o,r[2]=.5*o,r[3]=.5*(a-f)/o)}return r}},7774:function(v,p,r){v.exports=o;var e=r(8444),a=r(3012),n=r(5950),f=r(7437),c=r(567);function l(d,w,A){return Math.sqrt(Math.pow(d,2)+Math.pow(w,2)+Math.pow(A,2))}function m(d,w,A,_){return Math.sqrt(Math.pow(d,2)+Math.pow(w,2)+Math.pow(A,2)+Math.pow(_,2))}function h(d,w){var A=w[0],_=w[1],y=w[2],E=w[3],T=m(A,_,y,E);T>1e-6?(d[0]=A/T,d[1]=_/T,d[2]=y/T,d[3]=E/T):(d[0]=d[1]=d[2]=0,d[3]=1)}function b(d,w,A){this.radius=e([A]),this.center=e(w),this.rotation=e(d),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var u=b.prototype;u.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},u.recalcMatrix=function(d){this.radius.curve(d),this.center.curve(d),this.rotation.curve(d);var w=this.computedRotation;h(w,w);var A=this.computedMatrix;n(A,w);var _=this.computedCenter,y=this.computedEye,E=this.computedUp,T=Math.exp(this.computedRadius[0]);y[0]=_[0]+T*A[2],y[1]=_[1]+T*A[6],y[2]=_[2]+T*A[10],E[0]=A[1],E[1]=A[5],E[2]=A[9];for(var s=0;s<3;++s){for(var L=0,M=0;M<3;++M)L+=A[s+4*M]*y[M];A[12+s]=-L}},u.getMatrix=function(d,w){this.recalcMatrix(d);var A=this.computedMatrix;if(w){for(var _=0;_<16;++_)w[_]=A[_];return w}return A},u.idle=function(d){this.center.idle(d),this.radius.idle(d),this.rotation.idle(d)},u.flush=function(d){this.center.flush(d),this.radius.flush(d),this.rotation.flush(d)},u.pan=function(d,w,A,_){w=w||0,A=A||0,_=_||0,this.recalcMatrix(d);var y=this.computedMatrix,E=y[1],T=y[5],s=y[9],L=l(E,T,s);E/=L,T/=L,s/=L;var M=y[0],z=y[4],D=y[8],N=M*E+z*T+D*s;M-=E*N,z-=T*N,D-=s*N;var I=l(M,z,D);M/=I,z/=I,D/=I,y[2],y[6],y[10];var k=M*w+E*A,B=z*w+T*A,O=D*w+s*A;this.center.move(d,k,B,O);var H=Math.exp(this.computedRadius[0]);H=Math.max(1e-4,H+_),this.radius.set(d,Math.log(H))},u.rotate=function(d,w,A,_){this.recalcMatrix(d),w=w||0,A=A||0;var y=this.computedMatrix,E=y[0],T=y[4],s=y[8],L=y[1],M=y[5],z=y[9],D=y[2],N=y[6],I=y[10],k=w*E+A*L,B=w*T+A*M,O=w*s+A*z,H=-(N*O-I*B),Y=-(I*k-D*O),j=-(D*B-N*k),et=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(Y,2)-Math.pow(j,2))),it=m(H,Y,j,et);it>1e-6?(H/=it,Y/=it,j/=it,et/=it):(H=Y=j=0,et=1);var ut=this.computedRotation,J=ut[0],X=ut[1],tt=ut[2],V=ut[3],Q=J*et+V*H+X*j-tt*Y,ot=X*et+V*Y+tt*H-J*j,$=tt*et+V*j+J*Y-X*H,Z=V*et-J*H-X*Y-tt*j;if(_){H=D,Y=N,j=I;var st=Math.sin(_)/l(H,Y,j);H*=st,Y*=st,j*=st,et=Math.cos(w),Q=Q*et+Z*H+ot*j-$*Y,ot=ot*et+Z*Y+$*H-Q*j,$=$*et+Z*j+Q*Y-ot*H,Z=Z*et-Q*H-ot*Y-$*j}var nt=m(Q,ot,$,Z);nt>1e-6?(Q/=nt,ot/=nt,$/=nt,Z/=nt):(Q=ot=$=0,Z=1),this.rotation.set(d,Q,ot,$,Z)},u.lookAt=function(d,w,A,_){this.recalcMatrix(d),A=A||this.computedCenter,w=w||this.computedEye,_=_||this.computedUp;var y=this.computedMatrix;a(y,w,A,_);var E=this.computedRotation;c(E,y[0],y[1],y[2],y[4],y[5],y[6],y[8],y[9],y[10]),h(E,E),this.rotation.set(d,E[0],E[1],E[2],E[3]);for(var T=0,s=0;s<3;++s)T+=Math.pow(A[s]-w[s],2);this.radius.set(d,.5*Math.log(Math.max(T,1e-6))),this.center.set(d,A[0],A[1],A[2])},u.translate=function(d,w,A,_){this.center.move(d,w||0,A||0,_||0)},u.setMatrix=function(d,w){var A=this.computedRotation;c(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),h(A,A),this.rotation.set(d,A[0],A[1],A[2],A[3]);var _=this.computedMatrix;f(_,w);var y=_[15];if(Math.abs(y)>1e-6){var E=_[12]/y,T=_[13]/y,s=_[14]/y;this.recalcMatrix(d);var L=Math.exp(this.computedRadius[0]);this.center.set(d,E-_[2]*L,T-_[6]*L,s-_[10]*L),this.radius.idle(d)}else this.center.idle(d),this.radius.idle(d)},u.setDistance=function(d,w){w>0&&this.radius.set(d,Math.log(w))},u.setDistanceLimits=function(d,w){d>0?d=Math.log(d):d=-1/0,w>0?w=Math.log(w):w=1/0,w=Math.max(w,d),this.radius.bounds[0][0]=d,this.radius.bounds[1][0]=w},u.getDistanceLimits=function(d){var w=this.radius.bounds;return d?(d[0]=Math.exp(w[0][0]),d[1]=Math.exp(w[1][0]),d):[Math.exp(w[0][0]),Math.exp(w[1][0])]},u.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},u.fromJSON=function(d){var w=this.lastT(),A=d.center;A&&this.center.set(w,A[0],A[1],A[2]);var _=d.rotation;_&&this.rotation.set(w,_[0],_[1],_[2],_[3]);var y=d.distance;y&&y>0&&this.radius.set(w,Math.log(y)),this.setDistanceLimits(d.zoomMin,d.zoomMax)};function o(d){d=d||{};var w=d.center||[0,0,0],A=d.rotation||[0,0,0,1],_=d.radius||1;w=[].slice.call(w,0,3),A=[].slice.call(A,0,4),h(A,A);var y=new b(A,w,Math.log(_));return y.setDistanceLimits(d.zoomMin,d.zoomMax),("eye"in d||"up"in d)&&y.lookAt(0,d.eye,d.center,d.up),y}},4930:function(v,p,r){/*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. -*/var t=r(6184);v.exports=function(n,f,c){return c=typeof c<"u"?c+"":" ",t(c,f)+n}},4405:function(v){v.exports=function(r,t){t||(t=[0,""]),r=String(r);var a=parseFloat(r,10);return t[0]=a,t[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},4166:function(v,p,r){v.exports=a;var t=r(9398);function a(n,f){for(var c=f.length|0,l=n.length,m=[new Array(c),new Array(c)],h=0;h0){M=m[N][s][0],D=N;break}z=M[D^1];for(var I=0;I<2;++I)for(var k=m[I][s],B=0;B0&&(M=O,z=V,D=I)}return L||M&&o(M,D),z}function w(T,s){var L=m[s][T][0],M=[T];o(L,s);for(var z=L[s^1];;){for(;z!==T;)M.push(z),z=d(M[M.length-2],z,!1);if(m[0][T].length+m[1][T].length===0)break;var D=M[M.length-1],N=T,I=M[1],k=d(D,N,!0);if(t(f[D],f[N],f[I],f[k])<0)break;M.push(T),z=d(D,N)}return M}function A(T,s){return s[1]===s[s.length-1]}for(var h=0;h0;){m[0][h].length;var E=w(h,_);A(y,E)?y.push.apply(y,E):(y.length>0&&u.push(y),y=E)}y.length>0&&u.push(y)}return u}},3959:function(v,p,r){v.exports=a;var t=r(8348);function a(n,f){for(var c=t(n,f.length),l=new Array(f.length),m=new Array(f.length),h=[],b=0;b0;){var o=h.pop();l[o]=!1;for(var d=c[o],b=0;b0}y=y.filter(E);for(var T=y.length,s=new Array(T),L=new Array(T),_=0;_0;){var se=oe.pop(),ne=te[se];l(ne,function(Re,be){return Re-be});var ce=ne.length,ge=$[se],Te;if(ge===0){var k=y[se];Te=[k]}for(var _=0;_=0)&&($[we]=ge^1,oe.push(we),ge===0)){var k=y[we];Q(k)||(k.reverse(),Te.push(k))}}ge===0&&Z.push(Te)}return Z}},211:function(v,p,r){v.exports=d;var t=r(417)[3],a=r(4385),n=r(9014),f=r(5070);function c(){return!0}function l(w){return function(A,_){var y=w[A];return y?!!y.queryPoint(_,c):!1}}function m(w){for(var A={},_=0;_0&&A[y]===_[0])E=w[y-1];else return 1;for(var T=1;E;){var s=E.key,L=t(_,s[0],s[1]);if(s[0][0]0)T=-1,E=E.right;else return 0;else if(L>0)E=E.left;else if(L<0)T=1,E=E.right;else return 0}return T}}function b(w){return 1}function u(w){return function(_){return w(_[0],_[1])?0:1}}function o(w,A){return function(y){return w(y[0],y[1])?0:A(y)}}function d(w){for(var A=w.length,_=[],y=[],E=0;E=b?(s=1,M=b+2*d+A):(s=-d/b,M=d*s+A)):(s=0,w>=0?(L=0,M=A):-w>=o?(L=1,M=o+2*w+A):(L=-w/o,M=w*L+A));else if(L<0)L=0,d>=0?(s=0,M=A):-d>=b?(s=1,M=b+2*d+A):(s=-d/b,M=d*s+A);else{var z=1/T;s*=z,L*=z,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A}else{var D,N,I,k;s<0?(D=u+d,N=o+w,N>D?(I=N-D,k=b-2*u+o,I>=k?(s=1,L=0,M=b+2*d+A):(s=I/k,L=1-s,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)):(s=0,N<=0?(L=1,M=o+2*w+A):w>=0?(L=0,M=A):(L=-w/o,M=w*L+A))):L<0?(D=u+w,N=b+d,N>D?(I=N-D,k=b-2*u+o,I>=k?(L=1,s=0,M=o+2*w+A):(L=I/k,s=1-L,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)):(L=0,N<=0?(s=1,M=b+2*d+A):d>=0?(s=0,M=A):(s=-d/b,M=d*s+A))):(I=o+w-u-d,I<=0?(s=0,L=1,M=o+2*w+A):(k=b-2*u+o,I>=k?(s=1,L=0,M=b+2*d+A):(s=I/k,L=1-s,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)))}for(var B=1-s-L,h=0;h0){var o=c[m-1];if(t(b,o)===0&&n(o)!==u){m-=1;continue}}c[m++]=b}}return c.length=m,c}},6184:function(v){/*! +*/var e=r(6184);v.exports=function(n,f,c){return c=typeof c<"u"?c+"":" ",e(c,f)+n}},4405:function(v){v.exports=function(r,e){e||(e=[0,""]),r=String(r);var a=parseFloat(r,10);return e[0]=a,e[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},4166:function(v,p,r){v.exports=a;var e=r(9398);function a(n,f){for(var c=f.length|0,l=n.length,m=[new Array(c),new Array(c)],h=0;h0){M=m[N][s][0],D=N;break}z=M[D^1];for(var I=0;I<2;++I)for(var k=m[I][s],B=0;B0&&(M=O,z=H,D=I)}return L||M&&o(M,D),z}function w(T,s){var L=m[s][T][0],M=[T];o(L,s);for(var z=L[s^1];;){for(;z!==T;)M.push(z),z=d(M[M.length-2],z,!1);if(m[0][T].length+m[1][T].length===0)break;var D=M[M.length-1],N=T,I=M[1],k=d(D,N,!0);if(e(f[D],f[N],f[I],f[k])<0)break;M.push(T),z=d(D,N)}return M}function A(T,s){return s[1]===s[s.length-1]}for(var h=0;h0;){m[0][h].length;var E=w(h,_);A(y,E)?y.push.apply(y,E):(y.length>0&&u.push(y),y=E)}y.length>0&&u.push(y)}return u}},3959:function(v,p,r){v.exports=a;var e=r(8348);function a(n,f){for(var c=e(n,f.length),l=new Array(f.length),m=new Array(f.length),h=[],b=0;b0;){var o=h.pop();l[o]=!1;for(var d=c[o],b=0;b0}y=y.filter(E);for(var T=y.length,s=new Array(T),L=new Array(T),_=0;_0;){var st=ot.pop(),nt=et[st];l(nt,function(Rt,bt){return Rt-bt});var ct=nt.length,gt=$[st],Tt;if(gt===0){var k=y[st];Tt=[k]}for(var _=0;_=0)&&($[wt]=gt^1,ot.push(wt),gt===0)){var k=y[wt];Q(k)||(k.reverse(),Tt.push(k))}}gt===0&&Z.push(Tt)}return Z}},211:function(v,p,r){v.exports=d;var e=r(417)[3],a=r(4385),n=r(9014),f=r(5070);function c(){return!0}function l(w){return function(A,_){var y=w[A];return y?!!y.queryPoint(_,c):!1}}function m(w){for(var A={},_=0;_0&&A[y]===_[0])E=w[y-1];else return 1;for(var T=1;E;){var s=E.key,L=e(_,s[0],s[1]);if(s[0][0]0)T=-1,E=E.right;else return 0;else if(L>0)E=E.left;else if(L<0)T=1,E=E.right;else return 0}return T}}function b(w){return 1}function u(w){return function(_){return w(_[0],_[1])?0:1}}function o(w,A){return function(y){return w(y[0],y[1])?0:A(y)}}function d(w){for(var A=w.length,_=[],y=[],E=0;E=b?(s=1,M=b+2*d+A):(s=-d/b,M=d*s+A)):(s=0,w>=0?(L=0,M=A):-w>=o?(L=1,M=o+2*w+A):(L=-w/o,M=w*L+A));else if(L<0)L=0,d>=0?(s=0,M=A):-d>=b?(s=1,M=b+2*d+A):(s=-d/b,M=d*s+A);else{var z=1/T;s*=z,L*=z,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A}else{var D,N,I,k;s<0?(D=u+d,N=o+w,N>D?(I=N-D,k=b-2*u+o,I>=k?(s=1,L=0,M=b+2*d+A):(s=I/k,L=1-s,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)):(s=0,N<=0?(L=1,M=o+2*w+A):w>=0?(L=0,M=A):(L=-w/o,M=w*L+A))):L<0?(D=u+w,N=b+d,N>D?(I=N-D,k=b-2*u+o,I>=k?(L=1,s=0,M=o+2*w+A):(L=I/k,s=1-L,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)):(L=0,N<=0?(s=1,M=b+2*d+A):d>=0?(s=0,M=A):(s=-d/b,M=d*s+A))):(I=o+w-u-d,I<=0?(s=0,L=1,M=o+2*w+A):(k=b-2*u+o,I>=k?(s=1,L=0,M=b+2*d+A):(s=I/k,L=1-s,M=s*(b*s+u*L+2*d)+L*(u*s+o*L+2*w)+A)))}for(var B=1-s-L,h=0;h0){var o=c[m-1];if(e(b,o)===0&&n(o)!==u){m-=1;continue}}c[m++]=b}}return c.length=m,c}},6184:function(v){/*! * repeat-string * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. -*/var p="",r;v.exports=t;function t(a,n){if(typeof a!="string")throw new TypeError("expected a string");if(n===1)return a;if(n===2)return a+a;var f=a.length*n;if(r!==a||typeof r>"u")r=a,p="";else if(p.length>=f)return p.substr(0,f);for(;f>p.length&&n>1;)n&1&&(p+=a),n>>=1,a+=a;return p+=a,p=p.substr(0,f),p}},8161:function(v,p,r){v.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(v){v.exports=p;function p(r){for(var t=r.length,a=r[r.length-1],n=t,f=t-2;f>=0;--f){var c=a,l=r[f];a=c+l;var m=a-c,h=l-m;h&&(r[--n]=a,a=h)}for(var b=0,f=n;f0){if(N<=0)return I;k=D+N}else if(D<0){if(N>=0)return I;k=-(D+N)}else return I;var B=m*k;return I>=B||I<=-B?I:w(L,M,z)},function(L,M,z,D){var N=L[0]-D[0],I=M[0]-D[0],k=z[0]-D[0],B=L[1]-D[1],O=M[1]-D[1],V=z[1]-D[1],Y=L[2]-D[2],j=M[2]-D[2],te=z[2]-D[2],ie=I*V,ue=k*O,J=k*B,X=N*V,ee=N*O,G=I*B,Q=Y*(ie-ue)+j*(J-X)+te*(ee-G),oe=(Math.abs(ie)+Math.abs(ue))*Math.abs(Y)+(Math.abs(J)+Math.abs(X))*Math.abs(j)+(Math.abs(ee)+Math.abs(G))*Math.abs(te),$=h*oe;return Q>$||-Q>$?Q:A(L,M,z,D)}];function y(s){var L=_[s.length];return L||(L=_[s.length]=d(s.length)),L.apply(void 0,s)}function E(s,L,M,z,D,N,I){return function(B,O,V,Y,j){switch(arguments.length){case 0:case 1:return 0;case 2:return z(B,O);case 3:return D(B,O,V);case 4:return N(B,O,V,Y);case 5:return I(B,O,V,Y,j)}for(var te=new Array(arguments.length),ie=0;ie0&&b>0||h<0&&b<0)return!1;var u=t(l,f,c),o=t(m,f,c);return u>0&&o>0||u<0&&o<0?!1:h===0&&b===0&&u===0&&o===0?a(f,c,l,m):!0}},4078:function(v){v.exports=r;function p(t,a){var n=t+a,f=n-t,c=n-f,l=a-f,m=t-c,h=m+l;return h?[h,n]:[n]}function r(t,a){var n=t.length|0,f=a.length|0;if(n===1&&f===1)return p(t[0],-a[0]);var c=n+f,l=new Array(c),m=0,h=0,b=0,u=Math.abs,o=t[h],d=u(o),w=-a[b],A=u(w),_,y;d=f?(_=o,h+=1,h=f?(_=o,h+=1,h"u"&&(_=c(d));var y=d.length;if(y===0||_<1)return{cells:[],vertexIds:[],vertexWeights:[]};var E=l(w,+A),T=m(d,_),s=h(T,w,E,+A),L=b(T,w.length|0),M=f(_)(d,T.data,L,E),z=u(T),D=[].slice.call(s.data,0,s.shape[0]);return a.free(E),a.free(T.data),a.free(s.data),a.free(L),{cells:M,vertexIds:z,vertexWeights:D}}},1168:function(v){v.exports=r;var p=[function(){function a(n,f,c,l){for(var m=n.length,h=[],b=0;b>1,w=c[2*d+1];if(w===b)return d;b>1,w=c[2*d+1];if(w===b)return d;b>1,w=c[2*d+1];if(w===b)return d;b0)-(n<0)},p.abs=function(n){var f=n>>r-1;return(n^f)-f},p.min=function(n,f){return f^(n^f)&-(n65535)<<4,n>>>=f,c=(n>255)<<3,n>>>=c,f|=c,c=(n>15)<<2,n>>>=c,f|=c,c=(n>3)<<1,n>>>=c,f|=c,f|n>>1},p.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},p.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function t(n){var f=32;return n&=-n,n&&f--,n&65535&&(f-=16),n&16711935&&(f-=8),n&252645135&&(f-=4),n&858993459&&(f-=2),n&1431655765&&(f-=1),f}p.countTrailingZeros=t,p.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},p.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},p.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var f=0;f<256;++f){var c=f,l=f,m=7;for(c>>>=1;c;c>>>=1)l<<=1,l|=c&1,--m;n[f]=l<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},p.interleave2=function(n,f){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,n|f<<1},p.deinterleave2=function(n,f){return n=n>>>f&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},p.interleave3=function(n,f,c){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,n|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,n|c<<2},p.deinterleave3=function(n,f){return n=n>>>f&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},p.nextCombination=function(n){var f=n|n-1;return f+1|(~f&-~f)-1>>>t(n)+1}},6656:function(v,p,r){"use restrict";var t=r(9392),a=r(9521);function n(s){for(var L=0,M=Math.max,z=0,D=s.length;z>1,I=l(s[N],L);I<=0?(I===0&&(D=N),M=N+1):I>0&&(z=N-1)}return D}p.findCell=u;function o(s,L){for(var M=new Array(s.length),z=0,D=M.length;z=s.length||l(s[te],N)!==0););}return M}p.incidence=o;function d(s,L){if(!L)return o(b(A(s,0)),s);for(var M=new Array(L),z=0;z>>O&1&&B.push(D[O]);L.push(B)}return h(L)}p.explode=w;function A(s,L){if(L<0)return[];for(var M=[],z=(1<>1:(J>>1)-1}function z(J){for(var X=L(J);;){var ee=X,G=2*J+1,Q=2*(J+1),oe=J;if(G0;){var ee=M(J);if(ee>=0){var G=L(ee);if(X0){var J=B[0];return s(0,Y-1),Y-=1,z(0),J}return-1}function I(J,X){var ee=B[J];return d[ee]===X?J:(d[ee]=-1/0,D(J),N(),d[ee]=X,Y+=1,D(Y-1))}function k(J){if(!w[J]){w[J]=!0;var X=u[J],ee=o[J];u[ee]>=0&&(u[ee]=X),o[X]>=0&&(o[X]=ee),O[X]>=0&&I(O[X],T(X)),O[ee]>=0&&I(O[ee],T(ee))}}for(var B=[],O=new Array(h),A=0;A>1;A>=0;--A)z(A);for(;;){var j=N();if(j<0||d[j]>m)break;k(j)}for(var te=[],A=0;A=0&&ee>=0&&X!==ee){var G=O[X],Q=O[ee];G!==Q&&ue.push([G,Q])}}),a.unique(a.normalize(ue)),{positions:te,edges:ue}}},6638:function(v,p,r){v.exports=n;var t=r(417);function a(f,c){var l,m;if(c[0][0]c[1][0])l=c[1],m=c[0];else{var h=Math.min(f[0][1],f[1][1]),b=Math.max(f[0][1],f[1][1]),u=Math.min(c[0][1],c[1][1]),o=Math.max(c[0][1],c[1][1]);return bo?h-o:b-o}var d,w;f[0][1]c[1][0])l=c[1],m=c[0];else return a(c,f);var h,b;if(f[0][0]f[1][0])h=f[1],b=f[0];else return-a(f,c);var u=t(l,m,b),o=t(l,m,h);if(u<0){if(o<=0)return u}else if(u>0){if(o>=0)return u}else if(o)return o;if(u=t(b,h,m),o=t(b,h,l),u<0){if(o<=0)return u}else if(u>0){if(o>=0)return u}else if(o)return o;return m[0]-b[0]}},4385:function(v,p,r){v.exports=o;var t=r(5070),a=r(7080),n=r(417),f=r(6638);function c(d,w,A){this.slabs=d,this.coordinates=w,this.horizontal=A}var l=c.prototype;function m(d,w){return d.y-w}function h(d,w){for(var A=null;d;){var _=d.key,y,E;_[0][0]<_[1][0]?(y=_[0],E=_[1]):(y=_[1],E=_[0]);var T=n(y,E,w);if(T<0)d=d.left;else if(T>0)if(w[0]!==_[1][0])A=d,d=d.right;else{var s=h(d.right,w);if(s)return s;d=d.left}else{if(w[0]!==_[1][0])return d;var s=h(d.right,w);if(s)return s;d=d.left}}return A}l.castUp=function(d){var w=t.le(this.coordinates,d[0]);if(w<0)return-1;this.slabs[w];var A=h(this.slabs[w],d),_=-1;if(A&&(_=A.value),this.coordinates[w]===d[0]){var y=null;if(A&&(y=A.key),w>0){var E=h(this.slabs[w-1],d);E&&(y?f(E.key,y)>0&&(y=E.key,_=E.value):(_=E.value,y=E.key))}var T=this.horizontal[w];if(T.length>0){var s=t.ge(T,d[1],m);if(s=T.length)return _;L=T[s]}}if(L.start)if(y){var M=n(y[0],y[1],[d[0],L.y]);y[0][0]>y[1][0]&&(M=-M),M>0&&(_=L.index)}else _=L.index;else L.y!==d[1]&&(_=L.index)}}}return _};function b(d,w,A,_){this.y=d,this.index=w,this.start=A,this.closed=_}function u(d,w,A,_){this.x=d,this.segment=w,this.create=A,this.index=_}function o(d){for(var w=d.length,A=2*w,_=new Array(A),y=0;y1&&(w=1);for(var A=1-w,_=h.length,y=new Array(_),E=0;E<_;++E)y[E]=w*h[E]+A*u[E];return y}function c(h,b){for(var u=[],o=[],d=n(h[h.length-1],b),w=h[h.length-1],A=h[0],_=0;_0||d>0&&y<0){var E=f(w,y,A,d);u.push(E),o.push(E.slice())}y<0?o.push(A.slice()):y>0?u.push(A.slice()):(u.push(A.slice()),o.push(A.slice())),d=y}return{positive:u,negative:o}}function l(h,b){for(var u=[],o=n(h[h.length-1],b),d=h[h.length-1],w=h[0],A=0;A0||o>0&&_<0)&&u.push(f(d,_,w,o)),_>=0&&u.push(w.slice()),o=_}return u}function m(h,b){for(var u=[],o=n(h[h.length-1],b),d=h[h.length-1],w=h[0],A=0;A0||o>0&&_<0)&&u.push(f(d,_,w,o)),_<=0&&u.push(w.slice()),o=_}return u}},8974:function(v,p,r){var t;(function(){var a={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(h){return c(m(h),arguments)}function f(h,b){return n.apply(null,[h].concat(b||[]))}function c(h,b){var u=1,o=h.length,d,w="",A,_,y,E,T,s,L,M;for(A=0;A=0),y.type){case"b":d=parseInt(d,10).toString(2);break;case"c":d=String.fromCharCode(parseInt(d,10));break;case"d":case"i":d=parseInt(d,10);break;case"j":d=JSON.stringify(d,null,y.width?parseInt(y.width):0);break;case"e":d=y.precision?parseFloat(d).toExponential(y.precision):parseFloat(d).toExponential();break;case"f":d=y.precision?parseFloat(d).toFixed(y.precision):parseFloat(d);break;case"g":d=y.precision?String(Number(d.toPrecision(y.precision))):parseFloat(d);break;case"o":d=(parseInt(d,10)>>>0).toString(8);break;case"s":d=String(d),d=y.precision?d.substring(0,y.precision):d;break;case"t":d=String(!!d),d=y.precision?d.substring(0,y.precision):d;break;case"T":d=Object.prototype.toString.call(d).slice(8,-1).toLowerCase(),d=y.precision?d.substring(0,y.precision):d;break;case"u":d=parseInt(d,10)>>>0;break;case"v":d=d.valueOf(),d=y.precision?d.substring(0,y.precision):d;break;case"x":d=(parseInt(d,10)>>>0).toString(16);break;case"X":d=(parseInt(d,10)>>>0).toString(16).toUpperCase();break}a.json.test(y.type)?w+=d:(a.number.test(y.type)&&(!L||y.sign)?(M=L?"+":"-",d=d.toString().replace(a.sign,"")):M="",T=y.pad_char?y.pad_char==="0"?"0":y.pad_char.charAt(1):" ",s=y.width-(M+d).length,E=y.width&&s>0?T.repeat(s):"",w+=y.align?M+d+E:T==="0"?M+E+d:E+M+d)}return w}var l=Object.create(null);function m(h){if(l[h])return l[h];for(var b=h,u,o=[],d=0;b;){if((u=a.text.exec(b))!==null)o.push(u[0]);else if((u=a.modulo.exec(b))!==null)o.push("%");else if((u=a.placeholder.exec(b))!==null){if(u[2]){d|=1;var w=[],A=u[2],_=[];if((_=a.key.exec(A))!==null)for(w.push(_[1]);(A=A.substring(_[0].length))!=="";)if((_=a.key_access.exec(A))!==null)w.push(_[1]);else if((_=a.index_access.exec(A))!==null)w.push(_[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=w}else d|=2;if(d===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");b=b.substring(u[0].length)}return l[h]=o}p.sprintf=n,p.vsprintf=f,typeof window<"u"&&(window.sprintf=n,window.vsprintf=f,t=(function(){return{sprintf:n,vsprintf:f}}).call(p,r,p,v),t!==void 0&&(v.exports=t))})()},4162:function(v,p,r){v.exports=m;var t=r(9284),a=r(9584),n={"2d":function(h,b,u){var o=h({order:b,scalarArguments:3,getters:u==="generic"?[0]:void 0,phase:function(w,A,_,y){return w>y|0},vertex:function(w,A,_,y,E,T,s,L,M,z,D,N,I){var k=(s<<0)+(L<<1)+(M<<2)+(z<<3)|0;if(!(k===0||k===15))switch(k){case 0:D.push([w-.5,A-.5]);break;case 1:D.push([w-.25-.25*(y+_-2*I)/(_-y),A-.25-.25*(E+_-2*I)/(_-E)]);break;case 2:D.push([w-.75-.25*(-y-_+2*I)/(y-_),A-.25-.25*(T+y-2*I)/(y-T)]);break;case 3:D.push([w-.5,A-.5-.5*(E+_+T+y-4*I)/(_-E+y-T)]);break;case 4:D.push([w-.25-.25*(T+E-2*I)/(E-T),A-.75-.25*(-E-_+2*I)/(E-_)]);break;case 5:D.push([w-.5-.5*(y+_+T+E-4*I)/(_-y+E-T),A-.5]);break;case 6:D.push([w-.5-.25*(-y-_+T+E)/(y-_+E-T),A-.5-.25*(-E-_+T+y)/(E-_+y-T)]);break;case 7:D.push([w-.75-.25*(T+E-2*I)/(E-T),A-.75-.25*(T+y-2*I)/(y-T)]);break;case 8:D.push([w-.75-.25*(-T-E+2*I)/(T-E),A-.75-.25*(-T-y+2*I)/(T-y)]);break;case 9:D.push([w-.5-.25*(y+_+-T-E)/(_-y+T-E),A-.5-.25*(E+_+-T-y)/(_-E+T-y)]);break;case 10:D.push([w-.5-.5*(-y-_+-T-E+4*I)/(y-_+T-E),A-.5]);break;case 11:D.push([w-.25-.25*(-T-E+2*I)/(T-E),A-.75-.25*(E+_-2*I)/(_-E)]);break;case 12:D.push([w-.5,A-.5-.5*(-E-_+-T-y+4*I)/(E-_+T-y)]);break;case 13:D.push([w-.75-.25*(y+_-2*I)/(_-y),A-.25-.25*(-T-y+2*I)/(T-y)]);break;case 14:D.push([w-.25-.25*(-y-_+2*I)/(y-_),A-.25-.25*(-E-_+2*I)/(E-_)]);break;case 15:D.push([w-.5,A-.5]);break}},cell:function(w,A,_,y,E,T,s,L,M){E?L.push([w,A]):L.push([A,w])}});return function(d,w){var A=[],_=[];return o(d,A,_,w),{positions:A,cells:_}}}};function f(h,b){var u=h.length+"d",o=n[u];if(o)return o(t,h,b)}function c(h,b){for(var u=a(h,b),o=u.length,d=new Array(o),w=new Array(o),A=0;A0&&(_+=.02);for(var E=new Float32Array(A),T=0,s=-.5*_,y=0;yMath.max(y,E)?T[2]=1:y>Math.max(_,E)?T[0]=1:T[1]=1;for(var s=0,L=0,M=0;M<3;++M)s+=A[M]*A[M],L+=T[M]*A[M];for(var M=0;M<3;++M)T[M]-=L/s*A[M];return c(T,T),T}function u(A,_,y,E,T,s,L,M){this.center=t(y),this.up=t(E),this.right=t(T),this.radius=t([s]),this.angle=t([L,M]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,_),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var o=u.prototype;o.setDistanceLimits=function(A,_){A>0?A=Math.log(A):A=-1/0,_>0?_=Math.log(_):_=1/0,_=Math.max(_,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=_},o.getDistanceLimits=function(A){var _=this.radius.bounds[0];return A?(A[0]=Math.exp(_[0][0]),A[1]=Math.exp(_[1][0]),A):[Math.exp(_[0][0]),Math.exp(_[1][0])]},o.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var _=this.computedUp,y=this.computedRight,E=0,T=0,s=0;s<3;++s)T+=_[s]*y[s],E+=_[s]*_[s];for(var L=Math.sqrt(E),M=0,s=0;s<3;++s)y[s]-=_[s]*T/E,M+=y[s]*y[s],_[s]/=L;for(var z=Math.sqrt(M),s=0;s<3;++s)y[s]/=z;var D=this.computedToward;f(D,_,y),c(D,D);for(var N=Math.exp(this.computedRadius[0]),I=this.computedAngle[0],k=this.computedAngle[1],B=Math.cos(I),O=Math.sin(I),V=Math.cos(k),Y=Math.sin(k),j=this.computedCenter,te=B*V,ie=O*V,ue=Y,J=-B*Y,X=-O*Y,ee=V,G=this.computedEye,Q=this.computedMatrix,s=0;s<3;++s){var oe=te*y[s]+ie*D[s]+ue*_[s];Q[4*s+1]=J*y[s]+X*D[s]+ee*_[s],Q[4*s+2]=oe,Q[4*s+3]=0}var $=Q[1],Z=Q[5],se=Q[9],ne=Q[2],ce=Q[6],ge=Q[10],Te=Z*ge-se*ce,we=se*ne-$*ge,Re=$*ce-Z*ne,be=m(Te,we,Re);Te/=be,we/=be,Re/=be,Q[0]=Te,Q[4]=we,Q[8]=Re;for(var s=0;s<3;++s)G[s]=j[s]+Q[2+4*s]*N;for(var s=0;s<3;++s){for(var M=0,Ae=0;Ae<3;++Ae)M+=Q[s+4*Ae]*G[Ae];Q[12+s]=-M}Q[15]=1},o.getMatrix=function(A,_){this.recalcMatrix(A);var y=this.computedMatrix;if(_){for(var E=0;E<16;++E)_[E]=y[E];return _}return y};var d=[0,0,0];o.rotate=function(A,_,y,E){if(this.angle.move(A,_,y),E){this.recalcMatrix(A);var T=this.computedMatrix;d[0]=T[2],d[1]=T[6],d[2]=T[10];for(var s=this.computedUp,L=this.computedRight,M=this.computedToward,z=0;z<3;++z)T[4*z]=s[z],T[4*z+1]=L[z],T[4*z+2]=M[z];n(T,T,E,d);for(var z=0;z<3;++z)s[z]=T[4*z],L[z]=T[4*z+1];this.up.set(A,s[0],s[1],s[2]),this.right.set(A,L[0],L[1],L[2])}},o.pan=function(A,_,y,E){_=_||0,y=y||0,E=E||0,this.recalcMatrix(A);var T=this.computedMatrix;Math.exp(this.computedRadius[0]);var s=T[1],L=T[5],M=T[9],z=m(s,L,M);s/=z,L/=z,M/=z;var D=T[0],N=T[4],I=T[8],k=D*s+N*L+I*M;D-=s*k,N-=L*k,I-=M*k;var B=m(D,N,I);D/=B,N/=B,I/=B;var O=D*_+s*y,V=N*_+L*y,Y=I*_+M*y;this.center.move(A,O,V,Y);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+E),this.radius.set(A,Math.log(j))},o.translate=function(A,_,y,E){this.center.move(A,_||0,y||0,E||0)},o.setMatrix=function(A,_,y,E){var T=1;typeof y=="number"&&(T=y|0),(T<0||T>3)&&(T=1);var s=(T+2)%3;_||(this.recalcMatrix(A),_=this.computedMatrix);var L=_[T],M=_[T+4],z=_[T+8];if(E){var N=Math.abs(L),I=Math.abs(M),k=Math.abs(z),B=Math.max(N,I,k);N===B?(L=L<0?-1:1,M=z=0):k===B?(z=z<0?-1:1,L=M=0):(M=M<0?-1:1,L=z=0)}else{var D=m(L,M,z);L/=D,M/=D,z/=D}var O=_[s],V=_[s+4],Y=_[s+8],j=O*L+V*M+Y*z;O-=L*j,V-=M*j,Y-=z*j;var te=m(O,V,Y);O/=te,V/=te,Y/=te;var ie=M*Y-z*V,ue=z*O-L*Y,J=L*V-M*O,X=m(ie,ue,J);ie/=X,ue/=X,J/=X,this.center.jump(A,Ue,ke,He),this.radius.idle(A),this.up.jump(A,L,M,z),this.right.jump(A,O,V,Y);var ee,G;if(T===2){var Q=_[1],oe=_[5],$=_[9],Z=Q*O+oe*V+$*Y,se=Q*ie+oe*ue+$*J;Te<0?ee=-Math.PI/2:ee=Math.PI/2,G=Math.atan2(se,Z)}else{var ne=_[2],ce=_[6],ge=_[10],Te=ne*L+ce*M+ge*z,we=ne*O+ce*V+ge*Y,Re=ne*ie+ce*ue+ge*J;ee=Math.asin(h(Te)),G=Math.atan2(Re,we)}this.angle.jump(A,G,ee),this.recalcMatrix(A);var be=_[2],Ae=_[6],me=_[10],Le=this.computedMatrix;a(Le,_);var Ve=Le[15],Ue=Le[12]/Ve,ke=Le[13]/Ve,He=Le[14]/Ve,Ie=Math.exp(this.computedRadius[0]);this.center.jump(A,Ue-be*Ie,ke-Ae*Ie,He-me*Ie)},o.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},o.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},o.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},o.setDistance=function(A,_){_>0&&this.radius.set(A,Math.log(_))},o.lookAt=function(A,_,y,E){this.recalcMatrix(A),_=_||this.computedEye,y=y||this.computedCenter,E=E||this.computedUp;var T=E[0],s=E[1],L=E[2],M=m(T,s,L);if(!(M<1e-6)){T/=M,s/=M,L/=M;var z=_[0]-y[0],D=_[1]-y[1],N=_[2]-y[2],I=m(z,D,N);if(!(I<1e-6)){z/=I,D/=I,N/=I;var k=this.computedRight,B=k[0],O=k[1],V=k[2],Y=T*B+s*O+L*V;B-=Y*T,O-=Y*s,V-=Y*L;var j=m(B,O,V);if(!(j<.01&&(B=s*N-L*D,O=L*z-T*N,V=T*D-s*z,j=m(B,O,V),j<1e-6))){B/=j,O/=j,V/=j,this.up.set(A,T,s,L),this.right.set(A,B,O,V),this.center.set(A,y[0],y[1],y[2]),this.radius.set(A,Math.log(I));var te=s*V-L*O,ie=L*B-T*V,ue=T*O-s*B,J=m(te,ie,ue);te/=J,ie/=J,ue/=J;var X=T*z+s*D+L*N,ee=B*z+O*D+V*N,G=te*z+ie*D+ue*N,Q=Math.asin(h(X)),oe=Math.atan2(G,ee),$=this.angle._state,Z=$[$.length-1],se=$[$.length-2];Z=Z%(2*Math.PI);var ne=Math.abs(Z+2*Math.PI-oe),ce=Math.abs(Z-oe),ge=Math.abs(Z-2*Math.PI-oe);ne0?V.pop():new ArrayBuffer(B)}p.mallocArrayBuffer=d;function w(k){return new Uint8Array(d(k),0,k)}p.mallocUint8=w;function A(k){return new Uint16Array(d(2*k),0,k)}p.mallocUint16=A;function _(k){return new Uint32Array(d(4*k),0,k)}p.mallocUint32=_;function y(k){return new Int8Array(d(k),0,k)}p.mallocInt8=y;function E(k){return new Int16Array(d(2*k),0,k)}p.mallocInt16=E;function T(k){return new Int32Array(d(4*k),0,k)}p.mallocInt32=T;function s(k){return new Float32Array(d(4*k),0,k)}p.mallocFloat32=p.mallocFloat=s;function L(k){return new Float64Array(d(8*k),0,k)}p.mallocFloat64=p.mallocDouble=L;function M(k){return f?new Uint8ClampedArray(d(k),0,k):w(k)}p.mallocUint8Clamped=M;function z(k){return c?new BigUint64Array(d(8*k),0,k):null}p.mallocBigUint64=z;function D(k){return l?new BigInt64Array(d(8*k),0,k):null}p.mallocBigInt64=D;function N(k){return new DataView(d(k),0,k)}p.mallocDataView=N;function I(k){k=t.nextPow2(k);var B=t.log2(k),O=b[B];return O.length>0?O.pop():new n(k)}p.mallocBuffer=I,p.clearCache=function(){for(var B=0;B<32;++B)m.UINT8[B].length=0,m.UINT16[B].length=0,m.UINT32[B].length=0,m.INT8[B].length=0,m.INT16[B].length=0,m.INT32[B].length=0,m.FLOAT[B].length=0,m.DOUBLE[B].length=0,m.BIGUINT64[B].length=0,m.BIGINT64[B].length=0,m.UINT8C[B].length=0,h[B].length=0,b[B].length=0}},1731:function(v){"use restrict";v.exports=p;function p(t){this.roots=new Array(t),this.ranks=new Array(t);for(var a=0;a",V="",Y=O.length,j=V.length,te=I[0]===d||I[0]===_,ie=0,ue=-j;ie>-1&&(ie=k.indexOf(O,ie),!(ie===-1||(ue=k.indexOf(V,ie+Y),ue===-1)||ue<=ie));){for(var J=ie;J=ue)B[J]=null,k=k.substr(0,J)+" "+k.substr(J+1);else if(B[J]!==null){var X=B[J].indexOf(I[0]);X===-1?B[J]+=I:te&&(B[J]=B[J].substr(0,X+1)+(1+parseInt(B[J][X+1]))+B[J].substr(X+2))}var ee=ie+Y,G=k.substr(ee,ue-ee),Q=G.indexOf(O);Q!==-1?ie=Q:ie=ue+j}return B}function T(N,I,k){for(var B=I.textAlign||"start",O=I.textBaseline||"alphabetic",V=[1<<30,1<<30],Y=[0,0],j=N.length,te=0;te/g,` -`):k=k.replace(/\/g," ");var Y="",j=[];for(Z=0;Z-1?parseInt(He[1+Ke]):0,ht=$e>-1?parseInt(Ie[1+$e]):0;lt!==ht&&(rt=rt.replace(Re(),"?px "),ce*=Math.pow(.75,ht-lt),rt=rt.replace("?px ",Re())),ne+=.25*X*(ht-lt)}if(V.superscripts===!0){var dt=He.indexOf(d),xt=Ie.indexOf(d),St=dt>-1?parseInt(He[1+dt]):0,nt=xt>-1?parseInt(Ie[1+xt]):0;St!==nt&&(rt=rt.replace(Re(),"?px "),ce*=Math.pow(.75,nt-St),rt=rt.replace("?px ",Re())),ne-=.25*X*(nt-St)}if(V.bolds===!0){var ze=He.indexOf(h)>-1,Ze=Ie.indexOf(h)>-1;!ze&&Ze&&(Je?rt=rt.replace("italic ","italic bold "):rt="bold "+rt),ze&&!Ze&&(rt=rt.replace("bold ",""))}if(V.italics===!0){var Je=He.indexOf(u)>-1,We=Ie.indexOf(u)>-1;!Je&&We&&(rt="italic "+rt),Je&&!We&&(rt=rt.replace("italic ",""))}I.font=rt}for($=0;$0&&(O=B.size),B.lineSpacing&&B.lineSpacing>0&&(V=B.lineSpacing),B.styletags&&B.styletags.breaklines&&(Y.breaklines=!!B.styletags.breaklines),B.styletags&&B.styletags.bolds&&(Y.bolds=!!B.styletags.bolds),B.styletags&&B.styletags.italics&&(Y.italics=!!B.styletags.italics),B.styletags&&B.styletags.subscripts&&(Y.subscripts=!!B.styletags.subscripts),B.styletags&&B.styletags.superscripts&&(Y.superscripts=!!B.styletags.superscripts)),k.font=[B.fontStyle,B.fontVariant,B.fontWeight,O+"px",B.font].filter(function(te){return te}).join(" "),k.textAlign="start",k.textBaseline="alphabetic",k.direction="ltr";var j=s(I,k,N,O,V,Y);return z(j,B,O)}},5346:function(v){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(L){L.permitHostObjects___&&L.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var t=!1;if(typeof WeakMap=="function"){var a=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new a,f=Object.freeze({});if(n.set(f,1),n.get(f)!==1)t=!0;else{v.exports=WeakMap;return}}}var c=Object.getOwnPropertyNames,l=Object.defineProperty,m=Object.isExtensible,h="weakmap:",b=h+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var u=new ArrayBuffer(25),o=new Uint8Array(u);crypto.getRandomValues(o),b=h+"rand:"+Array.prototype.map.call(o,function(L){return(L%36).toString(36)}).join("")+"___"}function d(L){return!(L.substr(0,h.length)==h&&L.substr(L.length-3)==="___")}if(l(Object,"getOwnPropertyNames",{value:function(M){return c(M).filter(d)}}),"getPropertyNames"in Object){var w=Object.getPropertyNames;l(Object,"getPropertyNames",{value:function(M){return w(M).filter(d)}})}function A(L){if(L!==Object(L))throw new TypeError("Not an object: "+L);var M=L[b];if(M&&M.key===L)return M;if(m(L)){M={key:L};try{return l(L,b,{value:M,writable:!1,enumerable:!1,configurable:!1}),M}catch{return}}}(function(){var L=Object.freeze;l(Object,"freeze",{value:function(N){return A(N),L(N)}});var M=Object.seal;l(Object,"seal",{value:function(N){return A(N),M(N)}});var z=Object.preventExtensions;l(Object,"preventExtensions",{value:function(N){return A(N),z(N)}})})();function _(L){return L.prototype=null,Object.freeze(L)}var y=!1;function E(){!y&&typeof console<"u"&&(y=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var T=0,s=function(){this instanceof s||E();var L=[],M=[],z=T++;function D(B,O){var V,Y=A(B);return Y?z in Y?Y[z]:O:(V=L.indexOf(B),V>=0?M[V]:O)}function N(B){var O=A(B);return O?z in O:L.indexOf(B)>=0}function I(B,O){var V,Y=A(B);return Y?Y[z]=O:(V=L.indexOf(B),V>=0?M[V]=O:(V=L.length,M[V]=O,L[V]=B)),this}function k(B){var O=A(B),V,Y;return O?z in O&&delete O[z]:(V=L.indexOf(B),V<0?!1:(Y=L.length-1,L[V]=void 0,M[V]=M[Y],L[V]=L[Y],L.length=Y,M.length=Y,!0))}return Object.create(s.prototype,{get___:{value:_(D)},has___:{value:_(N)},set___:{value:_(I)},delete___:{value:_(k)}})};s.prototype=Object.create(Object.prototype,{get:{value:function(M,z){return this.get___(M,z)},writable:!0,configurable:!0},has:{value:function(M){return this.has___(M)},writable:!0,configurable:!0},set:{value:function(M,z){return this.set___(M,z)},writable:!0,configurable:!0},delete:{value:function(M){return this.delete___(M)},writable:!0,configurable:!0}}),typeof a=="function"?function(){t&&typeof Proxy<"u"&&(Proxy=void 0);function L(){this instanceof s||E();var M=new a,z=void 0,D=!1;function N(O,V){return z?M.has(O)?M.get(O):z.get___(O,V):M.get(O,V)}function I(O){return M.has(O)||(z?z.has___(O):!1)}var k;t?k=function(O,V){return M.set(O,V),M.has(O)||(z||(z=new s),z.set(O,V)),this}:k=function(O,V){if(D)try{M.set(O,V)}catch{z||(z=new s),z.set___(O,V)}else M.set(O,V);return this};function B(O){var V=!!M.delete(O);return z&&z.delete___(O)||V}return Object.create(s.prototype,{get___:{value:_(N)},has___:{value:_(I)},set___:{value:_(k)},delete___:{value:_(B)},permitHostObjects___:{value:_(function(O){if(O===r)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}L.prototype=s.prototype,v.exports=L,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),v.exports=s)})()},9222:function(v,p,r){var t=r(7178);v.exports=a;function a(){var n={};return function(f){if((typeof f!="object"||f===null)&&typeof f!="function")throw new Error("Weakmap-shim: Key must be object");var c=f.valueOf(n);return c&&c.identity===n?c:t(f,n)}}},7178:function(v){v.exports=p;function p(r,t){var a={identity:t},n=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(f){return f!==t?n.apply(this,arguments):a},writable:!0}),a}},4037:function(v,p,r){var t=r(9222);v.exports=a;function a(){var n=t();return{get:function(f,c){var l=n(f);return l.hasOwnProperty("value")?l.value:c},set:function(f,c){return n(f).value=c,this},has:function(f){return"value"in n(f)},delete:function(f){return delete n(f).value}}}},6183:function(v){function p(){return function(c,l,m,h,b,u){var o=c[0],d=m[0],w=[0],A=d;h|=0;var _=0,y=d;for(_=0;_=0!=T>=0&&b.push(w[0]+.5+.5*(E+T)/(E-T))}h+=y,++w[0]}}}function r(){return p()}var t=r;function a(c){var l={};return function(h,b,u){var o=h.dtype,d=h.order,w=[o,d.join()].join(),A=l[w];return A||(l[w]=A=c([o,d])),A(h.shape.slice(0),h.data,h.stride,h.offset|0,b,u)}}function n(c){return a(t.bind(void 0,c))}function f(c){return n({funcName:c.funcName})}v.exports=f({funcName:"zeroCrossings"})},9584:function(v,p,r){v.exports=a;var t=r(6183);function a(n,f){var c=[];return f=+f||0,t(n.hi(n.shape[0]-1),c,f),c}},6601:function(){}},i={};function S(v){var p=i[v];if(p!==void 0)return p.exports;var r=i[v]={id:v,loaded:!1,exports:{}};return C[v].call(r.exports,r,r.exports,S),r.loaded=!0,r.exports}(function(){S.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){S.nmd=function(v){return v.paths=[],v.children||(v.children=[]),v}}();var x=S(7386);return x}()})},33576:function(H,U,e){/*! +*/var p="",r;v.exports=e;function e(a,n){if(typeof a!="string")throw new TypeError("expected a string");if(n===1)return a;if(n===2)return a+a;var f=a.length*n;if(r!==a||typeof r>"u")r=a,p="";else if(p.length>=f)return p.substr(0,f);for(;f>p.length&&n>1;)n&1&&(p+=a),n>>=1,a+=a;return p+=a,p=p.substr(0,f),p}},8161:function(v,p,r){v.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(v){v.exports=p;function p(r){for(var e=r.length,a=r[r.length-1],n=e,f=e-2;f>=0;--f){var c=a,l=r[f];a=c+l;var m=a-c,h=l-m;h&&(r[--n]=a,a=h)}for(var b=0,f=n;f0){if(N<=0)return I;k=D+N}else if(D<0){if(N>=0)return I;k=-(D+N)}else return I;var B=m*k;return I>=B||I<=-B?I:w(L,M,z)},function(L,M,z,D){var N=L[0]-D[0],I=M[0]-D[0],k=z[0]-D[0],B=L[1]-D[1],O=M[1]-D[1],H=z[1]-D[1],Y=L[2]-D[2],j=M[2]-D[2],et=z[2]-D[2],it=I*H,ut=k*O,J=k*B,X=N*H,tt=N*O,V=I*B,Q=Y*(it-ut)+j*(J-X)+et*(tt-V),ot=(Math.abs(it)+Math.abs(ut))*Math.abs(Y)+(Math.abs(J)+Math.abs(X))*Math.abs(j)+(Math.abs(tt)+Math.abs(V))*Math.abs(et),$=h*ot;return Q>$||-Q>$?Q:A(L,M,z,D)}];function y(s){var L=_[s.length];return L||(L=_[s.length]=d(s.length)),L.apply(void 0,s)}function E(s,L,M,z,D,N,I){return function(B,O,H,Y,j){switch(arguments.length){case 0:case 1:return 0;case 2:return z(B,O);case 3:return D(B,O,H);case 4:return N(B,O,H,Y);case 5:return I(B,O,H,Y,j)}for(var et=new Array(arguments.length),it=0;it0&&b>0||h<0&&b<0)return!1;var u=e(l,f,c),o=e(m,f,c);return u>0&&o>0||u<0&&o<0?!1:h===0&&b===0&&u===0&&o===0?a(f,c,l,m):!0}},4078:function(v){v.exports=r;function p(e,a){var n=e+a,f=n-e,c=n-f,l=a-f,m=e-c,h=m+l;return h?[h,n]:[n]}function r(e,a){var n=e.length|0,f=a.length|0;if(n===1&&f===1)return p(e[0],-a[0]);var c=n+f,l=new Array(c),m=0,h=0,b=0,u=Math.abs,o=e[h],d=u(o),w=-a[b],A=u(w),_,y;d=f?(_=o,h+=1,h=f?(_=o,h+=1,h"u"&&(_=c(d));var y=d.length;if(y===0||_<1)return{cells:[],vertexIds:[],vertexWeights:[]};var E=l(w,+A),T=m(d,_),s=h(T,w,E,+A),L=b(T,w.length|0),M=f(_)(d,T.data,L,E),z=u(T),D=[].slice.call(s.data,0,s.shape[0]);return a.free(E),a.free(T.data),a.free(s.data),a.free(L),{cells:M,vertexIds:z,vertexWeights:D}}},1168:function(v){v.exports=r;var p=[function(){function a(n,f,c,l){for(var m=n.length,h=[],b=0;b>1,w=c[2*d+1];if(w===b)return d;b>1,w=c[2*d+1];if(w===b)return d;b>1,w=c[2*d+1];if(w===b)return d;b0)-(n<0)},p.abs=function(n){var f=n>>r-1;return(n^f)-f},p.min=function(n,f){return f^(n^f)&-(n65535)<<4,n>>>=f,c=(n>255)<<3,n>>>=c,f|=c,c=(n>15)<<2,n>>>=c,f|=c,c=(n>3)<<1,n>>>=c,f|=c,f|n>>1},p.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},p.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function e(n){var f=32;return n&=-n,n&&f--,n&65535&&(f-=16),n&16711935&&(f-=8),n&252645135&&(f-=4),n&858993459&&(f-=2),n&1431655765&&(f-=1),f}p.countTrailingZeros=e,p.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},p.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},p.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var a=new Array(256);(function(n){for(var f=0;f<256;++f){var c=f,l=f,m=7;for(c>>>=1;c;c>>>=1)l<<=1,l|=c&1,--m;n[f]=l<>>8&255]<<16|a[n>>>16&255]<<8|a[n>>>24&255]},p.interleave2=function(n,f){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,f&=65535,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,n|f<<1},p.deinterleave2=function(n,f){return n=n>>>f&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},p.interleave3=function(n,f,c){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,n|=f<<1,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,n|c<<2},p.deinterleave3=function(n,f){return n=n>>>f&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},p.nextCombination=function(n){var f=n|n-1;return f+1|(~f&-~f)-1>>>e(n)+1}},6656:function(v,p,r){"use restrict";var e=r(9392),a=r(9521);function n(s){for(var L=0,M=Math.max,z=0,D=s.length;z>1,I=l(s[N],L);I<=0?(I===0&&(D=N),M=N+1):I>0&&(z=N-1)}return D}p.findCell=u;function o(s,L){for(var M=new Array(s.length),z=0,D=M.length;z=s.length||l(s[et],N)!==0););}return M}p.incidence=o;function d(s,L){if(!L)return o(b(A(s,0)),s);for(var M=new Array(L),z=0;z>>O&1&&B.push(D[O]);L.push(B)}return h(L)}p.explode=w;function A(s,L){if(L<0)return[];for(var M=[],z=(1<>1:(J>>1)-1}function z(J){for(var X=L(J);;){var tt=X,V=2*J+1,Q=2*(J+1),ot=J;if(V0;){var tt=M(J);if(tt>=0){var V=L(tt);if(X0){var J=B[0];return s(0,Y-1),Y-=1,z(0),J}return-1}function I(J,X){var tt=B[J];return d[tt]===X?J:(d[tt]=-1/0,D(J),N(),d[tt]=X,Y+=1,D(Y-1))}function k(J){if(!w[J]){w[J]=!0;var X=u[J],tt=o[J];u[tt]>=0&&(u[tt]=X),o[X]>=0&&(o[X]=tt),O[X]>=0&&I(O[X],T(X)),O[tt]>=0&&I(O[tt],T(tt))}}for(var B=[],O=new Array(h),A=0;A>1;A>=0;--A)z(A);for(;;){var j=N();if(j<0||d[j]>m)break;k(j)}for(var et=[],A=0;A=0&&tt>=0&&X!==tt){var V=O[X],Q=O[tt];V!==Q&&ut.push([V,Q])}}),a.unique(a.normalize(ut)),{positions:et,edges:ut}}},6638:function(v,p,r){v.exports=n;var e=r(417);function a(f,c){var l,m;if(c[0][0]c[1][0])l=c[1],m=c[0];else{var h=Math.min(f[0][1],f[1][1]),b=Math.max(f[0][1],f[1][1]),u=Math.min(c[0][1],c[1][1]),o=Math.max(c[0][1],c[1][1]);return bo?h-o:b-o}var d,w;f[0][1]c[1][0])l=c[1],m=c[0];else return a(c,f);var h,b;if(f[0][0]f[1][0])h=f[1],b=f[0];else return-a(f,c);var u=e(l,m,b),o=e(l,m,h);if(u<0){if(o<=0)return u}else if(u>0){if(o>=0)return u}else if(o)return o;if(u=e(b,h,m),o=e(b,h,l),u<0){if(o<=0)return u}else if(u>0){if(o>=0)return u}else if(o)return o;return m[0]-b[0]}},4385:function(v,p,r){v.exports=o;var e=r(5070),a=r(7080),n=r(417),f=r(6638);function c(d,w,A){this.slabs=d,this.coordinates=w,this.horizontal=A}var l=c.prototype;function m(d,w){return d.y-w}function h(d,w){for(var A=null;d;){var _=d.key,y,E;_[0][0]<_[1][0]?(y=_[0],E=_[1]):(y=_[1],E=_[0]);var T=n(y,E,w);if(T<0)d=d.left;else if(T>0)if(w[0]!==_[1][0])A=d,d=d.right;else{var s=h(d.right,w);if(s)return s;d=d.left}else{if(w[0]!==_[1][0])return d;var s=h(d.right,w);if(s)return s;d=d.left}}return A}l.castUp=function(d){var w=e.le(this.coordinates,d[0]);if(w<0)return-1;this.slabs[w];var A=h(this.slabs[w],d),_=-1;if(A&&(_=A.value),this.coordinates[w]===d[0]){var y=null;if(A&&(y=A.key),w>0){var E=h(this.slabs[w-1],d);E&&(y?f(E.key,y)>0&&(y=E.key,_=E.value):(_=E.value,y=E.key))}var T=this.horizontal[w];if(T.length>0){var s=e.ge(T,d[1],m);if(s=T.length)return _;L=T[s]}}if(L.start)if(y){var M=n(y[0],y[1],[d[0],L.y]);y[0][0]>y[1][0]&&(M=-M),M>0&&(_=L.index)}else _=L.index;else L.y!==d[1]&&(_=L.index)}}}return _};function b(d,w,A,_){this.y=d,this.index=w,this.start=A,this.closed=_}function u(d,w,A,_){this.x=d,this.segment=w,this.create=A,this.index=_}function o(d){for(var w=d.length,A=2*w,_=new Array(A),y=0;y1&&(w=1);for(var A=1-w,_=h.length,y=new Array(_),E=0;E<_;++E)y[E]=w*h[E]+A*u[E];return y}function c(h,b){for(var u=[],o=[],d=n(h[h.length-1],b),w=h[h.length-1],A=h[0],_=0;_0||d>0&&y<0){var E=f(w,y,A,d);u.push(E),o.push(E.slice())}y<0?o.push(A.slice()):y>0?u.push(A.slice()):(u.push(A.slice()),o.push(A.slice())),d=y}return{positive:u,negative:o}}function l(h,b){for(var u=[],o=n(h[h.length-1],b),d=h[h.length-1],w=h[0],A=0;A0||o>0&&_<0)&&u.push(f(d,_,w,o)),_>=0&&u.push(w.slice()),o=_}return u}function m(h,b){for(var u=[],o=n(h[h.length-1],b),d=h[h.length-1],w=h[0],A=0;A0||o>0&&_<0)&&u.push(f(d,_,w,o)),_<=0&&u.push(w.slice()),o=_}return u}},8974:function(v,p,r){var e;(function(){var a={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(h){return c(m(h),arguments)}function f(h,b){return n.apply(null,[h].concat(b||[]))}function c(h,b){var u=1,o=h.length,d,w="",A,_,y,E,T,s,L,M;for(A=0;A=0),y.type){case"b":d=parseInt(d,10).toString(2);break;case"c":d=String.fromCharCode(parseInt(d,10));break;case"d":case"i":d=parseInt(d,10);break;case"j":d=JSON.stringify(d,null,y.width?parseInt(y.width):0);break;case"e":d=y.precision?parseFloat(d).toExponential(y.precision):parseFloat(d).toExponential();break;case"f":d=y.precision?parseFloat(d).toFixed(y.precision):parseFloat(d);break;case"g":d=y.precision?String(Number(d.toPrecision(y.precision))):parseFloat(d);break;case"o":d=(parseInt(d,10)>>>0).toString(8);break;case"s":d=String(d),d=y.precision?d.substring(0,y.precision):d;break;case"t":d=String(!!d),d=y.precision?d.substring(0,y.precision):d;break;case"T":d=Object.prototype.toString.call(d).slice(8,-1).toLowerCase(),d=y.precision?d.substring(0,y.precision):d;break;case"u":d=parseInt(d,10)>>>0;break;case"v":d=d.valueOf(),d=y.precision?d.substring(0,y.precision):d;break;case"x":d=(parseInt(d,10)>>>0).toString(16);break;case"X":d=(parseInt(d,10)>>>0).toString(16).toUpperCase();break}a.json.test(y.type)?w+=d:(a.number.test(y.type)&&(!L||y.sign)?(M=L?"+":"-",d=d.toString().replace(a.sign,"")):M="",T=y.pad_char?y.pad_char==="0"?"0":y.pad_char.charAt(1):" ",s=y.width-(M+d).length,E=y.width&&s>0?T.repeat(s):"",w+=y.align?M+d+E:T==="0"?M+E+d:E+M+d)}return w}var l=Object.create(null);function m(h){if(l[h])return l[h];for(var b=h,u,o=[],d=0;b;){if((u=a.text.exec(b))!==null)o.push(u[0]);else if((u=a.modulo.exec(b))!==null)o.push("%");else if((u=a.placeholder.exec(b))!==null){if(u[2]){d|=1;var w=[],A=u[2],_=[];if((_=a.key.exec(A))!==null)for(w.push(_[1]);(A=A.substring(_[0].length))!=="";)if((_=a.key_access.exec(A))!==null)w.push(_[1]);else if((_=a.index_access.exec(A))!==null)w.push(_[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");u[2]=w}else d|=2;if(d===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:u[0],param_no:u[1],keys:u[2],sign:u[3],pad_char:u[4],align:u[5],width:u[6],precision:u[7],type:u[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");b=b.substring(u[0].length)}return l[h]=o}p.sprintf=n,p.vsprintf=f,typeof window<"u"&&(window.sprintf=n,window.vsprintf=f,e=(function(){return{sprintf:n,vsprintf:f}}).call(p,r,p,v),e!==void 0&&(v.exports=e))})()},4162:function(v,p,r){v.exports=m;var e=r(9284),a=r(9584),n={"2d":function(h,b,u){var o=h({order:b,scalarArguments:3,getters:u==="generic"?[0]:void 0,phase:function(w,A,_,y){return w>y|0},vertex:function(w,A,_,y,E,T,s,L,M,z,D,N,I){var k=(s<<0)+(L<<1)+(M<<2)+(z<<3)|0;if(!(k===0||k===15))switch(k){case 0:D.push([w-.5,A-.5]);break;case 1:D.push([w-.25-.25*(y+_-2*I)/(_-y),A-.25-.25*(E+_-2*I)/(_-E)]);break;case 2:D.push([w-.75-.25*(-y-_+2*I)/(y-_),A-.25-.25*(T+y-2*I)/(y-T)]);break;case 3:D.push([w-.5,A-.5-.5*(E+_+T+y-4*I)/(_-E+y-T)]);break;case 4:D.push([w-.25-.25*(T+E-2*I)/(E-T),A-.75-.25*(-E-_+2*I)/(E-_)]);break;case 5:D.push([w-.5-.5*(y+_+T+E-4*I)/(_-y+E-T),A-.5]);break;case 6:D.push([w-.5-.25*(-y-_+T+E)/(y-_+E-T),A-.5-.25*(-E-_+T+y)/(E-_+y-T)]);break;case 7:D.push([w-.75-.25*(T+E-2*I)/(E-T),A-.75-.25*(T+y-2*I)/(y-T)]);break;case 8:D.push([w-.75-.25*(-T-E+2*I)/(T-E),A-.75-.25*(-T-y+2*I)/(T-y)]);break;case 9:D.push([w-.5-.25*(y+_+-T-E)/(_-y+T-E),A-.5-.25*(E+_+-T-y)/(_-E+T-y)]);break;case 10:D.push([w-.5-.5*(-y-_+-T-E+4*I)/(y-_+T-E),A-.5]);break;case 11:D.push([w-.25-.25*(-T-E+2*I)/(T-E),A-.75-.25*(E+_-2*I)/(_-E)]);break;case 12:D.push([w-.5,A-.5-.5*(-E-_+-T-y+4*I)/(E-_+T-y)]);break;case 13:D.push([w-.75-.25*(y+_-2*I)/(_-y),A-.25-.25*(-T-y+2*I)/(T-y)]);break;case 14:D.push([w-.25-.25*(-y-_+2*I)/(y-_),A-.25-.25*(-E-_+2*I)/(E-_)]);break;case 15:D.push([w-.5,A-.5]);break}},cell:function(w,A,_,y,E,T,s,L,M){E?L.push([w,A]):L.push([A,w])}});return function(d,w){var A=[],_=[];return o(d,A,_,w),{positions:A,cells:_}}}};function f(h,b){var u=h.length+"d",o=n[u];if(o)return o(e,h,b)}function c(h,b){for(var u=a(h,b),o=u.length,d=new Array(o),w=new Array(o),A=0;A0&&(_+=.02);for(var E=new Float32Array(A),T=0,s=-.5*_,y=0;yMath.max(y,E)?T[2]=1:y>Math.max(_,E)?T[0]=1:T[1]=1;for(var s=0,L=0,M=0;M<3;++M)s+=A[M]*A[M],L+=T[M]*A[M];for(var M=0;M<3;++M)T[M]-=L/s*A[M];return c(T,T),T}function u(A,_,y,E,T,s,L,M){this.center=e(y),this.up=e(E),this.right=e(T),this.radius=e([s]),this.angle=e([L,M]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,_),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var o=u.prototype;o.setDistanceLimits=function(A,_){A>0?A=Math.log(A):A=-1/0,_>0?_=Math.log(_):_=1/0,_=Math.max(_,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=_},o.getDistanceLimits=function(A){var _=this.radius.bounds[0];return A?(A[0]=Math.exp(_[0][0]),A[1]=Math.exp(_[1][0]),A):[Math.exp(_[0][0]),Math.exp(_[1][0])]},o.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var _=this.computedUp,y=this.computedRight,E=0,T=0,s=0;s<3;++s)T+=_[s]*y[s],E+=_[s]*_[s];for(var L=Math.sqrt(E),M=0,s=0;s<3;++s)y[s]-=_[s]*T/E,M+=y[s]*y[s],_[s]/=L;for(var z=Math.sqrt(M),s=0;s<3;++s)y[s]/=z;var D=this.computedToward;f(D,_,y),c(D,D);for(var N=Math.exp(this.computedRadius[0]),I=this.computedAngle[0],k=this.computedAngle[1],B=Math.cos(I),O=Math.sin(I),H=Math.cos(k),Y=Math.sin(k),j=this.computedCenter,et=B*H,it=O*H,ut=Y,J=-B*Y,X=-O*Y,tt=H,V=this.computedEye,Q=this.computedMatrix,s=0;s<3;++s){var ot=et*y[s]+it*D[s]+ut*_[s];Q[4*s+1]=J*y[s]+X*D[s]+tt*_[s],Q[4*s+2]=ot,Q[4*s+3]=0}var $=Q[1],Z=Q[5],st=Q[9],nt=Q[2],ct=Q[6],gt=Q[10],Tt=Z*gt-st*ct,wt=st*nt-$*gt,Rt=$*ct-Z*nt,bt=m(Tt,wt,Rt);Tt/=bt,wt/=bt,Rt/=bt,Q[0]=Tt,Q[4]=wt,Q[8]=Rt;for(var s=0;s<3;++s)V[s]=j[s]+Q[2+4*s]*N;for(var s=0;s<3;++s){for(var M=0,At=0;At<3;++At)M+=Q[s+4*At]*V[At];Q[12+s]=-M}Q[15]=1},o.getMatrix=function(A,_){this.recalcMatrix(A);var y=this.computedMatrix;if(_){for(var E=0;E<16;++E)_[E]=y[E];return _}return y};var d=[0,0,0];o.rotate=function(A,_,y,E){if(this.angle.move(A,_,y),E){this.recalcMatrix(A);var T=this.computedMatrix;d[0]=T[2],d[1]=T[6],d[2]=T[10];for(var s=this.computedUp,L=this.computedRight,M=this.computedToward,z=0;z<3;++z)T[4*z]=s[z],T[4*z+1]=L[z],T[4*z+2]=M[z];n(T,T,E,d);for(var z=0;z<3;++z)s[z]=T[4*z],L[z]=T[4*z+1];this.up.set(A,s[0],s[1],s[2]),this.right.set(A,L[0],L[1],L[2])}},o.pan=function(A,_,y,E){_=_||0,y=y||0,E=E||0,this.recalcMatrix(A);var T=this.computedMatrix;Math.exp(this.computedRadius[0]);var s=T[1],L=T[5],M=T[9],z=m(s,L,M);s/=z,L/=z,M/=z;var D=T[0],N=T[4],I=T[8],k=D*s+N*L+I*M;D-=s*k,N-=L*k,I-=M*k;var B=m(D,N,I);D/=B,N/=B,I/=B;var O=D*_+s*y,H=N*_+L*y,Y=I*_+M*y;this.center.move(A,O,H,Y);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+E),this.radius.set(A,Math.log(j))},o.translate=function(A,_,y,E){this.center.move(A,_||0,y||0,E||0)},o.setMatrix=function(A,_,y,E){var T=1;typeof y=="number"&&(T=y|0),(T<0||T>3)&&(T=1);var s=(T+2)%3;_||(this.recalcMatrix(A),_=this.computedMatrix);var L=_[T],M=_[T+4],z=_[T+8];if(E){var N=Math.abs(L),I=Math.abs(M),k=Math.abs(z),B=Math.max(N,I,k);N===B?(L=L<0?-1:1,M=z=0):k===B?(z=z<0?-1:1,L=M=0):(M=M<0?-1:1,L=z=0)}else{var D=m(L,M,z);L/=D,M/=D,z/=D}var O=_[s],H=_[s+4],Y=_[s+8],j=O*L+H*M+Y*z;O-=L*j,H-=M*j,Y-=z*j;var et=m(O,H,Y);O/=et,H/=et,Y/=et;var it=M*Y-z*H,ut=z*O-L*Y,J=L*H-M*O,X=m(it,ut,J);it/=X,ut/=X,J/=X,this.center.jump(A,Ut,kt,Vt),this.radius.idle(A),this.up.jump(A,L,M,z),this.right.jump(A,O,H,Y);var tt,V;if(T===2){var Q=_[1],ot=_[5],$=_[9],Z=Q*O+ot*H+$*Y,st=Q*it+ot*ut+$*J;Tt<0?tt=-Math.PI/2:tt=Math.PI/2,V=Math.atan2(st,Z)}else{var nt=_[2],ct=_[6],gt=_[10],Tt=nt*L+ct*M+gt*z,wt=nt*O+ct*H+gt*Y,Rt=nt*it+ct*ut+gt*J;tt=Math.asin(h(Tt)),V=Math.atan2(Rt,wt)}this.angle.jump(A,V,tt),this.recalcMatrix(A);var bt=_[2],At=_[6],mt=_[10],Lt=this.computedMatrix;a(Lt,_);var Ht=Lt[15],Ut=Lt[12]/Ht,kt=Lt[13]/Ht,Vt=Lt[14]/Ht,It=Math.exp(this.computedRadius[0]);this.center.jump(A,Ut-bt*It,kt-At*It,Vt-mt*It)},o.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},o.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},o.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},o.setDistance=function(A,_){_>0&&this.radius.set(A,Math.log(_))},o.lookAt=function(A,_,y,E){this.recalcMatrix(A),_=_||this.computedEye,y=y||this.computedCenter,E=E||this.computedUp;var T=E[0],s=E[1],L=E[2],M=m(T,s,L);if(!(M<1e-6)){T/=M,s/=M,L/=M;var z=_[0]-y[0],D=_[1]-y[1],N=_[2]-y[2],I=m(z,D,N);if(!(I<1e-6)){z/=I,D/=I,N/=I;var k=this.computedRight,B=k[0],O=k[1],H=k[2],Y=T*B+s*O+L*H;B-=Y*T,O-=Y*s,H-=Y*L;var j=m(B,O,H);if(!(j<.01&&(B=s*N-L*D,O=L*z-T*N,H=T*D-s*z,j=m(B,O,H),j<1e-6))){B/=j,O/=j,H/=j,this.up.set(A,T,s,L),this.right.set(A,B,O,H),this.center.set(A,y[0],y[1],y[2]),this.radius.set(A,Math.log(I));var et=s*H-L*O,it=L*B-T*H,ut=T*O-s*B,J=m(et,it,ut);et/=J,it/=J,ut/=J;var X=T*z+s*D+L*N,tt=B*z+O*D+H*N,V=et*z+it*D+ut*N,Q=Math.asin(h(X)),ot=Math.atan2(V,tt),$=this.angle._state,Z=$[$.length-1],st=$[$.length-2];Z=Z%(2*Math.PI);var nt=Math.abs(Z+2*Math.PI-ot),ct=Math.abs(Z-ot),gt=Math.abs(Z-2*Math.PI-ot);nt0?H.pop():new ArrayBuffer(B)}p.mallocArrayBuffer=d;function w(k){return new Uint8Array(d(k),0,k)}p.mallocUint8=w;function A(k){return new Uint16Array(d(2*k),0,k)}p.mallocUint16=A;function _(k){return new Uint32Array(d(4*k),0,k)}p.mallocUint32=_;function y(k){return new Int8Array(d(k),0,k)}p.mallocInt8=y;function E(k){return new Int16Array(d(2*k),0,k)}p.mallocInt16=E;function T(k){return new Int32Array(d(4*k),0,k)}p.mallocInt32=T;function s(k){return new Float32Array(d(4*k),0,k)}p.mallocFloat32=p.mallocFloat=s;function L(k){return new Float64Array(d(8*k),0,k)}p.mallocFloat64=p.mallocDouble=L;function M(k){return f?new Uint8ClampedArray(d(k),0,k):w(k)}p.mallocUint8Clamped=M;function z(k){return c?new BigUint64Array(d(8*k),0,k):null}p.mallocBigUint64=z;function D(k){return l?new BigInt64Array(d(8*k),0,k):null}p.mallocBigInt64=D;function N(k){return new DataView(d(k),0,k)}p.mallocDataView=N;function I(k){k=e.nextPow2(k);var B=e.log2(k),O=b[B];return O.length>0?O.pop():new n(k)}p.mallocBuffer=I,p.clearCache=function(){for(var B=0;B<32;++B)m.UINT8[B].length=0,m.UINT16[B].length=0,m.UINT32[B].length=0,m.INT8[B].length=0,m.INT16[B].length=0,m.INT32[B].length=0,m.FLOAT[B].length=0,m.DOUBLE[B].length=0,m.BIGUINT64[B].length=0,m.BIGINT64[B].length=0,m.UINT8C[B].length=0,h[B].length=0,b[B].length=0}},1731:function(v){"use restrict";v.exports=p;function p(e){this.roots=new Array(e),this.ranks=new Array(e);for(var a=0;a",H="",Y=O.length,j=H.length,et=I[0]===d||I[0]===_,it=0,ut=-j;it>-1&&(it=k.indexOf(O,it),!(it===-1||(ut=k.indexOf(H,it+Y),ut===-1)||ut<=it));){for(var J=it;J=ut)B[J]=null,k=k.substr(0,J)+" "+k.substr(J+1);else if(B[J]!==null){var X=B[J].indexOf(I[0]);X===-1?B[J]+=I:et&&(B[J]=B[J].substr(0,X+1)+(1+parseInt(B[J][X+1]))+B[J].substr(X+2))}var tt=it+Y,V=k.substr(tt,ut-tt),Q=V.indexOf(O);Q!==-1?it=Q:it=ut+j}return B}function T(N,I,k){for(var B=I.textAlign||"start",O=I.textBaseline||"alphabetic",H=[1<<30,1<<30],Y=[0,0],j=N.length,et=0;et/g,` +`):k=k.replace(/\/g," ");var Y="",j=[];for(Z=0;Z-1?parseInt(Vt[1+Kt]):0,he=$t>-1?parseInt(It[1+$t]):0;le!==he&&(re=re.replace(Rt(),"?px "),ct*=Math.pow(.75,he-le),re=re.replace("?px ",Rt())),nt+=.25*X*(he-le)}if(H.superscripts===!0){var de=Vt.indexOf(d),xe=It.indexOf(d),Se=de>-1?parseInt(Vt[1+de]):0,ne=xe>-1?parseInt(It[1+xe]):0;Se!==ne&&(re=re.replace(Rt(),"?px "),ct*=Math.pow(.75,ne-Se),re=re.replace("?px ",Rt())),nt-=.25*X*(ne-Se)}if(H.bolds===!0){var zt=Vt.indexOf(h)>-1,Xt=It.indexOf(h)>-1;!zt&&Xt&&(Jt?re=re.replace("italic ","italic bold "):re="bold "+re),zt&&!Xt&&(re=re.replace("bold ",""))}if(H.italics===!0){var Jt=Vt.indexOf(u)>-1,Wt=It.indexOf(u)>-1;!Jt&&Wt&&(re="italic "+re),Jt&&!Wt&&(re=re.replace("italic ",""))}I.font=re}for($=0;$0&&(O=B.size),B.lineSpacing&&B.lineSpacing>0&&(H=B.lineSpacing),B.styletags&&B.styletags.breaklines&&(Y.breaklines=!!B.styletags.breaklines),B.styletags&&B.styletags.bolds&&(Y.bolds=!!B.styletags.bolds),B.styletags&&B.styletags.italics&&(Y.italics=!!B.styletags.italics),B.styletags&&B.styletags.subscripts&&(Y.subscripts=!!B.styletags.subscripts),B.styletags&&B.styletags.superscripts&&(Y.superscripts=!!B.styletags.superscripts)),k.font=[B.fontStyle,B.fontVariant,B.fontWeight,O+"px",B.font].filter(function(et){return et}).join(" "),k.textAlign="start",k.textBaseline="alphabetic",k.direction="ltr";var j=s(I,k,N,O,H,Y);return z(j,B,O)}},5346:function(v){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(L){L.permitHostObjects___&&L.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var e=!1;if(typeof WeakMap=="function"){var a=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new a,f=Object.freeze({});if(n.set(f,1),n.get(f)!==1)e=!0;else{v.exports=WeakMap;return}}}var c=Object.getOwnPropertyNames,l=Object.defineProperty,m=Object.isExtensible,h="weakmap:",b=h+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var u=new ArrayBuffer(25),o=new Uint8Array(u);crypto.getRandomValues(o),b=h+"rand:"+Array.prototype.map.call(o,function(L){return(L%36).toString(36)}).join("")+"___"}function d(L){return!(L.substr(0,h.length)==h&&L.substr(L.length-3)==="___")}if(l(Object,"getOwnPropertyNames",{value:function(M){return c(M).filter(d)}}),"getPropertyNames"in Object){var w=Object.getPropertyNames;l(Object,"getPropertyNames",{value:function(M){return w(M).filter(d)}})}function A(L){if(L!==Object(L))throw new TypeError("Not an object: "+L);var M=L[b];if(M&&M.key===L)return M;if(m(L)){M={key:L};try{return l(L,b,{value:M,writable:!1,enumerable:!1,configurable:!1}),M}catch{return}}}(function(){var L=Object.freeze;l(Object,"freeze",{value:function(N){return A(N),L(N)}});var M=Object.seal;l(Object,"seal",{value:function(N){return A(N),M(N)}});var z=Object.preventExtensions;l(Object,"preventExtensions",{value:function(N){return A(N),z(N)}})})();function _(L){return L.prototype=null,Object.freeze(L)}var y=!1;function E(){!y&&typeof console<"u"&&(y=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var T=0,s=function(){this instanceof s||E();var L=[],M=[],z=T++;function D(B,O){var H,Y=A(B);return Y?z in Y?Y[z]:O:(H=L.indexOf(B),H>=0?M[H]:O)}function N(B){var O=A(B);return O?z in O:L.indexOf(B)>=0}function I(B,O){var H,Y=A(B);return Y?Y[z]=O:(H=L.indexOf(B),H>=0?M[H]=O:(H=L.length,M[H]=O,L[H]=B)),this}function k(B){var O=A(B),H,Y;return O?z in O&&delete O[z]:(H=L.indexOf(B),H<0?!1:(Y=L.length-1,L[H]=void 0,M[H]=M[Y],L[H]=L[Y],L.length=Y,M.length=Y,!0))}return Object.create(s.prototype,{get___:{value:_(D)},has___:{value:_(N)},set___:{value:_(I)},delete___:{value:_(k)}})};s.prototype=Object.create(Object.prototype,{get:{value:function(M,z){return this.get___(M,z)},writable:!0,configurable:!0},has:{value:function(M){return this.has___(M)},writable:!0,configurable:!0},set:{value:function(M,z){return this.set___(M,z)},writable:!0,configurable:!0},delete:{value:function(M){return this.delete___(M)},writable:!0,configurable:!0}}),typeof a=="function"?function(){e&&typeof Proxy<"u"&&(Proxy=void 0);function L(){this instanceof s||E();var M=new a,z=void 0,D=!1;function N(O,H){return z?M.has(O)?M.get(O):z.get___(O,H):M.get(O,H)}function I(O){return M.has(O)||(z?z.has___(O):!1)}var k;e?k=function(O,H){return M.set(O,H),M.has(O)||(z||(z=new s),z.set(O,H)),this}:k=function(O,H){if(D)try{M.set(O,H)}catch{z||(z=new s),z.set___(O,H)}else M.set(O,H);return this};function B(O){var H=!!M.delete(O);return z&&z.delete___(O)||H}return Object.create(s.prototype,{get___:{value:_(N)},has___:{value:_(I)},set___:{value:_(k)},delete___:{value:_(B)},permitHostObjects___:{value:_(function(O){if(O===r)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}L.prototype=s.prototype,v.exports=L,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),v.exports=s)})()},9222:function(v,p,r){var e=r(7178);v.exports=a;function a(){var n={};return function(f){if((typeof f!="object"||f===null)&&typeof f!="function")throw new Error("Weakmap-shim: Key must be object");var c=f.valueOf(n);return c&&c.identity===n?c:e(f,n)}}},7178:function(v){v.exports=p;function p(r,e){var a={identity:e},n=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(f){return f!==e?n.apply(this,arguments):a},writable:!0}),a}},4037:function(v,p,r){var e=r(9222);v.exports=a;function a(){var n=e();return{get:function(f,c){var l=n(f);return l.hasOwnProperty("value")?l.value:c},set:function(f,c){return n(f).value=c,this},has:function(f){return"value"in n(f)},delete:function(f){return delete n(f).value}}}},6183:function(v){function p(){return function(c,l,m,h,b,u){var o=c[0],d=m[0],w=[0],A=d;h|=0;var _=0,y=d;for(_=0;_=0!=T>=0&&b.push(w[0]+.5+.5*(E+T)/(E-T))}h+=y,++w[0]}}}function r(){return p()}var e=r;function a(c){var l={};return function(h,b,u){var o=h.dtype,d=h.order,w=[o,d.join()].join(),A=l[w];return A||(l[w]=A=c([o,d])),A(h.shape.slice(0),h.data,h.stride,h.offset|0,b,u)}}function n(c){return a(e.bind(void 0,c))}function f(c){return n({funcName:c.funcName})}v.exports=f({funcName:"zeroCrossings"})},9584:function(v,p,r){v.exports=a;var e=r(6183);function a(n,f){var c=[];return f=+f||0,e(n.hi(n.shape[0]-1),c,f),c}},6601:function(){}},i={};function S(v){var p=i[v];if(p!==void 0)return p.exports;var r=i[v]={id:v,loaded:!1,exports:{}};return C[v].call(r.exports,r,r.exports,S),r.loaded=!0,r.exports}(function(){S.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){S.nmd=function(v){return v.paths=[],v.children||(v.children=[]),v}}();var x=S(7386);return x}()})},33576:function(G,U,t){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */function g(nt,ze){if(!(nt instanceof ze))throw new TypeError("Cannot call a class as a function")}function C(nt,ze){for(var Ze=0;Ze"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{return!1}}return ze=r(ze),p(nt,Je()?Reflect.construct(ze,Ze||[],r(nt).constructor):ze.apply(nt,Ze))}function p(nt,ze){if(ze&&(f(ze)==="object"||typeof ze=="function"))return ze;if(ze!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t(nt)}function r(nt){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ze){return Ze.__proto__||Object.getPrototypeOf(Ze)},r(nt)}function t(nt){if(nt===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return nt}function a(nt,ze){if(typeof ze!="function"&&ze!==null)throw new TypeError("Super expression must either be null or a function");nt.prototype=Object.create(ze&&ze.prototype,{constructor:{value:nt,writable:!0,configurable:!0}}),Object.defineProperty(nt,"prototype",{writable:!1}),ze&&n(nt,ze)}function n(nt,ze){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Je,We){return Je.__proto__=We,Je},n(nt,ze)}function f(nt){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ze){return typeof ze}:function(ze){return ze&&typeof Symbol=="function"&&ze.constructor===Symbol&&ze!==Symbol.prototype?"symbol":typeof ze},f(nt)}var c=e(59968),l=e(35984),m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;U.Buffer=o,U.SlowBuffer=z,U.INSPECT_MAX_BYTES=50;var h=2147483647;U.kMaxLength=h,o.TYPED_ARRAY_SUPPORT=b(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function b(){try{var nt=new Uint8Array(1),ze={foo:function(){return 42}};return Object.setPrototypeOf(ze,Uint8Array.prototype),Object.setPrototypeOf(nt,ze),nt.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function u(nt){if(nt>h)throw new RangeError('The value "'+nt+'" is invalid for option "size"');var ze=new Uint8Array(nt);return Object.setPrototypeOf(ze,o.prototype),ze}function o(nt,ze,Ze){if(typeof nt=="number"){if(typeof ze=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(nt)}return d(nt,ze,Ze)}o.poolSize=8192;function d(nt,ze,Ze){if(typeof nt=="string")return y(nt,ze);if(ArrayBuffer.isView(nt))return T(nt);if(nt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+f(nt));if(lt(nt,ArrayBuffer)||nt&<(nt.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(lt(nt,SharedArrayBuffer)||nt&<(nt.buffer,SharedArrayBuffer)))return s(nt,ze,Ze);if(typeof nt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Je=nt.valueOf&&nt.valueOf();if(Je!=null&&Je!==nt)return o.from(Je,ze,Ze);var We=L(nt);if(We)return We;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof nt[Symbol.toPrimitive]=="function")return o.from(nt[Symbol.toPrimitive]("string"),ze,Ze);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+f(nt))}o.from=function(nt,ze,Ze){return d(nt,ze,Ze)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function w(nt){if(typeof nt!="number")throw new TypeError('"size" argument must be of type number');if(nt<0)throw new RangeError('The value "'+nt+'" is invalid for option "size"')}function A(nt,ze,Ze){return w(nt),nt<=0?u(nt):ze!==void 0?typeof Ze=="string"?u(nt).fill(ze,Ze):u(nt).fill(ze):u(nt)}o.alloc=function(nt,ze,Ze){return A(nt,ze,Ze)};function _(nt){return w(nt),u(nt<0?0:M(nt)|0)}o.allocUnsafe=function(nt){return _(nt)},o.allocUnsafeSlow=function(nt){return _(nt)};function y(nt,ze){if((typeof ze!="string"||ze==="")&&(ze="utf8"),!o.isEncoding(ze))throw new TypeError("Unknown encoding: "+ze);var Ze=D(nt,ze)|0,Je=u(Ze),We=Je.write(nt,ze);return We!==Ze&&(Je=Je.slice(0,We)),Je}function E(nt){for(var ze=nt.length<0?0:M(nt.length)|0,Ze=u(ze),Je=0;Je=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return nt|0}function z(nt){return+nt!=nt&&(nt=0),o.alloc(+nt)}o.isBuffer=function(ze){return ze!=null&&ze._isBuffer===!0&&ze!==o.prototype},o.compare=function(ze,Ze){if(lt(ze,Uint8Array)&&(ze=o.from(ze,ze.offset,ze.byteLength)),lt(Ze,Uint8Array)&&(Ze=o.from(Ze,Ze.offset,Ze.byteLength)),!o.isBuffer(ze)||!o.isBuffer(Ze))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ze===Ze)return 0;for(var Je=ze.length,We=Ze.length,Fe=0,xe=Math.min(Je,We);FeWe.length?(o.isBuffer(xe)||(xe=o.from(xe)),xe.copy(We,Fe)):Uint8Array.prototype.set.call(We,xe,Fe);else if(o.isBuffer(xe))xe.copy(We,Fe);else throw new TypeError('"list" argument must be an Array of Buffers');Fe+=xe.length}return We};function D(nt,ze){if(o.isBuffer(nt))return nt.length;if(ArrayBuffer.isView(nt)||lt(nt,ArrayBuffer))return nt.byteLength;if(typeof nt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+f(nt));var Ze=nt.length,Je=arguments.length>2&&arguments[2]===!0;if(!Je&&Ze===0)return 0;for(var We=!1;;)switch(ze){case"ascii":case"latin1":case"binary":return Ze;case"utf8":case"utf-8":return He(nt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ze*2;case"hex":return Ze>>>1;case"base64":return Ke(nt).length;default:if(We)return Je?-1:He(nt).length;ze=(""+ze).toLowerCase(),We=!0}}o.byteLength=D;function N(nt,ze,Ze){var Je=!1;if((ze===void 0||ze<0)&&(ze=0),ze>this.length||((Ze===void 0||Ze>this.length)&&(Ze=this.length),Ze<=0)||(Ze>>>=0,ze>>>=0,Ze<=ze))return"";for(nt||(nt="utf8");;)switch(nt){case"hex":return Q(this,ze,Ze);case"utf8":case"utf-8":return ue(this,ze,Ze);case"ascii":return ee(this,ze,Ze);case"latin1":case"binary":return G(this,ze,Ze);case"base64":return ie(this,ze,Ze);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,ze,Ze);default:if(Je)throw new TypeError("Unknown encoding: "+nt);nt=(nt+"").toLowerCase(),Je=!0}}o.prototype._isBuffer=!0;function I(nt,ze,Ze){var Je=nt[ze];nt[ze]=nt[Ze],nt[Ze]=Je}o.prototype.swap16=function(){var ze=this.length;if(ze%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ze=0;ZeZe&&(ze+=" ... "),""},m&&(o.prototype[m]=o.prototype.inspect),o.prototype.compare=function(ze,Ze,Je,We,Fe){if(lt(ze,Uint8Array)&&(ze=o.from(ze,ze.offset,ze.byteLength)),!o.isBuffer(ze))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+f(ze));if(Ze===void 0&&(Ze=0),Je===void 0&&(Je=ze?ze.length:0),We===void 0&&(We=0),Fe===void 0&&(Fe=this.length),Ze<0||Je>ze.length||We<0||Fe>this.length)throw new RangeError("out of range index");if(We>=Fe&&Ze>=Je)return 0;if(We>=Fe)return-1;if(Ze>=Je)return 1;if(Ze>>>=0,Je>>>=0,We>>>=0,Fe>>>=0,this===ze)return 0;for(var xe=Fe-We,ye=Je-Ze,Ee=Math.min(xe,ye),Me=this.slice(We,Fe),Ne=ze.slice(Ze,Je),je=0;je2147483647?Ze=2147483647:Ze<-2147483648&&(Ze=-2147483648),Ze=+Ze,ht(Ze)&&(Ze=We?0:nt.length-1),Ze<0&&(Ze=nt.length+Ze),Ze>=nt.length){if(We)return-1;Ze=nt.length-1}else if(Ze<0)if(We)Ze=0;else return-1;if(typeof ze=="string"&&(ze=o.from(ze,Je)),o.isBuffer(ze))return ze.length===0?-1:B(nt,ze,Ze,Je,We);if(typeof ze=="number")return ze=ze&255,typeof Uint8Array.prototype.indexOf=="function"?We?Uint8Array.prototype.indexOf.call(nt,ze,Ze):Uint8Array.prototype.lastIndexOf.call(nt,ze,Ze):B(nt,[ze],Ze,Je,We);throw new TypeError("val must be string, number or Buffer")}function B(nt,ze,Ze,Je,We){var Fe=1,xe=nt.length,ye=ze.length;if(Je!==void 0&&(Je=String(Je).toLowerCase(),Je==="ucs2"||Je==="ucs-2"||Je==="utf16le"||Je==="utf-16le")){if(nt.length<2||ze.length<2)return-1;Fe=2,xe/=2,ye/=2,Ze/=2}function Ee(mt,bt){return Fe===1?mt[bt]:mt.readUInt16BE(bt*Fe)}var Me;if(We){var Ne=-1;for(Me=Ze;Mexe&&(Ze=xe-ye),Me=Ze;Me>=0;Me--){for(var je=!0,it=0;itWe&&(Je=We)):Je=We;var Fe=ze.length;Je>Fe/2&&(Je=Fe/2);var xe;for(xe=0;xe>>0,isFinite(Je)?(Je=Je>>>0,We===void 0&&(We="utf8")):(We=Je,Je=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Fe=this.length-Ze;if((Je===void 0||Je>Fe)&&(Je=Fe),ze.length>0&&(Je<0||Ze<0)||Ze>this.length)throw new RangeError("Attempt to write outside buffer bounds");We||(We="utf8");for(var xe=!1;;)switch(We){case"hex":return O(this,ze,Ze,Je);case"utf8":case"utf-8":return V(this,ze,Ze,Je);case"ascii":case"latin1":case"binary":return Y(this,ze,Ze,Je);case"base64":return j(this,ze,Ze,Je);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,ze,Ze,Je);default:if(xe)throw new TypeError("Unknown encoding: "+We);We=(""+We).toLowerCase(),xe=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ie(nt,ze,Ze){return ze===0&&Ze===nt.length?c.fromByteArray(nt):c.fromByteArray(nt.slice(ze,Ze))}function ue(nt,ze,Ze){Ze=Math.min(nt.length,Ze);for(var Je=[],We=ze;We239?4:Fe>223?3:Fe>191?2:1;if(We+ye<=Ze){var Ee=void 0,Me=void 0,Ne=void 0,je=void 0;switch(ye){case 1:Fe<128&&(xe=Fe);break;case 2:Ee=nt[We+1],(Ee&192)===128&&(je=(Fe&31)<<6|Ee&63,je>127&&(xe=je));break;case 3:Ee=nt[We+1],Me=nt[We+2],(Ee&192)===128&&(Me&192)===128&&(je=(Fe&15)<<12|(Ee&63)<<6|Me&63,je>2047&&(je<55296||je>57343)&&(xe=je));break;case 4:Ee=nt[We+1],Me=nt[We+2],Ne=nt[We+3],(Ee&192)===128&&(Me&192)===128&&(Ne&192)===128&&(je=(Fe&15)<<18|(Ee&63)<<12|(Me&63)<<6|Ne&63,je>65535&&je<1114112&&(xe=je))}}xe===null?(xe=65533,ye=1):xe>65535&&(xe-=65536,Je.push(xe>>>10&1023|55296),xe=56320|xe&1023),Je.push(xe),We+=ye}return X(Je)}var J=4096;function X(nt){var ze=nt.length;if(ze<=J)return String.fromCharCode.apply(String,nt);for(var Ze="",Je=0;JeJe)&&(Ze=Je);for(var We="",Fe=ze;FeJe&&(ze=Je),Ze<0?(Ze+=Je,Ze<0&&(Ze=0)):Ze>Je&&(Ze=Je),ZeZe)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(ze,Ze,Je){ze=ze>>>0,Ze=Ze>>>0,Je||$(ze,Ze,this.length);for(var We=this[ze],Fe=1,xe=0;++xe>>0,Ze=Ze>>>0,Je||$(ze,Ze,this.length);for(var We=this[ze+--Ze],Fe=1;Ze>0&&(Fe*=256);)We+=this[ze+--Ze]*Fe;return We},o.prototype.readUint8=o.prototype.readUInt8=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,1,this.length),this[ze]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,2,this.length),this[ze]|this[ze+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,2,this.length),this[ze]<<8|this[ze+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,4,this.length),(this[ze]|this[ze+1]<<8|this[ze+2]<<16)+this[ze+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,4,this.length),this[ze]*16777216+(this[ze+1]<<16|this[ze+2]<<8|this[ze+3])},o.prototype.readBigUInt64LE=xt(function(ze){ze=ze>>>0,Le(ze,"offset");var Ze=this[ze],Je=this[ze+7];(Ze===void 0||Je===void 0)&&Ve(ze,this.length-8);var We=Ze+this[++ze]*Math.pow(2,8)+this[++ze]*Math.pow(2,16)+this[++ze]*Math.pow(2,24),Fe=this[++ze]+this[++ze]*Math.pow(2,8)+this[++ze]*Math.pow(2,16)+Je*Math.pow(2,24);return BigInt(We)+(BigInt(Fe)<>>0,Le(ze,"offset");var Ze=this[ze],Je=this[ze+7];(Ze===void 0||Je===void 0)&&Ve(ze,this.length-8);var We=Ze*Math.pow(2,24)+this[++ze]*Math.pow(2,16)+this[++ze]*Math.pow(2,8)+this[++ze],Fe=this[++ze]*Math.pow(2,24)+this[++ze]*Math.pow(2,16)+this[++ze]*Math.pow(2,8)+Je;return(BigInt(We)<>>0,Ze=Ze>>>0,Je||$(ze,Ze,this.length);for(var We=this[ze],Fe=1,xe=0;++xe=Fe&&(We-=Math.pow(2,8*Ze)),We},o.prototype.readIntBE=function(ze,Ze,Je){ze=ze>>>0,Ze=Ze>>>0,Je||$(ze,Ze,this.length);for(var We=Ze,Fe=1,xe=this[ze+--We];We>0&&(Fe*=256);)xe+=this[ze+--We]*Fe;return Fe*=128,xe>=Fe&&(xe-=Math.pow(2,8*Ze)),xe},o.prototype.readInt8=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,1,this.length),this[ze]&128?(255-this[ze]+1)*-1:this[ze]},o.prototype.readInt16LE=function(ze,Ze){ze=ze>>>0,Ze||$(ze,2,this.length);var Je=this[ze]|this[ze+1]<<8;return Je&32768?Je|4294901760:Je},o.prototype.readInt16BE=function(ze,Ze){ze=ze>>>0,Ze||$(ze,2,this.length);var Je=this[ze+1]|this[ze]<<8;return Je&32768?Je|4294901760:Je},o.prototype.readInt32LE=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,4,this.length),this[ze]|this[ze+1]<<8|this[ze+2]<<16|this[ze+3]<<24},o.prototype.readInt32BE=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,4,this.length),this[ze]<<24|this[ze+1]<<16|this[ze+2]<<8|this[ze+3]},o.prototype.readBigInt64LE=xt(function(ze){ze=ze>>>0,Le(ze,"offset");var Ze=this[ze],Je=this[ze+7];(Ze===void 0||Je===void 0)&&Ve(ze,this.length-8);var We=this[ze+4]+this[ze+5]*Math.pow(2,8)+this[ze+6]*Math.pow(2,16)+(Je<<24);return(BigInt(We)<>>0,Le(ze,"offset");var Ze=this[ze],Je=this[ze+7];(Ze===void 0||Je===void 0)&&Ve(ze,this.length-8);var We=(Ze<<24)+this[++ze]*Math.pow(2,16)+this[++ze]*Math.pow(2,8)+this[++ze];return(BigInt(We)<>>0,Ze||$(ze,4,this.length),l.read(this,ze,!0,23,4)},o.prototype.readFloatBE=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,4,this.length),l.read(this,ze,!1,23,4)},o.prototype.readDoubleLE=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,8,this.length),l.read(this,ze,!0,52,8)},o.prototype.readDoubleBE=function(ze,Ze){return ze=ze>>>0,Ze||$(ze,8,this.length),l.read(this,ze,!1,52,8)};function Z(nt,ze,Ze,Je,We,Fe){if(!o.isBuffer(nt))throw new TypeError('"buffer" argument must be a Buffer instance');if(ze>We||zent.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(ze,Ze,Je,We){if(ze=+ze,Ze=Ze>>>0,Je=Je>>>0,!We){var Fe=Math.pow(2,8*Je)-1;Z(this,ze,Ze,Je,Fe,0)}var xe=1,ye=0;for(this[Ze]=ze&255;++ye>>0,Je=Je>>>0,!We){var Fe=Math.pow(2,8*Je)-1;Z(this,ze,Ze,Je,Fe,0)}var xe=Je-1,ye=1;for(this[Ze+xe]=ze&255;--xe>=0&&(ye*=256);)this[Ze+xe]=ze/ye&255;return Ze+Je},o.prototype.writeUint8=o.prototype.writeUInt8=function(ze,Ze,Je){return ze=+ze,Ze=Ze>>>0,Je||Z(this,ze,Ze,1,255,0),this[Ze]=ze&255,Ze+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(ze,Ze,Je){return ze=+ze,Ze=Ze>>>0,Je||Z(this,ze,Ze,2,65535,0),this[Ze]=ze&255,this[Ze+1]=ze>>>8,Ze+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(ze,Ze,Je){return ze=+ze,Ze=Ze>>>0,Je||Z(this,ze,Ze,2,65535,0),this[Ze]=ze>>>8,this[Ze+1]=ze&255,Ze+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(ze,Ze,Je){return ze=+ze,Ze=Ze>>>0,Je||Z(this,ze,Ze,4,4294967295,0),this[Ze+3]=ze>>>24,this[Ze+2]=ze>>>16,this[Ze+1]=ze>>>8,this[Ze]=ze&255,Ze+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(ze,Ze,Je){return ze=+ze,Ze=Ze>>>0,Je||Z(this,ze,Ze,4,4294967295,0),this[Ze]=ze>>>24,this[Ze+1]=ze>>>16,this[Ze+2]=ze>>>8,this[Ze+3]=ze&255,Ze+4};function se(nt,ze,Ze,Je,We){me(ze,Je,We,nt,Ze,7);var Fe=Number(ze&BigInt(4294967295));nt[Ze++]=Fe,Fe=Fe>>8,nt[Ze++]=Fe,Fe=Fe>>8,nt[Ze++]=Fe,Fe=Fe>>8,nt[Ze++]=Fe;var xe=Number(ze>>BigInt(32)&BigInt(4294967295));return nt[Ze++]=xe,xe=xe>>8,nt[Ze++]=xe,xe=xe>>8,nt[Ze++]=xe,xe=xe>>8,nt[Ze++]=xe,Ze}function ne(nt,ze,Ze,Je,We){me(ze,Je,We,nt,Ze,7);var Fe=Number(ze&BigInt(4294967295));nt[Ze+7]=Fe,Fe=Fe>>8,nt[Ze+6]=Fe,Fe=Fe>>8,nt[Ze+5]=Fe,Fe=Fe>>8,nt[Ze+4]=Fe;var xe=Number(ze>>BigInt(32)&BigInt(4294967295));return nt[Ze+3]=xe,xe=xe>>8,nt[Ze+2]=xe,xe=xe>>8,nt[Ze+1]=xe,xe=xe>>8,nt[Ze]=xe,Ze+8}o.prototype.writeBigUInt64LE=xt(function(ze){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return se(this,ze,Ze,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=xt(function(ze){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ne(this,ze,Ze,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(ze,Ze,Je,We){if(ze=+ze,Ze=Ze>>>0,!We){var Fe=Math.pow(2,8*Je-1);Z(this,ze,Ze,Je,Fe-1,-Fe)}var xe=0,ye=1,Ee=0;for(this[Ze]=ze&255;++xe>0)-Ee&255;return Ze+Je},o.prototype.writeIntBE=function(ze,Ze,Je,We){if(ze=+ze,Ze=Ze>>>0,!We){var Fe=Math.pow(2,8*Je-1);Z(this,ze,Ze,Je,Fe-1,-Fe)}var xe=Je-1,ye=1,Ee=0;for(this[Ze+xe]=ze&255;--xe>=0&&(ye*=256);)ze<0&&Ee===0&&this[Ze+xe+1]!==0&&(Ee=1),this[Ze+xe]=(ze/ye>>0)-Ee&255;return Ze+Je},o.prototype.writeInt8=function(ze,Ze,Je){return ze=+ze,Ze=Ze>>>0,Je||Z(this,ze,Ze,1,127,-128),ze<0&&(ze=255+ze+1),this[Ze]=ze&255,Ze+1},o.prototype.writeInt16LE=function(ze,Ze,Je){return ze=+ze,Ze=Ze>>>0,Je||Z(this,ze,Ze,2,32767,-32768),this[Ze]=ze&255,this[Ze+1]=ze>>>8,Ze+2},o.prototype.writeInt16BE=function(ze,Ze,Je){return ze=+ze,Ze=Ze>>>0,Je||Z(this,ze,Ze,2,32767,-32768),this[Ze]=ze>>>8,this[Ze+1]=ze&255,Ze+2},o.prototype.writeInt32LE=function(ze,Ze,Je){return ze=+ze,Ze=Ze>>>0,Je||Z(this,ze,Ze,4,2147483647,-2147483648),this[Ze]=ze&255,this[Ze+1]=ze>>>8,this[Ze+2]=ze>>>16,this[Ze+3]=ze>>>24,Ze+4},o.prototype.writeInt32BE=function(ze,Ze,Je){return ze=+ze,Ze=Ze>>>0,Je||Z(this,ze,Ze,4,2147483647,-2147483648),ze<0&&(ze=4294967295+ze+1),this[Ze]=ze>>>24,this[Ze+1]=ze>>>16,this[Ze+2]=ze>>>8,this[Ze+3]=ze&255,Ze+4},o.prototype.writeBigInt64LE=xt(function(ze){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return se(this,ze,Ze,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=xt(function(ze){var Ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ne(this,ze,Ze,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ce(nt,ze,Ze,Je,We,Fe){if(Ze+Je>nt.length)throw new RangeError("Index out of range");if(Ze<0)throw new RangeError("Index out of range")}function ge(nt,ze,Ze,Je,We){return ze=+ze,Ze=Ze>>>0,We||ce(nt,ze,Ze,4),l.write(nt,ze,Ze,Je,23,4),Ze+4}o.prototype.writeFloatLE=function(ze,Ze,Je){return ge(this,ze,Ze,!0,Je)},o.prototype.writeFloatBE=function(ze,Ze,Je){return ge(this,ze,Ze,!1,Je)};function Te(nt,ze,Ze,Je,We){return ze=+ze,Ze=Ze>>>0,We||ce(nt,ze,Ze,8),l.write(nt,ze,Ze,Je,52,8),Ze+8}o.prototype.writeDoubleLE=function(ze,Ze,Je){return Te(this,ze,Ze,!0,Je)},o.prototype.writeDoubleBE=function(ze,Ze,Je){return Te(this,ze,Ze,!1,Je)},o.prototype.copy=function(ze,Ze,Je,We){if(!o.isBuffer(ze))throw new TypeError("argument should be a Buffer");if(Je||(Je=0),!We&&We!==0&&(We=this.length),Ze>=ze.length&&(Ze=ze.length),Ze||(Ze=0),We>0&&We=this.length)throw new RangeError("Index out of range");if(We<0)throw new RangeError("sourceEnd out of bounds");We>this.length&&(We=this.length),ze.length-Ze>>0,Je=Je===void 0?this.length:Je>>>0,ze||(ze=0);var xe;if(typeof ze=="number")for(xe=Ze;xeMath.pow(2,32)?We=be(String(Ze)):typeof Ze=="bigint"&&(We=String(Ze),(Ze>Math.pow(BigInt(2),BigInt(32))||Ze<-Math.pow(BigInt(2),BigInt(32)))&&(We=be(We)),We+="n"),Je+=" It must be ".concat(ze,". Received ").concat(We),Je},RangeError);function be(nt){for(var ze="",Ze=nt.length,Je=nt[0]==="-"?1:0;Ze>=Je+4;Ze-=3)ze="_".concat(nt.slice(Ze-3,Ze)).concat(ze);return"".concat(nt.slice(0,Ze)).concat(ze)}function Ae(nt,ze,Ze){Le(ze,"offset"),(nt[ze]===void 0||nt[ze+Ze]===void 0)&&Ve(ze,nt.length-(Ze+1))}function me(nt,ze,Ze,Je,We,Fe){if(nt>Ze||nt3?ze===0||ze===BigInt(0)?ye=">= 0".concat(xe," and < 2").concat(xe," ** ").concat((Fe+1)*8).concat(xe):ye=">= -(2".concat(xe," ** ").concat((Fe+1)*8-1).concat(xe,") and < 2 ** ")+"".concat((Fe+1)*8-1).concat(xe):ye=">= ".concat(ze).concat(xe," and <= ").concat(Ze).concat(xe),new we.ERR_OUT_OF_RANGE("value",ye,nt)}Ae(Je,We,Fe)}function Le(nt,ze){if(typeof nt!="number")throw new we.ERR_INVALID_ARG_TYPE(ze,"number",nt)}function Ve(nt,ze,Ze){throw Math.floor(nt)!==nt?(Le(nt,Ze),new we.ERR_OUT_OF_RANGE(Ze||"offset","an integer",nt)):ze<0?new we.ERR_BUFFER_OUT_OF_BOUNDS:new we.ERR_OUT_OF_RANGE(Ze||"offset",">= ".concat(Ze?1:0," and <= ").concat(ze),nt)}var Ue=/[^+/0-9A-Za-z-_]/g;function ke(nt){if(nt=nt.split("=")[0],nt=nt.trim().replace(Ue,""),nt.length<2)return"";for(;nt.length%4!==0;)nt=nt+"=";return nt}function He(nt,ze){ze=ze||1/0;for(var Ze,Je=nt.length,We=null,Fe=[],xe=0;xe55295&&Ze<57344){if(!We){if(Ze>56319){(ze-=3)>-1&&Fe.push(239,191,189);continue}else if(xe+1===Je){(ze-=3)>-1&&Fe.push(239,191,189);continue}We=Ze;continue}if(Ze<56320){(ze-=3)>-1&&Fe.push(239,191,189),We=Ze;continue}Ze=(We-55296<<10|Ze-56320)+65536}else We&&(ze-=3)>-1&&Fe.push(239,191,189);if(We=null,Ze<128){if((ze-=1)<0)break;Fe.push(Ze)}else if(Ze<2048){if((ze-=2)<0)break;Fe.push(Ze>>6|192,Ze&63|128)}else if(Ze<65536){if((ze-=3)<0)break;Fe.push(Ze>>12|224,Ze>>6&63|128,Ze&63|128)}else if(Ze<1114112){if((ze-=4)<0)break;Fe.push(Ze>>18|240,Ze>>12&63|128,Ze>>6&63|128,Ze&63|128)}else throw new Error("Invalid code point")}return Fe}function Ie(nt){for(var ze=[],Ze=0;Ze>8,We=Ze%256,Fe.push(We),Fe.push(Je);return Fe}function Ke(nt){return c.toByteArray(ke(nt))}function $e(nt,ze,Ze,Je){var We;for(We=0;We=ze.length||We>=nt.length);++We)ze[We+Ze]=nt[We];return We}function lt(nt,ze){return nt instanceof ze||nt!=null&&nt.constructor!=null&&nt.constructor.name!=null&&nt.constructor.name===ze.name}function ht(nt){return nt!==nt}var dt=function(){for(var nt="0123456789abcdef",ze=new Array(256),Ze=0;Ze<16;++Ze)for(var Je=Ze*16,We=0;We<16;++We)ze[Je+We]=nt[Ze]+nt[We];return ze}();function xt(nt){return typeof BigInt>"u"?St:nt}function St(){throw new Error("BigInt not supported")}},25928:function(H){H.exports=C,H.exports.isMobile=C,H.exports.default=C;var U=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,e=/CrOS/,g=/android|ipad|playbook|silk/i;function C(i){i||(i={});var S=i.ua;if(!S&&typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),typeof S!="string")return!1;var x=U.test(S)&&!e.test(S)||!!i.tablet&&g.test(S);return!x&&i.tablet&&i.featureDetect&&navigator&&navigator.maxTouchPoints>1&&S.indexOf("Macintosh")!==-1&&S.indexOf("Safari")!==-1&&(x=!0),x}},48932:function(H,U,e){e.r(U),e.d(U,{sankeyCenter:function(){return a},sankeyCircular:function(){return L},sankeyJustify:function(){return t},sankeyLeft:function(){return p},sankeyRight:function(){return r}});var g=e(84706),C=e(34712),i=e(10132),S=e(6688),x=e.n(S);function v(we){return we.target.depth}function p(we){return we.depth}function r(we,Re){return Re-1-we.height}function t(we,Re){return we.sourceLinks.length?we.depth:Re-1}function a(we){return we.targetLinks.length?we.depth:we.sourceLinks.length?(0,g.SY)(we.sourceLinks,v)-1:0}function n(we){return function(){return we}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(we){return typeof we}:function(we){return we&&typeof Symbol=="function"&&we.constructor===Symbol&&we!==Symbol.prototype?"symbol":typeof we};function c(we,Re){return m(we.source,Re.source)||we.index-Re.index}function l(we,Re){return m(we.target,Re.target)||we.index-Re.index}function m(we,Re){return we.partOfCycle===Re.partOfCycle?we.y0-Re.y0:we.circularLinkType==="top"||Re.circularLinkType==="bottom"?-1:1}function h(we){return we.value}function b(we){return(we.y0+we.y1)/2}function u(we){return b(we.source)}function o(we){return b(we.target)}function d(we){return we.index}function w(we){return we.nodes}function A(we){return we.links}function _(we,Re){var be=we.get(Re);if(!be)throw new Error("missing: "+Re);return be}function y(we,Re){return Re(we)}var E=25,T=10,s=.3;function L(){var we=0,Re=0,be=1,Ae=1,me=24,Le,Ve=d,Ue=t,ke=w,He=A,Ie=32,rt=2,Ke,$e=null;function lt(){var Je={nodes:ke.apply(null,arguments),links:He.apply(null,arguments)};ht(Je),M(Je,Ve,$e),dt(Je),nt(Je),z(Je,Ve),ze(Je,Ie,Ve),Ze(Je);for(var We=4,Fe=0;Fe"u"?"undefined":f(ye))!=="object"&&(ye=Fe.source=_(We,ye)),(typeof Ee>"u"?"undefined":f(Ee))!=="object"&&(Ee=Fe.target=_(We,Ee)),ye.sourceLinks.push(Fe),Ee.targetLinks.push(Fe)}),Je}function dt(Je){Je.nodes.forEach(function(We){We.partOfCycle=!1,We.value=Math.max((0,g.oh)(We.sourceLinks,h),(0,g.oh)(We.targetLinks,h)),We.sourceLinks.forEach(function(Fe){Fe.circular&&(We.partOfCycle=!0,We.circularLinkType=Fe.circularLinkType)}),We.targetLinks.forEach(function(Fe){Fe.circular&&(We.partOfCycle=!0,We.circularLinkType=Fe.circularLinkType)})})}function xt(Je){var We=0,Fe=0,xe=0,ye=0,Ee=(0,g.kv)(Je.nodes,function(Me){return Me.column});return Je.links.forEach(function(Me){Me.circular&&(Me.circularLinkType=="top"?We=We+Me.width:Fe=Fe+Me.width,Me.target.column==0&&(ye=ye+Me.width),Me.source.column==Ee&&(xe=xe+Me.width))}),We=We>0?We+E+T:We,Fe=Fe>0?Fe+E+T:Fe,xe=xe>0?xe+E+T:xe,ye=ye>0?ye+E+T:ye,{top:We,bottom:Fe,left:ye,right:xe}}function St(Je,We){var Fe=(0,g.kv)(Je.nodes,function(it){return it.column}),xe=be-we,ye=Ae-Re,Ee=xe+We.right+We.left,Me=ye+We.top+We.bottom,Ne=xe/Ee,je=ye/Me;return we=we*Ne+We.left,be=We.right==0?be:be*Ne,Re=Re*je+We.top,Ae=Ae*je,Je.nodes.forEach(function(it){it.x0=we+it.column*((be-we-me)/Fe),it.x1=it.x0+me}),je}function nt(Je){var We,Fe,xe;for(We=Je.nodes,Fe=[],xe=0;We.length;++xe,We=Fe,Fe=[])We.forEach(function(ye){ye.depth=xe,ye.sourceLinks.forEach(function(Ee){Fe.indexOf(Ee.target)<0&&!Ee.circular&&Fe.push(Ee.target)})});for(We=Je.nodes,Fe=[],xe=0;We.length;++xe,We=Fe,Fe=[])We.forEach(function(ye){ye.height=xe,ye.targetLinks.forEach(function(Ee){Fe.indexOf(Ee.source)<0&&!Ee.circular&&Fe.push(Ee.source)})});Je.nodes.forEach(function(ye){ye.column=Math.floor(Ue.call(null,ye,xe))})}function ze(Je,We,Fe){var xe=(0,C.UJ)().key(function(it){return it.column}).sortKeys(g.XE).entries(Je.nodes).map(function(it){return it.values});Me(Fe),je();for(var ye=1,Ee=We;Ee>0;--Ee)Ne(ye*=.99,Fe),je();function Me(it){if(Ke){var mt=1/0;xe.forEach(function(ct){var Tt=Ae*Ke/(ct.length+1);mt=Tt0))if(ct==0&&Lt==1)Bt=Tt.y1-Tt.y0,Tt.y0=Ae/2-Bt/2,Tt.y1=Ae/2+Bt/2;else if(ct==bt-1&&Lt==1)Bt=Tt.y1-Tt.y0,Tt.y0=Ae/2-Bt/2,Tt.y1=Ae/2+Bt/2;else{var ir=0,pt=(0,g.mo)(Tt.sourceLinks,o),Xt=(0,g.mo)(Tt.targetLinks,u);pt&&Xt?ir=(pt+Xt)/2:ir=pt||Xt;var Kt=(ir-b(Tt))*it;Tt.y0+=Kt,Tt.y1+=Kt}})})}function je(){xe.forEach(function(it){var mt,bt,vt=Re,Lt=it.length,ct;for(it.sort(m),ct=0;ct0&&(mt.y0+=bt,mt.y1+=bt),vt=mt.y1+Le;if(bt=vt-Le-Ae,bt>0)for(vt=mt.y0-=bt,mt.y1-=bt,ct=Lt-2;ct>=0;--ct)mt=it[ct],bt=mt.y1+Le-vt,bt>0&&(mt.y0-=bt,mt.y1-=bt),vt=mt.y0})}}function Ze(Je){Je.nodes.forEach(function(We){We.sourceLinks.sort(l),We.targetLinks.sort(c)}),Je.nodes.forEach(function(We){var Fe=We.y0,xe=Fe,ye=We.y1,Ee=ye;We.sourceLinks.forEach(function(Me){Me.circular?(Me.y0=ye-Me.width/2,ye=ye-Me.width):(Me.y0=Fe+Me.width/2,Fe+=Me.width)}),We.targetLinks.forEach(function(Me){Me.circular?(Me.y1=Ee-Me.width/2,Ee=Ee-Me.width):(Me.y1=xe+Me.width/2,xe+=Me.width)})})}return lt}function M(we,Re,be){var Ae=0;if(be===null){for(var me=[],Le=0;LeRe.source.column)}function I(we,Re){var be=0;we.sourceLinks.forEach(function(me){be=me.circular&&!ge(me,Re)?be+1:be});var Ae=0;return we.targetLinks.forEach(function(me){Ae=me.circular&&!ge(me,Re)?Ae+1:Ae}),be+Ae}function k(we){var Re=we.source.sourceLinks,be=0;Re.forEach(function(Le){be=Le.circular?be+1:be});var Ae=we.target.targetLinks,me=0;return Ae.forEach(function(Le){me=Le.circular?me+1:me}),!(be>1||me>1)}function B(we,Re,be){return we.sort(Y),we.forEach(function(Ae,me){var Le=0;if(ge(Ae,be)&&k(Ae))Ae.circularPathData.verticalBuffer=Le+Ae.width/2;else{var Ve=0;for(Ve;VeLe?Ue:Le}Ae.circularPathData.verticalBuffer=Le+Ae.width/2}}),we}function O(we,Re,be,Ae){var me=5,Le=(0,g.SY)(we.links,function(ke){return ke.source.y0});we.links.forEach(function(ke){ke.circular&&(ke.circularPathData={})});var Ve=we.links.filter(function(ke){return ke.circularLinkType=="top"});B(Ve,Re,Ae);var Ue=we.links.filter(function(ke){return ke.circularLinkType=="bottom"});B(Ue,Re,Ae),we.links.forEach(function(ke){if(ke.circular){if(ke.circularPathData.arcRadius=ke.width+T,ke.circularPathData.leftNodeBuffer=me,ke.circularPathData.rightNodeBuffer=me,ke.circularPathData.sourceWidth=ke.source.x1-ke.source.x0,ke.circularPathData.sourceX=ke.source.x0+ke.circularPathData.sourceWidth,ke.circularPathData.targetX=ke.target.x0,ke.circularPathData.sourceY=ke.y0,ke.circularPathData.targetY=ke.y1,ge(ke,Ae)&&k(ke))ke.circularPathData.leftSmallArcRadius=T+ke.width/2,ke.circularPathData.leftLargeArcRadius=T+ke.width/2,ke.circularPathData.rightSmallArcRadius=T+ke.width/2,ke.circularPathData.rightLargeArcRadius=T+ke.width/2,ke.circularLinkType=="bottom"?(ke.circularPathData.verticalFullExtent=ke.source.y1+E+ke.circularPathData.verticalBuffer,ke.circularPathData.verticalLeftInnerExtent=ke.circularPathData.verticalFullExtent-ke.circularPathData.leftLargeArcRadius,ke.circularPathData.verticalRightInnerExtent=ke.circularPathData.verticalFullExtent-ke.circularPathData.rightLargeArcRadius):(ke.circularPathData.verticalFullExtent=ke.source.y0-E-ke.circularPathData.verticalBuffer,ke.circularPathData.verticalLeftInnerExtent=ke.circularPathData.verticalFullExtent+ke.circularPathData.leftLargeArcRadius,ke.circularPathData.verticalRightInnerExtent=ke.circularPathData.verticalFullExtent+ke.circularPathData.rightLargeArcRadius);else{var He=ke.source.column,Ie=ke.circularLinkType,rt=we.links.filter(function(lt){return lt.source.column==He&<.circularLinkType==Ie});ke.circularLinkType=="bottom"?rt.sort(te):rt.sort(j);var Ke=0;rt.forEach(function(lt,ht){lt.circularLinkID==ke.circularLinkID&&(ke.circularPathData.leftSmallArcRadius=T+ke.width/2+Ke,ke.circularPathData.leftLargeArcRadius=T+ke.width/2+ht*Re+Ke),Ke=Ke+lt.width}),He=ke.target.column,rt=we.links.filter(function(lt){return lt.target.column==He&<.circularLinkType==Ie}),ke.circularLinkType=="bottom"?rt.sort(ue):rt.sort(ie),Ke=0,rt.forEach(function(lt,ht){lt.circularLinkID==ke.circularLinkID&&(ke.circularPathData.rightSmallArcRadius=T+ke.width/2+Ke,ke.circularPathData.rightLargeArcRadius=T+ke.width/2+ht*Re+Ke),Ke=Ke+lt.width}),ke.circularLinkType=="bottom"?(ke.circularPathData.verticalFullExtent=Math.max(be,ke.source.y1,ke.target.y1)+E+ke.circularPathData.verticalBuffer,ke.circularPathData.verticalLeftInnerExtent=ke.circularPathData.verticalFullExtent-ke.circularPathData.leftLargeArcRadius,ke.circularPathData.verticalRightInnerExtent=ke.circularPathData.verticalFullExtent-ke.circularPathData.rightLargeArcRadius):(ke.circularPathData.verticalFullExtent=Le-E-ke.circularPathData.verticalBuffer,ke.circularPathData.verticalLeftInnerExtent=ke.circularPathData.verticalFullExtent+ke.circularPathData.leftLargeArcRadius,ke.circularPathData.verticalRightInnerExtent=ke.circularPathData.verticalFullExtent+ke.circularPathData.rightLargeArcRadius)}ke.circularPathData.leftInnerExtent=ke.circularPathData.sourceX+ke.circularPathData.leftNodeBuffer,ke.circularPathData.rightInnerExtent=ke.circularPathData.targetX-ke.circularPathData.rightNodeBuffer,ke.circularPathData.leftFullExtent=ke.circularPathData.sourceX+ke.circularPathData.leftLargeArcRadius+ke.circularPathData.leftNodeBuffer,ke.circularPathData.rightFullExtent=ke.circularPathData.targetX-ke.circularPathData.rightLargeArcRadius-ke.circularPathData.rightNodeBuffer}if(ke.circular)ke.path=V(ke);else{var $e=(0,i.ak)().source(function(lt){var ht=lt.source.x0+(lt.source.x1-lt.source.x0),dt=lt.y0;return[ht,dt]}).target(function(lt){var ht=lt.target.x0,dt=lt.y1;return[ht,dt]});ke.path=$e(ke)}})}function V(we){var Re="";return we.circularLinkType=="top"?Re="M"+we.circularPathData.sourceX+" "+we.circularPathData.sourceY+" L"+we.circularPathData.leftInnerExtent+" "+we.circularPathData.sourceY+" A"+we.circularPathData.leftLargeArcRadius+" "+we.circularPathData.leftSmallArcRadius+" 0 0 0 "+we.circularPathData.leftFullExtent+" "+(we.circularPathData.sourceY-we.circularPathData.leftSmallArcRadius)+" L"+we.circularPathData.leftFullExtent+" "+we.circularPathData.verticalLeftInnerExtent+" A"+we.circularPathData.leftLargeArcRadius+" "+we.circularPathData.leftLargeArcRadius+" 0 0 0 "+we.circularPathData.leftInnerExtent+" "+we.circularPathData.verticalFullExtent+" L"+we.circularPathData.rightInnerExtent+" "+we.circularPathData.verticalFullExtent+" A"+we.circularPathData.rightLargeArcRadius+" "+we.circularPathData.rightLargeArcRadius+" 0 0 0 "+we.circularPathData.rightFullExtent+" "+we.circularPathData.verticalRightInnerExtent+" L"+we.circularPathData.rightFullExtent+" "+(we.circularPathData.targetY-we.circularPathData.rightSmallArcRadius)+" A"+we.circularPathData.rightLargeArcRadius+" "+we.circularPathData.rightSmallArcRadius+" 0 0 0 "+we.circularPathData.rightInnerExtent+" "+we.circularPathData.targetY+" L"+we.circularPathData.targetX+" "+we.circularPathData.targetY:Re="M"+we.circularPathData.sourceX+" "+we.circularPathData.sourceY+" L"+we.circularPathData.leftInnerExtent+" "+we.circularPathData.sourceY+" A"+we.circularPathData.leftLargeArcRadius+" "+we.circularPathData.leftSmallArcRadius+" 0 0 1 "+we.circularPathData.leftFullExtent+" "+(we.circularPathData.sourceY+we.circularPathData.leftSmallArcRadius)+" L"+we.circularPathData.leftFullExtent+" "+we.circularPathData.verticalLeftInnerExtent+" A"+we.circularPathData.leftLargeArcRadius+" "+we.circularPathData.leftLargeArcRadius+" 0 0 1 "+we.circularPathData.leftInnerExtent+" "+we.circularPathData.verticalFullExtent+" L"+we.circularPathData.rightInnerExtent+" "+we.circularPathData.verticalFullExtent+" A"+we.circularPathData.rightLargeArcRadius+" "+we.circularPathData.rightLargeArcRadius+" 0 0 1 "+we.circularPathData.rightFullExtent+" "+we.circularPathData.verticalRightInnerExtent+" L"+we.circularPathData.rightFullExtent+" "+(we.circularPathData.targetY+we.circularPathData.rightSmallArcRadius)+" A"+we.circularPathData.rightLargeArcRadius+" "+we.circularPathData.rightSmallArcRadius+" 0 0 1 "+we.circularPathData.rightInnerExtent+" "+we.circularPathData.targetY+" L"+we.circularPathData.targetX+" "+we.circularPathData.targetY,Re}function Y(we,Re){return J(we)==J(Re)?we.circularLinkType=="bottom"?te(we,Re):j(we,Re):J(Re)-J(we)}function j(we,Re){return we.y0-Re.y0}function te(we,Re){return Re.y0-we.y0}function ie(we,Re){return we.y1-Re.y1}function ue(we,Re){return Re.y1-we.y1}function J(we){return we.target.column-we.source.column}function X(we){return we.target.x0-we.source.x1}function ee(we,Re){var be=D(we),Ae=X(Re)/Math.tan(be),me=ce(we)=="up"?we.y1+Ae:we.y1-Ae;return me}function G(we,Re){var be=D(we),Ae=X(Re)/Math.tan(be),me=ce(we)=="up"?we.y1-Ae:we.y1+Ae;return me}function Q(we,Re,be,Ae){we.links.forEach(function(me){if(!me.circular&&me.target.column-me.source.column>1){var Le=me.source.column+1,Ve=me.target.column-1,Ue=1,ke=Ve-Le+1;for(Ue=1;Le<=Ve;Le++,Ue++)we.nodes.forEach(function(He){if(He.column==Le){var Ie=Ue/(ke+1),rt=Math.pow(1-Ie,3),Ke=3*Ie*Math.pow(1-Ie,2),$e=3*Math.pow(Ie,2)*(1-Ie),lt=Math.pow(Ie,3),ht=rt*me.y0+Ke*me.y0+$e*me.y1+lt*me.y1,dt=ht-me.width/2,xt=ht+me.width/2,St;dt>He.y0&&dtHe.y0&&xtHe.y1&&$(nt,St,Re,be)})):dtHe.y1&&(St=xt-He.y0+10,He=$(He,St,Re,be),we.nodes.forEach(function(nt){y(nt,Ae)==y(He,Ae)||nt.column!=He.column||nt.y0He.y1&&$(nt,St,Re,be)}))}})}})}function oe(we,Re){return we.y0>Re.y0&&we.y0Re.y0&&we.y1Re.y1}function $(we,Re,be,Ae){return we.y0+Re>=be&&we.y1+Re<=Ae&&(we.y0=we.y0+Re,we.y1=we.y1+Re,we.targetLinks.forEach(function(me){me.y1=me.y1+Re}),we.sourceLinks.forEach(function(me){me.y0=me.y0+Re})),we}function Z(we,Re,be,Ae){we.nodes.forEach(function(me){Ae&&me.y+(me.y1-me.y0)>Re&&(me.y=me.y-(me.y+(me.y1-me.y0)-Re));var Le=we.links.filter(function(ke){return y(ke.source,be)==y(me,be)}),Ve=Le.length;Ve>1&&Le.sort(function(ke,He){if(!ke.circular&&!He.circular){if(ke.target.column==He.target.column)return ke.y1-He.y1;if(ne(ke,He)){if(ke.target.column>He.target.column){var Ie=G(He,ke);return ke.y1-Ie}if(He.target.column>ke.target.column){var rt=G(ke,He);return rt-He.y1}}else return ke.y1-He.y1}if(ke.circular&&!He.circular)return ke.circularLinkType=="top"?-1:1;if(He.circular&&!ke.circular)return He.circularLinkType=="top"?1:-1;if(ke.circular&&He.circular)return ke.circularLinkType===He.circularLinkType&&ke.circularLinkType=="top"?ke.target.column===He.target.column?ke.target.y1-He.target.y1:He.target.column-ke.target.column:ke.circularLinkType===He.circularLinkType&&ke.circularLinkType=="bottom"?ke.target.column===He.target.column?He.target.y1-ke.target.y1:ke.target.column-He.target.column:ke.circularLinkType=="top"?-1:1});var Ue=me.y0;Le.forEach(function(ke){ke.y0=Ue+ke.width/2,Ue=Ue+ke.width}),Le.forEach(function(ke,He){if(ke.circularLinkType=="bottom"){var Ie=He+1,rt=0;for(Ie;Ie1&&me.sort(function(Ue,ke){if(!Ue.circular&&!ke.circular){if(Ue.source.column==ke.source.column)return Ue.y0-ke.y0;if(ne(Ue,ke)){if(ke.source.column0?"up":"down"}function ge(we,Re){return y(we.source,Re)==y(we.target,Re)}function Te(we,Re,be){var Ae=we.nodes,me=we.links,Le=!1,Ve=!1;if(me.forEach(function(Ke){Ke.circularLinkType=="top"?Le=!0:Ke.circularLinkType=="bottom"&&(Ve=!0)}),Le==!1||Ve==!1){var Ue=(0,g.SY)(Ae,function(Ke){return Ke.y0}),ke=(0,g.kv)(Ae,function(Ke){return Ke.y1}),He=ke-Ue,Ie=be-Re,rt=Ie/He;Ae.forEach(function(Ke){var $e=(Ke.y1-Ke.y0)*rt;Ke.y0=(Ke.y0-Ue)*rt,Ke.y1=Ke.y0+$e}),me.forEach(function(Ke){Ke.y0=(Ke.y0-Ue)*rt,Ke.y1=(Ke.y1-Ue)*rt,Ke.width=Ke.width*rt})}}},26800:function(H,U,e){e.r(U),e.d(U,{sankey:function(){return d},sankeyCenter:function(){return p},sankeyJustify:function(){return v},sankeyLeft:function(){return S},sankeyLinkHorizontal:function(){return y},sankeyRight:function(){return x}});var g=e(84706),C=e(34712);function i(E){return E.target.depth}function S(E){return E.depth}function x(E,T){return T-1-E.height}function v(E,T){return E.sourceLinks.length?E.depth:T-1}function p(E){return E.targetLinks.length?E.depth:E.sourceLinks.length?(0,g.SY)(E.sourceLinks,i)-1:0}function r(E){return function(){return E}}function t(E,T){return n(E.source,T.source)||E.index-T.index}function a(E,T){return n(E.target,T.target)||E.index-T.index}function n(E,T){return E.y0-T.y0}function f(E){return E.value}function c(E){return(E.y0+E.y1)/2}function l(E){return c(E.source)*E.value}function m(E){return c(E.target)*E.value}function h(E){return E.index}function b(E){return E.nodes}function u(E){return E.links}function o(E,T){var s=E.get(T);if(!s)throw new Error("missing: "+T);return s}function d(){var E=0,T=0,s=1,L=1,M=24,z=8,D=h,N=v,I=b,k=u,B=32,O=2/3;function V(){var J={nodes:I.apply(null,arguments),links:k.apply(null,arguments)};return Y(J),j(J),te(J),ie(J),ue(J),J}V.update=function(J){return ue(J),J},V.nodeId=function(J){return arguments.length?(D=typeof J=="function"?J:r(J),V):D},V.nodeAlign=function(J){return arguments.length?(N=typeof J=="function"?J:r(J),V):N},V.nodeWidth=function(J){return arguments.length?(M=+J,V):M},V.nodePadding=function(J){return arguments.length?(z=+J,V):z},V.nodes=function(J){return arguments.length?(I=typeof J=="function"?J:r(J),V):I},V.links=function(J){return arguments.length?(k=typeof J=="function"?J:r(J),V):k},V.size=function(J){return arguments.length?(E=T=0,s=+J[0],L=+J[1],V):[s-E,L-T]},V.extent=function(J){return arguments.length?(E=+J[0][0],s=+J[1][0],T=+J[0][1],L=+J[1][1],V):[[E,T],[s,L]]},V.iterations=function(J){return arguments.length?(B=+J,V):B};function Y(J){J.nodes.forEach(function(ee,G){ee.index=G,ee.sourceLinks=[],ee.targetLinks=[]});var X=(0,C.kH)(J.nodes,D);J.links.forEach(function(ee,G){ee.index=G;var Q=ee.source,oe=ee.target;typeof Q!="object"&&(Q=ee.source=o(X,Q)),typeof oe!="object"&&(oe=ee.target=o(X,oe)),Q.sourceLinks.push(ee),oe.targetLinks.push(ee)})}function j(J){J.nodes.forEach(function(X){X.value=Math.max((0,g.oh)(X.sourceLinks,f),(0,g.oh)(X.targetLinks,f))})}function te(J){var X,ee,G;for(X=J.nodes,ee=[],G=0;X.length;++G,X=ee,ee=[])X.forEach(function(oe){oe.depth=G,oe.sourceLinks.forEach(function($){ee.indexOf($.target)<0&&ee.push($.target)})});for(X=J.nodes,ee=[],G=0;X.length;++G,X=ee,ee=[])X.forEach(function(oe){oe.height=G,oe.targetLinks.forEach(function($){ee.indexOf($.source)<0&&ee.push($.source)})});var Q=(s-E-M)/(G-1);J.nodes.forEach(function(oe){oe.x1=(oe.x0=E+Math.max(0,Math.min(G-1,Math.floor(N.call(null,oe,G))))*Q)+M})}function ie(J){var X=(0,C.UJ)().key(function(se){return se.x0}).sortKeys(g.XE).entries(J.nodes).map(function(se){return se.values});Q(),Z();for(var ee=1,G=B;G>0;--G)$(ee*=.99),Z(),oe(ee),Z();function Q(){var se=(0,g.kv)(X,function(ge){return ge.length}),ne=O*(L-T)/(se-1);z>ne&&(z=ne);var ce=(0,g.SY)(X,function(ge){return(L-T-(ge.length-1)*z)/(0,g.oh)(ge,f)});X.forEach(function(ge){ge.forEach(function(Te,we){Te.y1=(Te.y0=we)+Te.value*ce})}),J.links.forEach(function(ge){ge.width=ge.value*ce})}function oe(se){X.forEach(function(ne){ne.forEach(function(ce){if(ce.targetLinks.length){var ge=((0,g.oh)(ce.targetLinks,l)/(0,g.oh)(ce.targetLinks,f)-c(ce))*se;ce.y0+=ge,ce.y1+=ge}})})}function $(se){X.slice().reverse().forEach(function(ne){ne.forEach(function(ce){if(ce.sourceLinks.length){var ge=((0,g.oh)(ce.sourceLinks,m)/(0,g.oh)(ce.sourceLinks,f)-c(ce))*se;ce.y0+=ge,ce.y1+=ge}})})}function Z(){X.forEach(function(se){var ne,ce,ge=T,Te=se.length,we;for(se.sort(n),we=0;we0&&(ne.y0+=ce,ne.y1+=ce),ge=ne.y1+z;if(ce=ge-z-L,ce>0)for(ge=ne.y0-=ce,ne.y1-=ce,we=Te-2;we>=0;--we)ne=se[we],ce=ne.y1+z-ge,ce>0&&(ne.y0-=ce,ne.y1-=ce),ge=ne.y0})}}function ue(J){J.nodes.forEach(function(X){X.sourceLinks.sort(a),X.targetLinks.sort(t)}),J.nodes.forEach(function(X){var ee=X.y0,G=ee;X.sourceLinks.forEach(function(Q){Q.y0=ee+Q.width/2,ee+=Q.width}),X.targetLinks.forEach(function(Q){Q.y1=G+Q.width/2,G+=Q.width})})}return V}var w=e(10132);function A(E){return[E.source.x1,E.y0]}function _(E){return[E.target.x0,E.y1]}function y(){return(0,w.ak)().source(A).target(_)}},33428:function(H,U,e){var g,C;(function(){var i={version:"3.8.0"},S=[].slice,x=function(fe){return S.call(fe)},v=self.document;function p(fe){return fe&&(fe.ownerDocument||fe.document||fe).documentElement}function r(fe){return fe&&(fe.ownerDocument&&fe.ownerDocument.defaultView||fe.document&&fe||fe.defaultView)}if(v)try{x(v.documentElement.childNodes)[0].nodeType}catch{x=function(Ce){for(var Be=Ce.length,tt=new Array(Be);Be--;)tt[Be]=Ce[Be];return tt}}if(Date.now||(Date.now=function(){return+new Date}),v)try{v.createElement("DIV").style.setProperty("opacity",0,"")}catch{var t=this.Element.prototype,a=t.setAttribute,n=t.setAttributeNS,f=this.CSSStyleDeclaration.prototype,c=f.setProperty;t.setAttribute=function(Ce,Be){a.call(this,Ce,Be+"")},t.setAttributeNS=function(Ce,Be,tt){n.call(this,Ce,Be,tt+"")},f.setProperty=function(Ce,Be,tt){c.call(this,Ce,Be+"",tt)}}i.ascending=l;function l(fe,Ce){return feCe?1:fe>=Ce?0:NaN}i.descending=function(fe,Ce){return Cefe?1:Ce>=fe?0:NaN},i.min=function(fe,Ce){var Be=-1,tt=fe.length,at,ft;if(arguments.length===1){for(;++Be=ft){at=ft;break}for(;++Beft&&(at=ft)}else{for(;++Be=ft){at=ft;break}for(;++Beft&&(at=ft)}return at},i.max=function(fe,Ce){var Be=-1,tt=fe.length,at,ft;if(arguments.length===1){for(;++Be=ft){at=ft;break}for(;++Beat&&(at=ft)}else{for(;++Be=ft){at=ft;break}for(;++Beat&&(at=ft)}return at},i.extent=function(fe,Ce){var Be=-1,tt=fe.length,at,ft,Dt;if(arguments.length===1){for(;++Be=ft){at=Dt=ft;break}for(;++Beft&&(at=ft),Dt=ft){at=Dt=ft;break}for(;++Beft&&(at=ft),Dt1)return Dt/(Yt-1)},i.deviation=function(){var fe=i.variance.apply(this,arguments);return fe&&Math.sqrt(fe)};function b(fe){return{left:function(Ce,Be,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ce.length);tt>>1;fe(Ce[ft],Be)<0?tt=ft+1:at=ft}return tt},right:function(Ce,Be,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ce.length);tt>>1;fe(Ce[ft],Be)>0?at=ft:tt=ft+1}return tt}}}var u=b(l);i.bisectLeft=u.left,i.bisect=i.bisectRight=u.right,i.bisector=function(fe){return b(fe.length===1?function(Ce,Be){return l(fe(Ce),Be)}:fe)},i.shuffle=function(fe,Ce,Be){(tt=arguments.length)<3&&(Be=fe.length,tt<2&&(Ce=0));for(var tt=Be-Ce,at,ft;tt;)ft=Math.random()*tt--|0,at=fe[tt+Ce],fe[tt+Ce]=fe[ft+Ce],fe[ft+Ce]=at;return fe},i.permute=function(fe,Ce){for(var Be=Ce.length,tt=new Array(Be);Be--;)tt[Be]=fe[Ce[Be]];return tt},i.pairs=function(fe){for(var Ce=0,Be=fe.length-1,tt=fe[0],at=new Array(Be<0?0:Be);Ce=0;)for(Dt=fe[Ce],Be=Dt.length;--Be>=0;)ft[--at]=Dt[Be];return ft};var d=Math.abs;i.range=function(fe,Ce,Be){if(arguments.length<3&&(Be=1,arguments.length<2&&(Ce=fe,fe=0)),(Ce-fe)/Be===1/0)throw new Error("infinite range");var tt=[],at=w(d(Be)),ft=-1,Dt;if(fe*=at,Ce*=at,Be*=at,Be<0)for(;(Dt=fe+Be*++ft)>Ce;)tt.push(Dt/at);else for(;(Dt=fe+Be*++ft)=Ce.length)return at?at.call(fe,Yt):tt?Yt.sort(tt):Yt;for(var nr=-1,_r=Yt.length,Lr=Ce[Zt++],Jr,on,Rr,Br=new _,jr;++nr<_r;)(jr=Br.get(Jr=Lr(on=Yt[nr])))?jr.push(on):Br.set(Jr,[on]);return Et?(on=Et(),Rr=function(un,vn){on.set(un,ft(Et,vn,Zt))}):(on={},Rr=function(un,vn){on[un]=ft(Et,vn,Zt)}),Br.forEach(Rr),on}function Dt(Et,Yt){if(Yt>=Ce.length)return Et;var Zt=[],nr=Be[Yt++];return Et.forEach(function(_r,Lr){Zt.push({key:_r,values:Dt(Lr,Yt)})}),nr?Zt.sort(function(_r,Lr){return nr(_r.key,Lr.key)}):Zt}return fe.map=function(Et,Yt){return ft(Yt,Et,0)},fe.entries=function(Et){return Dt(ft(i.map,Et,0),0)},fe.key=function(Et){return Ce.push(Et),fe},fe.sortKeys=function(Et){return Be[Ce.length-1]=Et,fe},fe.sortValues=function(Et){return tt=Et,fe},fe.rollup=function(Et){return at=Et,fe},fe},i.set=function(fe){var Ce=new I;if(fe)for(var Be=0,tt=fe.length;Be=0&&(tt=fe.slice(Be+1),fe=fe.slice(0,Be)),fe)return arguments.length<2?this[fe].on(tt):this[fe].on(tt,Ce);if(arguments.length===2){if(Ce==null)for(fe in this)this.hasOwnProperty(fe)&&this[fe].on(tt,null);return this}};function te(fe){var Ce=[],Be=new _;function tt(){for(var at=Ce,ft=-1,Dt=at.length,Et;++ft=0&&(Be=fe.slice(0,Ce))!=="xmlns"&&(fe=fe.slice(Ce+1)),ge.hasOwnProperty(Be)?{space:ge[Be],local:fe}:fe}},Z.attr=function(fe,Ce){if(arguments.length<2){if(typeof fe=="string"){var Be=this.node();return fe=i.ns.qualify(fe),fe.local?Be.getAttributeNS(fe.space,fe.local):Be.getAttribute(fe)}for(Ce in fe)this.each(Te(Ce,fe[Ce]));return this}return this.each(Te(fe,Ce))};function Te(fe,Ce){fe=i.ns.qualify(fe);function Be(){this.removeAttribute(fe)}function tt(){this.removeAttributeNS(fe.space,fe.local)}function at(){this.setAttribute(fe,Ce)}function ft(){this.setAttributeNS(fe.space,fe.local,Ce)}function Dt(){var Yt=Ce.apply(this,arguments);Yt==null?this.removeAttribute(fe):this.setAttribute(fe,Yt)}function Et(){var Yt=Ce.apply(this,arguments);Yt==null?this.removeAttributeNS(fe.space,fe.local):this.setAttributeNS(fe.space,fe.local,Yt)}return Ce==null?fe.local?tt:Be:typeof Ce=="function"?fe.local?Et:Dt:fe.local?ft:at}function we(fe){return fe.trim().replace(/\s+/g," ")}Z.classed=function(fe,Ce){if(arguments.length<2){if(typeof fe=="string"){var Be=this.node(),tt=(fe=be(fe)).length,at=-1;if(Ce=Be.classList){for(;++at=0;)(ft=Be[tt])&&(at&&at!==ft.nextSibling&&at.parentNode.insertBefore(ft,at),at=ft);return this},Z.sort=function(fe){fe=rt.apply(this,arguments);for(var Ce=-1,Be=this.length;++Ce=Ce&&(Ce=at+1);!(Yt=Dt[Ce])&&++Ce0&&(fe=fe.slice(0,at));var Dt=xt.get(fe);Dt&&(fe=Dt,ft=nt);function Et(){var nr=this[tt];nr&&(this.removeEventListener(fe,nr,nr.$),delete this[tt])}function Yt(){var nr=ft(Ce,x(arguments));Et.call(this),this.addEventListener(fe,this[tt]=nr,nr.$=Be),nr._=Ce}function Zt(){var nr=new RegExp("^__on([^.]+)"+i.requote(fe)+"$"),_r;for(var Lr in this)if(_r=Lr.match(nr)){var Jr=this[Lr];this.removeEventListener(_r[1],Jr,Jr.$),delete this[Lr]}}return at?Ce?Yt:Et:Ce?Y:Zt}var xt=i.map({mouseenter:"mouseover",mouseleave:"mouseout"});v&&xt.forEach(function(fe){"on"+fe in v&&xt.remove(fe)});function St(fe,Ce){return function(Be){var tt=i.event;i.event=Be,Ce[0]=this.__data__;try{fe.apply(this,Ce)}finally{i.event=tt}}}function nt(fe,Ce){var Be=St(fe,Ce);return function(tt){var at=this,ft=tt.relatedTarget;(!ft||ft!==at&&!(ft.compareDocumentPosition(at)&8))&&Be.call(at,tt)}}var ze,Ze=0;function Je(fe){var Ce=".dragsuppress-"+ ++Ze,Be="click"+Ce,tt=i.select(r(fe)).on("touchmove"+Ce,ie).on("dragstart"+Ce,ie).on("selectstart"+Ce,ie);if(ze==null&&(ze="onselectstart"in fe?!1:O(fe.style,"userSelect")),ze){var at=p(fe).style,ft=at[ze];at[ze]="none"}return function(Dt){if(tt.on(Ce,null),ze&&(at[ze]=ft),Dt){var Et=function(){tt.on(Be,null)};tt.on(Be,function(){ie(),Et()},!0),setTimeout(Et,0)}}}i.mouse=function(fe){return Fe(fe,ue())};var We=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Fe(fe,Ce){Ce.changedTouches&&(Ce=Ce.changedTouches[0]);var Be=fe.ownerSVGElement||fe;if(Be.createSVGPoint){var tt=Be.createSVGPoint();if(We<0){var at=r(fe);if(at.scrollX||at.scrollY){Be=i.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ft=Be[0][0].getScreenCTM();We=!(ft.f||ft.e),Be.remove()}}return We?(tt.x=Ce.pageX,tt.y=Ce.pageY):(tt.x=Ce.clientX,tt.y=Ce.clientY),tt=tt.matrixTransform(fe.getScreenCTM().inverse()),[tt.x,tt.y]}var Dt=fe.getBoundingClientRect();return[Ce.clientX-Dt.left-fe.clientLeft,Ce.clientY-Dt.top-fe.clientTop]}i.touch=function(fe,Ce,Be){if(arguments.length<3&&(Be=Ce,Ce=ue().changedTouches),Ce){for(var tt=0,at=Ce.length,ft;tt1?it:fe<-1?-it:Math.asin(fe)}function ct(fe){return((fe=Math.exp(fe))-1/fe)/2}function Tt(fe){return((fe=Math.exp(fe))+1/fe)/2}function Bt(fe){return((fe=Math.exp(2*fe))-1)/(fe+1)}var ir=Math.SQRT2,pt=2,Xt=4;i.interpolateZoom=function(fe,Ce){var Be=fe[0],tt=fe[1],at=fe[2],ft=Ce[0],Dt=Ce[1],Et=Ce[2],Yt=ft-Be,Zt=Dt-tt,nr=Yt*Yt+Zt*Zt,_r,Lr;if(nr0&&(Kn=Kn.transition().duration(Dt)),Kn.call(vn.event)}function ii(){Br&&Br.domain(Rr.range().map(function(Kn){return(Kn-fe.x)/fe.k}).map(Rr.invert)),un&&un.domain(jr.range().map(function(Kn){return(Kn-fe.y)/fe.k}).map(jr.invert))}function fi(Kn){Et++||Kn({type:"zoomstart"})}function Oi(Kn){ii(),Kn({type:"zoom",scale:fe.k,translate:[fe.x,fe.y]})}function Mi(Kn){--Et||(Kn({type:"zoomend"}),Be=null)}function Ii(){var Kn=this,Bi=on.of(Kn,arguments),Ti=0,Zi=i.select(r(Kn)).on(Zt,Ka).on(nr,Ja),ba=qr(i.mouse(Kn)),na=Je(Kn);Gt.call(Kn),fi(Bi);function Ka(){Ti=1,ui(i.mouse(Kn),ba),Oi(Bi)}function Ja(){Zi.on(Zt,null).on(nr,null),na(Ti),Mi(Bi)}}function ra(){var Kn=this,Bi=on.of(Kn,arguments),Ti={},Zi=0,ba,na=".zoom-"+i.event.changedTouches[0].identifier,Ka="touchmove"+na,Ja="touchend"+na,eo=[],wa=i.select(Kn),uo=Je(Kn);Ei(),fi(Bi),wa.on(Yt,null).on(Lr,Ei);function oi(){var to=i.touches(Kn);return ba=fe.k,to.forEach(function(ca){ca.identifier in Ti&&(Ti[ca.identifier]=qr(ca))}),to}function Ei(){var to=i.event.target;i.select(to).on(Ka,Ao).on(Ja,Lo),eo.push(to);for(var ca=i.event.changedTouches,Ha=0,Oa=ca.length;Ha1){var Ea=is[0],El=is[1],ji=Ea[0]-El[0],_a=Ea[1]-El[1];Zi=ji*ji+_a*_a}}function Ao(){var to=i.touches(Kn),ca,Ha,Oa,is;Gt.call(Kn);for(var bs=0,Ea=to.length;bs1?1:Ce,Be=Be<0?0:Be>1?1:Be,at=Be<=.5?Be*(1+Ce):Be+Ce-Be*Ce,tt=2*Be-at;function ft(Et){return Et>360?Et-=360:Et<0&&(Et+=360),Et<60?tt+(at-tt)*Et/60:Et<180?at:Et<240?tt+(at-tt)*(240-Et)/60:tt}function Dt(Et){return Math.round(ft(Et)*255)}return new fr(Dt(fe+120),Dt(fe),Dt(fe-120))}i.hcl=It;function It(fe,Ce,Be){return this instanceof It?(this.h=+fe,this.c=+Ce,void(this.l=+Be)):arguments.length<2?fe instanceof It?new It(fe.h,fe.c,fe.l):fe instanceof Ht?Nt(fe.l,fe.a,fe.b):Nt((fe=Gr((fe=i.rgb(fe)).r,fe.g,fe.b)).l,fe.a,fe.b):new It(fe,Ce,Be)}var Pt=It.prototype=new gt;Pt.brighter=function(fe){return new It(this.h,this.c,Math.min(100,this.l+Jt*(arguments.length?fe:1)))},Pt.darker=function(fe){return new It(this.h,this.c,Math.max(0,this.l-Jt*(arguments.length?fe:1)))},Pt.rgb=function(){return kt(this.h,this.c,this.l).rgb()};function kt(fe,Ce,Be){return isNaN(fe)&&(fe=0),isNaN(Ce)&&(Ce=0),new Ht(Be,Math.cos(fe*=mt)*Ce,Math.sin(fe)*Ce)}i.lab=Ht;function Ht(fe,Ce,Be){return this instanceof Ht?(this.l=+fe,this.a=+Ce,void(this.b=+Be)):arguments.length<2?fe instanceof Ht?new Ht(fe.l,fe.a,fe.b):fe instanceof It?kt(fe.h,fe.c,fe.l):Gr((fe=fr(fe)).r,fe.g,fe.b):new Ht(fe,Ce,Be)}var Jt=18,ur=.95047,hr=1,vr=1.08883,Ye=Ht.prototype=new gt;Ye.brighter=function(fe){return new Ht(Math.min(100,this.l+Jt*(arguments.length?fe:1)),this.a,this.b)},Ye.darker=function(fe){return new Ht(Math.max(0,this.l-Jt*(arguments.length?fe:1)),this.a,this.b)},Ye.rgb=function(){return Ge(this.l,this.a,this.b)};function Ge(fe,Ce,Be){var tt=(fe+16)/116,at=tt+Ce/500,ft=tt-Be/200;return at=Ot(at)*ur,tt=Ot(tt)*hr,ft=Ot(ft)*vr,new fr(tr(3.2404542*at-1.5371385*tt-.4985314*ft),tr(-.969266*at+1.8760108*tt+.041556*ft),tr(.0556434*at-.2040259*tt+1.0572252*ft))}function Nt(fe,Ce,Be){return fe>0?new It(Math.atan2(Be,Ce)*bt,Math.sqrt(Ce*Ce+Be*Be),fe):new It(NaN,NaN,fe)}function Ot(fe){return fe>.206893034?fe*fe*fe:(fe-.13793103448275862)/7.787037}function Qt(fe){return fe>.008856?Math.pow(fe,.3333333333333333):7.787037*fe+.13793103448275862}function tr(fe){return Math.round(255*(fe<=.00304?12.92*fe:1.055*Math.pow(fe,.4166666666666667)-.055))}i.rgb=fr;function fr(fe,Ce,Be){return this instanceof fr?(this.r=~~fe,this.g=~~Ce,void(this.b=~~Be)):arguments.length<2?fe instanceof fr?new fr(fe.r,fe.g,fe.b):xr(""+fe,fr,Ct):new fr(fe,Ce,Be)}function rr(fe){return new fr(fe>>16,fe>>8&255,fe&255)}function Vt(fe){return rr(fe)+""}var dr=fr.prototype=new gt;dr.brighter=function(fe){fe=Math.pow(.7,arguments.length?fe:1);var Ce=this.r,Be=this.g,tt=this.b,at=30;return!Ce&&!Be&&!tt?new fr(at,at,at):(Ce&&Ce>4,tt=tt>>4|tt,at=Yt&240,at=at>>4|at,ft=Yt&15,ft=ft<<4|ft):fe.length===7&&(tt=(Yt&16711680)>>16,at=(Yt&65280)>>8,ft=Yt&255)),Ce(tt,at,ft))}function pr(fe,Ce,Be){var tt=Math.min(fe/=255,Ce/=255,Be/=255),at=Math.max(fe,Ce,Be),ft=at-tt,Dt,Et,Yt=(at+tt)/2;return ft?(Et=Yt<.5?ft/(at+tt):ft/(2-at-tt),fe==at?Dt=(Ce-Be)/ft+(Ce0&&Yt<1?0:Dt),new st(Dt,Et,Yt)}function Gr(fe,Ce,Be){fe=Pr(fe),Ce=Pr(Ce),Be=Pr(Be);var tt=Qt((.4124564*fe+.3575761*Ce+.1804375*Be)/ur),at=Qt((.2126729*fe+.7151522*Ce+.072175*Be)/hr),ft=Qt((.0193339*fe+.119192*Ce+.9503041*Be)/vr);return Ht(116*at-16,500*(tt-at),200*(at-ft))}function Pr(fe){return(fe/=255)<=.04045?fe/12.92:Math.pow((fe+.055)/1.055,2.4)}function Dr(fe){var Ce=parseFloat(fe);return fe.charAt(fe.length-1)==="%"?Math.round(Ce*2.55):Ce}var cn=i.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});cn.forEach(function(fe,Ce){cn.set(fe,rr(Ce))});function rn(fe){return typeof fe=="function"?fe:function(){return fe}}i.functor=rn,i.xhr=Cn(k);function Cn(fe){return function(Ce,Be,tt){return arguments.length===2&&typeof Be=="function"&&(tt=Be,Be=null),En(Ce,Be,fe,tt)}}function En(fe,Ce,Be,tt){var at={},ft=i.dispatch("beforesend","progress","load","error"),Dt={},Et=new XMLHttpRequest,Yt=null;self.XDomainRequest&&!("withCredentials"in Et)&&/^(http(s)?:)?\/\//.test(fe)&&(Et=new XDomainRequest),"onload"in Et?Et.onload=Et.onerror=Zt:Et.onreadystatechange=function(){Et.readyState>3&&Zt()};function Zt(){var nr=Et.status,_r;if(!nr&&Cr(Et)||nr>=200&&nr<300||nr===304){try{_r=Be.call(at,Et)}catch(Lr){ft.error.call(at,Lr);return}ft.load.call(at,_r)}else ft.error.call(at,Et)}return Et.onprogress=function(nr){var _r=i.event;i.event=nr;try{ft.progress.call(at,Et)}finally{i.event=_r}},at.header=function(nr,_r){return nr=(nr+"").toLowerCase(),arguments.length<2?Dt[nr]:(_r==null?delete Dt[nr]:Dt[nr]=_r+"",at)},at.mimeType=function(nr){return arguments.length?(Ce=nr==null?null:nr+"",at):Ce},at.responseType=function(nr){return arguments.length?(Yt=nr,at):Yt},at.response=function(nr){return Be=nr,at},["get","post"].forEach(function(nr){at[nr]=function(){return at.send.apply(at,[nr].concat(x(arguments)))}}),at.send=function(nr,_r,Lr){if(arguments.length===2&&typeof _r=="function"&&(Lr=_r,_r=null),Et.open(nr,fe,!0),Ce!=null&&!("accept"in Dt)&&(Dt.accept=Ce+",*/*"),Et.setRequestHeader)for(var Jr in Dt)Et.setRequestHeader(Jr,Dt[Jr]);return Ce!=null&&Et.overrideMimeType&&Et.overrideMimeType(Ce),Yt!=null&&(Et.responseType=Yt),Lr!=null&&at.on("error",Lr).on("load",function(on){Lr(null,on)}),ft.beforesend.call(at,Et),Et.send(_r??null),at},at.abort=function(){return Et.abort(),at},i.rebind(at,ft,"on"),tt==null?at:at.get(Tr(tt))}function Tr(fe){return fe.length===1?function(Ce,Be){fe(Ce==null?Be:null)}:fe}function Cr(fe){var Ce=fe.responseType;return Ce&&Ce!=="text"?fe.response:fe.responseText}i.dsv=function(fe,Ce){var Be=new RegExp('["'+fe+` -]`),tt=fe.charCodeAt(0);function at(Zt,nr,_r){arguments.length<3&&(_r=nr,nr=null);var Lr=En(Zt,Ce,nr==null?ft:Dt(nr),_r);return Lr.row=function(Jr){return arguments.length?Lr.response((nr=Jr)==null?ft:Dt(Jr)):nr},Lr}function ft(Zt){return at.parse(Zt.responseText)}function Dt(Zt){return function(nr){return at.parse(nr.responseText,Zt)}}at.parse=function(Zt,nr){var _r;return at.parseRows(Zt,function(Lr,Jr){if(_r)return _r(Lr,Jr-1);var on=function(Rr){for(var Br={},jr=Lr.length,un=0;un=on)return Lr;if(un)return un=!1,_r;var Vn=Rr;if(Zt.charCodeAt(Vn)===34){for(var qn=Vn;qn++24?(isFinite(Ce)&&(clearTimeout(pn),pn=setTimeout(kn,Ce)),an=0):(an=1,gn(kn))}i.timer.flush=function(){ni(),ci()};function ni(){for(var fe=Date.now(),Ce=Wr;Ce;)fe>=Ce.t&&Ce.c(fe-Ce.t)&&(Ce.c=null),Ce=Ce.n;return fe}function ci(){for(var fe,Ce=Wr,Be=1/0;Ce;)Ce.c?(Ce.t=0;--Et)Rr.push(at[Zt[_r[Et]][2]]);for(Et=+Jr;Et1&&vt(fe[Be[tt-2]],fe[Be[tt-1]],fe[at])<=0;)--tt;Be[tt++]=at}return Be.slice(0,tt)}function wr(fe,Ce){return fe[0]-Ce[0]||fe[1]-Ce[1]}i.geom.polygon=function(fe){return ee(fe,nn),fe};var nn=i.geom.polygon.prototype=[];nn.area=function(){for(var fe=-1,Ce=this.length,Be,tt=this[Ce-1],at=0;++feye)Et=Et.L;else if(Dt=Ce-sn(Et,Be),Dt>ye){if(!Et.R){tt=Et;break}Et=Et.R}else{ft>-ye?(tt=Et.P,at=Et):Dt>-ye?(tt=Et,at=Et.N):tt=at=Et;break}var Yt=Ar(fe);if(Bn.insert(tt,Yt),!(!tt&&!at)){if(tt===at){Ln(tt),at=Ar(tt.site),Bn.insert(Yt,at),Yt.edge=at.edge=ai(tt.site,Yt.site),wn(tt),wn(at);return}if(!at){Yt.edge=ai(tt.site,Yt.site);return}Ln(tt),Ln(at);var Zt=tt.site,nr=Zt.x,_r=Zt.y,Lr=fe.x-nr,Jr=fe.y-_r,on=at.site,Rr=on.x-nr,Br=on.y-_r,jr=2*(Lr*Br-Jr*Rr),un=Lr*Lr+Jr*Jr,vn=Rr*Rr+Br*Br,qr={x:(Br*un-Jr*vn)/jr+nr,y:(Lr*vn-Rr*un)/jr+_r};Ci(at.edge,Zt,on,qr),Yt.edge=ai(Zt,fe,null,qr),at.edge=ai(fe,on,null,qr),wn(tt),wn(at)}}function hn(fe,Ce){var Be=fe.site,tt=Be.x,at=Be.y,ft=at-Ce;if(!ft)return tt;var Dt=fe.P;if(!Dt)return-1/0;Be=Dt.site;var Et=Be.x,Yt=Be.y,Zt=Yt-Ce;if(!Zt)return Et;var nr=Et-tt,_r=1/ft-1/Zt,Lr=nr/Zt;return _r?(-Lr+Math.sqrt(Lr*Lr-2*_r*(nr*nr/(-2*Zt)-Yt+Zt/2+at-ft/2)))/_r+tt:(tt+Et)/2}function sn(fe,Ce){var Be=fe.N;if(Be)return hn(Be,Ce);var tt=fe.site;return tt.y===Ce?tt.x:1/0}function Er(fe){this.site=fe,this.edges=[]}Er.prototype.prepare=function(){for(var fe=this.edges,Ce=fe.length,Be;Ce--;)Be=fe[Ce].edge,(!Be.b||!Be.a)&&fe.splice(Ce,1);return fe.sort(Vr),fe.length};function Zr(fe){for(var Ce=fe[0][0],Be=fe[1][0],tt=fe[0][1],at=fe[1][1],ft,Dt,Et,Yt,Zt=An,nr=Zt.length,_r,Lr,Jr,on,Rr,Br;nr--;)if(_r=Zt[nr],!(!_r||!_r.prepare()))for(Jr=_r.edges,on=Jr.length,Lr=0;Lrye||d(Yt-Dt)>ye)&&(Jr.splice(Lr,0,new pa(pi(_r.site,Br,d(Et-Ce)ye?{x:Ce,y:d(ft-Ce)ye?{x:d(Dt-at)ye?{x:Be,y:d(ft-Be)ye?{x:d(Dt-tt)=-Ee)){var Lr=Yt*Yt+Zt*Zt,Jr=nr*nr+Br*Br,on=(Br*Lr-Zt*Jr)/_r,Rr=(Yt*Jr-nr*Lr)/_r,Br=Rr+Et,jr=Sr.pop()||new Qr;jr.arc=fe,jr.site=at,jr.x=on+Dt,jr.y=Br+Math.sqrt(on*on+Rr*Rr),jr.cy=Br,fe.circle=jr;for(var un=null,vn=Di._;vn;)if(jr.y0)){if(Rr/=Jr,Jr<0){if(Rr<_r)return;Rr0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}if(Rr=Be-Et,!(!Jr&&Rr<0)){if(Rr/=Jr,Jr<0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}else if(Jr>0){if(Rr<_r)return;Rr0)){if(Rr/=on,on<0){if(Rr<_r)return;Rr0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}if(Rr=tt-Yt,!(!on&&Rr<0)){if(Rr/=on,on<0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}else if(on>0){if(Rr<_r)return;Rr0&&(at.a={x:Et+_r*Jr,y:Yt+_r*on}),Lr<1&&(at.b={x:Et+Lr*Jr,y:Yt+Lr*on}),at}}}}}}function Un(fe){for(var Ce=Tn,Be=Pn(fe[0][0],fe[0][1],fe[1][0],fe[1][1]),tt=Ce.length,at;tt--;)at=Ce[tt],(!On(at,fe)||!Be(at)||d(at.a.x-at.b.x)=ft)return;if(nr>Lr){if(!tt)tt={x:on,y:Dt};else if(tt.y>=Et)return;Be={x:on,y:Et}}else{if(!tt)tt={x:on,y:Et};else if(tt.y1)if(nr>Lr){if(!tt)tt={x:(Dt-jr)/Br,y:Dt};else if(tt.y>=Et)return;Be={x:(Et-jr)/Br,y:Et}}else{if(!tt)tt={x:(Et-jr)/Br,y:Et};else if(tt.y=ft)return;Be={x:ft,y:Br*ft+jr}}else{if(!tt)tt={x:ft,y:Br*ft+jr};else if(tt.x=nr&&jr.x<=Lr&&jr.y>=_r&&jr.y<=Jr?[[nr,Jr],[Lr,Jr],[Lr,_r],[nr,_r]]:[];un.point=Yt[Rr]}),Zt}function Et(Yt){return Yt.map(function(Zt,nr){return{x:Math.round(tt(Zt,nr)/ye)*ye,y:Math.round(at(Zt,nr)/ye)*ye,i:nr}})}return Dt.links=function(Yt){return Nu(Et(Yt)).edges.filter(function(Zt){return Zt.l&&Zt.r}).map(function(Zt){return{source:Yt[Zt.l.i],target:Yt[Zt.r.i]}})},Dt.triangles=function(Yt){var Zt=[];return Nu(Et(Yt)).cells.forEach(function(nr,_r){for(var Lr=nr.site,Jr=nr.edges.sort(Vr),on=-1,Rr=Jr.length,Br,jr=Jr[Rr-1].edge,un=jr.l===Lr?jr.r:jr.l;++onvn&&(vn=nr.x),nr.y>qr&&(qr=nr.y),Jr.push(nr.x),on.push(nr.y);else for(Rr=0;Rrvn&&(vn=Vn),qn>qr&&(qr=qn),Jr.push(Vn),on.push(qn)}var ui=vn-jr,Qn=qr-un;ui>Qn?qr=un+ui:vn=jr+Qn;function ii(Mi,Ii,ra,ka,la,Kn,Bi,Ti){if(!(isNaN(ra)||isNaN(ka)))if(Mi.leaf){var Zi=Mi.x,ba=Mi.y;if(Zi!=null)if(d(Zi-ra)+d(ba-ka)<.01)fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti);else{var na=Mi.point;Mi.x=Mi.y=Mi.point=null,fi(Mi,na,Zi,ba,la,Kn,Bi,Ti),fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}else Mi.x=ra,Mi.y=ka,Mi.point=Ii}else fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}function fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti){var Zi=(la+Bi)*.5,ba=(Kn+Ti)*.5,na=ra>=Zi,Ka=ka>=ba,Ja=Ka<<1|na;Mi.leaf=!1,Mi=Mi.nodes[Ja]||(Mi.nodes[Ja]=ho()),na?la=Zi:Bi=Zi,Ka?Kn=ba:Ti=ba,ii(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}var Oi=ho();if(Oi.add=function(Mi){ii(Oi,Mi,+_r(Mi,++Rr),+Lr(Mi,Rr),jr,un,vn,qr)},Oi.visit=function(Mi){sl(Mi,Oi,jr,un,vn,qr)},Oi.find=function(Mi){return vu(Oi,Mi[0],Mi[1],jr,un,vn,qr)},Rr=-1,Ce==null){for(;++Rrft||Lr>Dt||Jr=Vn,Qn=Be>=qn,ii=Qn<<1|ui,fi=ii+4;iiBe&&(ft=Ce.slice(Be,ft),Et[Dt]?Et[Dt]+=ft:Et[++Dt]=ft),(tt=tt[0])===(at=at[0])?Et[Dt]?Et[Dt]+=at:Et[++Dt]=at:(Et[++Dt]=null,Yt.push({i:Dt,x:za(tt,at)})),Be=$a.lastIndex;return Be=0&&!(tt=i.interpolators[Be](fe,Ce)););return tt}i.interpolators=[function(fe,Ce){var Be=typeof Ce;return(Be==="string"?cn.has(Ce.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ce)?Ra:Ua:Ce instanceof gt?Ra:Array.isArray(Ce)?_o:Be==="object"&&isNaN(Ce)?ll:za)(fe,Ce)}],i.interpolateArray=_o;function _o(fe,Ce){var Be=[],tt=[],at=fe.length,ft=Ce.length,Dt=Math.min(fe.length,Ce.length),Et;for(Et=0;Et=0?fe.slice(0,Ce):fe,tt=Ce>=0?fe.slice(Ce+1):"in";return Be=bo.get(Be)||wf,tt=xc.get(tt)||k,es(tt(Be.apply(null,S.call(arguments,1))))};function es(fe){return function(Ce){return Ce<=0?0:Ce>=1?1:fe(Ce)}}function Za(fe){return function(Ce){return 1-fe(1-Ce)}}function Uu(fe){return function(Ce){return .5*(Ce<.5?fe(2*Ce):2-fe(2-2*Ce))}}function Cs(fe){return fe*fe}function ts(fe){return fe*fe*fe}function Vu(fe){if(fe<=0)return 0;if(fe>=1)return 1;var Ce=fe*fe,Be=Ce*fe;return 4*(fe<.5?Be:3*(fe-Ce)+Be-.75)}function Tf(fe){return function(Ce){return Math.pow(Ce,fe)}}function bc(fe){return 1-Math.cos(fe*it)}function du(fe){return Math.pow(2,10*(fe-1))}function wc(fe){return 1-Math.sqrt(1-fe*fe)}function Tc(fe,Ce){var Be;return arguments.length<2&&(Ce=.45),arguments.length?Be=Ce/Ne*Math.asin(1/fe):(fe=1,Be=Ce/4),function(tt){return 1+fe*Math.pow(2,-10*tt)*Math.sin((tt-Be)*Ne/Ce)}}function Ac(fe){return fe||(fe=1.70158),function(Ce){return Ce*Ce*((fe+1)*Ce-fe)}}function Hu(fe){return fe<.36363636363636365?7.5625*fe*fe:fe<.7272727272727273?7.5625*(fe-=.5454545454545454)*fe+.75:fe<.9090909090909091?7.5625*(fe-=.8181818181818182)*fe+.9375:7.5625*(fe-=.9545454545454546)*fe+.984375}i.interpolateHcl=Mc;function Mc(fe,Ce){fe=i.hcl(fe),Ce=i.hcl(Ce);var Be=fe.h,tt=fe.c,at=fe.l,ft=Ce.h-Be,Dt=Ce.c-tt,Et=Ce.l-at;return isNaN(Dt)&&(Dt=0,tt=isNaN(tt)?Ce.c:tt),isNaN(ft)?(ft=0,Be=isNaN(Be)?Ce.h:Be):ft>180?ft-=360:ft<-180&&(ft+=360),function(Yt){return kt(Be+ft*Yt,tt+Dt*Yt,at+Et*Yt)+""}}i.interpolateHsl=Sc;function Sc(fe,Ce){fe=i.hsl(fe),Ce=i.hsl(Ce);var Be=fe.h,tt=fe.s,at=fe.l,ft=Ce.h-Be,Dt=Ce.s-tt,Et=Ce.l-at;return isNaN(Dt)&&(Dt=0,tt=isNaN(tt)?Ce.s:tt),isNaN(ft)?(ft=0,Be=isNaN(Be)?Ce.h:Be):ft>180?ft-=360:ft<-180&&(ft+=360),function(Yt){return Ct(Be+ft*Yt,tt+Dt*Yt,at+Et*Yt)+""}}i.interpolateLab=Af;function Af(fe,Ce){fe=i.lab(fe),Ce=i.lab(Ce);var Be=fe.l,tt=fe.a,at=fe.b,ft=Ce.l-Be,Dt=Ce.a-tt,Et=Ce.b-at;return function(Yt){return Ge(Be+ft*Yt,tt+Dt*Yt,at+Et*Yt)+""}}i.interpolateRound=Mf;function Mf(fe,Ce){return Ce-=fe,function(Be){return Math.round(fe+Ce*Be)}}i.transform=function(fe){var Ce=v.createElementNS(i.ns.prefix.svg,"g");return(i.transform=function(Be){if(Be!=null){Ce.setAttribute("transform",Be);var tt=Ce.transform.baseVal.consolidate()}return new Ys(tt?tt.matrix:Sf)})(fe)};function Ys(fe){var Ce=[fe.a,fe.b],Be=[fe.c,fe.d],tt=zl(Ce),at=fl(Ce,Be),ft=zl(kl(Be,Ce,-at))||0;Ce[0]*Be[1]180?Ce+=360:Ce-fe>180&&(fe+=360),tt.push({i:Be.push(vs(Be)+"rotate(",null,")")-2,x:za(fe,Ce)})):Ce&&Be.push(vs(Be)+"rotate("+Ce+")")}function Ef(fe,Ce,Be,tt){fe!==Ce?tt.push({i:Be.push(vs(Be)+"skewX(",null,")")-2,x:za(fe,Ce)}):Ce&&Be.push(vs(Be)+"skewX("+Ce+")")}function _f(fe,Ce,Be,tt){if(fe[0]!==Ce[0]||fe[1]!==Ce[1]){var at=Be.push(vs(Be)+"scale(",null,",",null,")");tt.push({i:at-4,x:za(fe[0],Ce[0])},{i:at-2,x:za(fe[1],Ce[1])})}else(Ce[0]!==1||Ce[1]!==1)&&Be.push(vs(Be)+"scale("+Ce+")")}function gu(fe,Ce){var Be=[],tt=[];return fe=i.transform(fe),Ce=i.transform(Ce),Ec(fe.translate,Ce.translate,Be,tt),pu(fe.rotate,Ce.rotate,Be,tt),Ef(fe.skew,Ce.skew,Be,tt),_f(fe.scale,Ce.scale,Be,tt),fe=Ce=null,function(at){for(var ft=-1,Dt=tt.length,Et;++ft0?ft=qr:(Be.c=null,Be.t=NaN,Be=null,Ce.end({type:"end",alpha:ft=0})):qr>0&&(Ce.start({type:"start",alpha:ft=qr}),Be=_n(fe.tick)),fe):ft},fe.start=function(){var qr,Vn=Jr.length,qn=on.length,ui=tt[0],Qn=tt[1],ii,fi;for(qr=0;qr=0;)ft.push(nr=Zt[Yt]),nr.parent=Et,nr.depth=Et.depth+1;Be&&(Et.value=0),Et.children=Zt}else Be&&(Et.value=+Be.call(tt,Et,Et.depth)||0),delete Et.children;return wo(at,function(_r){var Lr,Jr;fe&&(Lr=_r.children)&&Lr.sort(fe),Be&&(Jr=_r.parent)&&(Jr.value+=_r.value)}),Dt}return tt.sort=function(at){return arguments.length?(fe=at,tt):fe},tt.children=function(at){return arguments.length?(Ce=at,tt):Ce},tt.value=function(at){return arguments.length?(Be=at,tt):Be},tt.revalue=function(at){return Be&&(dl(at,function(ft){ft.children&&(ft.value=0)}),wo(at,function(ft){var Dt;ft.children||(ft.value=+Be.call(tt,ft,ft.depth)||0),(Dt=ft.parent)&&(Dt.value+=ft.value)})),at},tt};function vl(fe,Ce){return i.rebind(fe,Ce,"sort","children","value"),fe.nodes=fe,fe.links=Cc,fe}function dl(fe,Ce){for(var Be=[fe];(fe=Be.pop())!=null;)if(Ce(fe),(at=fe.children)&&(tt=at.length))for(var tt,at;--tt>=0;)Be.push(at[tt])}function wo(fe,Ce){for(var Be=[fe],tt=[];(fe=Be.pop())!=null;)if(tt.push(fe),(Dt=fe.children)&&(ft=Dt.length))for(var at=-1,ft,Dt;++atat&&(at=Et),tt.push(Et)}for(Dt=0;Dttt&&(Be=Ce,tt=at);return Be}function Lf(fe){return fe.reduce(Ho,0)}function Ho(fe,Ce){return fe+Ce[1]}i.layout.histogram=function(){var fe=!0,Ce=Number,Be=Zs,tt=Pf;function at(ft,Lr){for(var Et=[],Yt=ft.map(Ce,this),Zt=Be.call(this,Yt,Lr),nr=tt.call(this,Zt,Yt,Lr),_r,Lr=-1,Jr=Yt.length,on=nr.length-1,Rr=fe?1:1/Jr,Br;++Lr0)for(Lr=-1;++Lr=Zt[0]&&Br<=Zt[1]&&(_r=Et[i.bisect(nr,Br,1,on)-1],_r.y+=Rr,_r.push(ft[Lr]));return Et}return at.value=function(ft){return arguments.length?(Ce=ft,at):Ce},at.range=function(ft){return arguments.length?(Be=rn(ft),at):Be},at.bins=function(ft){return arguments.length?(tt=typeof ft=="number"?function(Dt){return ju(Dt,ft)}:rn(ft),at):tt},at.frequency=function(ft){return arguments.length?(fe=!!ft,at):fe},at};function Pf(fe,Ce){return ju(fe,Math.ceil(Math.log(Ce.length)/Math.LN2+1))}function ju(fe,Ce){for(var Be=-1,tt=+fe[0],at=(fe[1]-tt)/Ce,ft=[];++Be<=Ce;)ft[Be]=at*Be+tt;return ft}function Zs(fe){return[i.min(fe),i.max(fe)]}i.layout.pack=function(){var fe=i.layout.hierarchy().sort(Ps),Ce=0,Be=[1,1],tt;function at(ft,Dt){var Et=fe.call(this,ft,Dt),Yt=Et[0],Zt=Be[0],nr=Be[1],_r=tt==null?Math.sqrt:typeof tt=="function"?tt:function(){return tt};if(Yt.x=Yt.y=0,wo(Yt,function(Jr){Jr.r=+_r(Jr.value)}),wo(Yt,Go),Ce){var Lr=Ce*(tt?1:Math.max(2*Yt.r/Zt,2*Yt.r/nr))/2;wo(Yt,function(Jr){Jr.r+=Lr}),wo(Yt,Go),wo(Yt,function(Jr){Jr.r-=Lr})}return Rs(Yt,Zt/2,nr/2,tt?1:1/Math.max(2*Yt.r/Zt,2*Yt.r/nr)),Et}return at.size=function(ft){return arguments.length?(Be=ft,at):Be},at.radius=function(ft){return arguments.length?(tt=ft==null||typeof ft=="function"?ft:+ft,at):tt},at.padding=function(ft){return arguments.length?(Ce=+ft,at):Ce},vl(at,fe)};function Ps(fe,Ce){return fe.value-Ce.value}function Tu(fe,Ce){var Be=fe._pack_next;fe._pack_next=Ce,Ce._pack_prev=fe,Ce._pack_next=Be,Be._pack_prev=Ce}function Da(fe,Ce){fe._pack_next=Ce,Ce._pack_prev=fe}function Bl(fe,Ce){var Be=Ce.x-fe.x,tt=Ce.y-fe.y,at=fe.r+Ce.r;return .999*at*at>Be*Be+tt*tt}function Go(fe){if(!(Ce=fe.children)||!(Lr=Ce.length))return;var Ce,Be=1/0,tt=-1/0,at=1/0,ft=-1/0,Dt,Et,Yt,Zt,nr,_r,Lr;function Jr(qr){Be=Math.min(qr.x-qr.r,Be),tt=Math.max(qr.x+qr.r,tt),at=Math.min(qr.y-qr.r,at),ft=Math.max(qr.y+qr.r,ft)}if(Ce.forEach(ds),Dt=Ce[0],Dt.x=-Dt.r,Dt.y=0,Jr(Dt),Lr>1&&(Et=Ce[1],Et.x=Et.r,Et.y=0,Jr(Et),Lr>2))for(Yt=Ce[2],Wo(Dt,Et,Yt),Jr(Yt),Tu(Dt,Yt),Dt._pack_prev=Yt,Tu(Yt,Et),Et=Dt._pack_next,Zt=3;ZtBr.x&&(Br=Vn),Vn.depth>jr.depth&&(jr=Vn)});var un=Ce(Rr,Br)/2-Rr.x,vn=Be[0]/(Br.x+Ce(Br,Rr)/2+un),qr=Be[1]/(jr.depth||1);dl(Jr,function(Vn){Vn.x=(Vn.x+un)*vn,Vn.y=Vn.depth*qr})}return Lr}function ft(nr){for(var _r={A:null,children:[nr]},Lr=[_r],Jr;(Jr=Lr.pop())!=null;)for(var on=Jr.children,Rr,Br=0,jr=on.length;Br0&&(Ul(Pc(Rr,nr,Lr),nr,Vn),jr+=Vn,un+=Vn),vn+=Rr.m,jr+=Jr.m,qr+=Br.m,un+=on.m;Rr&&!Do(on)&&(on.t=Rr,on.m+=vn-un),Jr&&!Yo(Br)&&(Br.t=Jr,Br.m+=jr-qr,Lr=nr)}return Lr}function Zt(nr){nr.x*=Be[0],nr.y=nr.depth*Be[1]}return at.separation=function(nr){return arguments.length?(Ce=nr,at):Ce},at.size=function(nr){return arguments.length?(tt=(Be=nr)==null?Zt:null,at):tt?null:Be},at.nodeSize=function(nr){return arguments.length?(tt=(Be=nr)==null?null:Zt,at):tt?Be:null},vl(at,fe)};function ps(fe,Ce){return fe.parent==Ce.parent?1:2}function Yo(fe){var Ce=fe.children;return Ce.length?Ce[0]:fe.t}function Do(fe){var Ce=fe.children,Be;return(Be=Ce.length)?Ce[Be-1]:fe.t}function Ul(fe,Ce,Be){var tt=Be/(Ce.i-fe.i);Ce.c-=tt,Ce.s+=Be,fe.c+=tt,Ce.z+=Be,Ce.m+=Be}function Lc(fe){for(var Ce=0,Be=0,tt=fe.children,at=tt.length,ft;--at>=0;)ft=tt[at],ft.z+=Ce,ft.m+=Ce,Ce+=ft.s+(Be+=ft.c)}function Pc(fe,Ce,Be){return fe.a.parent===Ce.parent?fe.a:Be}i.layout.cluster=function(){var fe=i.layout.hierarchy().sort(null).value(null),Ce=ps,Be=[1,1],tt=!1;function at(ft,Dt){var Et=fe.call(this,ft,Dt),Yt=Et[0],Zt,nr=0;wo(Yt,function(Rr){var Br=Rr.children;Br&&Br.length?(Rr.x=Dc(Br),Rr.y=Rc(Br)):(Rr.x=Zt?nr+=Ce(Rr,Zt):0,Rr.y=0,Zt=Rr)});var _r=Ku(Yt),Lr=Rf(Yt),Jr=_r.x-Ce(_r,Lr)/2,on=Lr.x+Ce(Lr,_r)/2;return wo(Yt,tt?function(Rr){Rr.x=(Rr.x-Yt.x)*Be[0],Rr.y=(Yt.y-Rr.y)*Be[1]}:function(Rr){Rr.x=(Rr.x-Jr)/(on-Jr)*Be[0],Rr.y=(1-(Yt.y?Rr.y/Yt.y:1))*Be[1]}),Et}return at.separation=function(ft){return arguments.length?(Ce=ft,at):Ce},at.size=function(ft){return arguments.length?(tt=(Be=ft)==null,at):tt?null:Be},at.nodeSize=function(ft){return arguments.length?(tt=(Be=ft)!=null,at):tt?Be:null},vl(at,fe)};function Rc(fe){return 1+i.max(fe,function(Ce){return Ce.y})}function Dc(fe){return fe.reduce(function(Ce,Be){return Ce+Be.x},0)/fe.length}function Ku(fe){var Ce=fe.children;return Ce&&Ce.length?Ku(Ce[0]):fe}function Rf(fe){var Ce=fe.children,Be;return Ce&&(Be=Ce.length)?Rf(Ce[Be-1]):fe}i.layout.treemap=function(){var fe=i.layout.hierarchy(),Ce=Math.round,Be=[1,1],tt=null,at=yl,ft=!1,Dt,Et="squarify",Yt=.5*(1+Math.sqrt(5));function Zt(Rr,Br){for(var jr=-1,un=Rr.length,vn,qr;++jr0;)un.push(qr=vn[Qn-1]),un.area+=qr.area,Et!=="squarify"||(qn=Lr(un,ui))<=Vn?(vn.pop(),Vn=qn):(un.area-=un.pop().area,Jr(un,ui,jr,!1),ui=Math.min(jr.dx,jr.dy),un.length=un.area=0,Vn=1/0);un.length&&(Jr(un,ui,jr,!0),un.length=un.area=0),Br.forEach(nr)}}function _r(Rr){var Br=Rr.children;if(Br&&Br.length){var jr=at(Rr),un=Br.slice(),vn,qr=[];for(Zt(un,jr.dx*jr.dy/Rr.value),qr.area=0;vn=un.pop();)qr.push(vn),qr.area+=vn.area,vn.z!=null&&(Jr(qr,vn.z?jr.dx:jr.dy,jr,!un.length),qr.length=qr.area=0);Br.forEach(_r)}}function Lr(Rr,Br){for(var jr=Rr.area,un,vn=0,qr=1/0,Vn=-1,qn=Rr.length;++Vnvn&&(vn=un));return jr*=jr,Br*=Br,jr?Math.max(Br*vn*Yt/jr,jr/(Br*qr*Yt)):1/0}function Jr(Rr,Br,jr,un){var vn=-1,qr=Rr.length,Vn=jr.x,qn=jr.y,ui=Br?Ce(Rr.area/Br):0,Qn;if(Br==jr.dx){for((un||ui>jr.dy)&&(ui=jr.dy);++vnjr.dx)&&(ui=jr.dx);++vn1);return fe+Ce*tt*Math.sqrt(-2*Math.log(ft)/ft)}},logNormal:function(){var fe=i.random.normal.apply(i,arguments);return function(){return Math.exp(fe())}},bates:function(fe){var Ce=i.random.irwinHall(fe);return function(){return Ce()/fe}},irwinHall:function(fe){return function(){for(var Ce=0,Be=0;Be2?If:Df,Zt=tt?cl:Uo;return at=Yt(fe,Ce,Zt,Be),ft=Yt(Ce,fe,Zt,qa),Et}function Et(Yt){return at(Yt)}return Et.invert=function(Yt){return ft(Yt)},Et.domain=function(Yt){return arguments.length?(fe=Yt.map(Number),Dt()):fe},Et.range=function(Yt){return arguments.length?(Ce=Yt,Dt()):Ce},Et.rangeRound=function(Yt){return Et.range(Yt).interpolate(Mf)},Et.clamp=function(Yt){return arguments.length?(tt=Yt,Dt()):tt},Et.interpolate=function(Yt){return arguments.length?(Be=Yt,Dt()):Be},Et.ticks=function(Yt){return Xo(fe,Yt)},Et.tickFormat=function(Yt,Zt){return d3_scale_linearTickFormat(fe,Yt,Zt)},Et.nice=function(Yt){return zf(fe,Yt),Dt()},Et.copy=function(){return Ff(fe,Ce,Be,tt)},Dt()}function Ju(fe,Ce){return i.rebind(fe,Ce,"range","rangeRound","interpolate","clamp")}function zf(fe,Ce){return Vl(fe,gs(vo(fe,Ce)[2])),Vl(fe,gs(vo(fe,Ce)[2])),fe}function vo(fe,Ce){Ce==null&&(Ce=10);var Be=Co(fe),tt=Be[1]-Be[0],at=Math.pow(10,Math.floor(Math.log(tt/Ce)/Math.LN10)),ft=Ce/tt*at;return ft<=.15?at*=10:ft<=.35?at*=5:ft<=.75&&(at*=2),Be[0]=Math.ceil(Be[0]/at)*at,Be[1]=Math.floor(Be[1]/at)*at+at*.5,Be[2]=at,Be}function Xo(fe,Ce){return i.range.apply(i,vo(fe,Ce))}i.scale.log=function(){return Ds(i.scale.linear().domain([0,1]),10,!0,[1,10])};function Ds(fe,Ce,Be,tt){function at(Et){return(Be?Math.log(Et<0?0:Et):-Math.log(Et>0?0:-Et))/Math.log(Ce)}function ft(Et){return Be?Math.pow(Ce,Et):-Math.pow(Ce,-Et)}function Dt(Et){return fe(at(Et))}return Dt.invert=function(Et){return ft(fe.invert(Et))},Dt.domain=function(Et){return arguments.length?(Be=Et[0]>=0,fe.domain((tt=Et.map(Number)).map(at)),Dt):tt},Dt.base=function(Et){return arguments.length?(Ce=+Et,fe.domain(tt.map(at)),Dt):Ce},Dt.nice=function(){var Et=Vl(tt.map(at),Be?Math:bl);return fe.domain(Et),tt=Et.map(ft),Dt},Dt.ticks=function(){var Et=Co(tt),Yt=[],Zt=Et[0],nr=Et[1],_r=Math.floor(at(Zt)),Lr=Math.ceil(at(nr)),Jr=Ce%1?2:Ce;if(isFinite(Lr-_r)){if(Be){for(;_r0;on--)Yt.push(ft(_r)*on);for(_r=0;Yt[_r]nr;Lr--);Yt=Yt.slice(_r,Lr)}return Yt},Dt.copy=function(){return Ds(fe.copy(),Ce,Be,tt)},Ju(Dt,fe)}var bl={floor:function(fe){return-Math.ceil(-fe)},ceil:function(fe){return-Math.floor(-fe)}};i.scale.pow=function(){return Au(i.scale.linear(),1,[0,1])};function Au(fe,Ce,Be){var tt=Ks(Ce),at=Ks(1/Ce);function ft(Dt){return fe(tt(Dt))}return ft.invert=function(Dt){return at(fe.invert(Dt))},ft.domain=function(Dt){return arguments.length?(fe.domain((Be=Dt.map(Number)).map(tt)),ft):Be},ft.ticks=function(Dt){return Xo(Be,Dt)},ft.tickFormat=function(Dt,Et){return d3_scale_linearTickFormat(Be,Dt,Et)},ft.nice=function(Dt){return ft.domain(zf(Be,Dt))},ft.exponent=function(Dt){return arguments.length?(tt=Ks(Ce=Dt),at=Ks(1/Ce),fe.domain(Be.map(tt)),ft):Ce},ft.copy=function(){return Au(fe.copy(),Ce,Be)},Ju(ft,fe)}function Ks(fe){return function(Ce){return Ce<0?-Math.pow(-Ce,fe):Math.pow(Ce,fe)}}i.scale.sqrt=function(){return i.scale.pow().exponent(.5)},i.scale.ordinal=function(){return Js([],{t:"range",a:[[]]})};function Js(fe,Ce){var Be,tt,at;function ft(Et){return tt[((Be.get(Et)||(Ce.t==="range"?Be.set(Et,fe.push(Et)):NaN))-1)%tt.length]}function Dt(Et,Yt){return i.range(fe.length).map(function(Zt){return Et+Yt*Zt})}return ft.domain=function(Et){if(!arguments.length)return fe;fe=[],Be=new _;for(var Yt=-1,Zt=Et.length,nr;++Yt0?Be[ft-1]:fe[0],ftLr?0:1;if(nr=je)return Yt(nr,on)+(Zt?Yt(Zt,1-on):"")+"Z";var Rr,Br,jr,un,vn=0,qr=0,Vn,qn,ui,Qn,ii,fi,Oi,Mi,Ii=[];if((un=(+Dt.apply(this,arguments)||0)/2)&&(jr=tt===Mu?Math.sqrt(Zt*Zt+nr*nr):+tt.apply(this,arguments),on||(qr*=-1),nr&&(qr=Lt(jr/nr*Math.sin(un))),Zt&&(vn=Lt(jr/Zt*Math.sin(un)))),nr){Vn=nr*Math.cos(_r+qr),qn=nr*Math.sin(_r+qr),ui=nr*Math.cos(Lr-qr),Qn=nr*Math.sin(Lr-qr);var ra=Math.abs(Lr-_r-2*qr)<=Me?0:1;if(qr&&Wl(Vn,qn,ui,Qn)===on^ra){var ka=(_r+Lr)/2;Vn=nr*Math.cos(ka),qn=nr*Math.sin(ka),ui=Qn=null}}else Vn=qn=0;if(Zt){ii=Zt*Math.cos(Lr-vn),fi=Zt*Math.sin(Lr-vn),Oi=Zt*Math.cos(_r+vn),Mi=Zt*Math.sin(_r+vn);var la=Math.abs(_r-Lr+2*vn)<=Me?0:1;if(vn&&Wl(ii,fi,Oi,Mi)===1-on^la){var Kn=(_r+Lr)/2;ii=Zt*Math.cos(Kn),fi=Zt*Math.sin(Kn),Oi=Mi=null}}else ii=fi=0;if(Jr>ye&&(Rr=Math.min(Math.abs(nr-Zt)/2,+Be.apply(this,arguments)))>.001){Br=Zt0?0:1}function Yl(fe,Ce,Be,tt,at){var ft=fe[0]-Ce[0],Dt=fe[1]-Ce[1],Et=(at?tt:-tt)/Math.sqrt(ft*ft+Dt*Dt),Yt=Et*Dt,Zt=-Et*ft,nr=fe[0]+Yt,_r=fe[1]+Zt,Lr=Ce[0]+Yt,Jr=Ce[1]+Zt,on=(nr+Lr)/2,Rr=(_r+Jr)/2,Br=Lr-nr,jr=Jr-_r,un=Br*Br+jr*jr,vn=Be-tt,qr=nr*Jr-Lr*_r,Vn=(jr<0?-1:1)*Math.sqrt(Math.max(0,vn*vn*un-qr*qr)),qn=(qr*jr-Br*Vn)/un,ui=(-qr*Br-jr*Vn)/un,Qn=(qr*jr+Br*Vn)/un,ii=(-qr*Br+jr*Vn)/un,fi=qn-on,Oi=ui-Rr,Mi=Qn-on,Ii=ii-Rr;return fi*fi+Oi*Oi>Mi*Mi+Ii*Ii&&(qn=Qn,ui=ii),[[qn-Yt,ui-Zt],[qn*Be/vn,ui*Be/vn]]}function Fs(){return!0}function Xl(fe){var Ce=di,Be=li,tt=Fs,at=Va,ft=at.key,Dt=.7;function Et(Yt){var Zt=[],nr=[],_r=-1,Lr=Yt.length,Jr,on=rn(Ce),Rr=rn(Be);function Br(){Zt.push("M",at(fe(nr),Dt))}for(;++_r1?fe.join("L"):fe+"Z"}function ns(fe){return fe.join("L")+"Z"}function $u(fe){for(var Ce=0,Be=fe.length,tt=fe[0],at=[tt[0],",",tt[1]];++Ce1&&at.push("H",tt[0]),at.join("")}function Qs(fe){for(var Ce=0,Be=fe.length,tt=fe[0],at=[tt[0],",",tt[1]];++Ce1){Et=Ce[1],ft=fe[Yt],Yt++,tt+="C"+(at[0]+Dt[0])+","+(at[1]+Dt[1])+","+(ft[0]-Et[0])+","+(ft[1]-Et[1])+","+ft[0]+","+ft[1];for(var Zt=2;Zt9&&(ft=Be*3/Math.sqrt(ft),Dt[Et]=ft*tt,Dt[Et+1]=ft*at));for(Et=-1;++Et<=Yt;)ft=(fe[Math.min(Yt,Et+1)][0]-fe[Math.max(0,Et-1)][0])/(6*(1+Dt[Et]*Dt[Et])),Ce.push([ft||0,Dt[Et]*ft||0]);return Ce}function Cu(fe){return fe.length<3?Va(fe):fe[0]+lo(fe,Ql(fe))}i.svg.line.radial=function(){var fe=Xl(Uf);return fe.radius=fe.x,delete fe.x,fe.angle=fe.y,delete fe.y,fe};function Uf(fe){for(var Ce,Be=-1,tt=fe.length,at,ft;++BeMe)+",1 "+_r}function Zt(nr,_r,Lr,Jr){return"Q 0,0 "+Jr}return ft.radius=function(nr){return arguments.length?(Be=rn(nr),ft):Be},ft.source=function(nr){return arguments.length?(fe=rn(nr),ft):fe},ft.target=function(nr){return arguments.length?(Ce=rn(nr),ft):Ce},ft.startAngle=function(nr){return arguments.length?(tt=rn(nr),ft):tt},ft.endAngle=function(nr){return arguments.length?(at=rn(nr),ft):at},ft};function tf(fe){return fe.radius}i.svg.diagonal=function(){var fe=ef,Ce=$s,Be=ql;function tt(at,ft){var Dt=fe.call(this,at,ft),Et=Ce.call(this,at,ft),Yt=(Dt.y+Et.y)/2,Zt=[Dt,{x:Dt.x,y:Yt},{x:Et.x,y:Yt},Et];return Zt=Zt.map(Be),"M"+Zt[0]+"C"+Zt[1]+" "+Zt[2]+" "+Zt[3]}return tt.source=function(at){return arguments.length?(fe=rn(at),tt):fe},tt.target=function(at){return arguments.length?(Ce=rn(at),tt):Ce},tt.projection=function(at){return arguments.length?(Be=at,tt):Be},tt};function ql(fe){return[fe.x,fe.y]}i.svg.diagonal.radial=function(){var fe=i.svg.diagonal(),Ce=ql,Be=fe.projection;return fe.projection=function(tt){return arguments.length?Be(Vf(Ce=tt)):Ce},fe};function Vf(fe){return function(){var Ce=fe.apply(this,arguments),Be=Ce[0],tt=Ce[1]-it;return[Be*Math.cos(tt),Be*Math.sin(tt)]}}i.svg.symbol=function(){var fe=ot,Ce=qe;function Be(tt,at){return(Mt.get(fe.call(this,tt,at))||wt)(Ce.call(this,tt,at))}return Be.type=function(tt){return arguments.length?(fe=rn(tt),Be):fe},Be.size=function(tt){return arguments.length?(Ce=rn(tt),Be):Ce},Be};function qe(){return 64}function ot(){return"circle"}function wt(fe){var Ce=Math.sqrt(fe/Me);return"M0,"+Ce+"A"+Ce+","+Ce+" 0 1,1 0,"+-Ce+"A"+Ce+","+Ce+" 0 1,1 0,"+Ce+"Z"}var Mt=i.map({circle:wt,cross:function(fe){var Ce=Math.sqrt(fe/5)/2;return"M"+-3*Ce+","+-Ce+"H"+-Ce+"V"+-3*Ce+"H"+Ce+"V"+-Ce+"H"+3*Ce+"V"+Ce+"H"+Ce+"V"+3*Ce+"H"+-Ce+"V"+Ce+"H"+-3*Ce+"Z"},diamond:function(fe){var Ce=Math.sqrt(fe/(2*zt)),Be=Ce*zt;return"M0,"+-Ce+"L"+Be+",0 0,"+Ce+" "+-Be+",0Z"},square:function(fe){var Ce=Math.sqrt(fe)/2;return"M"+-Ce+","+-Ce+"L"+Ce+","+-Ce+" "+Ce+","+Ce+" "+-Ce+","+Ce+"Z"},"triangle-down":function(fe){var Ce=Math.sqrt(fe/Ut),Be=Ce*Ut/2;return"M0,"+Be+"L"+Ce+","+-Be+" "+-Ce+","+-Be+"Z"},"triangle-up":function(fe){var Ce=Math.sqrt(fe/Ut),Be=Ce*Ut/2;return"M0,"+-Be+"L"+Ce+","+Be+" "+-Ce+","+Be+"Z"}});i.svg.symbolTypes=Mt.keys();var Ut=Math.sqrt(3),zt=Math.tan(30*mt);Z.transition=function(fe){for(var Ce=Ir||++Mr,Be=Rn(fe),tt=[],at,ft,Dt=Nr||{time:Date.now(),ease:Vu,delay:0,duration:250},Et=-1,Yt=this.length;++Et0;)_r[--un].call(fe,jr);if(Br>=1)return Dt.event&&Dt.event.end.call(fe,fe.__data__,Ce),--ft.count?delete ft[tt]:delete fe[Be],1}Dt||(Et=at.time,Yt=_n(Lr,0,Et),Dt=ft[tt]={tween:new _,time:Et,timer:Yt,delay:at.delay,duration:at.duration,ease:at.ease,index:Ce},at=null,++ft.count)}i.svg.axis=function(){var fe=i.scale.linear(),Ce=Zn,Be=6,tt=6,at=3,ft=[10],Dt=null,Et;function Yt(Zt){Zt.each(function(){var nr=i.select(this),_r=this.__chart__||fe,Lr=this.__chart__=fe.copy(),Jr=Dt??(Lr.ticks?Lr.ticks.apply(Lr,ft):Lr.domain()),on=Et??(Lr.tickFormat?Lr.tickFormat.apply(Lr,ft):k),Rr=nr.selectAll(".tick").data(Jr,Lr),Br=Rr.enter().insert("g",".domain").attr("class","tick").style("opacity",ye),jr=i.transition(Rr.exit()).style("opacity",ye).remove(),un=i.transition(Rr.order()).style("opacity",1),vn=Math.max(Be,0)+at,qr,Vn=xl(Lr),qn=nr.selectAll(".domain").data([0]),ui=(qn.enter().append("path").attr("class","domain"),i.transition(qn));Br.append("line"),Br.append("text");var Qn=Br.select("line"),ii=un.select("line"),fi=Rr.select("text").text(on),Oi=Br.select("text"),Mi=un.select("text"),Ii=Ce==="top"||Ce==="left"?-1:1,ra,ka,la,Kn;if(Ce==="bottom"||Ce==="top"?(qr=Pi,ra="x",la="y",ka="x2",Kn="y2",fi.attr("dy",Ii<0?"0em":".71em").style("text-anchor","middle"),ui.attr("d","M"+Vn[0]+","+Ii*tt+"V0H"+Vn[1]+"V"+Ii*tt)):(qr=Ri,ra="y",la="x",ka="y2",Kn="x2",fi.attr("dy",".32em").style("text-anchor",Ii<0?"end":"start"),ui.attr("d","M"+Ii*tt+","+Vn[0]+"H0V"+Vn[1]+"H"+Ii*tt)),Qn.attr(Kn,Ii*Be),Oi.attr(la,Ii*vn),ii.attr(ka,0).attr(Kn,Ii*Be),Mi.attr(ra,0).attr(la,Ii*vn),Lr.rangeBand){var Bi=Lr,Ti=Bi.rangeBand()/2;_r=Lr=function(Zi){return Bi(Zi)+Ti}}else _r.rangeBand?_r=Lr:jr.call(qr,Lr,_r);Br.call(qr,_r,Lr),un.call(qr,Lr,Lr)})}return Yt.scale=function(Zt){return arguments.length?(fe=Zt,Yt):fe},Yt.orient=function(Zt){return arguments.length?(Ce=Zt in Li?Zt+"":Zn,Yt):Ce},Yt.ticks=function(){return arguments.length?(ft=x(arguments),Yt):ft},Yt.tickValues=function(Zt){return arguments.length?(Dt=Zt,Yt):Dt},Yt.tickFormat=function(Zt){return arguments.length?(Et=Zt,Yt):Et},Yt.tickSize=function(Zt){var nr=arguments.length;return nr?(Be=+Zt,tt=+arguments[nr-1],Yt):Be},Yt.innerTickSize=function(Zt){return arguments.length?(Be=+Zt,Yt):Be},Yt.outerTickSize=function(Zt){return arguments.length?(tt=+Zt,Yt):tt},Yt.tickPadding=function(Zt){return arguments.length?(at=+Zt,Yt):at},Yt.tickSubdivide=function(){return arguments.length&&Yt},Yt};var Zn="bottom",Li={top:1,right:1,bottom:1,left:1};function Pi(fe,Ce,Be){fe.attr("transform",function(tt){var at=Ce(tt);return"translate("+(isFinite(at)?at:Be(tt))+",0)"})}function Ri(fe,Ce,Be){fe.attr("transform",function(tt){var at=Ce(tt);return"translate(0,"+(isFinite(at)?at:Be(tt))+")"})}i.svg.brush=function(){var fe=J(nr,"brushstart","brush","brushend"),Ce=null,Be=null,tt=[0,0],at=[0,0],ft,Dt,Et=!0,Yt=!0,Zt=Xi[0];function nr(Rr){Rr.each(function(){var Br=i.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",on).on("touchstart.brush",on),jr=Br.selectAll(".background").data([0]);jr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Br.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var un=Br.selectAll(".resize").data(Zt,k);un.exit().remove(),un.enter().append("g").attr("class",function(qn){return"resize "+qn}).style("cursor",function(qn){return zi[qn]}).append("rect").attr("x",function(qn){return/[ew]$/.test(qn)?-3:null}).attr("y",function(qn){return/^[ns]/.test(qn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),un.style("display",nr.empty()?"none":null);var vn=i.transition(Br),qr=i.transition(jr),Vn;Ce&&(Vn=xl(Ce),qr.attr("x",Vn[0]).attr("width",Vn[1]-Vn[0]),Lr(vn)),Be&&(Vn=xl(Be),qr.attr("y",Vn[0]).attr("height",Vn[1]-Vn[0]),Jr(vn)),_r(vn)})}nr.event=function(Rr){Rr.each(function(){var Br=fe.of(this,arguments),jr={x:tt,y:at,i:ft,j:Dt},un=this.__chart__||jr;this.__chart__=jr,Ir?i.select(this).transition().each("start.brush",function(){ft=un.i,Dt=un.j,tt=un.x,at=un.y,Br({type:"brushstart"})}).tween("brush:brush",function(){var vn=_o(tt,jr.x),qr=_o(at,jr.y);return ft=Dt=null,function(Vn){tt=jr.x=vn(Vn),at=jr.y=qr(Vn),Br({type:"brush",mode:"resize"})}}).each("end.brush",function(){ft=jr.i,Dt=jr.j,Br({type:"brush",mode:"resize"}),Br({type:"brushend"})}):(Br({type:"brushstart"}),Br({type:"brush",mode:"resize"}),Br({type:"brushend"}))})};function _r(Rr){Rr.selectAll(".resize").attr("transform",function(Br){return"translate("+tt[+/e$/.test(Br)]+","+at[+/^s/.test(Br)]+")"})}function Lr(Rr){Rr.select(".extent").attr("x",tt[0]),Rr.selectAll(".extent,.n>rect,.s>rect").attr("width",tt[1]-tt[0])}function Jr(Rr){Rr.select(".extent").attr("y",at[0]),Rr.selectAll(".extent,.e>rect,.w>rect").attr("height",at[1]-at[0])}function on(){var Rr=this,Br=i.select(i.event.target),jr=fe.of(Rr,arguments),un=i.select(Rr),vn=Br.datum(),qr=!/^(n|s)$/.test(vn)&&Ce,Vn=!/^(e|w)$/.test(vn)&&Be,qn=Br.classed("extent"),ui=Je(Rr),Qn,ii=i.mouse(Rr),fi,Oi=i.select(r(Rr)).on("keydown.brush",ra).on("keyup.brush",ka);if(i.event.changedTouches?Oi.on("touchmove.brush",la).on("touchend.brush",Bi):Oi.on("mousemove.brush",la).on("mouseup.brush",Bi),un.interrupt().selectAll("*").interrupt(),qn)ii[0]=tt[0]-ii[0],ii[1]=at[0]-ii[1];else if(vn){var Mi=+/w$/.test(vn),Ii=+/^n/.test(vn);fi=[tt[1-Mi]-ii[0],at[1-Ii]-ii[1]],ii[0]=tt[Mi],ii[1]=at[Ii]}else i.event.altKey&&(Qn=ii.slice());un.style("pointer-events","none").selectAll(".resize").style("display",null),i.select("body").style("cursor",Br.style("cursor")),jr({type:"brushstart"}),la();function ra(){i.event.keyCode==32&&(qn||(Qn=null,ii[0]-=tt[1],ii[1]-=at[1],qn=2),ie())}function ka(){i.event.keyCode==32&&qn==2&&(ii[0]+=tt[1],ii[1]+=at[1],qn=0,ie())}function la(){var Ti=i.mouse(Rr),Zi=!1;fi&&(Ti[0]+=fi[0],Ti[1]+=fi[1]),qn||(i.event.altKey?(Qn||(Qn=[(tt[0]+tt[1])/2,(at[0]+at[1])/2]),ii[0]=tt[+(Ti[0]"u"&&(R=1e-6);var W,ae,ve,Se,Pe;for(ve=P,Pe=0;Pe<8;Pe++){if(Se=this.sampleCurveX(ve)-P,Math.abs(Se)ae)return ae;for(;WSe?W=ve:ae=ve,ve=(ae-W)*.5+W}return ve},p.prototype.solve=function(P,R){return this.sampleCurveY(this.solveCurveX(P,R))};var r=t;function t(P,R){this.x=P,this.y=R}t.prototype={clone:function(){return new t(this.x,this.y)},add:function(P){return this.clone()._add(P)},sub:function(P){return this.clone()._sub(P)},multByPoint:function(P){return this.clone()._multByPoint(P)},divByPoint:function(P){return this.clone()._divByPoint(P)},mult:function(P){return this.clone()._mult(P)},div:function(P){return this.clone()._div(P)},rotate:function(P){return this.clone()._rotate(P)},rotateAround:function(P,R){return this.clone()._rotateAround(P,R)},matMult:function(P){return this.clone()._matMult(P)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(P){return this.x===P.x&&this.y===P.y},dist:function(P){return Math.sqrt(this.distSqr(P))},distSqr:function(P){var R=P.x-this.x,W=P.y-this.y;return R*R+W*W},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(P){return Math.atan2(this.y-P.y,this.x-P.x)},angleWith:function(P){return this.angleWithSep(P.x,P.y)},angleWithSep:function(P,R){return Math.atan2(this.x*R-this.y*P,this.x*P+this.y*R)},_matMult:function(P){var R=P[0]*this.x+P[1]*this.y,W=P[2]*this.x+P[3]*this.y;return this.x=R,this.y=W,this},_add:function(P){return this.x+=P.x,this.y+=P.y,this},_sub:function(P){return this.x-=P.x,this.y-=P.y,this},_mult:function(P){return this.x*=P,this.y*=P,this},_div:function(P){return this.x/=P,this.y/=P,this},_multByPoint:function(P){return this.x*=P.x,this.y*=P.y,this},_divByPoint:function(P){return this.x/=P.x,this.y/=P.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var P=this.y;return this.y=this.x,this.x=-P,this},_rotate:function(P){var R=Math.cos(P),W=Math.sin(P),ae=R*this.x-W*this.y,ve=W*this.x+R*this.y;return this.x=ae,this.y=ve,this},_rotateAround:function(P,R){var W=Math.cos(P),ae=Math.sin(P),ve=R.x+W*(this.x-R.x)-ae*(this.y-R.y),Se=R.y+ae*(this.x-R.x)+W*(this.y-R.y);return this.x=ve,this.y=Se,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},t.convert=function(P){return P instanceof t?P:Array.isArray(P)?new t(P[0],P[1]):P};var a=typeof self<"u"?self:{};function n(P,R){if(Array.isArray(P)){if(!Array.isArray(R)||P.length!==R.length)return!1;for(var W=0;W=1)return 1;var R=P*P,W=R*P;return 4*(P<.5?W:3*(P-R)+W-.75)}function l(P,R,W,ae){var ve=new v(P,R,W,ae);return function(Se){return ve.solve(Se)}}var m=l(.25,.1,.25,1);function h(P,R,W){return Math.min(W,Math.max(R,P))}function b(P,R,W){var ae=W-R,ve=((P-R)%ae+ae)%ae+R;return ve===R?W:ve}function u(P,R,W){if(!P.length)return W(null,[]);var ae=P.length,ve=new Array(P.length),Se=null;P.forEach(function(Pe,et){R(Pe,function(yt,_t){yt&&(Se=yt),ve[et]=_t,--ae===0&&W(Se,ve)})})}function o(P){var R=[];for(var W in P)R.push(P[W]);return R}function d(P,R){var W=[];for(var ae in P)ae in R||W.push(ae);return W}function w(P){for(var R=[],W=arguments.length-1;W-- >0;)R[W]=arguments[W+1];for(var ae=0,ve=R;ae>R/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,P)}return P()}function T(P){return P<=1?1:Math.pow(2,Math.ceil(Math.log(P)/Math.LN2))}function s(P){return P?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(P):!1}function L(P,R){P.forEach(function(W){R[W]&&(R[W]=R[W].bind(R))})}function M(P,R){return P.indexOf(R,P.length-R.length)!==-1}function z(P,R,W){var ae={};for(var ve in P)ae[ve]=R.call(W||this,P[ve],ve,P);return ae}function D(P,R,W){var ae={};for(var ve in P)R.call(W||this,P[ve],ve,P)&&(ae[ve]=P[ve]);return ae}function N(P){return Array.isArray(P)?P.map(N):typeof P=="object"&&P?z(P,N):P}function I(P,R){for(var W=0;W=0)return!0;return!1}var k={};function B(P){k[P]||(typeof console<"u"&&console.warn(P),k[P]=!0)}function O(P,R,W){return(W.y-P.y)*(R.x-P.x)>(R.y-P.y)*(W.x-P.x)}function V(P){for(var R=0,W=0,ae=P.length,ve=ae-1,Se=void 0,Pe=void 0;W@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,W={};if(P.replace(R,function(ve,Se,Pe,et){var yt=Pe||et;return W[Se]=yt?yt.toLowerCase():!0,""}),W["max-age"]){var ae=parseInt(W["max-age"],10);isNaN(ae)?delete W["max-age"]:W["max-age"]=ae}return W}var ie=null;function ue(P){if(ie==null){var R=P.navigator?P.navigator.userAgent:null;ie=!!P.safari||!!(R&&(/\b(iPad|iPhone|iPod)\b/.test(R)||R.match("Safari")&&!R.match("Chrome")))}return ie}function J(P){try{var R=a[P];return R.setItem("_mapbox_test_",1),R.removeItem("_mapbox_test_"),!0}catch{return!1}}function X(P){return a.btoa(encodeURIComponent(P).replace(/%([0-9A-F]{2})/g,function(R,W){return String.fromCharCode(+("0x"+W))}))}function ee(P){return decodeURIComponent(a.atob(P).split("").map(function(R){return"%"+("00"+R.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var G=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now.bind(Date),Q=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,oe=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame,$,Z,se={now:G,frame:function(R){var W=Q(R);return{cancel:function(){return oe(W)}}},getImageData:function(R,W){W===void 0&&(W=0);var ae=a.document.createElement("canvas"),ve=ae.getContext("2d");if(!ve)throw new Error("failed to create canvas 2d context");return ae.width=R.width,ae.height=R.height,ve.drawImage(R,0,0,R.width,R.height),ve.getImageData(-W,-W,R.width+2*W,R.height+2*W)},resolveURL:function(R){return $||($=a.document.createElement("a")),$.href=R,$.href},hardwareConcurrency:a.navigator&&a.navigator.hardwareConcurrency||4,get devicePixelRatio(){return a.devicePixelRatio},get prefersReducedMotion(){return a.matchMedia?(Z==null&&(Z=a.matchMedia("(prefers-reduced-motion: reduce)")),Z.matches):!1}},ne={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},ce={supported:!1,testSupport:be},ge,Te=!1,we,Re=!1;a.document&&(we=a.document.createElement("img"),we.onload=function(){ge&&Ae(ge),ge=null,Re=!0},we.onerror=function(){Te=!0,ge=null},we.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function be(P){Te||!we||(Re?Ae(P):ge=P)}function Ae(P){var R=P.createTexture();P.bindTexture(P.TEXTURE_2D,R);try{if(P.texImage2D(P.TEXTURE_2D,0,P.RGBA,P.RGBA,P.UNSIGNED_BYTE,we),P.isContextLost())return;ce.supported=!0}catch{}P.deleteTexture(R),Te=!0}var me="01";function Le(){for(var P="1",R="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",W="",ae=0;ae<10;ae++)W+=R[Math.floor(Math.random()*62)];var ve=12*60*60*1e3,Se=[P,me,W].join(""),Pe=Date.now()+ve;return{token:Se,tokenExpiresAt:Pe}}var Ve=function(R,W){this._transformRequestFn=R,this._customAccessToken=W,this._createSkuToken()};Ve.prototype._createSkuToken=function(){var R=Le();this._skuToken=R.token,this._skuTokenExpiresAt=R.tokenExpiresAt},Ve.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ve.prototype.transformRequest=function(R,W){return this._transformRequestFn?this._transformRequestFn(R,W)||{url:R}:{url:R}},Ve.prototype.normalizeStyleURL=function(R,W){if(!Ue(R))return R;var ae=$e(R);return ae.path="/styles/v1"+ae.path,this._makeAPIURL(ae,this._customAccessToken||W)},Ve.prototype.normalizeGlyphsURL=function(R,W){if(!Ue(R))return R;var ae=$e(R);return ae.path="/fonts/v1"+ae.path,this._makeAPIURL(ae,this._customAccessToken||W)},Ve.prototype.normalizeSourceURL=function(R,W){if(!Ue(R))return R;var ae=$e(R);return ae.path="/v4/"+ae.authority+".json",ae.params.push("secure"),this._makeAPIURL(ae,this._customAccessToken||W)},Ve.prototype.normalizeSpriteURL=function(R,W,ae,ve){var Se=$e(R);return Ue(R)?(Se.path="/styles/v1"+Se.path+"/sprite"+W+ae,this._makeAPIURL(Se,this._customAccessToken||ve)):(Se.path+=""+W+ae,lt(Se))},Ve.prototype.normalizeTileURL=function(R,W){if(this._isSkuTokenExpired()&&this._createSkuToken(),R&&!Ue(R))return R;var ae=$e(R),ve=/(\.(png|jpg)\d*)(?=$)/,Se=/^.+\/v4\//,Pe=se.devicePixelRatio>=2||W===512?"@2x":"",et=ce.supported?".webp":"$1";ae.path=ae.path.replace(ve,""+Pe+et),ae.path=ae.path.replace(Se,"/"),ae.path="/v4"+ae.path;var yt=this._customAccessToken||rt(ae.params)||ne.ACCESS_TOKEN;return ne.REQUIRE_ACCESS_TOKEN&&yt&&this._skuToken&&ae.params.push("sku="+this._skuToken),this._makeAPIURL(ae,yt)},Ve.prototype.canonicalizeTileURL=function(R,W){var ae="/v4/",ve=/\.[\w]+$/,Se=$e(R);if(!Se.path.match(/(^\/v4\/)/)||!Se.path.match(ve))return R;var Pe="mapbox://tiles/";Pe+=Se.path.replace(ae,"");var et=Se.params;return W&&(et=et.filter(function(yt){return!yt.match(/^access_token=/)})),et.length&&(Pe+="?"+et.join("&")),Pe},Ve.prototype.canonicalizeTileset=function(R,W){for(var ae=W?Ue(W):!1,ve=[],Se=0,Pe=R.tiles||[];Se=0&&R.params.splice(Se,1)}if(ve.path!=="/"&&(R.path=""+ve.path+R.path),!ne.REQUIRE_ACCESS_TOKEN)return lt(R);if(W=W||ne.ACCESS_TOKEN,!W)throw new Error("An API access token is required to use Mapbox GL. "+ae);if(W[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+ae);return R.params=R.params.filter(function(Pe){return Pe.indexOf("access_token")===-1}),R.params.push("access_token="+W),lt(R)};function Ue(P){return P.indexOf("mapbox:")===0}var ke=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function He(P){return ke.test(P)}function Ie(P){return P.indexOf("sku=")>0&&He(P)}function rt(P){for(var R=0,W=P;R=1&&a.localStorage.setItem(W,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},xt.prototype.processRequests=function(R){},xt.prototype.postEvent=function(R,W,ae,ve){var Se=this;if(ne.EVENTS_URL){var Pe=$e(ne.EVENTS_URL);Pe.params.push("access_token="+(ve||ne.ACCESS_TOKEN||""));var et={event:this.type,created:new Date(R).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:x,skuId:me,userId:this.anonId},yt=W?w(et,W):et,_t={url:lt(Pe),headers:{"Content-Type":"text/plain"},body:JSON.stringify([yt])};this.pendingRequest=Ht(_t,function(Ft){Se.pendingRequest=null,ae(Ft),Se.saveEventData(),Se.processRequests(ve)})}},xt.prototype.queueRequest=function(R,W){this.queue.push(R),this.processRequests(W)};var St=function(P){function R(){P.call(this,"map.load"),this.success={},this.skuToken=""}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.postMapLoadEvent=function(ae,ve,Se,Pe){this.skuToken=Se,(ne.EVENTS_URL&&Pe||ne.ACCESS_TOKEN&&Array.isArray(ae)&&ae.some(function(et){return Ue(et)||He(et)}))&&this.queueRequest({id:ve,timestamp:Date.now()},Pe)},R.prototype.processRequests=function(ae){var ve=this;if(!(this.pendingRequest||this.queue.length===0)){var Se=this.queue.shift(),Pe=Se.id,et=Se.timestamp;Pe&&this.success[Pe]||(this.anonId||this.fetchEventData(),s(this.anonId)||(this.anonId=E()),this.postEvent(et,{skuToken:this.skuToken},function(yt){yt||Pe&&(ve.success[Pe]=!0)},ae))}},R}(xt),nt=function(P){function R(W){P.call(this,"appUserTurnstile"),this._customAccessToken=W}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.postTurnstileEvent=function(ae,ve){ne.EVENTS_URL&&ne.ACCESS_TOKEN&&Array.isArray(ae)&&ae.some(function(Se){return Ue(Se)||He(Se)})&&this.queueRequest(Date.now(),ve)},R.prototype.processRequests=function(ae){var ve=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var Se=dt(ne.ACCESS_TOKEN),Pe=Se?Se.u:ne.ACCESS_TOKEN,et=Pe!==this.eventData.tokenU;s(this.anonId)||(this.anonId=E(),et=!0);var yt=this.queue.shift();if(this.eventData.lastSuccess){var _t=new Date(this.eventData.lastSuccess),Ft=new Date(yt),jt=(yt-this.eventData.lastSuccess)/(24*60*60*1e3);et=et||jt>=1||jt<-1||_t.getDate()!==Ft.getDate()}else et=!0;if(!et)return this.processRequests();this.postEvent(yt,{"enabled.telemetry":!1},function(ar){ar||(ve.eventData.lastSuccess=yt,ve.eventData.tokenU=Pe)},ae)}},R}(xt),ze=new nt,Ze=ze.postTurnstileEvent.bind(ze),Je=new St,We=Je.postMapLoadEvent.bind(Je),Fe="mapbox-tiles",xe=500,ye=50,Ee=1e3*60*7,Me;function Ne(){a.caches&&!Me&&(Me=a.caches.open(Fe))}var je;function it(P,R){if(je===void 0)try{new Response(new ReadableStream),je=!0}catch{je=!1}je?R(P.body):P.blob().then(R)}function mt(P,R,W){if(Ne(),!!Me){var ae={status:R.status,statusText:R.statusText,headers:new a.Headers};R.headers.forEach(function(Pe,et){return ae.headers.set(et,Pe)});var ve=te(R.headers.get("Cache-Control")||"");if(!ve["no-store"]){ve["max-age"]&&ae.headers.set("Expires",new Date(W+ve["max-age"]*1e3).toUTCString());var Se=new Date(ae.headers.get("Expires")).getTime()-W;SeDate.now()&&!W["no-cache"]}var ct=1/0;function Tt(P){ct++,ct>ye&&(P.getActor().send("enforceCacheSizeLimit",xe),ct=0)}function Bt(P){Ne(),Me&&Me.then(function(R){R.keys().then(function(W){for(var ae=0;ae=200&&W.status<300||W.status===0)&&W.response!==null){var ve=W.response;if(P.type==="json")try{ve=JSON.parse(W.response)}catch(Se){return R(Se)}R(null,ve,W.getResponseHeader("Cache-Control"),W.getResponseHeader("Expires"))}else R(new $t(W.statusText,W.status,P.url))},W.send(P.body),{cancel:function(){return W.abort()}}}var It=function(P,R){if(!st(P.url)){if(a.fetch&&a.Request&&a.AbortController&&a.Request.prototype.hasOwnProperty("signal"))return At(P,R);if(j()&&self.worker&&self.worker.actor){var W=!0;return self.worker.actor.send("getResource",P,R,void 0,W)}}return Ct(P,R)},Pt=function(P,R){return It(w(P,{type:"json"}),R)},kt=function(P,R){return It(w(P,{type:"arrayBuffer"}),R)},Ht=function(P,R){return It(w(P,{method:"POST"}),R)};function Jt(P){var R=a.document.createElement("a");return R.href=P,R.protocol===a.document.location.protocol&&R.host===a.document.location.host}var ur="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function hr(P,R,W,ae){var ve=new a.Image,Se=a.URL;ve.onload=function(){R(null,ve),Se.revokeObjectURL(ve.src),ve.onload=null,a.requestAnimationFrame(function(){ve.src=ur})},ve.onerror=function(){return R(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Pe=new a.Blob([new Uint8Array(P)],{type:"image/png"});ve.cacheControl=W,ve.expires=ae,ve.src=P.byteLength?Se.createObjectURL(Pe):ur}function vr(P,R){var W=new a.Blob([new Uint8Array(P)],{type:"image/png"});a.createImageBitmap(W).then(function(ae){R(null,ae)}).catch(function(ae){R(new Error("Could not load image because of "+ae.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Ye,Ge,Nt=function(){Ye=[],Ge=0};Nt();var Ot=function(P,R){if(ce.supported&&(P.headers||(P.headers={}),P.headers.accept="image/webp,*/*"),Ge>=ne.MAX_PARALLEL_IMAGE_REQUESTS){var W={requestParameters:P,callback:R,cancelled:!1,cancel:function(){this.cancelled=!0}};return Ye.push(W),W}Ge++;var ae=!1,ve=function(){if(!ae)for(ae=!0,Ge--;Ye.length&&Ge0||this._oneTimeListeners&&this._oneTimeListeners[R]&&this._oneTimeListeners[R].length>0||this._eventedParent&&this._eventedParent.listens(R)},dr.prototype.setEventedParent=function(R,W){return this._eventedParent=R,this._eventedParentData=W,this};var mr=8,xr={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},pr={"*":{type:"source"}},Gr=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Pr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Dr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},cn={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},rn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Cn={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},En={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Tr={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Cr=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Wr={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ur={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},an={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},pn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},gn={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_n={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ni={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ci={type:"array",value:"*"},di={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},li={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ri={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},wr={type:"array",value:"*",minimum:1},nn={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},$r=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],dn={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Hn={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Tn={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},An={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Bn={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},Jn={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},gi={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Di={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Sr={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},kr={"*":{type:"string"}},Ar={$version:mr,$root:xr,sources:pr,source:Gr,source_vector:Pr,source_raster:Dr,source_raster_dem:cn,source_geojson:rn,source_video:Cn,source_image:En,layer:Tr,layout:Cr,layout_background:Wr,layout_fill:Ur,layout_circle:an,layout_heatmap:pn,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:gn,layout_symbol:_n,layout_raster:kn,layout_hillshade:ni,filter:ci,filter_operator:di,geometry_type:li,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:ri,expression:wr,light:nn,paint:$r,paint_fill:dn,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:Hn,paint_circle:Tn,paint_heatmap:An,paint_symbol:Bn,paint_raster:Jn,paint_hillshade:gi,paint_background:Di,transition:Sr,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:kr},Or=function(R,W,ae,ve){this.message=(R?R+": ":"")+ae,ve&&(this.identifier=ve),W!=null&&W.__line__&&(this.line=W.__line__)};function xn(P){var R=P.key,W=P.value;return W?[new Or(R,W,"constants have been deprecated as of v8")]:[]}function In(P){for(var R=[],W=arguments.length-1;W-- >0;)R[W]=arguments[W+1];for(var ae=0,ve=R;ae":P.itemType.kind==="value"?"array":"array<"+R+">"}else return P.kind}var Eo=[Vr,Qr,wn,Ln,Pn,pi,Un,pa(On),Ci];function xo(P,R){if(R.kind==="error")return null;if(P.kind==="array"){if(R.kind==="array"&&(R.N===0&&R.itemType.kind==="value"||!xo(P.itemType,R.itemType))&&(typeof P.N!="number"||P.N===R.N))return null}else{if(P.kind===R.kind)return null;if(P.kind==="value")for(var W=0,ae=Eo;W255?255:_t}function ve(_t){return _t<0?0:_t>1?1:_t}function Se(_t){return _t[_t.length-1]==="%"?ae(parseFloat(_t)/100*255):ae(parseInt(_t))}function Pe(_t){return _t[_t.length-1]==="%"?ve(parseFloat(_t)/100):ve(parseFloat(_t))}function et(_t,Ft,jt){return jt<0?jt+=1:jt>1&&(jt-=1),jt*6<1?_t+(Ft-_t)*jt*6:jt*2<1?Ft:jt*3<2?_t+(Ft-_t)*(2/3-jt)*6:_t}function yt(_t){var Ft=_t.replace(/ /g,"").toLowerCase();if(Ft in W)return W[Ft].slice();if(Ft[0]==="#"){if(Ft.length===4){var jt=parseInt(Ft.substr(1),16);return jt>=0&&jt<=4095?[(jt&3840)>>4|(jt&3840)>>8,jt&240|(jt&240)>>4,jt&15|(jt&15)<<4,1]:null}else if(Ft.length===7){var jt=parseInt(Ft.substr(1),16);return jt>=0&&jt<=16777215?[(jt&16711680)>>16,(jt&65280)>>8,jt&255,1]:null}return null}var ar=Ft.indexOf("("),er=Ft.indexOf(")");if(ar!==-1&&er+1===Ft.length){var yr=Ft.substr(0,ar),zr=Ft.substr(ar+1,er-(ar+1)).split(","),ln=1;switch(yr){case"rgba":if(zr.length!==4)return null;ln=Pe(zr.pop());case"rgb":return zr.length!==3?null:[Se(zr[0]),Se(zr[1]),Se(zr[2]),ln];case"hsla":if(zr.length!==4)return null;ln=Pe(zr.pop());case"hsl":if(zr.length!==3)return null;var en=(parseFloat(zr[0])%360+360)%360/360,Sn=Pe(zr[1]),mn=Pe(zr[2]),Mn=mn<=.5?mn*(Sn+1):mn+Sn-mn*Sn,zn=mn*2-Mn;return[ae(et(zn,Mn,en+1/3)*255),ae(et(zn,Mn,en)*255),ae(et(zn,Mn,en-1/3)*255),ln];default:return null}}return null}try{R.parseCSSColor=yt}catch{}}),bf=Nu.parseCSSColor,$i=function(R,W,ae,ve){ve===void 0&&(ve=1),this.r=R,this.g=W,this.b=ae,this.a=ve};$i.parse=function(R){if(R){if(R instanceof $i)return R;if(typeof R=="string"){var W=bf(R);if(W)return new $i(W[0]/255*W[3],W[1]/255*W[3],W[2]/255*W[3],W[3])}}},$i.prototype.toString=function(){var R=this.toArray(),W=R[0],ae=R[1],ve=R[2],Se=R[3];return"rgba("+Math.round(W)+","+Math.round(ae)+","+Math.round(ve)+","+Se+")"},$i.prototype.toArray=function(){var R=this,W=R.r,ae=R.g,ve=R.b,Se=R.a;return Se===0?[0,0,0,0]:[W*255/Se,ae*255/Se,ve*255/Se,Se]},$i.black=new $i(0,0,0,1),$i.white=new $i(1,1,1,1),$i.transparent=new $i(0,0,0,0),$i.red=new $i(1,0,0,1);var Fl=function(R,W,ae){R?this.sensitivity=W?"variant":"case":this.sensitivity=W?"accent":"base",this.locale=ae,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Fl.prototype.compare=function(R,W){return this.collator.compare(R,W)},Fl.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Bu=function(R,W,ae,ve,Se){this.text=R,this.image=W,this.scale=ae,this.fontStack=ve,this.textColor=Se},Xa=function(R){this.sections=R};Xa.fromString=function(R){return new Xa([new Bu(R,null,null,null,null)])},Xa.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(R){return R.text.length!==0||R.image&&R.image.name.length!==0})},Xa.factory=function(R){return R instanceof Xa?R:Xa.fromString(R)},Xa.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(R){return R.text}).join("")},Xa.prototype.serialize=function(){for(var R=["format"],W=0,ae=this.sections;W=0&&P<=255&&typeof R=="number"&&R>=0&&R<=255&&typeof W=="number"&&W>=0&&W<=255)){var ve=typeof ae=="number"?[P,R,W,ae]:[P,R,W];return"Invalid rgba value ["+ve.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof ae>"u"||typeof ae=="number"&&ae>=0&&ae<=1?null:"Invalid rgba value ["+[P,R,W,ae].join(", ")+"]: 'a' must be between 0 and 1."}function vu(P){if(P===null)return!0;if(typeof P=="string")return!0;if(typeof P=="boolean")return!0;if(typeof P=="number")return!0;if(P instanceof $i)return!0;if(P instanceof Fl)return!0;if(P instanceof Xa)return!0;if(P instanceof ho)return!0;if(Array.isArray(P)){for(var R=0,W=P;R2){var et=R[1];if(typeof et!="string"||!(et in ul)||et==="object")return W.error('The item type argument of "array" must be one of string, number, boolean',1);Pe=ul[et],ae++}else Pe=On;var yt;if(R.length>3){if(R[2]!==null&&(typeof R[2]!="number"||R[2]<0||R[2]!==Math.floor(R[2])))return W.error('The length argument to "array" must be a positive integer literal',2);yt=R[2],ae++}ve=pa(Pe,yt)}else ve=ul[Se];for(var _t=[];ae1)&&W.push(ve)}}return W.concat(this.args.map(function(Se){return Se.serialize()}))};var qa=function(R){this.type=pi,this.sections=R};qa.parse=function(R,W){if(R.length<2)return W.error("Expected at least one argument.");var ae=R[1];if(!Array.isArray(ae)&&typeof ae=="object")return W.error("First argument must be an image or text section.");for(var ve=[],Se=!1,Pe=1;Pe<=R.length-1;++Pe){var et=R[Pe];if(Se&&typeof et=="object"&&!Array.isArray(et)){Se=!1;var yt=null;if(et["font-scale"]&&(yt=W.parse(et["font-scale"],1,Qr),!yt))return null;var _t=null;if(et["text-font"]&&(_t=W.parse(et["text-font"],1,pa(wn)),!_t))return null;var Ft=null;if(et["text-color"]&&(Ft=W.parse(et["text-color"],1,Pn),!Ft))return null;var jt=ve[ve.length-1];jt.scale=yt,jt.font=_t,jt.textColor=Ft}else{var ar=W.parse(R[Pe],1,On);if(!ar)return null;var er=ar.type.kind;if(er!=="string"&&er!=="value"&&er!=="null"&&er!=="resolvedImage")return W.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Se=!0,ve.push({content:ar,scale:null,font:null,textColor:null})}}return new qa(ve)},qa.prototype.evaluate=function(R){var W=function(ae){var ve=ae.content.evaluate(R);return Ra(ve)===Ci?new Bu("",ve,null,null,null):new Bu(ll(ve),null,ae.scale?ae.scale.evaluate(R):null,ae.font?ae.font.evaluate(R).join(","):null,ae.textColor?ae.textColor.evaluate(R):null)};return new Xa(this.sections.map(W))},qa.prototype.eachChild=function(R){for(var W=0,ae=this.sections;W-1),ae},_o.prototype.eachChild=function(R){R(this.input)},_o.prototype.outputDefined=function(){return!1},_o.prototype.serialize=function(){return["image",this.input.serialize()]};var wf={"to-boolean":Ln,"to-color":Pn,"to-number":Qr,"to-string":wn},bo=function(R,W){this.type=R,this.args=W};bo.parse=function(R,W){if(R.length<2)return W.error("Expected at least one argument.");var ae=R[0];if((ae==="to-boolean"||ae==="to-string")&&R.length!==2)return W.error("Expected one argument.");for(var ve=wf[ae],Se=[],Pe=1;Pe4?ae="Invalid rbga value "+JSON.stringify(W)+": expected an array containing either three or four numeric values.":ae=sl(W[0],W[1],W[2],W[3]),!ae))return new $i(W[0]/255,W[1]/255,W[2]/255,W[3])}throw new Ua(ae||"Could not parse color from value '"+(typeof W=="string"?W:String(JSON.stringify(W)))+"'")}else if(this.type.kind==="number"){for(var yt=null,_t=0,Ft=this.args;_t=R[2]||P[1]<=R[1]||P[3]>=R[3])}function wc(P,R){var W=Tf(P[0]),ae=bc(P[1]),ve=Math.pow(2,R.z);return[Math.round(W*ve*ts),Math.round(ae*ve*ts)]}function Tc(P,R,W){var ae=P[0]-R[0],ve=P[1]-R[1],Se=P[0]-W[0],Pe=P[1]-W[1];return ae*Pe-Se*ve===0&&ae*Se<=0&&ve*Pe<=0}function Ac(P,R,W){return R[1]>P[1]!=W[1]>P[1]&&P[0]<(W[0]-R[0])*(P[1]-R[1])/(W[1]-R[1])+R[0]}function Hu(P,R){for(var W=!1,ae=0,ve=R.length;ae0&&jt<0||Ft<0&&jt>0}function Mf(P,R,W,ae){var ve=[R[0]-P[0],R[1]-P[1]],Se=[ae[0]-W[0],ae[1]-W[1]];return Sc(Se,ve)===0?!1:!!(Af(P,R,W,ae)&&Af(W,ae,P,R))}function Ys(P,R,W){for(var ae=0,ve=W;aeW[2]){var ve=ae*.5,Se=P[0]-W[0]>ve?-ae:W[0]-P[0]>ve?ae:0;Se===0&&(Se=P[0]-W[2]>ve?-ae:W[2]-P[0]>ve?ae:0),P[0]+=Se}Vu(R,P)}function Ec(P){P[0]=P[1]=1/0,P[2]=P[3]=-1/0}function pu(P,R,W,ae){for(var ve=Math.pow(2,ae.z)*ts,Se=[ae.x*ts,ae.y*ts],Pe=[],et=0,yt=P;et=0)return!1;var W=!0;return P.eachChild(function(ae){W&&!Ol(ae,R)&&(W=!1)}),W}var Ls=function(R,W){this.type=W.type,this.name=R,this.boundExpression=W};Ls.parse=function(R,W){if(R.length!==2||typeof R[1]!="string")return W.error("'var' expression requires exactly one string literal argument.");var ae=R[1];return W.scope.has(ae)?new Ls(ae,W.scope.get(ae)):W.error('Unknown variable "'+ae+'". Make sure "'+ae+'" has been bound in an enclosing "let" expression before using it.',1)},Ls.prototype.evaluate=function(R){return this.boundExpression.evaluate(R)},Ls.prototype.eachChild=function(){},Ls.prototype.outputDefined=function(){return!1},Ls.prototype.serialize=function(){return["var",this.name]};var rs=function(R,W,ae,ve,Se){W===void 0&&(W=[]),ve===void 0&&(ve=new Zr),Se===void 0&&(Se=[]),this.registry=R,this.path=W,this.key=W.map(function(Pe){return"["+Pe+"]"}).join(""),this.scope=ve,this.errors=Se,this.expectedType=ae};rs.prototype.parse=function(R,W,ae,ve,Se){return Se===void 0&&(Se={}),W?this.concat(W,ae,ve)._parse(R,Se):this._parse(R,Se)},rs.prototype._parse=function(R,W){(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number")&&(R=["literal",R]);function ae(Ft,jt,ar){return ar==="assert"?new $a(jt,[Ft]):ar==="coerce"?new bo(jt,[Ft]):Ft}if(Array.isArray(R)){if(R.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var ve=R[0];if(typeof ve!="string")return this.error("Expression name must be a string, but found "+typeof ve+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var Se=this.registry[ve];if(Se){var Pe=Se.parse(R,this);if(!Pe)return null;if(this.expectedType){var et=this.expectedType,yt=Pe.type;if((et.kind==="string"||et.kind==="number"||et.kind==="boolean"||et.kind==="object"||et.kind==="array")&&yt.kind==="value")Pe=ae(Pe,et,W.typeAnnotation||"assert");else if((et.kind==="color"||et.kind==="formatted"||et.kind==="resolvedImage")&&(yt.kind==="value"||yt.kind==="string"))Pe=ae(Pe,et,W.typeAnnotation||"coerce");else if(this.checkSubtype(et,yt))return null}if(!(Pe instanceof za)&&Pe.type.kind!=="resolvedImage"&&Gu(Pe)){var _t=new es;try{Pe=new za(Pe.type,Pe.evaluate(_t))}catch(Ft){return this.error(Ft.message),null}}return Pe}return this.error('Unknown expression "'+ve+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof R>"u"?this.error("'undefined' value invalid. Use null instead."):typeof R=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof R+" instead.")},rs.prototype.concat=function(R,W,ae){var ve=typeof R=="number"?this.path.concat(R):this.path,Se=ae?this.scope.concat(ae):this.scope;return new rs(this.registry,ve,W||null,Se,this.errors)},rs.prototype.error=function(R){for(var W=[],ae=arguments.length-1;ae-- >0;)W[ae]=arguments[ae+1];var ve=""+this.key+W.map(function(Se){return"["+Se+"]"}).join("");this.errors.push(new Er(ve,R))},rs.prototype.checkSubtype=function(R,W){var ae=xo(R,W);return ae&&this.error(ae),ae};function Gu(P){if(P instanceof Ls)return Gu(P.boundExpression);if(P instanceof Za&&P.name==="error")return!1;if(P instanceof Cs)return!1;if(P instanceof Uo)return!1;var R=P instanceof bo||P instanceof $a,W=!0;return P.eachChild(function(ae){R?W=W&&Gu(ae):W=W&&ae instanceof za}),W?cl(P)&&Ol(P,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function hl(P,R){for(var W=P.length-1,ae=0,ve=W,Se=0,Pe,et;ae<=ve;)if(Se=Math.floor((ae+ve)/2),Pe=P[Se],et=P[Se+1],Pe<=R){if(Se===W||RR)ve=Se-1;else throw new Ua("Input is not a number.");return 0}var Vo=function(R,W,ae){this.type=R,this.input=W,this.labels=[],this.outputs=[];for(var ve=0,Se=ae;ve=et)return W.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',_t);var jt=W.parse(yt,Ft,Se);if(!jt)return null;Se=Se||jt.type,ve.push([et,jt])}return new Vo(Se,ae,ve)},Vo.prototype.evaluate=function(R){var W=this.labels,ae=this.outputs;if(W.length===1)return ae[0].evaluate(R);var ve=this.input.evaluate(R);if(ve<=W[0])return ae[0].evaluate(R);var Se=W.length;if(ve>=W[Se-1])return ae[Se-1].evaluate(R);var Pe=hl(W,ve);return ae[Pe].evaluate(R)},Vo.prototype.eachChild=function(R){R(this.input);for(var W=0,ae=this.outputs;W0&&R.push(this.labels[W]),R.push(this.outputs[W].serialize());return R};function Ca(P,R,W){return P*(1-W)+R*W}function Wu(P,R,W){return new $i(Ca(P.r,R.r,W),Ca(P.g,R.g,W),Ca(P.b,R.b,W),Ca(P.a,R.a,W))}function _c(P,R,W){return P.map(function(ae,ve){return Ca(ae,R[ve],W)})}var mu=Object.freeze({__proto__:null,number:Ca,color:Wu,array:_c}),vl=.95047,dl=1,wo=1.08883,yu=4/29,pl=6/29,xu=3*pl*pl,Cc=pl*pl*pl,Cf=Math.PI/180,Yu=180/Math.PI;function Xu(P){return P>Cc?Math.pow(P,.3333333333333333):P/xu+yu}function Zu(P){return P>pl?P*P*P:xu*(P-yu)}function ml(P){return 255*(P<=.0031308?12.92*P:1.055*Math.pow(P,.4166666666666667)-.055)}function bu(P){return P/=255,P<=.04045?P/12.92:Math.pow((P+.055)/1.055,2.4)}function Nl(P){var R=bu(P.r),W=bu(P.g),ae=bu(P.b),ve=Xu((.4124564*R+.3575761*W+.1804375*ae)/vl),Se=Xu((.2126729*R+.7151522*W+.072175*ae)/dl),Pe=Xu((.0193339*R+.119192*W+.9503041*ae)/wo);return{l:116*Se-16,a:500*(ve-Se),b:200*(Se-Pe),alpha:P.a}}function wu(P){var R=(P.l+16)/116,W=isNaN(P.a)?R:R+P.a/500,ae=isNaN(P.b)?R:R-P.b/200;return R=dl*Zu(R),W=vl*Zu(W),ae=wo*Zu(ae),new $i(ml(3.2404542*W-1.5371385*R-.4985314*ae),ml(-.969266*W+1.8760108*R+.041556*ae),ml(.0556434*W-.2040259*R+1.0572252*ae),P.alpha)}function ga(P,R,W){return{l:Ca(P.l,R.l,W),a:Ca(P.a,R.a,W),b:Ca(P.b,R.b,W),alpha:Ca(P.alpha,R.alpha,W)}}function Lf(P){var R=Nl(P),W=R.l,ae=R.a,ve=R.b,Se=Math.atan2(ve,ae)*Yu;return{h:Se<0?Se+360:Se,c:Math.sqrt(ae*ae+ve*ve),l:W,alpha:P.a}}function Ho(P){var R=P.h*Cf,W=P.c,ae=P.l;return wu({l:ae,a:Math.cos(R)*W,b:Math.sin(R)*W,alpha:P.alpha})}function Pf(P,R,W){var ae=R-P;return P+W*(ae>180||ae<-180?ae-360*Math.round(ae/360):ae)}function ju(P,R,W){return{h:Pf(P.h,R.h,W),c:Ca(P.c,R.c,W),l:Ca(P.l,R.l,W),alpha:Ca(P.alpha,R.alpha,W)}}var Zs={forward:Nl,reverse:wu,interpolate:ga},Ps={forward:Lf,reverse:Ho,interpolate:ju},Tu=Object.freeze({__proto__:null,lab:Zs,hcl:Ps}),Da=function(R,W,ae,ve,Se){this.type=R,this.operator=W,this.interpolation=ae,this.input=ve,this.labels=[],this.outputs=[];for(var Pe=0,et=Se;Pe1}))return W.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ve={name:"cubic-bezier",controlPoints:yt}}else return W.error("Unknown interpolation type "+String(ve[0]),1,0);if(R.length-1<4)return W.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if((R.length-1)%2!==0)return W.error("Expected an even number of arguments.");if(Se=W.parse(Se,2,Qr),!Se)return null;var _t=[],Ft=null;ae==="interpolate-hcl"||ae==="interpolate-lab"?Ft=Pn:W.expectedType&&W.expectedType.kind!=="value"&&(Ft=W.expectedType);for(var jt=0;jt=ar)return W.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',yr);var ln=W.parse(er,zr,Ft);if(!ln)return null;Ft=Ft||ln.type,_t.push([ar,ln])}return Ft.kind!=="number"&&Ft.kind!=="color"&&!(Ft.kind==="array"&&Ft.itemType.kind==="number"&&typeof Ft.N=="number")?W.error("Type "+ta(Ft)+" is not interpolatable."):new Da(Ft,ae,ve,Se,_t)},Da.prototype.evaluate=function(R){var W=this.labels,ae=this.outputs;if(W.length===1)return ae[0].evaluate(R);var ve=this.input.evaluate(R);if(ve<=W[0])return ae[0].evaluate(R);var Se=W.length;if(ve>=W[Se-1])return ae[Se-1].evaluate(R);var Pe=hl(W,ve),et=W[Pe],yt=W[Pe+1],_t=Da.interpolationFactor(this.interpolation,ve,et,yt),Ft=ae[Pe].evaluate(R),jt=ae[Pe+1].evaluate(R);return this.operator==="interpolate"?mu[this.type.kind.toLowerCase()](Ft,jt,_t):this.operator==="interpolate-hcl"?Ps.reverse(Ps.interpolate(Ps.forward(Ft),Ps.forward(jt),_t)):Zs.reverse(Zs.interpolate(Zs.forward(Ft),Zs.forward(jt),_t))},Da.prototype.eachChild=function(R){R(this.input);for(var W=0,ae=this.outputs;W=ae.length)throw new Ua("Array index out of bounds: "+W+" > "+(ae.length-1)+".");if(W!==Math.floor(W))throw new Ua("Array index must be an integer, but found "+W+" instead.");return ae[W]},js.prototype.eachChild=function(R){R(this.index),R(this.input)},js.prototype.outputDefined=function(){return!1},js.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Rs=function(R,W){this.type=Ln,this.needle=R,this.haystack=W};Rs.parse=function(R,W){if(R.length!==3)return W.error("Expected 2 arguments, but found "+(R.length-1)+" instead.");var ae=W.parse(R[1],1,On),ve=W.parse(R[2],2,On);return!ae||!ve?null:Qa(ae.type,[Ln,wn,Qr,Vr,On])?new Rs(ae,ve):W.error("Expected first argument to be of type boolean, string, number or null, but found "+ta(ae.type)+" instead")},Rs.prototype.evaluate=function(R){var W=this.needle.evaluate(R),ae=this.haystack.evaluate(R);if(!ae)return!1;if(!ol(W,["boolean","string","number","null"]))throw new Ua("Expected first argument to be of type boolean, string, number or null, but found "+ta(Ra(W))+" instead.");if(!ol(ae,["string","array"]))throw new Ua("Expected second argument to be of type array or string, but found "+ta(Ra(ae))+" instead.");return ae.indexOf(W)>=0},Rs.prototype.eachChild=function(R){R(this.needle),R(this.haystack)},Rs.prototype.outputDefined=function(){return!0},Rs.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Wo=function(R,W,ae){this.type=Qr,this.needle=R,this.haystack=W,this.fromIndex=ae};Wo.parse=function(R,W){if(R.length<=2||R.length>=5)return W.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var ae=W.parse(R[1],1,On),ve=W.parse(R[2],2,On);if(!ae||!ve)return null;if(!Qa(ae.type,[Ln,wn,Qr,Vr,On]))return W.error("Expected first argument to be of type boolean, string, number or null, but found "+ta(ae.type)+" instead");if(R.length===4){var Se=W.parse(R[3],3,Qr);return Se?new Wo(ae,ve,Se):null}else return new Wo(ae,ve)},Wo.prototype.evaluate=function(R){var W=this.needle.evaluate(R),ae=this.haystack.evaluate(R);if(!ol(W,["boolean","string","number","null"]))throw new Ua("Expected first argument to be of type boolean, string, number or null, but found "+ta(Ra(W))+" instead.");if(!ol(ae,["string","array"]))throw new Ua("Expected second argument to be of type array or string, but found "+ta(Ra(ae))+" instead.");if(this.fromIndex){var ve=this.fromIndex.evaluate(R);return ae.indexOf(W,ve)}return ae.indexOf(W)},Wo.prototype.eachChild=function(R){R(this.needle),R(this.haystack),this.fromIndex&&R(this.fromIndex)},Wo.prototype.outputDefined=function(){return!1},Wo.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var R=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),R]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ps=function(R,W,ae,ve,Se,Pe){this.inputType=R,this.type=W,this.input=ae,this.cases=ve,this.outputs=Se,this.otherwise=Pe};ps.parse=function(R,W){if(R.length<5)return W.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if(R.length%2!==1)return W.error("Expected an even number of arguments.");var ae,ve;W.expectedType&&W.expectedType.kind!=="value"&&(ve=W.expectedType);for(var Se={},Pe=[],et=2;etNumber.MAX_SAFE_INTEGER)return Ft.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof er=="number"&&Math.floor(er)!==er)return Ft.error("Numeric branch labels must be integer values.");if(!ae)ae=Ra(er);else if(Ft.checkSubtype(ae,Ra(er)))return null;if(typeof Se[String(er)]<"u")return Ft.error("Branch labels must be unique.");Se[String(er)]=Pe.length}var yr=W.parse(_t,et,ve);if(!yr)return null;ve=ve||yr.type,Pe.push(yr)}var zr=W.parse(R[1],1,On);if(!zr)return null;var ln=W.parse(R[R.length-1],R.length-1,ve);return!ln||zr.type.kind!=="value"&&W.concat(1).checkSubtype(ae,zr.type)?null:new ps(ae,ve,zr,Se,Pe,ln)},ps.prototype.evaluate=function(R){var W=this.input.evaluate(R),ae=Ra(W)===this.inputType&&this.outputs[this.cases[W]]||this.otherwise;return ae.evaluate(R)},ps.prototype.eachChild=function(R){R(this.input),this.outputs.forEach(R),R(this.otherwise)},ps.prototype.outputDefined=function(){return this.outputs.every(function(R){return R.outputDefined()})&&this.otherwise.outputDefined()},ps.prototype.serialize=function(){for(var R=this,W=["match",this.input.serialize()],ae=Object.keys(this.cases).sort(),ve=[],Se={},Pe=0,et=ae;Pe=5)return W.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var ae=W.parse(R[1],1,On),ve=W.parse(R[2],2,Qr);if(!ae||!ve)return null;if(!Qa(ae.type,[pa(On),wn,On]))return W.error("Expected first argument to be of type array or string, but found "+ta(ae.type)+" instead");if(R.length===4){var Se=W.parse(R[3],3,Qr);return Se?new Do(ae.type,ae,ve,Se):null}else return new Do(ae.type,ae,ve)},Do.prototype.evaluate=function(R){var W=this.input.evaluate(R),ae=this.beginIndex.evaluate(R);if(!ol(W,["string","array"]))throw new Ua("Expected first argument to be of type array or string, but found "+ta(Ra(W))+" instead.");if(this.endIndex){var ve=this.endIndex.evaluate(R);return W.slice(ae,ve)}return W.slice(ae)},Do.prototype.eachChild=function(R){R(this.input),R(this.beginIndex),this.endIndex&&R(this.endIndex)},Do.prototype.outputDefined=function(){return!1},Do.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var R=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),R]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Ul(P,R){return P==="=="||P==="!="?R.kind==="boolean"||R.kind==="string"||R.kind==="number"||R.kind==="null"||R.kind==="value":R.kind==="string"||R.kind==="number"||R.kind==="value"}function Lc(P,R,W){return R===W}function Pc(P,R,W){return R!==W}function Rc(P,R,W){return RW}function Ku(P,R,W){return R<=W}function Rf(P,R,W){return R>=W}function yl(P,R,W,ae){return ae.compare(R,W)===0}function ja(P,R,W,ae){return!yl(P,R,W,ae)}function Co(P,R,W,ae){return ae.compare(R,W)<0}function xl(P,R,W,ae){return ae.compare(R,W)>0}function Df(P,R,W,ae){return ae.compare(R,W)<=0}function Vl(P,R,W,ae){return ae.compare(R,W)>=0}function gs(P,R,W){var ae=P!=="=="&&P!=="!=";return function(){function ve(Se,Pe,et){this.type=Ln,this.lhs=Se,this.rhs=Pe,this.collator=et,this.hasUntypedArgument=Se.type.kind==="value"||Pe.type.kind==="value"}return ve.parse=function(Pe,et){if(Pe.length!==3&&Pe.length!==4)return et.error("Expected two or three arguments.");var yt=Pe[0],_t=et.parse(Pe[1],1,On);if(!_t)return null;if(!Ul(yt,_t.type))return et.concat(1).error('"'+yt+`" comparisons are not supported for type '`+ta(_t.type)+"'.");var Ft=et.parse(Pe[2],2,On);if(!Ft)return null;if(!Ul(yt,Ft.type))return et.concat(2).error('"'+yt+`" comparisons are not supported for type '`+ta(Ft.type)+"'.");if(_t.type.kind!==Ft.type.kind&&_t.type.kind!=="value"&&Ft.type.kind!=="value")return et.error("Cannot compare types '"+ta(_t.type)+"' and '"+ta(Ft.type)+"'.");ae&&(_t.type.kind==="value"&&Ft.type.kind!=="value"?_t=new $a(Ft.type,[_t]):_t.type.kind!=="value"&&Ft.type.kind==="value"&&(Ft=new $a(_t.type,[Ft])));var jt=null;if(Pe.length===4){if(_t.type.kind!=="string"&&Ft.type.kind!=="string"&&_t.type.kind!=="value"&&Ft.type.kind!=="value")return et.error("Cannot use collator to compare non-string types.");if(jt=et.parse(Pe[3],3,ai),!jt)return null}return new ve(_t,Ft,jt)},ve.prototype.evaluate=function(Pe){var et=this.lhs.evaluate(Pe),yt=this.rhs.evaluate(Pe);if(ae&&this.hasUntypedArgument){var _t=Ra(et),Ft=Ra(yt);if(_t.kind!==Ft.kind||!(_t.kind==="string"||_t.kind==="number"))throw new Ua('Expected arguments for "'+P+'" to be (string, string) or (number, number), but found ('+_t.kind+", "+Ft.kind+") instead.")}if(this.collator&&!ae&&this.hasUntypedArgument){var jt=Ra(et),ar=Ra(yt);if(jt.kind!=="string"||ar.kind!=="string")return R(Pe,et,yt)}return this.collator?W(Pe,et,yt,this.collator.evaluate(Pe)):R(Pe,et,yt)},ve.prototype.eachChild=function(Pe){Pe(this.lhs),Pe(this.rhs),this.collator&&Pe(this.collator)},ve.prototype.outputDefined=function(){return!0},ve.prototype.serialize=function(){var Pe=[P];return this.eachChild(function(et){Pe.push(et.serialize())}),Pe},ve}()}var Ic=gs("==",Lc,yl),If=gs("!=",Pc,ja),Ff=gs("<",Rc,Co),Ju=gs(">",Dc,xl),zf=gs("<=",Ku,Df),vo=gs(">=",Rf,Vl),Xo=function(R,W,ae,ve,Se){this.type=wn,this.number=R,this.locale=W,this.currency=ae,this.minFractionDigits=ve,this.maxFractionDigits=Se};Xo.parse=function(R,W){if(R.length!==3)return W.error("Expected two arguments.");var ae=W.parse(R[1],1,Qr);if(!ae)return null;var ve=R[2];if(typeof ve!="object"||Array.isArray(ve))return W.error("NumberFormat options argument must be an object.");var Se=null;if(ve.locale&&(Se=W.parse(ve.locale,1,wn),!Se))return null;var Pe=null;if(ve.currency&&(Pe=W.parse(ve.currency,1,wn),!Pe))return null;var et=null;if(ve["min-fraction-digits"]&&(et=W.parse(ve["min-fraction-digits"],1,Qr),!et))return null;var yt=null;return ve["max-fraction-digits"]&&(yt=W.parse(ve["max-fraction-digits"],1,Qr),!yt)?null:new Xo(ae,Se,Pe,et,yt)},Xo.prototype.evaluate=function(R){return new Intl.NumberFormat(this.locale?this.locale.evaluate(R):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(R):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(R):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(R):void 0}).format(this.number.evaluate(R))},Xo.prototype.eachChild=function(R){R(this.number),this.locale&&R(this.locale),this.currency&&R(this.currency),this.minFractionDigits&&R(this.minFractionDigits),this.maxFractionDigits&&R(this.maxFractionDigits)},Xo.prototype.outputDefined=function(){return!1},Xo.prototype.serialize=function(){var R={};return this.locale&&(R.locale=this.locale.serialize()),this.currency&&(R.currency=this.currency.serialize()),this.minFractionDigits&&(R["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(R["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),R]};var Ds=function(R){this.type=Qr,this.input=R};Ds.parse=function(R,W){if(R.length!==2)return W.error("Expected 1 argument, but found "+(R.length-1)+" instead.");var ae=W.parse(R[1],1);return ae?ae.type.kind!=="array"&&ae.type.kind!=="string"&&ae.type.kind!=="value"?W.error("Expected argument of type string or array, but found "+ta(ae.type)+" instead."):new Ds(ae):null},Ds.prototype.evaluate=function(R){var W=this.input.evaluate(R);if(typeof W=="string")return W.length;if(Array.isArray(W))return W.length;throw new Ua("Expected value to be of type string or array, but found "+ta(Ra(W))+" instead.")},Ds.prototype.eachChild=function(R){R(this.input)},Ds.prototype.outputDefined=function(){return!1},Ds.prototype.serialize=function(){var R=["length"];return this.eachChild(function(W){R.push(W.serialize())}),R};var bl={"==":Ic,"!=":If,">":Ju,"<":Ff,">=":vo,"<=":zf,array:$a,at:js,boolean:$a,case:Yo,coalesce:Go,collator:Cs,format:qa,image:_o,in:Rs,"index-of":Wo,interpolate:Da,"interpolate-hcl":Da,"interpolate-lab":Da,length:Ds,let:ds,literal:za,match:ps,number:$a,"number-format":Xo,object:$a,slice:Do,step:Vo,string:$a,"to-boolean":bo,"to-color":bo,"to-number":bo,"to-string":bo,var:Ls,within:Uo};function Au(P,R){var W=R[0],ae=R[1],ve=R[2],Se=R[3];W=W.evaluate(P),ae=ae.evaluate(P),ve=ve.evaluate(P);var Pe=Se?Se.evaluate(P):1,et=sl(W,ae,ve,Pe);if(et)throw new Ua(et);return new $i(W/255*Pe,ae/255*Pe,ve/255*Pe,Pe)}function Ks(P,R){return P in R}function Js(P,R){var W=R[P];return typeof W>"u"?null:W}function kf(P,R,W,ae){for(;W<=ae;){var ve=W+ae>>1;if(R[ve]===P)return!0;R[ve]>P?ae=ve-1:W=ve+1}return!1}function ms(P){return{type:P}}Za.register(bl,{error:[mi,[wn],function(P,R){var W=R[0];throw new Ua(W.evaluate(P))}],typeof:[wn,[On],function(P,R){var W=R[0];return ta(Ra(W.evaluate(P)))}],"to-rgba":[pa(Qr,4),[Pn],function(P,R){var W=R[0];return W.evaluate(P).toArray()}],rgb:[Pn,[Qr,Qr,Qr],Au],rgba:[Pn,[Qr,Qr,Qr,Qr],Au],has:{type:Ln,overloads:[[[wn],function(P,R){var W=R[0];return Ks(W.evaluate(P),P.properties())}],[[wn,Un],function(P,R){var W=R[0],ae=R[1];return Ks(W.evaluate(P),ae.evaluate(P))}]]},get:{type:On,overloads:[[[wn],function(P,R){var W=R[0];return Js(W.evaluate(P),P.properties())}],[[wn,Un],function(P,R){var W=R[0],ae=R[1];return Js(W.evaluate(P),ae.evaluate(P))}]]},"feature-state":[On,[wn],function(P,R){var W=R[0];return Js(W.evaluate(P),P.featureState||{})}],properties:[Un,[],function(P){return P.properties()}],"geometry-type":[wn,[],function(P){return P.geometryType()}],id:[On,[],function(P){return P.id()}],zoom:[Qr,[],function(P){return P.globals.zoom}],"heatmap-density":[Qr,[],function(P){return P.globals.heatmapDensity||0}],"line-progress":[Qr,[],function(P){return P.globals.lineProgress||0}],accumulated:[On,[],function(P){return P.globals.accumulated===void 0?null:P.globals.accumulated}],"+":[Qr,ms(Qr),function(P,R){for(var W=0,ae=0,ve=R;ae":[Ln,[wn,On],function(P,R){var W=R[0],ae=R[1],ve=P.properties()[W.value],Se=ae.value;return typeof ve==typeof Se&&ve>Se}],"filter-id->":[Ln,[On],function(P,R){var W=R[0],ae=P.id(),ve=W.value;return typeof ae==typeof ve&&ae>ve}],"filter-<=":[Ln,[wn,On],function(P,R){var W=R[0],ae=R[1],ve=P.properties()[W.value],Se=ae.value;return typeof ve==typeof Se&&ve<=Se}],"filter-id-<=":[Ln,[On],function(P,R){var W=R[0],ae=P.id(),ve=W.value;return typeof ae==typeof ve&&ae<=ve}],"filter->=":[Ln,[wn,On],function(P,R){var W=R[0],ae=R[1],ve=P.properties()[W.value],Se=ae.value;return typeof ve==typeof Se&&ve>=Se}],"filter-id->=":[Ln,[On],function(P,R){var W=R[0],ae=P.id(),ve=W.value;return typeof ae==typeof ve&&ae>=ve}],"filter-has":[Ln,[On],function(P,R){var W=R[0];return W.value in P.properties()}],"filter-has-id":[Ln,[],function(P){return P.id()!==null&&P.id()!==void 0}],"filter-type-in":[Ln,[pa(wn)],function(P,R){var W=R[0];return W.value.indexOf(P.geometryType())>=0}],"filter-id-in":[Ln,[pa(On)],function(P,R){var W=R[0];return W.value.indexOf(P.id())>=0}],"filter-in-small":[Ln,[wn,pa(On)],function(P,R){var W=R[0],ae=R[1];return ae.value.indexOf(P.properties()[W.value])>=0}],"filter-in-large":[Ln,[wn,pa(On)],function(P,R){var W=R[0],ae=R[1];return kf(P.properties()[W.value],ae.value,0,ae.value.length-1)}],all:{type:Ln,overloads:[[[Ln,Ln],function(P,R){var W=R[0],ae=R[1];return W.evaluate(P)&&ae.evaluate(P)}],[ms(Ln),function(P,R){for(var W=0,ae=R;W-1}function Tl(P){return!!P.expression&&P.expression.interpolated}function ha(P){return P instanceof Number?"number":P instanceof String?"string":P instanceof Boolean?"boolean":Array.isArray(P)?"array":P===null?"null":typeof P}function Al(P){return typeof P=="object"&&P!==null&&!Array.isArray(P)}function Mu(P){return P}function Of(P,R){var W=R.type==="color",ae=P.stops&&typeof P.stops[0][0]=="object",ve=ae||P.property!==void 0,Se=ae||!ve,Pe=P.type||(Tl(R)?"exponential":"interval");if(W&&(P=In({},P),P.stops&&(P.stops=P.stops.map(function($n){return[$n[0],$i.parse($n[1])]})),P.default?P.default=$i.parse(P.default):P.default=$i.parse(R.default)),P.colorSpace&&P.colorSpace!=="rgb"&&!Tu[P.colorSpace])throw new Error("Unknown color space: "+P.colorSpace);var et,yt,_t;if(Pe==="exponential")et=Qu;else if(Pe==="interval")et=Su;else if(Pe==="categorical"){et=Gl,yt=Object.create(null);for(var Ft=0,jt=P.stops;Ft=P.stops[ae-1][0])return P.stops[ae-1][1];var ve=hl(P.stops.map(function(Se){return Se[0]}),W);return P.stops[ve][1]}function Qu(P,R,W){var ae=P.base!==void 0?P.base:1;if(ha(W)!=="number")return Ml(P.default,R.default);var ve=P.stops.length;if(ve===1||W<=P.stops[0][0])return P.stops[0][1];if(W>=P.stops[ve-1][0])return P.stops[ve-1][1];var Se=hl(P.stops.map(function(jt){return jt[0]}),W),Pe=Yl(W,ae,P.stops[Se][0],P.stops[Se+1][0]),et=P.stops[Se][1],yt=P.stops[Se+1][1],_t=mu[R.type]||Mu;if(P.colorSpace&&P.colorSpace!=="rgb"){var Ft=Tu[P.colorSpace];_t=function(jt,ar){return Ft.reverse(Ft.interpolate(Ft.forward(jt),Ft.forward(ar),Pe))}}return typeof et.evaluate=="function"?{evaluate:function(){for(var ar=[],er=arguments.length;er--;)ar[er]=arguments[er];var yr=et.evaluate.apply(void 0,ar),zr=yt.evaluate.apply(void 0,ar);if(!(yr===void 0||zr===void 0))return _t(yr,zr,Pe)}}:_t(et,yt,Pe)}function Wl(P,R,W){return R.type==="color"?W=$i.parse(W):R.type==="formatted"?W=Xa.fromString(W.toString()):R.type==="resolvedImage"?W=ho.fromString(W.toString()):ha(W)!==R.type&&(R.type!=="enum"||!R.values[W])&&(W=void 0),Ml(W,P.default,R.default)}function Yl(P,R,W,ae){var ve=ae-W,Se=P-W;return ve===0?0:R===1?Se/ve:(Math.pow(R,Se)-1)/(Math.pow(R,ve)-1)}var Fs=function(R,W){this.expression=R,this._warningHistory={},this._evaluator=new es,this._defaultValue=W?Nf(W):null,this._enumValues=W&&W.type==="enum"?W.values:null};Fs.prototype.evaluateWithoutErrorHandling=function(R,W,ae,ve,Se,Pe){return this._evaluator.globals=R,this._evaluator.feature=W,this._evaluator.featureState=ae,this._evaluator.canonical=ve,this._evaluator.availableImages=Se||null,this._evaluator.formattedSection=Pe,this.expression.evaluate(this._evaluator)},Fs.prototype.evaluate=function(R,W,ae,ve,Se,Pe){this._evaluator.globals=R,this._evaluator.feature=W||null,this._evaluator.featureState=ae||null,this._evaluator.canonical=ve,this._evaluator.availableImages=Se||null,this._evaluator.formattedSection=Pe||null;try{var et=this.expression.evaluate(this._evaluator);if(et==null||typeof et=="number"&&et!==et)return this._defaultValue;if(this._enumValues&&!(et in this._enumValues))throw new Ua("Expected value to be one of "+Object.keys(this._enumValues).map(function(yt){return JSON.stringify(yt)}).join(", ")+", but found "+JSON.stringify(et)+" instead.");return et}catch(yt){return this._warningHistory[yt.message]||(this._warningHistory[yt.message]=!0,typeof console<"u"&&console.warn(yt.message)),this._defaultValue}};function Xl(P){return Array.isArray(P)&&P.length>0&&typeof P[0]=="string"&&P[0]in bl}function zs(P,R){var W=new rs(bl,[],R?Fc(R):void 0),ae=W.parse(P,void 0,void 0,void 0,R&&R.type==="string"?{typeAnnotation:"coerce"}:void 0);return ae?wl(new Fs(ae,R)):Is(W.errors)}var Va=function(R,W){this.kind=R,this._styleExpression=W,this.isStateDependent=R!=="constant"&&!Xs(W.expression)};Va.prototype.evaluateWithoutErrorHandling=function(R,W,ae,ve,Se,Pe){return this._styleExpression.evaluateWithoutErrorHandling(R,W,ae,ve,Se,Pe)},Va.prototype.evaluate=function(R,W,ae,ve,Se,Pe){return this._styleExpression.evaluate(R,W,ae,ve,Se,Pe)};var ns=function(R,W,ae,ve){this.kind=R,this.zoomStops=ae,this._styleExpression=W,this.isStateDependent=R!=="camera"&&!Xs(W.expression),this.interpolationType=ve};ns.prototype.evaluateWithoutErrorHandling=function(R,W,ae,ve,Se,Pe){return this._styleExpression.evaluateWithoutErrorHandling(R,W,ae,ve,Se,Pe)},ns.prototype.evaluate=function(R,W,ae,ve,Se,Pe){return this._styleExpression.evaluate(R,W,ae,ve,Se,Pe)},ns.prototype.interpolationFactor=function(R,W,ae){return this.interpolationType?Da.interpolationFactor(this.interpolationType,R,W,ae):0};function $u(P,R){if(P=zs(P,R),P.result==="error")return P;var W=P.value.expression,ae=cl(W);if(!ae&&!ys(R))return Is([new Er("","data expressions not supported")]);var ve=Ol(W,["zoom"]);if(!ve&&!Hl(R))return Is([new Er("","zoom expressions not supported")]);var Se=Zl(W);if(!Se&&!ve)return Is([new Er("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(Se instanceof Er)return Is([Se]);if(Se instanceof Da&&!Tl(R))return Is([new Er("",'"interpolate" expressions cannot be used with this property')]);if(!Se)return wl(ae?new Va("constant",P.value):new Va("source",P.value));var Pe=Se instanceof Da?Se.interpolation:void 0;return wl(ae?new ns("camera",P.value,Se.labels,Pe):new ns("composite",P.value,Se.labels,Pe))}var Qs=function(R,W){this._parameters=R,this._specification=W,In(this,Of(this._parameters,this._specification))};Qs.deserialize=function(R){return new Qs(R._parameters,R._specification)},Qs.serialize=function(R){return{_parameters:R._parameters,_specification:R._specification}};function Eu(P,R){if(Al(P))return new Qs(P,R);if(Xl(P)){var W=$u(P,R);if(W.result==="error")throw new Error(W.value.map(function(ve){return ve.key+": "+ve.message}).join(", "));return W.value}else{var ae=P;return typeof P=="string"&&R.type==="color"&&(ae=$i.parse(P)),{kind:"constant",evaluate:function(){return ae}}}}function Zl(P){var R=null;if(P instanceof ds)R=Zl(P.result);else if(P instanceof Go)for(var W=0,ae=P.args;Wae.maximum?[new Or(R,W,W+" is greater than the maximum value "+ae.maximum)]:[]}function Bf(P){var R=P.valueSpec,W=hn(P.value.type),ae,ve={},Se,Pe,et=W!=="categorical"&&P.value.property===void 0,yt=!et,_t=ha(P.value.stops)==="array"&&ha(P.value.stops[0])==="array"&&ha(P.value.stops[0][0])==="object",Ft=lo({key:P.key,value:P.value,valueSpec:P.styleSpec.function,style:P.style,styleSpec:P.styleSpec,objectElementValidators:{stops:jt,default:yr}});return W==="identity"&&et&&Ft.push(new Or(P.key,P.value,'missing required property "property"')),W!=="identity"&&!P.value.stops&&Ft.push(new Or(P.key,P.value,'missing required property "stops"')),W==="exponential"&&P.valueSpec.expression&&!Tl(P.valueSpec)&&Ft.push(new Or(P.key,P.value,"exponential functions not supported")),P.styleSpec.$version>=8&&(yt&&!ys(P.valueSpec)?Ft.push(new Or(P.key,P.value,"property functions not supported")):et&&!Hl(P.valueSpec)&&Ft.push(new Or(P.key,P.value,"zoom functions not supported"))),(W==="categorical"||_t)&&P.value.property===void 0&&Ft.push(new Or(P.key,P.value,'"property" property is required')),Ft;function jt(zr){if(W==="identity")return[new Or(zr.key,zr.value,'identity function may not have a "stops" property')];var ln=[],en=zr.value;return ln=ln.concat(jl({key:zr.key,value:en,valueSpec:zr.valueSpec,style:zr.style,styleSpec:zr.styleSpec,arrayElementValidator:ar})),ha(en)==="array"&&en.length===0&&ln.push(new Or(zr.key,en,"array must have at least one stop")),ln}function ar(zr){var ln=[],en=zr.value,Sn=zr.key;if(ha(en)!=="array")return[new Or(Sn,en,"array expected, "+ha(en)+" found")];if(en.length!==2)return[new Or(Sn,en,"array length 2 expected, length "+en.length+" found")];if(_t){if(ha(en[0])!=="object")return[new Or(Sn,en,"object expected, "+ha(en[0])+" found")];if(en[0].zoom===void 0)return[new Or(Sn,en,"object stop key must have zoom")];if(en[0].value===void 0)return[new Or(Sn,en,"object stop key must have value")];if(Pe&&Pe>hn(en[0].zoom))return[new Or(Sn,en[0].zoom,"stop zoom values must appear in ascending order")];hn(en[0].zoom)!==Pe&&(Pe=hn(en[0].zoom),Se=void 0,ve={}),ln=ln.concat(lo({key:Sn+"[0]",value:en[0],valueSpec:{zoom:{}},style:zr.style,styleSpec:zr.styleSpec,objectElementValidators:{zoom:Sl,value:er}}))}else ln=ln.concat(er({key:Sn+"[0]",value:en[0],valueSpec:{},style:zr.style,styleSpec:zr.styleSpec},en));return Xl(sn(en[1]))?ln.concat([new Or(Sn+"[1]",en[1],"expressions are not allowed in function stops.")]):ln.concat(Ir({key:Sn+"[1]",value:en[1],valueSpec:R,style:zr.style,styleSpec:zr.styleSpec}))}function er(zr,ln){var en=ha(zr.value),Sn=hn(zr.value),mn=zr.value!==null?zr.value:ln;if(!ae)ae=en;else if(en!==ae)return[new Or(zr.key,mn,en+" stop domain type must match previous stop domain type "+ae)];if(en!=="number"&&en!=="string"&&en!=="boolean")return[new Or(zr.key,mn,"stop domain value must be a number, string, or boolean")];if(en!=="number"&&W!=="categorical"){var Mn="number expected, "+en+" found";return ys(R)&&W===void 0&&(Mn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Or(zr.key,mn,Mn)]}return W==="categorical"&&en==="number"&&(!isFinite(Sn)||Math.floor(Sn)!==Sn)?[new Or(zr.key,mn,"integer expected, found "+Sn)]:W!=="categorical"&&en==="number"&&Se!==void 0&&Sn=2&&P[1]!=="$id"&&P[1]!=="$type";case"in":return P.length>=3&&(typeof P[1]!="string"||Array.isArray(P[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return P.length!==3||Array.isArray(P[1])||Array.isArray(P[2]);case"any":case"all":for(var R=0,W=P.slice(1);RR?1:0}function Jl(P){if(!Array.isArray(P))return!1;if(P[0]==="within")return!0;for(var R=1;R"||R==="<="||R===">="?Cu(P[1],P[2],R):R==="any"?Uf(P.slice(1)):R==="all"?["all"].concat(P.slice(1).map(Ql)):R==="none"?["all"].concat(P.slice(1).map(Ql).map($s)):R==="in"?$l(P[1],P.slice(2)):R==="!in"?$s($l(P[1],P.slice(2))):R==="has"?ef(P[1]):R==="!has"?$s(ef(P[1])):R==="within"?P:!0;return W}function Cu(P,R,W){switch(P){case"$type":return["filter-type-"+W,R];case"$id":return["filter-id-"+W,R];default:return["filter-"+W,P,R]}}function Uf(P){return["any"].concat(P.map(Ql))}function $l(P,R){if(R.length===0)return!1;switch(P){case"$type":return["filter-type-in",["literal",R]];case"$id":return["filter-id-in",["literal",R]];default:return R.length>200&&!R.some(function(W){return typeof W!=typeof R[0]})?["filter-in-large",P,["literal",R.sort(qu)]]:["filter-in-small",P,["literal",R]]}}function ef(P){switch(P){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",P]}}function $s(P){return["!",P]}function tf(P){return _u(sn(P.value))?ks(In({},P,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ql(P)}function ql(P){var R=P.value,W=P.key;if(ha(R)!=="array")return[new Or(W,R,"array expected, "+ha(R)+" found")];var ae=P.styleSpec,ve,Se=[];if(R.length<1)return[new Or(W,R,"filter array must have at least 1 element")];switch(Se=Se.concat(Kl({key:W+"[0]",value:R[0],valueSpec:ae.filter_operator,style:P.style,styleSpec:P.styleSpec})),hn(R[0])){case"<":case"<=":case">":case">=":R.length>=2&&hn(R[1])==="$type"&&Se.push(new Or(W,R,'"$type" cannot be use with operator "'+R[0]+'"'));case"==":case"!=":R.length!==3&&Se.push(new Or(W,R,'filter array for operator "'+R[0]+'" must have 3 elements'));case"in":case"!in":R.length>=2&&(ve=ha(R[1]),ve!=="string"&&Se.push(new Or(W+"[1]",R[1],"string expected, "+ve+" found")));for(var Pe=2;Pe=Ft[er+0]&&ae>=Ft[er+1])?(Pe[ar]=!0,Se.push(_t[ar])):Pe[ar]=!1}}},va.prototype._forEachCell=function(P,R,W,ae,ve,Se,Pe,et){for(var yt=this._convertToCellCoord(P),_t=this._convertToCellCoord(R),Ft=this._convertToCellCoord(W),jt=this._convertToCellCoord(ae),ar=yt;ar<=Ft;ar++)for(var er=_t;er<=jt;er++){var yr=this.d*er+ar;if(!(et&&!et(this._convertFromCellCoord(ar),this._convertFromCellCoord(er),this._convertFromCellCoord(ar+1),this._convertFromCellCoord(er+1)))&&ve.call(this,P,R,W,ae,yr,Se,Pe,et))return}},va.prototype._convertFromCellCoord=function(P){return(P-this.padding)/this.scale},va.prototype._convertToCellCoord=function(P){return Math.max(0,Math.min(this.d-1,Math.floor(P*this.scale)+this.padding))},va.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var P=this.cells,R=Xi+this.cells.length+1+1,W=0,ae=0;ae=0)){var jt=P[Ft];_t[Ft]=Ce[yt].shallow.indexOf(Ft)>=0?jt:Dt(jt,R)}P instanceof Error&&(_t.message=P.message)}if(_t.$name)throw new Error("$name property is reserved for worker serialization logic.");return yt!=="Object"&&(_t.$name=yt),_t}throw new Error("can't serialize object of type "+typeof P)}function Et(P){if(P==null||typeof P=="boolean"||typeof P=="number"||typeof P=="string"||P instanceof Boolean||P instanceof Number||P instanceof String||P instanceof Date||P instanceof RegExp||at(P)||ft(P)||ArrayBuffer.isView(P)||P instanceof Ia)return P;if(Array.isArray(P))return P.map(Et);if(typeof P=="object"){var R=P.$name||"Object",W=Ce[R],ae=W.klass;if(!ae)throw new Error("can't deserialize unregistered class "+R);if(ae.deserialize)return ae.deserialize(P);for(var ve=Object.create(ae.prototype),Se=0,Pe=Object.keys(P);Se=0?yt:Et(yt)}}return ve}throw new Error("can't deserialize object of type "+typeof P)}var Yt=function(){this.first=!0};Yt.prototype.update=function(R,W){var ae=Math.floor(R);return this.first?(this.first=!1,this.lastIntegerZoom=ae,this.lastIntegerZoomTime=0,this.lastZoom=R,this.lastFloorZoom=ae,!0):(this.lastFloorZoom>ae?(this.lastIntegerZoom=ae+1,this.lastIntegerZoomTime=W):this.lastFloorZoom=128&&P<=255},Arabic:function(P){return P>=1536&&P<=1791},"Arabic Supplement":function(P){return P>=1872&&P<=1919},"Arabic Extended-A":function(P){return P>=2208&&P<=2303},"Hangul Jamo":function(P){return P>=4352&&P<=4607},"Unified Canadian Aboriginal Syllabics":function(P){return P>=5120&&P<=5759},Khmer:function(P){return P>=6016&&P<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(P){return P>=6320&&P<=6399},"General Punctuation":function(P){return P>=8192&&P<=8303},"Letterlike Symbols":function(P){return P>=8448&&P<=8527},"Number Forms":function(P){return P>=8528&&P<=8591},"Miscellaneous Technical":function(P){return P>=8960&&P<=9215},"Control Pictures":function(P){return P>=9216&&P<=9279},"Optical Character Recognition":function(P){return P>=9280&&P<=9311},"Enclosed Alphanumerics":function(P){return P>=9312&&P<=9471},"Geometric Shapes":function(P){return P>=9632&&P<=9727},"Miscellaneous Symbols":function(P){return P>=9728&&P<=9983},"Miscellaneous Symbols and Arrows":function(P){return P>=11008&&P<=11263},"CJK Radicals Supplement":function(P){return P>=11904&&P<=12031},"Kangxi Radicals":function(P){return P>=12032&&P<=12255},"Ideographic Description Characters":function(P){return P>=12272&&P<=12287},"CJK Symbols and Punctuation":function(P){return P>=12288&&P<=12351},Hiragana:function(P){return P>=12352&&P<=12447},Katakana:function(P){return P>=12448&&P<=12543},Bopomofo:function(P){return P>=12544&&P<=12591},"Hangul Compatibility Jamo":function(P){return P>=12592&&P<=12687},Kanbun:function(P){return P>=12688&&P<=12703},"Bopomofo Extended":function(P){return P>=12704&&P<=12735},"CJK Strokes":function(P){return P>=12736&&P<=12783},"Katakana Phonetic Extensions":function(P){return P>=12784&&P<=12799},"Enclosed CJK Letters and Months":function(P){return P>=12800&&P<=13055},"CJK Compatibility":function(P){return P>=13056&&P<=13311},"CJK Unified Ideographs Extension A":function(P){return P>=13312&&P<=19903},"Yijing Hexagram Symbols":function(P){return P>=19904&&P<=19967},"CJK Unified Ideographs":function(P){return P>=19968&&P<=40959},"Yi Syllables":function(P){return P>=40960&&P<=42127},"Yi Radicals":function(P){return P>=42128&&P<=42191},"Hangul Jamo Extended-A":function(P){return P>=43360&&P<=43391},"Hangul Syllables":function(P){return P>=44032&&P<=55215},"Hangul Jamo Extended-B":function(P){return P>=55216&&P<=55295},"Private Use Area":function(P){return P>=57344&&P<=63743},"CJK Compatibility Ideographs":function(P){return P>=63744&&P<=64255},"Arabic Presentation Forms-A":function(P){return P>=64336&&P<=65023},"Vertical Forms":function(P){return P>=65040&&P<=65055},"CJK Compatibility Forms":function(P){return P>=65072&&P<=65103},"Small Form Variants":function(P){return P>=65104&&P<=65135},"Arabic Presentation Forms-B":function(P){return P>=65136&&P<=65279},"Halfwidth and Fullwidth Forms":function(P){return P>=65280&&P<=65519}};function nr(P){for(var R=0,W=P;R=65097&&P<=65103)||Zt["CJK Compatibility Ideographs"](P)||Zt["CJK Compatibility"](P)||Zt["CJK Radicals Supplement"](P)||Zt["CJK Strokes"](P)||Zt["CJK Symbols and Punctuation"](P)&&!(P>=12296&&P<=12305)&&!(P>=12308&&P<=12319)&&P!==12336||Zt["CJK Unified Ideographs Extension A"](P)||Zt["CJK Unified Ideographs"](P)||Zt["Enclosed CJK Letters and Months"](P)||Zt["Hangul Compatibility Jamo"](P)||Zt["Hangul Jamo Extended-A"](P)||Zt["Hangul Jamo Extended-B"](P)||Zt["Hangul Jamo"](P)||Zt["Hangul Syllables"](P)||Zt.Hiragana(P)||Zt["Ideographic Description Characters"](P)||Zt.Kanbun(P)||Zt["Kangxi Radicals"](P)||Zt["Katakana Phonetic Extensions"](P)||Zt.Katakana(P)&&P!==12540||Zt["Halfwidth and Fullwidth Forms"](P)&&P!==65288&&P!==65289&&P!==65293&&!(P>=65306&&P<=65310)&&P!==65339&&P!==65341&&P!==65343&&!(P>=65371&&P<=65503)&&P!==65507&&!(P>=65512&&P<=65519)||Zt["Small Form Variants"](P)&&!(P>=65112&&P<=65118)&&!(P>=65123&&P<=65126)||Zt["Unified Canadian Aboriginal Syllabics"](P)||Zt["Unified Canadian Aboriginal Syllabics Extended"](P)||Zt["Vertical Forms"](P)||Zt["Yijing Hexagram Symbols"](P)||Zt["Yi Syllables"](P)||Zt["Yi Radicals"](P))}function Rr(P){return!!(Zt["Latin-1 Supplement"](P)&&(P===167||P===169||P===174||P===177||P===188||P===189||P===190||P===215||P===247)||Zt["General Punctuation"](P)&&(P===8214||P===8224||P===8225||P===8240||P===8241||P===8251||P===8252||P===8258||P===8263||P===8264||P===8265||P===8273)||Zt["Letterlike Symbols"](P)||Zt["Number Forms"](P)||Zt["Miscellaneous Technical"](P)&&(P>=8960&&P<=8967||P>=8972&&P<=8991||P>=8996&&P<=9e3||P===9003||P>=9085&&P<=9114||P>=9150&&P<=9165||P===9167||P>=9169&&P<=9179||P>=9186&&P<=9215)||Zt["Control Pictures"](P)&&P!==9251||Zt["Optical Character Recognition"](P)||Zt["Enclosed Alphanumerics"](P)||Zt["Geometric Shapes"](P)||Zt["Miscellaneous Symbols"](P)&&!(P>=9754&&P<=9759)||Zt["Miscellaneous Symbols and Arrows"](P)&&(P>=11026&&P<=11055||P>=11088&&P<=11097||P>=11192&&P<=11243)||Zt["CJK Symbols and Punctuation"](P)||Zt.Katakana(P)||Zt["Private Use Area"](P)||Zt["CJK Compatibility Forms"](P)||Zt["Small Form Variants"](P)||Zt["Halfwidth and Fullwidth Forms"](P)||P===8734||P===8756||P===8757||P>=9984&&P<=10087||P>=10102&&P<=10131||P===65532||P===65533)}function Br(P){return!(on(P)||Rr(P))}function jr(P){return Zt.Arabic(P)||Zt["Arabic Supplement"](P)||Zt["Arabic Extended-A"](P)||Zt["Arabic Presentation Forms-A"](P)||Zt["Arabic Presentation Forms-B"](P)}function un(P){return P>=1424&&P<=2303||Zt["Arabic Presentation Forms-A"](P)||Zt["Arabic Presentation Forms-B"](P)}function vn(P,R){return!(!R&&un(P)||P>=2304&&P<=3583||P>=3840&&P<=4255||Zt.Khmer(P))}function qr(P){for(var R=0,W=P;R-1&&(Qn=qn.error),ui&&ui(P)};function Oi(){Mi.fire(new rr("pluginStateChange",{pluginStatus:Qn,pluginURL:ii}))}var Mi=new dr,Ii=function(){return Qn},ra=function(P){return P({pluginStatus:Qn,pluginURL:ii}),Mi.on("pluginStateChange",P),P},ka=function(P,R,W){if(W===void 0&&(W=!1),Qn===qn.deferred||Qn===qn.loading||Qn===qn.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");ii=se.resolveURL(P),Qn=qn.deferred,ui=R,Oi(),W||la()},la=function(){if(Qn!==qn.deferred||!ii)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Qn=qn.loading,Oi(),ii&&kt({url:ii},function(P){P?fi(P):(Qn=qn.loaded,Oi())})},Kn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Qn===qn.loaded||Kn.applyArabicShaping!=null},isLoading:function(){return Qn===qn.loading},setState:function(R){Qn=R.pluginStatus,ii=R.pluginURL},isParsed:function(){return Kn.applyArabicShaping!=null&&Kn.processBidirectionalText!=null&&Kn.processStyledBidirectionalText!=null},getPluginURL:function(){return ii}},Bi=function(){!Kn.isLoading()&&!Kn.isLoaded()&&Ii()==="deferred"&&la()},Ti=function(R,W){this.zoom=R,W?(this.now=W.now,this.fadeDuration=W.fadeDuration,this.zoomHistory=W.zoomHistory,this.transition=W.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Yt,this.transition={})};Ti.prototype.isSupportedScript=function(R){return Vn(R,Kn.isLoaded())},Ti.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ti.prototype.getCrossfadeParameters=function(){var R=this.zoom,W=R-Math.floor(R),ae=this.crossFadingFactor();return R>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:W+(1-W)*ae}:{fromScale:.5,toScale:1,t:1-(1-ae)*W}};var Zi=function(R,W){this.property=R,this.value=W,this.expression=Eu(W===void 0?R.specification.default:W,R.specification)};Zi.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Zi.prototype.possiblyEvaluate=function(R,W,ae){return this.property.possiblyEvaluate(this,R,W,ae)};var ba=function(R){this.property=R,this.value=new Zi(R,void 0)};ba.prototype.transitioned=function(R,W){return new Ka(this.property,this.value,W,w({},R.transition,this.transition),R.now)},ba.prototype.untransitioned=function(){return new Ka(this.property,this.value,null,{},0)};var na=function(R){this._properties=R,this._values=Object.create(R.defaultTransitionablePropertyValues)};na.prototype.getValue=function(R){return N(this._values[R].value.value)},na.prototype.setValue=function(R,W){this._values.hasOwnProperty(R)||(this._values[R]=new ba(this._values[R].property)),this._values[R].value=new Zi(this._values[R].property,W===null?void 0:N(W))},na.prototype.getTransition=function(R){return N(this._values[R].transition)},na.prototype.setTransition=function(R,W){this._values.hasOwnProperty(R)||(this._values[R]=new ba(this._values[R].property)),this._values[R].transition=N(W)||void 0},na.prototype.serialize=function(){for(var R={},W=0,ae=Object.keys(this._values);Wthis.end)return this.prior=null,Se;if(this.value.isDataDriven())return this.prior=null,Se;if(vePe.zoomHistory.lastIntegerZoom?{from:ae,to:ve}:{from:Se,to:ve}},R.prototype.interpolate=function(ae){return ae},R}(Ei),Lo=function(R){this.specification=R};Lo.prototype.possiblyEvaluate=function(R,W,ae,ve){if(R.value!==void 0)if(R.expression.kind==="constant"){var Se=R.expression.evaluate(W,null,{},ae,ve);return this._calculate(Se,Se,Se,W)}else return this._calculate(R.expression.evaluate(new Ti(Math.floor(W.zoom-1),W)),R.expression.evaluate(new Ti(Math.floor(W.zoom),W)),R.expression.evaluate(new Ti(Math.floor(W.zoom+1),W)),W)},Lo.prototype._calculate=function(R,W,ae,ve){var Se=ve.zoom;return Se>ve.zoomHistory.lastIntegerZoom?{from:R,to:W}:{from:ae,to:W}},Lo.prototype.interpolate=function(R){return R};var to=function(R){this.specification=R};to.prototype.possiblyEvaluate=function(R,W,ae,ve){return!!R.expression.evaluate(W,null,{},ae,ve)},to.prototype.interpolate=function(){return!1};var ca=function(R){this.properties=R,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var W in R){var ae=R[W];ae.specification.overridable&&this.overridableProperties.push(W);var ve=this.defaultPropertyValues[W]=new Zi(ae,void 0),Se=this.defaultTransitionablePropertyValues[W]=new ba(ae);this.defaultTransitioningPropertyValues[W]=Se.untransitioned(),this.defaultPossiblyEvaluatedValues[W]=ve.possiblyEvaluate({})}};Be("DataDrivenProperty",Ei),Be("DataConstantProperty",oi),Be("CrossFadedDataDrivenProperty",Ao),Be("CrossFadedProperty",Lo),Be("ColorRampProperty",to);var Ha="-transition",Oa=function(P){function R(W,ae){if(P.call(this),this.id=W.id,this.type=W.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},W.type!=="custom"&&(W=W,this.metadata=W.metadata,this.minzoom=W.minzoom,this.maxzoom=W.maxzoom,W.type!=="background"&&(this.source=W.source,this.sourceLayer=W["source-layer"],this.filter=W.filter),ae.layout&&(this._unevaluatedLayout=new eo(ae.layout)),ae.paint)){this._transitionablePaint=new na(ae.paint);for(var ve in W.paint)this.setPaintProperty(ve,W.paint[ve],{validate:!1});for(var Se in W.layout)this.setLayoutProperty(Se,W.layout[Se],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new uo(ae.paint)}}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},R.prototype.getLayoutProperty=function(ae){return ae==="visibility"?this.visibility:this._unevaluatedLayout.getValue(ae)},R.prototype.setLayoutProperty=function(ae,ve,Se){if(Se===void 0&&(Se={}),ve!=null){var Pe="layers."+this.id+".layout."+ae;if(this._validate(Pi,Pe,ae,ve,Se))return}if(ae==="visibility"){this.visibility=ve;return}this._unevaluatedLayout.setValue(ae,ve)},R.prototype.getPaintProperty=function(ae){return M(ae,Ha)?this._transitionablePaint.getTransition(ae.slice(0,-Ha.length)):this._transitionablePaint.getValue(ae)},R.prototype.setPaintProperty=function(ae,ve,Se){if(Se===void 0&&(Se={}),ve!=null){var Pe="layers."+this.id+".paint."+ae;if(this._validate(Li,Pe,ae,ve,Se))return!1}if(M(ae,Ha))return this._transitionablePaint.setTransition(ae.slice(0,-Ha.length),ve||void 0),!1;var et=this._transitionablePaint._values[ae],yt=et.property.specification["property-type"]==="cross-faded-data-driven",_t=et.value.isDataDriven(),Ft=et.value;this._transitionablePaint.setValue(ae,ve),this._handleSpecialPaintPropertyUpdate(ae);var jt=this._transitionablePaint._values[ae].value,ar=jt.isDataDriven();return ar||_t||yt||this._handleOverridablePaintPropertyUpdate(ae,Ft,jt)},R.prototype._handleSpecialPaintPropertyUpdate=function(ae){},R.prototype._handleOverridablePaintPropertyUpdate=function(ae,ve,Se){return!1},R.prototype.isHidden=function(ae){return this.minzoom&&ae=this.maxzoom?!0:this.visibility==="none"},R.prototype.updateTransitions=function(ae){this._transitioningPaint=this._transitionablePaint.transitioned(ae,this._transitioningPaint)},R.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},R.prototype.recalculate=function(ae,ve){ae.getCrossfadeParameters&&(this._crossfadeParameters=ae.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(ae,void 0,ve)),this.paint=this._transitioningPaint.possiblyEvaluate(ae,void 0,ve)},R.prototype.serialize=function(){var ae={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(ae.layout=ae.layout||{},ae.layout.visibility=this.visibility),D(ae,function(ve,Se){return ve!==void 0&&!(Se==="layout"&&!Object.keys(ve).length)&&!(Se==="paint"&&!Object.keys(ve).length)})},R.prototype._validate=function(ae,ve,Se,Pe,et){return et===void 0&&(et={}),et&&et.validate===!1?!1:Ri(this,ae.call(Dn,{key:ve,layerType:this.type,objectKey:Se,value:Pe,styleSpec:Ar,style:{glyphs:!0,sprite:!0}}))},R.prototype.is3D=function(){return!1},R.prototype.isTileClipped=function(){return!1},R.prototype.hasOffscreenPass=function(){return!1},R.prototype.resize=function(){},R.prototype.isStateDependent=function(){for(var ae in this.paint._values){var ve=this.paint.get(ae);if(!(!(ve instanceof wa)||!ys(ve.property.specification))&&(ve.value.kind==="source"||ve.value.kind==="composite")&&ve.value.isStateDependent)return!0}return!1},R}(dr),is={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bs=function(R,W){this._structArray=R,this._pos1=W*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ea=128,El=5,ji=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};ji.serialize=function(R,W){return R._trim(),W&&(R.isTransferred=!0,W.push(R.arrayBuffer)),{length:R.length,arrayBuffer:R.arrayBuffer}},ji.deserialize=function(R){var W=Object.create(this.prototype);return W.arrayBuffer=R.arrayBuffer,W.length=R.length,W.capacity=R.arrayBuffer.byteLength/W.bytesPerElement,W._refreshViews(),W},ji.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ji.prototype.clear=function(){this.length=0},ji.prototype.resize=function(R){this.reserve(R),this.length=R},ji.prototype.reserve=function(R){if(R>this.capacity){this.capacity=Math.max(R,Math.floor(this.capacity*El),Ea),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var W=this.uint8;this._refreshViews(),W&&this.uint8.set(W)}},ji.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function _a(P,R){R===void 0&&(R=1);var W=0,ae=0,ve=P.map(function(Pe){var et=kc(Pe.type),yt=W=qv(W,Math.max(R,et)),_t=Pe.components||1;return ae=Math.max(ae,et),W+=et*_t,{name:Pe.name,type:Pe.type,components:_t,offset:yt}}),Se=qv(W,Math.max(ae,R));return{members:ve,size:Se,alignment:R}}function kc(P){return is[P].BYTES_PER_ELEMENT}function qv(P,R){return Math.ceil(P/R)*R}var rf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve){var Se=this.length;return this.resize(Se+1),this.emplace(Se,ae,ve)},R.prototype.emplace=function(ae,ve,Se){var Pe=ae*2;return this.int16[Pe+0]=ve,this.int16[Pe+1]=Se,ae},R}(ji);rf.prototype.bytesPerElement=4,Be("StructArrayLayout2i4",rf);var dv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe){var et=this.length;return this.resize(et+1),this.emplace(et,ae,ve,Se,Pe)},R.prototype.emplace=function(ae,ve,Se,Pe,et){var yt=ae*4;return this.int16[yt+0]=ve,this.int16[yt+1]=Se,this.int16[yt+2]=Pe,this.int16[yt+3]=et,ae},R}(ji);dv.prototype.bytesPerElement=8,Be("StructArrayLayout4i8",dv);var Lu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe,et,yt){var _t=this.length;return this.resize(_t+1),this.emplace(_t,ae,ve,Se,Pe,et,yt)},R.prototype.emplace=function(ae,ve,Se,Pe,et,yt,_t){var Ft=ae*6;return this.int16[Ft+0]=ve,this.int16[Ft+1]=Se,this.int16[Ft+2]=Pe,this.int16[Ft+3]=et,this.int16[Ft+4]=yt,this.int16[Ft+5]=_t,ae},R}(ji);Lu.prototype.bytesPerElement=12,Be("StructArrayLayout2i4i12",Lu);var Hf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe,et,yt){var _t=this.length;return this.resize(_t+1),this.emplace(_t,ae,ve,Se,Pe,et,yt)},R.prototype.emplace=function(ae,ve,Se,Pe,et,yt,_t){var Ft=ae*4,jt=ae*8;return this.int16[Ft+0]=ve,this.int16[Ft+1]=Se,this.uint8[jt+4]=Pe,this.uint8[jt+5]=et,this.uint8[jt+6]=yt,this.uint8[jt+7]=_t,ae},R}(ji);Hf.prototype.bytesPerElement=8,Be("StructArrayLayout2i4ub8",Hf);var Gf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve){var Se=this.length;return this.resize(Se+1),this.emplace(Se,ae,ve)},R.prototype.emplace=function(ae,ve,Se){var Pe=ae*2;return this.float32[Pe+0]=ve,this.float32[Pe+1]=Se,ae},R}(ji);Gf.prototype.bytesPerElement=8,Be("StructArrayLayout2f8",Gf);var Zo=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar){var er=this.length;return this.resize(er+1),this.emplace(er,ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar)},R.prototype.emplace=function(ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar,er){var yr=ae*10;return this.uint16[yr+0]=ve,this.uint16[yr+1]=Se,this.uint16[yr+2]=Pe,this.uint16[yr+3]=et,this.uint16[yr+4]=yt,this.uint16[yr+5]=_t,this.uint16[yr+6]=Ft,this.uint16[yr+7]=jt,this.uint16[yr+8]=ar,this.uint16[yr+9]=er,ae},R}(ji);Zo.prototype.bytesPerElement=20,Be("StructArrayLayout10ui20",Zo);var Pu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar,er,yr){var zr=this.length;return this.resize(zr+1),this.emplace(zr,ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar,er,yr)},R.prototype.emplace=function(ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar,er,yr,zr){var ln=ae*12;return this.int16[ln+0]=ve,this.int16[ln+1]=Se,this.int16[ln+2]=Pe,this.int16[ln+3]=et,this.uint16[ln+4]=yt,this.uint16[ln+5]=_t,this.uint16[ln+6]=Ft,this.uint16[ln+7]=jt,this.int16[ln+8]=ar,this.int16[ln+9]=er,this.int16[ln+10]=yr,this.int16[ln+11]=zr,ae},R}(ji);Pu.prototype.bytesPerElement=24,Be("StructArrayLayout4i4ui4i24",Pu);var pv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,ae,ve,Se)},R.prototype.emplace=function(ae,ve,Se,Pe){var et=ae*3;return this.float32[et+0]=ve,this.float32[et+1]=Se,this.float32[et+2]=Pe,ae},R}(ji);pv.prototype.bytesPerElement=12,Be("StructArrayLayout3f12",pv);var gv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,ae)},R.prototype.emplace=function(ae,ve){var Se=ae*1;return this.uint32[Se+0]=ve,ae},R}(ji);gv.prototype.bytesPerElement=4,Be("StructArrayLayout1ul4",gv);var Oc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe,et,yt,_t,Ft,jt){var ar=this.length;return this.resize(ar+1),this.emplace(ar,ae,ve,Se,Pe,et,yt,_t,Ft,jt)},R.prototype.emplace=function(ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar){var er=ae*10,yr=ae*5;return this.int16[er+0]=ve,this.int16[er+1]=Se,this.int16[er+2]=Pe,this.int16[er+3]=et,this.int16[er+4]=yt,this.int16[er+5]=_t,this.uint32[yr+3]=Ft,this.uint16[er+8]=jt,this.uint16[er+9]=ar,ae},R}(ji);Oc.prototype.bytesPerElement=20,Be("StructArrayLayout6i1ul2ui20",Oc);var oh=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe,et,yt){var _t=this.length;return this.resize(_t+1),this.emplace(_t,ae,ve,Se,Pe,et,yt)},R.prototype.emplace=function(ae,ve,Se,Pe,et,yt,_t){var Ft=ae*6;return this.int16[Ft+0]=ve,this.int16[Ft+1]=Se,this.int16[Ft+2]=Pe,this.int16[Ft+3]=et,this.int16[Ft+4]=yt,this.int16[Ft+5]=_t,ae},R}(ji);oh.prototype.bytesPerElement=12,Be("StructArrayLayout2i2i2i12",oh);var eu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe,et){var yt=this.length;return this.resize(yt+1),this.emplace(yt,ae,ve,Se,Pe,et)},R.prototype.emplace=function(ae,ve,Se,Pe,et,yt){var _t=ae*4,Ft=ae*8;return this.float32[_t+0]=ve,this.float32[_t+1]=Se,this.float32[_t+2]=Pe,this.int16[Ft+6]=et,this.int16[Ft+7]=yt,ae},R}(ji);eu.prototype.bytesPerElement=16,Be("StructArrayLayout2f1f2i16",eu);var as=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe){var et=this.length;return this.resize(et+1),this.emplace(et,ae,ve,Se,Pe)},R.prototype.emplace=function(ae,ve,Se,Pe,et){var yt=ae*12,_t=ae*3;return this.uint8[yt+0]=ve,this.uint8[yt+1]=Se,this.float32[_t+1]=Pe,this.float32[_t+2]=et,ae},R}(ji);as.prototype.bytesPerElement=12,Be("StructArrayLayout2ub2f12",as);var tu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,ae,ve,Se)},R.prototype.emplace=function(ae,ve,Se,Pe){var et=ae*3;return this.uint16[et+0]=ve,this.uint16[et+1]=Se,this.uint16[et+2]=Pe,ae},R}(ji);tu.prototype.bytesPerElement=6,Be("StructArrayLayout3ui6",tu);var Nc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar,er,yr,zr,ln,en,Sn,mn){var Mn=this.length;return this.resize(Mn+1),this.emplace(Mn,ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar,er,yr,zr,ln,en,Sn,mn)},R.prototype.emplace=function(ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar,er,yr,zr,ln,en,Sn,mn,Mn){var zn=ae*24,Wn=ae*12,ti=ae*48;return this.int16[zn+0]=ve,this.int16[zn+1]=Se,this.uint16[zn+2]=Pe,this.uint16[zn+3]=et,this.uint32[Wn+2]=yt,this.uint32[Wn+3]=_t,this.uint32[Wn+4]=Ft,this.uint16[zn+10]=jt,this.uint16[zn+11]=ar,this.uint16[zn+12]=er,this.float32[Wn+7]=yr,this.float32[Wn+8]=zr,this.uint8[ti+36]=ln,this.uint8[ti+37]=en,this.uint8[ti+38]=Sn,this.uint32[Wn+10]=mn,this.int16[zn+22]=Mn,ae},R}(ji);Nc.prototype.bytesPerElement=48,Be("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Nc);var sh=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar,er,yr,zr,ln,en,Sn,mn,Mn,zn,Wn,ti,$n,bi,vi,xi,Ni,wi,Si){var Hi=this.length;return this.resize(Hi+1),this.emplace(Hi,ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar,er,yr,zr,ln,en,Sn,mn,Mn,zn,Wn,ti,$n,bi,vi,xi,Ni,wi,Si)},R.prototype.emplace=function(ae,ve,Se,Pe,et,yt,_t,Ft,jt,ar,er,yr,zr,ln,en,Sn,mn,Mn,zn,Wn,ti,$n,bi,vi,xi,Ni,wi,Si,Hi){var ki=ae*34,aa=ae*17;return this.int16[ki+0]=ve,this.int16[ki+1]=Se,this.int16[ki+2]=Pe,this.int16[ki+3]=et,this.int16[ki+4]=yt,this.int16[ki+5]=_t,this.int16[ki+6]=Ft,this.int16[ki+7]=jt,this.uint16[ki+8]=ar,this.uint16[ki+9]=er,this.uint16[ki+10]=yr,this.uint16[ki+11]=zr,this.uint16[ki+12]=ln,this.uint16[ki+13]=en,this.uint16[ki+14]=Sn,this.uint16[ki+15]=mn,this.uint16[ki+16]=Mn,this.uint16[ki+17]=zn,this.uint16[ki+18]=Wn,this.uint16[ki+19]=ti,this.uint16[ki+20]=$n,this.uint16[ki+21]=bi,this.uint16[ki+22]=vi,this.uint32[aa+12]=xi,this.float32[aa+13]=Ni,this.float32[aa+14]=wi,this.float32[aa+15]=Si,this.float32[aa+16]=Hi,ae},R}(ji);sh.prototype.bytesPerElement=68,Be("StructArrayLayout8i15ui1ul4f68",sh);var Wf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,ae)},R.prototype.emplace=function(ae,ve){var Se=ae*1;return this.float32[Se+0]=ve,ae},R}(ji);Wf.prototype.bytesPerElement=4,Be("StructArrayLayout1f4",Wf);var mv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,ae,ve,Se)},R.prototype.emplace=function(ae,ve,Se,Pe){var et=ae*3;return this.int16[et+0]=ve,this.int16[et+1]=Se,this.int16[et+2]=Pe,ae},R}(ji);mv.prototype.bytesPerElement=6,Be("StructArrayLayout3i6",mv);var Ru=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se){var Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,ae,ve,Se)},R.prototype.emplace=function(ae,ve,Se,Pe){var et=ae*2,yt=ae*4;return this.uint32[et+0]=ve,this.uint16[yt+2]=Se,this.uint16[yt+3]=Pe,ae},R}(ji);Ru.prototype.bytesPerElement=8,Be("StructArrayLayout1ul2ui8",Ru);var Bc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve){var Se=this.length;return this.resize(Se+1),this.emplace(Se,ae,ve)},R.prototype.emplace=function(ae,ve,Se){var Pe=ae*2;return this.uint16[Pe+0]=ve,this.uint16[Pe+1]=Se,ae},R}(ji);Bc.prototype.bytesPerElement=4,Be("StructArrayLayout2ui4",Bc);var Yf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae){var ve=this.length;return this.resize(ve+1),this.emplace(ve,ae)},R.prototype.emplace=function(ae,ve){var Se=ae*1;return this.uint16[Se+0]=ve,ae},R}(ji);Yf.prototype.bytesPerElement=2,Be("StructArrayLayout1ui2",Yf);var nf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ae,ve,Se,Pe){var et=this.length;return this.resize(et+1),this.emplace(et,ae,ve,Se,Pe)},R.prototype.emplace=function(ae,ve,Se,Pe,et){var yt=ae*4;return this.float32[yt+0]=ve,this.float32[yt+1]=Se,this.float32[yt+2]=Pe,this.float32[yt+3]=et,ae},R}(ji);nf.prototype.bytesPerElement=16,Be("StructArrayLayout4f16",nf);var ed=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return W.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},W.x1.get=function(){return this._structArray.int16[this._pos2+2]},W.y1.get=function(){return this._structArray.int16[this._pos2+3]},W.x2.get=function(){return this._structArray.int16[this._pos2+4]},W.y2.get=function(){return this._structArray.int16[this._pos2+5]},W.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},W.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},W.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},W.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(R.prototype,W),R}(bs);ed.prototype.size=20;var yv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(ae){return new ed(this,ae)},R}(Oc);Be("CollisionBoxArray",yv);var af=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return W.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},W.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},W.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},W.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},W.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},W.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},W.segment.get=function(){return this._structArray.uint16[this._pos2+10]},W.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},W.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},W.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},W.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},W.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},W.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},W.placedOrientation.set=function(ae){this._structArray.uint8[this._pos1+37]=ae},W.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},W.hidden.set=function(ae){this._structArray.uint8[this._pos1+38]=ae},W.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},W.crossTileID.set=function(ae){this._structArray.uint32[this._pos4+10]=ae},W.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(R.prototype,W),R}(bs);af.prototype.size=48;var xv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(ae){return new af(this,ae)},R}(Nc);Be("PlacedSymbolArray",xv);var Xf=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return W.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},W.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},W.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},W.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},W.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},W.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},W.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},W.key.get=function(){return this._structArray.uint16[this._pos2+8]},W.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},W.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},W.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},W.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},W.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},W.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},W.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},W.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},W.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},W.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},W.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},W.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},W.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},W.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},W.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},W.crossTileID.set=function(ae){this._structArray.uint32[this._pos4+12]=ae},W.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},W.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},W.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},W.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(R.prototype,W),R}(bs);Xf.prototype.size=68;var td=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(ae){return new Xf(this,ae)},R}(sh);Be("SymbolInstanceArray",td);var rd=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getoffsetX=function(ae){return this.float32[ae*1+0]},R}(Wf);Be("GlyphOffsetArray",rd);var qs=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getx=function(ae){return this.int16[ae*3+0]},R.prototype.gety=function(ae){return this.int16[ae*3+1]},R.prototype.gettileUnitDistanceFromAnchor=function(ae){return this.int16[ae*3+2]},R}(mv);Be("SymbolLineVertexArray",qs);var nd=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return W.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},W.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},W.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(R.prototype,W),R}(bs);nd.prototype.size=8;var id=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(ae){return new nd(this,ae)},R}(Ru);Be("FeatureIndexArray",id);var bp=_a([{name:"a_pos",components:2,type:"Int16"}],4),ad=bp.members,ro=function(R){R===void 0&&(R=[]),this.segments=R};ro.prototype.prepareSegment=function(R,W,ae,ve){var Se=this.segments[this.segments.length-1];return R>ro.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+ro.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+R),(!Se||Se.vertexLength+R>ro.MAX_VERTEX_ARRAY_LENGTH||Se.sortKey!==ve)&&(Se={vertexOffset:W.length,primitiveOffset:ae.length,vertexLength:0,primitiveLength:0},ve!==void 0&&(Se.sortKey=ve),this.segments.push(Se)),Se},ro.prototype.get=function(){return this.segments},ro.prototype.destroy=function(){for(var R=0,W=this.segments;R>>16)*yt&65535)<<16)&4294967295,Ft=Ft<<15|Ft>>>17,Ft=(Ft&65535)*_t+(((Ft>>>16)*_t&65535)<<16)&4294967295,Pe^=Ft,Pe=Pe<<13|Pe>>>19,et=(Pe&65535)*5+(((Pe>>>16)*5&65535)<<16)&4294967295,Pe=(et&65535)+27492+(((et>>>16)+58964&65535)<<16);switch(Ft=0,ve){case 3:Ft^=(W.charCodeAt(jt+2)&255)<<16;case 2:Ft^=(W.charCodeAt(jt+1)&255)<<8;case 1:Ft^=W.charCodeAt(jt)&255,Ft=(Ft&65535)*yt+(((Ft>>>16)*yt&65535)<<16)&4294967295,Ft=Ft<<15|Ft>>>17,Ft=(Ft&65535)*_t+(((Ft>>>16)*_t&65535)<<16)&4294967295,Pe^=Ft}return Pe^=W.length,Pe^=Pe>>>16,Pe=(Pe&65535)*2246822507+(((Pe>>>16)*2246822507&65535)<<16)&4294967295,Pe^=Pe>>>13,Pe=(Pe&65535)*3266489909+(((Pe>>>16)*3266489909&65535)<<16)&4294967295,Pe^=Pe>>>16,Pe>>>0}P.exports=R}),re=S(function(P){function R(W,ae){for(var ve=W.length,Se=ae^ve,Pe=0,et;ve>=4;)et=W.charCodeAt(Pe)&255|(W.charCodeAt(++Pe)&255)<<8|(W.charCodeAt(++Pe)&255)<<16|(W.charCodeAt(++Pe)&255)<<24,et=(et&65535)*1540483477+(((et>>>16)*1540483477&65535)<<16),et^=et>>>24,et=(et&65535)*1540483477+(((et>>>16)*1540483477&65535)<<16),Se=(Se&65535)*1540483477+(((Se>>>16)*1540483477&65535)<<16)^et,ve-=4,++Pe;switch(ve){case 3:Se^=(W.charCodeAt(Pe+2)&255)<<16;case 2:Se^=(W.charCodeAt(Pe+1)&255)<<8;case 1:Se^=W.charCodeAt(Pe)&255,Se=(Se&65535)*1540483477+(((Se>>>16)*1540483477&65535)<<16)}return Se^=Se>>>13,Se=(Se&65535)*1540483477+(((Se>>>16)*1540483477&65535)<<16),Se^=Se>>>15,Se>>>0}P.exports=R}),pe=de,Oe=de,Qe=re;pe.murmur3=Oe,pe.murmur2=Qe;var ut=function(){this.ids=[],this.positions=[],this.indexed=!1};ut.prototype.add=function(R,W,ae,ve){this.ids.push(Wt(R)),this.positions.push(W,ae,ve)},ut.prototype.getPositions=function(R){for(var W=Wt(R),ae=0,ve=this.ids.length-1;ae>1;this.ids[Se]>=W?ve=Se:ae=Se+1}for(var Pe=[];this.ids[ae]===W;){var et=this.positions[3*ae],yt=this.positions[3*ae+1],_t=this.positions[3*ae+2];Pe.push({index:et,start:yt,end:_t}),ae++}return Pe},ut.serialize=function(R,W){var ae=new Float64Array(R.ids),ve=new Uint32Array(R.positions);return qt(ae,ve,0,ae.length-1),W&&W.push(ae.buffer,ve.buffer),{ids:ae,positions:ve}},ut.deserialize=function(R){var W=new ut;return W.ids=R.ids,W.positions=R.positions,W.indexed=!0,W};var Rt=Math.pow(2,53)-1;function Wt(P){var R=+P;return!isNaN(R)&&R<=Rt?R:pe(String(P))}function qt(P,R,W,ae){for(;W>1],Se=W-1,Pe=ae+1;;){do Se++;while(P[Se]ve);if(Se>=Pe)break;cr(P,Se,Pe),cr(R,3*Se,3*Pe),cr(R,3*Se+1,3*Pe+1),cr(R,3*Se+2,3*Pe+2)}Pe-WPe.x+1||ytPe.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return W}function Ta(P,R){return{type:P.type,id:P.id,properties:P.properties,geometry:R?qi(P):[]}}function Ki(P,R,W,ae,ve){P.emplaceBack(R*2+(ae+1)/2,W*2+(ve+1)/2)}var ma=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(W){return W.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new rf,this.indexArray=new tu,this.segments=new ro,this.programConfigurations=new hi(R.layers,R.zoom),this.stateDependentLayerIds=this.layers.filter(function(W){return W.isStateDependent()}).map(function(W){return W.id})};ma.prototype.populate=function(R,W,ae){var ve=this.layers[0],Se=[],Pe=null;ve.type==="circle"&&(Pe=ve.layout.get("circle-sort-key"));for(var et=0,yt=R;et=Ai||ar<0||ar>=Ai)){var er=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,R.sortKey),yr=er.vertexLength;Ki(this.layoutVertexArray,jt,ar,-1,-1),Ki(this.layoutVertexArray,jt,ar,1,-1),Ki(this.layoutVertexArray,jt,ar,1,1),Ki(this.layoutVertexArray,jt,ar,-1,1),this.indexArray.emplaceBack(yr,yr+1,yr+2),this.indexArray.emplaceBack(yr,yr+3,yr+2),er.vertexLength+=4,er.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ae,{},ve)},Be("CircleBucket",ma,{omit:["layers"]});function Vi(P,R){for(var W=0;W=3){for(var Se=0;Se1){if(Bs(P,R))return!0;for(var ae=0;ae1?P.distSqr(W):P.distSqr(W.sub(R)._mult(ve)._add(R))}function Cl(P,R){for(var W=!1,ae,ve,Se,Pe=0;PeR.y!=Se.y>R.y&&R.x<(Se.x-ve.x)*(R.y-ve.y)/(Se.y-ve.y)+ve.x&&(W=!W)}return W}function jo(P,R){for(var W=!1,ae=0,ve=P.length-1;aeR.y!=Pe.y>R.y&&R.x<(Pe.x-Se.x)*(R.y-Se.y)/(Pe.y-Se.y)+Se.x&&(W=!W)}return W}function Ll(P,R,W,ae,ve){for(var Se=0,Pe=P;Se=et.x&&ve>=et.y)return!0}var yt=[new r(R,W),new r(R,ve),new r(ae,ve),new r(ae,W)];if(P.length>2)for(var _t=0,Ft=yt;_tve.x&&R.x>ve.x||P.yve.y&&R.y>ve.y)return!1;var Se=O(P,R,W[0]);return Se!==O(P,R,W[1])||Se!==O(P,R,W[2])||Se!==O(P,R,W[3])}function Ko(P,R,W){var ae=R.paint.get(P).value;return ae.kind==="constant"?ae.value:W.programConfigurations.get(R.id).getMaxValue(P)}function tl(P){return Math.sqrt(P[0]*P[0]+P[1]*P[1])}function ru(P,R,W,ae,ve){if(!R[0]&&!R[1])return P;var Se=r.convert(R)._mult(ve);W==="viewport"&&Se._rotate(-ae);for(var Pe=[],et=0;et0&&(Se=1/Math.sqrt(Se)),P[0]=R[0]*Se,P[1]=R[1]*Se,P[2]=R[2]*Se,P}function R1(P,R){return P[0]*R[0]+P[1]*R[1]+P[2]*R[2]}function D1(P,R,W){var ae=R[0],ve=R[1],Se=R[2],Pe=W[0],et=W[1],yt=W[2];return P[0]=ve*yt-Se*et,P[1]=Se*Pe-ae*yt,P[2]=ae*et-ve*Pe,P}function I1(P,R,W){var ae=R[0],ve=R[1],Se=R[2];return P[0]=ae*W[0]+ve*W[3]+Se*W[6],P[1]=ae*W[1]+ve*W[4]+Se*W[7],P[2]=ae*W[2]+ve*W[5]+Se*W[8],P}var F1=Mp;(function(){var P=Vc();return function(R,W,ae,ve,Se,Pe){var et,yt;for(W||(W=3),ae||(ae=0),ve?yt=Math.min(ve*W+ae,R.length):yt=R.length,et=ae;etP.width||ve.height>P.height||W.x>P.width-ve.width||W.y>P.height-ve.height)throw new RangeError("out of range source coordinates for image copy");if(ve.width>R.width||ve.height>R.height||ae.x>R.width-ve.width||ae.y>R.height-ve.height)throw new RangeError("out of range destination coordinates for image copy");for(var Pe=P.data,et=R.data,yt=0;yt80*W){et=_t=P[0],yt=Ft=P[1];for(var yr=W;yr_t&&(_t=jt),ar>Ft&&(Ft=ar);er=Math.max(_t-et,Ft-yt),er=er!==0?1/er:0}return Tv(Se,Pe,W,et,yt,er),Pe}function q0(P,R,W,ae,ve){var Se,Pe;if(ve===Rp(P,R,W,ae)>0)for(Se=R;Se=R;Se-=ae)Pe=rg(Se,P[Se],P[Se+1],Pe);return Pe&&ld(Pe,Pe.next)&&(Mv(Pe),Pe=Pe.next),Pe}function Qf(P,R){if(!P)return P;R||(R=P);var W=P,ae;do if(ae=!1,!W.steiner&&(ld(W,W.next)||no(W.prev,W,W.next)===0)){if(Mv(W),W=R=W.prev,W===W.next)break;ae=!0}else W=W.next;while(ae||W!==R);return R}function Tv(P,R,W,ae,ve,Se,Pe){if(P){!Pe&&Se&&sx(P,ae,ve,Se);for(var et=P,yt,_t;P.prev!==P.next;){if(yt=P.prev,_t=P.next,Se?q1(P,ae,ve,Se):$1(P)){R.push(yt.i/W),R.push(P.i/W),R.push(_t.i/W),Mv(P),P=_t.next,et=_t.next;continue}if(P=_t,P===et){Pe?Pe===1?(P=ex(Qf(P),R,W),Tv(P,R,W,ae,ve,Se,2)):Pe===2&&tx(P,R,W,ae,ve,Se):Tv(Qf(P),R,W,ae,ve,Se,1);break}}}}function $1(P){var R=P.prev,W=P,ae=P.next;if(no(R,W,ae)>=0)return!1;for(var ve=P.next.next;ve!==P.prev;){if(ph(R.x,R.y,W.x,W.y,ae.x,ae.y,ve.x,ve.y)&&no(ve.prev,ve,ve.next)>=0)return!1;ve=ve.next}return!0}function q1(P,R,W,ae){var ve=P.prev,Se=P,Pe=P.next;if(no(ve,Se,Pe)>=0)return!1;for(var et=ve.xSe.x?ve.x>Pe.x?ve.x:Pe.x:Se.x>Pe.x?Se.x:Pe.x,Ft=ve.y>Se.y?ve.y>Pe.y?ve.y:Pe.y:Se.y>Pe.y?Se.y:Pe.y,jt=Lp(et,yt,R,W,ae),ar=Lp(_t,Ft,R,W,ae),er=P.prevZ,yr=P.nextZ;er&&er.z>=jt&&yr&&yr.z<=ar;){if(er!==P.prev&&er!==P.next&&ph(ve.x,ve.y,Se.x,Se.y,Pe.x,Pe.y,er.x,er.y)&&no(er.prev,er,er.next)>=0||(er=er.prevZ,yr!==P.prev&&yr!==P.next&&ph(ve.x,ve.y,Se.x,Se.y,Pe.x,Pe.y,yr.x,yr.y)&&no(yr.prev,yr,yr.next)>=0))return!1;yr=yr.nextZ}for(;er&&er.z>=jt;){if(er!==P.prev&&er!==P.next&&ph(ve.x,ve.y,Se.x,Se.y,Pe.x,Pe.y,er.x,er.y)&&no(er.prev,er,er.next)>=0)return!1;er=er.prevZ}for(;yr&&yr.z<=ar;){if(yr!==P.prev&&yr!==P.next&&ph(ve.x,ve.y,Se.x,Se.y,Pe.x,Pe.y,yr.x,yr.y)&&no(yr.prev,yr,yr.next)>=0)return!1;yr=yr.nextZ}return!0}function ex(P,R,W){var ae=P;do{var ve=ae.prev,Se=ae.next.next;!ld(ve,Se)&&eg(ve,ae,ae.next,Se)&&Av(ve,Se)&&Av(Se,ve)&&(R.push(ve.i/W),R.push(ae.i/W),R.push(Se.i/W),Mv(ae),Mv(ae.next),ae=P=Se),ae=ae.next}while(ae!==P);return Qf(ae)}function tx(P,R,W,ae,ve,Se){var Pe=P;do{for(var et=Pe.next.next;et!==Pe.prev;){if(Pe.i!==et.i&&fx(Pe,et)){var yt=tg(Pe,et);Pe=Qf(Pe,Pe.next),yt=Qf(yt,yt.next),Tv(Pe,R,W,ae,ve,Se),Tv(yt,R,W,ae,ve,Se);return}et=et.next}Pe=Pe.next}while(Pe!==P)}function rx(P,R,W,ae){var ve=[],Se,Pe,et,yt,_t;for(Se=0,Pe=R.length;Se=W.next.y&&W.next.y!==W.y){var et=W.x+(ve-W.y)*(W.next.x-W.x)/(W.next.y-W.y);if(et<=ae&&et>Se){if(Se=et,et===ae){if(ve===W.y)return W;if(ve===W.next.y)return W.next}Pe=W.x=W.x&&W.x>=_t&&ae!==W.x&&ph(vePe.x||W.x===Pe.x&&ox(Pe,W)))&&(Pe=W,jt=ar)),W=W.next;while(W!==yt);return Pe}function ox(P,R){return no(P.prev,P,R.prev)<0&&no(R.next,P,P.next)<0}function sx(P,R,W,ae){var ve=P;do ve.z===null&&(ve.z=Lp(ve.x,ve.y,R,W,ae)),ve.prevZ=ve.prev,ve.nextZ=ve.next,ve=ve.next;while(ve!==P);ve.prevZ.nextZ=null,ve.prevZ=null,lx(ve)}function lx(P){var R,W,ae,ve,Se,Pe,et,yt,_t=1;do{for(W=P,P=null,Se=null,Pe=0;W;){for(Pe++,ae=W,et=0,R=0;R<_t&&(et++,ae=ae.nextZ,!!ae);R++);for(yt=_t;et>0||yt>0&&ae;)et!==0&&(yt===0||!ae||W.z<=ae.z)?(ve=W,W=W.nextZ,et--):(ve=ae,ae=ae.nextZ,yt--),Se?Se.nextZ=ve:P=ve,ve.prevZ=Se,Se=ve;W=ae}Se.nextZ=null,_t*=2}while(Pe>1);return P}function Lp(P,R,W,ae,ve){return P=32767*(P-W)*ve,R=32767*(R-ae)*ve,P=(P|P<<8)&16711935,P=(P|P<<4)&252645135,P=(P|P<<2)&858993459,P=(P|P<<1)&1431655765,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,P|R<<1}function ux(P){var R=P,W=P;do(R.x=0&&(P-Pe)*(ae-et)-(W-Pe)*(R-et)>=0&&(W-Pe)*(Se-et)-(ve-Pe)*(ae-et)>=0}function fx(P,R){return P.next.i!==R.i&&P.prev.i!==R.i&&!cx(P,R)&&(Av(P,R)&&Av(R,P)&&hx(P,R)&&(no(P.prev,P,R.prev)||no(P,R.prev,R))||ld(P,R)&&no(P.prev,P,P.next)>0&&no(R.prev,R,R.next)>0)}function no(P,R,W){return(R.y-P.y)*(W.x-R.x)-(R.x-P.x)*(W.y-R.y)}function ld(P,R){return P.x===R.x&&P.y===R.y}function eg(P,R,W,ae){var ve=fd(no(P,R,W)),Se=fd(no(P,R,ae)),Pe=fd(no(W,ae,P)),et=fd(no(W,ae,R));return!!(ve!==Se&&Pe!==et||ve===0&&ud(P,W,R)||Se===0&&ud(P,ae,R)||Pe===0&&ud(W,P,ae)||et===0&&ud(W,R,ae))}function ud(P,R,W){return R.x<=Math.max(P.x,W.x)&&R.x>=Math.min(P.x,W.x)&&R.y<=Math.max(P.y,W.y)&&R.y>=Math.min(P.y,W.y)}function fd(P){return P>0?1:P<0?-1:0}function cx(P,R){var W=P;do{if(W.i!==P.i&&W.next.i!==P.i&&W.i!==R.i&&W.next.i!==R.i&&eg(W,W.next,P,R))return!0;W=W.next}while(W!==P);return!1}function Av(P,R){return no(P.prev,P,P.next)<0?no(P,R,P.next)>=0&&no(P,P.prev,R)>=0:no(P,R,P.prev)<0||no(P,P.next,R)<0}function hx(P,R){var W=P,ae=!1,ve=(P.x+R.x)/2,Se=(P.y+R.y)/2;do W.y>Se!=W.next.y>Se&&W.next.y!==W.y&&ve<(W.next.x-W.x)*(Se-W.y)/(W.next.y-W.y)+W.x&&(ae=!ae),W=W.next;while(W!==P);return ae}function tg(P,R){var W=new Pp(P.i,P.x,P.y),ae=new Pp(R.i,R.x,R.y),ve=P.next,Se=R.prev;return P.next=R,R.prev=P,W.next=ve,ve.prev=W,ae.next=W,W.prev=ae,Se.next=ae,ae.prev=Se,ae}function rg(P,R,W,ae){var ve=new Pp(P,R,W);return ae?(ve.next=ae.next,ve.prev=ae,ae.next.prev=ve,ae.next=ve):(ve.prev=ve,ve.next=ve),ve}function Mv(P){P.next.prev=P.prev,P.prev.next=P.next,P.prevZ&&(P.prevZ.nextZ=P.nextZ),P.nextZ&&(P.nextZ.prevZ=P.prevZ)}function Pp(P,R,W){this.i=P,this.x=R,this.y=W,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}sd.deviation=function(P,R,W,ae){var ve=R&&R.length,Se=ve?R[0]*W:P.length,Pe=Math.abs(Rp(P,0,Se,W));if(ve)for(var et=0,yt=R.length;et0&&(ae+=P[ve-1].length,W.holes.push(ae))}return W},Cp.default=Q1;function vx(P,R,W,ae,ve){ng(P,R,W||0,ae||P.length-1,ve||dx)}function ng(P,R,W,ae,ve){for(;ae>W;){if(ae-W>600){var Se=ae-W+1,Pe=R-W+1,et=Math.log(Se),yt=.5*Math.exp(2*et/3),_t=.5*Math.sqrt(et*yt*(Se-yt)/Se)*(Pe-Se/2<0?-1:1),Ft=Math.max(W,Math.floor(R-Pe*yt/Se+_t)),jt=Math.min(ae,Math.floor(R+(Se-Pe)*yt/Se+_t));ng(P,R,Ft,jt,ve)}var ar=P[R],er=W,yr=ae;for(Sv(P,W,R),ve(P[ae],ar)>0&&Sv(P,W,ae);er0;)yr--}ve(P[W],ar)===0?Sv(P,W,yr):(yr++,Sv(P,yr,ae)),yr<=R&&(W=yr+1),R<=yr&&(ae=yr-1)}}function Sv(P,R,W){var ae=P[R];P[R]=P[W],P[W]=ae}function dx(P,R){return PR?1:0}function Dp(P,R){var W=P.length;if(W<=1)return[P];for(var ae=[],ve,Se,Pe=0;Pe1)for(var yt=0;yt>3}if(ae--,W===1||W===2)ve+=P.readSVarint(),Se+=P.readSVarint(),W===1&&(et&&Pe.push(et),et=[]),et.push(new r(ve,Se));else if(W===7)et&&et.push(et[0].clone());else throw new Error("unknown command "+W)}return et&&Pe.push(et),Pe},gh.prototype.bbox=function(){var P=this._pbf;P.pos=this._geometry;for(var R=P.readVarint()+P.pos,W=1,ae=0,ve=0,Se=0,Pe=1/0,et=-1/0,yt=1/0,_t=-1/0;P.pos>3}if(ae--,W===1||W===2)ve+=P.readSVarint(),Se+=P.readSVarint(),veet&&(et=ve),Se_t&&(_t=Se);else if(W!==7)throw new Error("unknown command "+W)}return[Pe,yt,et,_t]},gh.prototype.toGeoJSON=function(P,R,W){var ae=this.extent*Math.pow(2,W),ve=this.extent*P,Se=this.extent*R,Pe=this.loadGeometry(),et=gh.types[this.type],yt,_t;function Ft(er){for(var yr=0;yr>3;R=ae===1?P.readString():ae===2?P.readFloat():ae===3?P.readDouble():ae===4?P.readVarint64():ae===5?P.readVarint():ae===6?P.readSVarint():ae===7?P.readBoolean():null}return R}og.prototype.feature=function(P){if(P<0||P>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[P];var R=this._pbf.readVarint()+this._pbf.pos;return new ig(this._pbf,R,this.extent,this._keys,this._values)};var Lx=Px;function Px(P,R){this.layers=P.readFields(Rx,{},R)}function Rx(P,R,W){if(P===3){var ae=new ag(W,W.readVarint()+W.pos);ae.length&&(R[ae.name]=ae)}}var Dx=Lx,Ix=ig,Fx=ag,mh={VectorTile:Dx,VectorTileFeature:Ix,VectorTileLayer:Fx},zx=mh.VectorTileFeature.types,kx=500,zp=Math.pow(2,13);function Ev(P,R,W,ae,ve,Se,Pe,et){P.emplaceBack(R,W,Math.floor(ae*zp)*2+Pe,ve*zp*2,Se*zp*2,Math.round(et))}var iu=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(W){return W.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new Lu,this.indexArray=new tu,this.programConfigurations=new hi(R.layers,R.zoom),this.segments=new ro,this.stateDependentLayerIds=this.layers.filter(function(W){return W.isStateDependent()}).map(function(W){return W.id})};iu.prototype.populate=function(R,W,ae){this.features=[],this.hasPattern=Ip("fill-extrusion",this.layers,W);for(var ve=0,Se=R;ve=1){var Mn=ln[Sn-1];if(!Ox(mn,Mn)){er.vertexLength+4>ro.MAX_VERTEX_ARRAY_LENGTH&&(er=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var zn=mn.sub(Mn)._perp()._unit(),Wn=Mn.dist(mn);en+Wn>32768&&(en=0),Ev(this.layoutVertexArray,mn.x,mn.y,zn.x,zn.y,0,0,en),Ev(this.layoutVertexArray,mn.x,mn.y,zn.x,zn.y,0,1,en),en+=Wn,Ev(this.layoutVertexArray,Mn.x,Mn.y,zn.x,zn.y,0,0,en),Ev(this.layoutVertexArray,Mn.x,Mn.y,zn.x,zn.y,0,1,en);var ti=er.vertexLength;this.indexArray.emplaceBack(ti,ti+2,ti+1),this.indexArray.emplaceBack(ti+1,ti+2,ti+3),er.vertexLength+=4,er.primitiveLength+=2}}}}if(er.vertexLength+_t>ro.MAX_VERTEX_ARRAY_LENGTH&&(er=this.segments.prepareSegment(_t,this.layoutVertexArray,this.indexArray)),zx[R.type]==="Polygon"){for(var $n=[],bi=[],vi=er.vertexLength,xi=0,Ni=yt;xiAi)||P.y===R.y&&(P.y<0||P.y>Ai)}function Nx(P){return P.every(function(R){return R.x<0})||P.every(function(R){return R.x>Ai})||P.every(function(R){return R.y<0})||P.every(function(R){return R.y>Ai})}var Bx=new ca({"fill-extrusion-opacity":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ao(Ar["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),Ux={paint:Bx},Vx=function(P){function R(W){P.call(this,W,Ux)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.createBucket=function(ae){return new iu(ae)},R.prototype.queryRadius=function(){return tl(this.paint.get("fill-extrusion-translate"))},R.prototype.is3D=function(){return!0},R.prototype.queryIntersectsFeature=function(ae,ve,Se,Pe,et,yt,_t,Ft){var jt=ru(ae,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),yt.angle,_t),ar=this.paint.get("fill-extrusion-height").evaluate(ve,Se),er=this.paint.get("fill-extrusion-base").evaluate(ve,Se),yr=Wx(jt,Ft,yt,0),zr=Gx(Pe,er,ar,Ft),ln=zr[0],en=zr[1];return Hx(ln,en,yr)},R}(Oa);function _v(P,R){return P.x*R.x+P.y*R.y}function sg(P,R){if(P.length===1){for(var W=0,ae=R[W++],ve;!ve||ae.equals(ve);)if(ve=R[W++],!ve)return 1/0;for(;W=2&&R[_t-1].equals(R[_t-2]);)_t--;for(var Ft=0;Ft<_t-1&&R[Ft].equals(R[Ft+1]);)Ft++;if(!(_t<(yt?3:2))){ae==="bevel"&&(Se=1.05);var jt=this.overscaling<=16?Qx*Ai/(512*this.overscaling):0,ar=this.segments.prepareSegment(_t*10,this.layoutVertexArray,this.indexArray),er,yr=void 0,zr=void 0,ln=void 0,en=void 0;this.e1=this.e2=-1,yt&&(er=R[_t-2],en=R[Ft].sub(er)._unit()._perp());for(var Sn=Ft;Sn<_t;Sn++)if(zr=Sn===_t-1?yt?R[Ft+1]:void 0:R[Sn+1],!(zr&&R[Sn].equals(zr))){en&&(ln=en),er&&(yr=er),er=R[Sn],en=zr?zr.sub(er)._unit()._perp():ln,ln=ln||en;var mn=ln.add(en);(mn.x!==0||mn.y!==0)&&mn._unit();var Mn=ln.x*en.x+ln.y*en.y,zn=mn.x*en.x+mn.y*en.y,Wn=zn!==0?1/zn:1/0,ti=2*Math.sqrt(2-2*zn),$n=zn0;if($n&&Sn>Ft){var vi=er.dist(yr);if(vi>2*jt){var xi=er.sub(er.sub(yr)._mult(jt/vi)._round());this.updateDistance(yr,xi),this.addCurrentVertex(xi,ln,0,0,ar),yr=xi}}var Ni=yr&&zr,wi=Ni?ae:yt?"butt":ve;if(Ni&&wi==="round"&&(WnSe&&(wi="bevel"),wi==="bevel"&&(Wn>2&&(wi="flipbevel"),Wn100)mn=en.mult(-1);else{var Si=Wn*ln.add(en).mag()/ln.sub(en).mag();mn._perp()._mult(Si*(bi?-1:1))}this.addCurrentVertex(er,mn,0,0,ar),this.addCurrentVertex(er,mn.mult(-1),0,0,ar)}else if(wi==="bevel"||wi==="fakeround"){var Hi=-Math.sqrt(Wn*Wn-1),ki=bi?Hi:0,aa=bi?0:Hi;if(yr&&this.addCurrentVertex(er,ln,ki,aa,ar),wi==="fakeround")for(var xa=Math.round(ti*180/Math.PI/$x),oa=1;oa2*jt){var oo=er.add(zr.sub(er)._mult(jt/mo)._round());this.updateDistance(er,oo),this.addCurrentVertex(oo,en,0,0,ar),er=oo}}}}},Jo.prototype.addCurrentVertex=function(R,W,ae,ve,Se,Pe){Pe===void 0&&(Pe=!1);var et=W.x+W.y*ae,yt=W.y-W.x*ae,_t=-W.x+W.y*ve,Ft=-W.y-W.x*ve;this.addHalfVertex(R,et,yt,Pe,!1,ae,Se),this.addHalfVertex(R,_t,Ft,Pe,!0,-ve,Se),this.distance>fg/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(R,W,ae,ve,Se,Pe))},Jo.prototype.addHalfVertex=function(R,W,ae,ve,Se,Pe,et){var yt=R.x,_t=R.y,Ft=this.lineClips?this.scaledDistance*(fg-1):this.scaledDistance,jt=Ft*ug;if(this.layoutVertexArray.emplaceBack((yt<<1)+(ve?1:0),(_t<<1)+(Se?1:0),Math.round(lg*W)+128,Math.round(lg*ae)+128,(Pe===0?0:Pe<0?-1:1)+1|(jt&63)<<2,jt>>6),this.lineClips){var ar=this.scaledDistance-this.lineClips.start,er=this.lineClips.end-this.lineClips.start,yr=ar/er;this.layoutVertexArray2.emplaceBack(yr,this.lineClipsArray.length)}var zr=et.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,zr),et.primitiveLength++),Se?this.e2=zr:this.e1=zr},Jo.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Jo.prototype.updateDistance=function(R,W){this.distance+=R.dist(W),this.updateScaledDistance()},Be("LineBucket",Jo,{omit:["layers","patternFeatures"]});var eb=new ca({"line-cap":new oi(Ar.layout_line["line-cap"]),"line-join":new Ei(Ar.layout_line["line-join"]),"line-miter-limit":new oi(Ar.layout_line["line-miter-limit"]),"line-round-limit":new oi(Ar.layout_line["line-round-limit"]),"line-sort-key":new Ei(Ar.layout_line["line-sort-key"])}),tb=new ca({"line-opacity":new Ei(Ar.paint_line["line-opacity"]),"line-color":new Ei(Ar.paint_line["line-color"]),"line-translate":new oi(Ar.paint_line["line-translate"]),"line-translate-anchor":new oi(Ar.paint_line["line-translate-anchor"]),"line-width":new Ei(Ar.paint_line["line-width"]),"line-gap-width":new Ei(Ar.paint_line["line-gap-width"]),"line-offset":new Ei(Ar.paint_line["line-offset"]),"line-blur":new Ei(Ar.paint_line["line-blur"]),"line-dasharray":new Lo(Ar.paint_line["line-dasharray"]),"line-pattern":new Ao(Ar.paint_line["line-pattern"]),"line-gradient":new to(Ar.paint_line["line-gradient"])}),cg={paint:tb,layout:eb},rb=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.possiblyEvaluate=function(ae,ve){return ve=new Ti(Math.floor(ve.zoom),{now:ve.now,fadeDuration:ve.fadeDuration,zoomHistory:ve.zoomHistory,transition:ve.transition}),P.prototype.possiblyEvaluate.call(this,ae,ve)},R.prototype.evaluate=function(ae,ve,Se,Pe){return ve=w({},ve,{zoom:Math.floor(ve.zoom)}),P.prototype.evaluate.call(this,ae,ve,Se,Pe)},R}(Ei),hg=new rb(cg.paint.properties["line-width"].specification);hg.useIntegerZoom=!0;var nb=function(P){function R(W){P.call(this,W,cg),this.gradientVersion=0}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._handleSpecialPaintPropertyUpdate=function(ae){if(ae==="line-gradient"){var ve=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=ve._styleExpression.expression instanceof Vo,this.gradientVersion=(this.gradientVersion+1)%f}},R.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},R.prototype.recalculate=function(ae,ve){P.prototype.recalculate.call(this,ae,ve),this.paint._values["line-floorwidth"]=hg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,ae)},R.prototype.createBucket=function(ae){return new Jo(ae)},R.prototype.queryRadius=function(ae){var ve=ae,Se=vg(Ko("line-width",this,ve),Ko("line-gap-width",this,ve)),Pe=Ko("line-offset",this,ve);return Se/2+Math.abs(Pe)+tl(this.paint.get("line-translate"))},R.prototype.queryIntersectsFeature=function(ae,ve,Se,Pe,et,yt,_t){var Ft=ru(ae,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),yt.angle,_t),jt=_t/2*vg(this.paint.get("line-width").evaluate(ve,Se),this.paint.get("line-gap-width").evaluate(ve,Se)),ar=this.paint.get("line-offset").evaluate(ve,Se);return ar&&(Pe=ib(Pe,ar*_t)),fo(Ft,Pe,jt)},R.prototype.isTileClipped=function(){return!0},R}(Oa);function vg(P,R){return R>0?R+2*P:P}function ib(P,R){for(var W=[],ae=new r(0,0),ve=0;ve":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function hb(P){for(var R="",W=0;W>1,Ft=-7,jt=W?ve-1:0,ar=W?-1:1,er=P[R+jt];for(jt+=ar,Se=er&(1<<-Ft)-1,er>>=-Ft,Ft+=et;Ft>0;Se=Se*256+P[R+jt],jt+=ar,Ft-=8);for(Pe=Se&(1<<-Ft)-1,Se>>=-Ft,Ft+=ae;Ft>0;Pe=Pe*256+P[R+jt],jt+=ar,Ft-=8);if(Se===0)Se=1-_t;else{if(Se===yt)return Pe?NaN:(er?-1:1)*(1/0);Pe=Pe+Math.pow(2,ae),Se=Se-_t}return(er?-1:1)*Pe*Math.pow(2,Se-ae)},db=function(P,R,W,ae,ve,Se){var Pe,et,yt,_t=Se*8-ve-1,Ft=(1<<_t)-1,jt=Ft>>1,ar=ve===23?Math.pow(2,-24)-Math.pow(2,-77):0,er=ae?0:Se-1,yr=ae?1:-1,zr=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===1/0?(et=isNaN(R)?1:0,Pe=Ft):(Pe=Math.floor(Math.log(R)/Math.LN2),R*(yt=Math.pow(2,-Pe))<1&&(Pe--,yt*=2),Pe+jt>=1?R+=ar/yt:R+=ar*Math.pow(2,1-jt),R*yt>=2&&(Pe++,yt/=2),Pe+jt>=Ft?(et=0,Pe=Ft):Pe+jt>=1?(et=(R*yt-1)*Math.pow(2,ve),Pe=Pe+jt):(et=R*Math.pow(2,jt-1)*Math.pow(2,ve),Pe=0));ve>=8;P[W+er]=et&255,er+=yr,et/=256,ve-=8);for(Pe=Pe<0;P[W+er]=Pe&255,er+=yr,Pe/=256,_t-=8);P[W+er-yr]|=zr*128},cd={read:vb,write:db},hd=Ma;function Ma(P){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(P)?P:new Uint8Array(P||0),this.pos=0,this.type=0,this.length=this.buf.length}Ma.Varint=0,Ma.Fixed64=1,Ma.Bytes=2,Ma.Fixed32=5;var kp=65536*65536,pg=1/kp,pb=12,gg=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Ma.prototype={destroy:function(){this.buf=null},readFields:function(P,R,W){for(W=W||this.length;this.pos>3,Se=this.pos;this.type=ae&7,P(ve,R,this),this.pos===Se&&this.skip(ae)}return R},readMessage:function(P,R){return this.readFields(P,R,this.readVarint()+this.pos)},readFixed32:function(){var P=vd(this.buf,this.pos);return this.pos+=4,P},readSFixed32:function(){var P=yg(this.buf,this.pos);return this.pos+=4,P},readFixed64:function(){var P=vd(this.buf,this.pos)+vd(this.buf,this.pos+4)*kp;return this.pos+=8,P},readSFixed64:function(){var P=vd(this.buf,this.pos)+yg(this.buf,this.pos+4)*kp;return this.pos+=8,P},readFloat:function(){var P=cd.read(this.buf,this.pos,!0,23,4);return this.pos+=4,P},readDouble:function(){var P=cd.read(this.buf,this.pos,!0,52,8);return this.pos+=8,P},readVarint:function(P){var R=this.buf,W,ae;return ae=R[this.pos++],W=ae&127,ae<128||(ae=R[this.pos++],W|=(ae&127)<<7,ae<128)||(ae=R[this.pos++],W|=(ae&127)<<14,ae<128)||(ae=R[this.pos++],W|=(ae&127)<<21,ae<128)?W:(ae=R[this.pos],W|=(ae&15)<<28,gb(W,P,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var P=this.readVarint();return P%2===1?(P+1)/-2:P/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var P=this.readVarint()+this.pos,R=this.pos;return this.pos=P,P-R>=pb&&gg?Pb(this.buf,R,P):Lb(this.buf,R,P)},readBytes:function(){var P=this.readVarint()+this.pos,R=this.buf.subarray(this.pos,P);return this.pos=P,R},readPackedVarint:function(P,R){if(this.type!==Ma.Bytes)return P.push(this.readVarint(R));var W=sf(this);for(P=P||[];this.pos127;);else if(R===Ma.Bytes)this.pos=this.readVarint()+this.pos;else if(R===Ma.Fixed32)this.pos+=4;else if(R===Ma.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+R)},writeTag:function(P,R){this.writeVarint(P<<3|R)},realloc:function(P){for(var R=this.length||16;R268435455||P<0){mb(P,this);return}this.realloc(4),this.buf[this.pos++]=P&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=(P>>>=7)&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=(P>>>=7)&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=P>>>7&127)))},writeSVarint:function(P){this.writeVarint(P<0?-P*2-1:P*2)},writeBoolean:function(P){this.writeVarint(!!P)},writeString:function(P){P=String(P),this.realloc(P.length*4),this.pos++;var R=this.pos;this.pos=Rb(this.buf,P,this.pos);var W=this.pos-R;W>=128&&mg(R,W,this),this.pos=R-1,this.writeVarint(W),this.pos+=W},writeFloat:function(P){this.realloc(4),cd.write(this.buf,P,this.pos,!0,23,4),this.pos+=4},writeDouble:function(P){this.realloc(8),cd.write(this.buf,P,this.pos,!0,52,8),this.pos+=8},writeBytes:function(P){var R=P.length;this.writeVarint(R),this.realloc(R);for(var W=0;W=128&&mg(W,ae,this),this.pos=W-1,this.writeVarint(ae),this.pos+=ae},writeMessage:function(P,R,W){this.writeTag(P,Ma.Bytes),this.writeRawMessage(R,W)},writePackedVarint:function(P,R){R.length&&this.writeMessage(P,bb,R)},writePackedSVarint:function(P,R){R.length&&this.writeMessage(P,wb,R)},writePackedBoolean:function(P,R){R.length&&this.writeMessage(P,Mb,R)},writePackedFloat:function(P,R){R.length&&this.writeMessage(P,Tb,R)},writePackedDouble:function(P,R){R.length&&this.writeMessage(P,Ab,R)},writePackedFixed32:function(P,R){R.length&&this.writeMessage(P,Sb,R)},writePackedSFixed32:function(P,R){R.length&&this.writeMessage(P,Eb,R)},writePackedFixed64:function(P,R){R.length&&this.writeMessage(P,_b,R)},writePackedSFixed64:function(P,R){R.length&&this.writeMessage(P,Cb,R)},writeBytesField:function(P,R){this.writeTag(P,Ma.Bytes),this.writeBytes(R)},writeFixed32Field:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeFixed32(R)},writeSFixed32Field:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeSFixed32(R)},writeFixed64Field:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeFixed64(R)},writeSFixed64Field:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeSFixed64(R)},writeVarintField:function(P,R){this.writeTag(P,Ma.Varint),this.writeVarint(R)},writeSVarintField:function(P,R){this.writeTag(P,Ma.Varint),this.writeSVarint(R)},writeStringField:function(P,R){this.writeTag(P,Ma.Bytes),this.writeString(R)},writeFloatField:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeFloat(R)},writeDoubleField:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeDouble(R)},writeBooleanField:function(P,R){this.writeVarintField(P,!!R)}};function gb(P,R,W){var ae=W.buf,ve,Se;if(Se=ae[W.pos++],ve=(Se&112)>>4,Se<128||(Se=ae[W.pos++],ve|=(Se&127)<<3,Se<128)||(Se=ae[W.pos++],ve|=(Se&127)<<10,Se<128)||(Se=ae[W.pos++],ve|=(Se&127)<<17,Se<128)||(Se=ae[W.pos++],ve|=(Se&127)<<24,Se<128)||(Se=ae[W.pos++],ve|=(Se&1)<<31,Se<128))return yh(P,ve,R);throw new Error("Expected varint not more than 10 bytes")}function sf(P){return P.type===Ma.Bytes?P.readVarint()+P.pos:P.pos+1}function yh(P,R,W){return W?R*4294967296+(P>>>0):(R>>>0)*4294967296+(P>>>0)}function mb(P,R){var W,ae;if(P>=0?(W=P%4294967296|0,ae=P/4294967296|0):(W=~(-P%4294967296),ae=~(-P/4294967296),W^4294967295?W=W+1|0:(W=0,ae=ae+1|0)),P>=18446744073709552e3||P<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");R.realloc(10),yb(W,ae,R),xb(ae,R)}function yb(P,R,W){W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos]=P&127}function xb(P,R){var W=(P&7)<<4;R.buf[R.pos++]|=W|((P>>>=3)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127)))))}function mg(P,R,W){var ae=R<=16383?1:R<=2097151?2:R<=268435455?3:Math.floor(Math.log(R)/(Math.LN2*7));W.realloc(ae);for(var ve=W.pos-1;ve>=P;ve--)W.buf[ve+ae]=W.buf[ve]}function bb(P,R){for(var W=0;W>>8,P[W+2]=R>>>16,P[W+3]=R>>>24}function yg(P,R){return(P[R]|P[R+1]<<8|P[R+2]<<16)+(P[R+3]<<24)}function Lb(P,R,W){for(var ae="",ve=R;ve239?4:Se>223?3:Se>191?2:1;if(ve+et>W)break;var yt,_t,Ft;et===1?Se<128&&(Pe=Se):et===2?(yt=P[ve+1],(yt&192)===128&&(Pe=(Se&31)<<6|yt&63,Pe<=127&&(Pe=null))):et===3?(yt=P[ve+1],_t=P[ve+2],(yt&192)===128&&(_t&192)===128&&(Pe=(Se&15)<<12|(yt&63)<<6|_t&63,(Pe<=2047||Pe>=55296&&Pe<=57343)&&(Pe=null))):et===4&&(yt=P[ve+1],_t=P[ve+2],Ft=P[ve+3],(yt&192)===128&&(_t&192)===128&&(Ft&192)===128&&(Pe=(Se&15)<<18|(yt&63)<<12|(_t&63)<<6|Ft&63,(Pe<=65535||Pe>=1114112)&&(Pe=null))),Pe===null?(Pe=65533,et=1):Pe>65535&&(Pe-=65536,ae+=String.fromCharCode(Pe>>>10&1023|55296),Pe=56320|Pe&1023),ae+=String.fromCharCode(Pe),ve+=et}return ae}function Pb(P,R,W){return gg.decode(P.subarray(R,W))}function Rb(P,R,W){for(var ae=0,ve,Se;ae55295&&ve<57344)if(Se)if(ve<56320){P[W++]=239,P[W++]=191,P[W++]=189,Se=ve;continue}else ve=Se-55296<<10|ve-56320|65536,Se=null;else{ve>56319||ae+1===R.length?(P[W++]=239,P[W++]=191,P[W++]=189):Se=ve;continue}else Se&&(P[W++]=239,P[W++]=191,P[W++]=189,Se=null);ve<128?P[W++]=ve:(ve<2048?P[W++]=ve>>6|192:(ve<65536?P[W++]=ve>>12|224:(P[W++]=ve>>18|240,P[W++]=ve>>12&63|128),P[W++]=ve>>6&63|128),P[W++]=ve&63|128)}return W}var Op=3;function Db(P,R,W){P===1&&W.readMessage(Ib,R)}function Ib(P,R,W){if(P===3){var ae=W.readMessage(Fb,{}),ve=ae.id,Se=ae.bitmap,Pe=ae.width,et=ae.height,yt=ae.left,_t=ae.top,Ft=ae.advance;R.push({id:ve,bitmap:new Hc({width:Pe+2*Op,height:et+2*Op},Se),metrics:{width:Pe,height:et,left:yt,top:_t,advance:Ft}})}}function Fb(P,R,W){P===1?R.id=W.readVarint():P===2?R.bitmap=W.readBytes():P===3?R.width=W.readVarint():P===4?R.height=W.readVarint():P===5?R.left=W.readSVarint():P===6?R.top=W.readSVarint():P===7&&(R.advance=W.readVarint())}function zb(P){return new hd(P).readFields(Db,[])}var xg=Op;function bg(P){for(var R=0,W=0,ae=0,ve=P;ae=0;er--){var yr=et[er];if(!(ar.w>yr.w||ar.h>yr.h)){if(ar.x=yr.x,ar.y=yr.y,_t=Math.max(_t,ar.y+ar.h),yt=Math.max(yt,ar.x+ar.w),ar.w===yr.w&&ar.h===yr.h){var zr=et.pop();er=0&&ve>=R&&Du[this.text.charCodeAt(ve)];ve--)ae--;this.text=this.text.substring(R,ae),this.sectionIndex=this.sectionIndex.slice(R,ae)},Fo.prototype.substring=function(R,W){var ae=new Fo;return ae.text=this.text.substring(R,W),ae.sectionIndex=this.sectionIndex.slice(R,W),ae.sections=this.sections,ae},Fo.prototype.toString=function(){return this.text},Fo.prototype.getMaxScale=function(){var R=this;return this.sectionIndex.reduce(function(W,ae){return Math.max(W,R.sections[ae].scale)},0)},Fo.prototype.addTextSection=function(R,W){this.text+=R.text,this.sections.push(bh.forText(R.scale,R.fontStack||W));for(var ae=this.sections.length-1,ve=0;ve=Tg?null:++this.imageSectionID:(this.imageSectionID=wg,this.imageSectionID)};function Ob(P,R){for(var W=[],ae=P.text,ve=0,Se=0,Pe=R;Se=0,Ft=0,jt=0;jt0&&oo>bi&&(bi=oo)}else{var sa=W[xi.fontStack],ea=sa&&sa[wi];if(ea&&ea.rect)ki=ea.rect,Hi=ea.metrics;else{var Aa=R[xi.fontStack],Sa=Aa&&Aa[wi];if(!Sa)continue;Hi=Sa.metrics}Si=(zn-xi.scale)*Mo}oa?(P.verticalizable=!0,$n.push({glyph:wi,imageName:aa,x:ar,y:er+Si,vertical:oa,scale:xi.scale,fontStack:xi.fontStack,sectionIndex:Ni,metrics:Hi,rect:ki}),ar+=xa*xi.scale+_t):($n.push({glyph:wi,imageName:aa,x:ar,y:er+Si,vertical:oa,scale:xi.scale,fontStack:xi.fontStack,sectionIndex:Ni,metrics:Hi,rect:ki}),ar+=Hi.advance*xi.scale+_t)}if($n.length!==0){var zo=ar-_t;yr=Math.max(zo,yr),Vb($n,0,$n.length-1,ln,bi)}ar=0;var ko=Se*zn+bi;ti.lineOffset=Math.max(bi,Wn),er+=ko,zr=Math.max(ko,zr),++en}var yo=er-Rv,Qo=Bp(Pe),$o=Qo.horizontalAlign,co=Qo.verticalAlign;Hb(P.positionedLines,ln,$o,co,yr,zr,Se,yo,ve.length),P.top+=-co*yo,P.bottom=P.top+yo,P.left+=-$o*yr,P.right=P.left+yr}function Vb(P,R,W,ae,ve){if(!(!ae&&!ve))for(var Se=P[W],Pe=Se.metrics.advance*Se.scale,et=(P[W].x+Pe)*ae,yt=R;yt<=W;yt++)P[yt].x-=et,P[yt].y+=ve}function Hb(P,R,W,ae,ve,Se,Pe,et,yt){var _t=(R-W)*ve,Ft=0;Se!==Pe?Ft=-et*ae-Rv:Ft=(-ae*yt+.5)*Pe;for(var jt=0,ar=P;jt-W/2;){if(Pe--,Pe<0)return!1;et-=P[Pe].dist(Se),Se=P[Pe]}et+=P[Pe].dist(P[Pe+1]),Pe++;for(var yt=[],_t=0;etae;)_t-=yt.shift().angleDelta;if(_t>ve)return!1;Pe++,et+=jt.dist(ar)}return!0}function Rg(P){for(var R=0,W=0;W_t){var yr=(_t-yt)/er,zr=Ca(jt.x,ar.x,yr),ln=Ca(jt.y,ar.y,yr),en=new wh(zr,ln,ar.angleTo(jt),Ft);return en._round(),!Pe||Pg(P,en,et,Pe,R)?en:void 0}yt+=er}}function Xb(P,R,W,ae,ve,Se,Pe,et,yt){var _t=Dg(ae,Se,Pe),Ft=Ig(ae,ve),jt=Ft*Pe,ar=P[0].x===0||P[0].x===yt||P[0].y===0||P[0].y===yt;R-jt=0&&Mn=0&&zn=0&&ar+_t<=Ft){var Wn=new wh(Mn,zn,Sn,yr);Wn._round(),(!ae||Pg(P,Wn,Se,ae,ve))&&er.push(Wn)}}jt+=en}return!et&&!er.length&&!Pe&&(er=Fg(P,jt/2,W,ae,ve,Se,Pe,!0,yt)),er}function zg(P,R,W,ae,ve){for(var Se=[],Pe=0;Pe=ae&&jt.x>=ae)&&(Ft.x>=ae?Ft=new r(ae,Ft.y+(jt.y-Ft.y)*((ae-Ft.x)/(jt.x-Ft.x)))._round():jt.x>=ae&&(jt=new r(ae,Ft.y+(jt.y-Ft.y)*((ae-Ft.x)/(jt.x-Ft.x)))._round()),!(Ft.y>=ve&&jt.y>=ve)&&(Ft.y>=ve?Ft=new r(Ft.x+(jt.x-Ft.x)*((ve-Ft.y)/(jt.y-Ft.y)),ve)._round():jt.y>=ve&&(jt=new r(Ft.x+(jt.x-Ft.x)*((ve-Ft.y)/(jt.y-Ft.y)),ve)._round()),(!yt||!Ft.equals(yt[yt.length-1]))&&(yt=[Ft],Se.push(yt)),yt.push(jt)))))}return Se}var Th=ws;function kg(P,R,W,ae){var ve=[],Se=P.image,Pe=Se.pixelRatio,et=Se.paddedRect.w-2*Th,yt=Se.paddedRect.h-2*Th,_t=P.right-P.left,Ft=P.bottom-P.top,jt=Se.stretchX||[[0,et]],ar=Se.stretchY||[[0,yt]],er=function(sa,ea){return sa+ea[1]-ea[0]},yr=jt.reduce(er,0),zr=ar.reduce(er,0),ln=et-yr,en=yt-zr,Sn=0,mn=yr,Mn=0,zn=zr,Wn=0,ti=ln,$n=0,bi=en;if(Se.content&&ae){var vi=Se.content;Sn=gd(jt,0,vi[0]),Mn=gd(ar,0,vi[1]),mn=gd(jt,vi[0],vi[2]),zn=gd(ar,vi[1],vi[3]),Wn=vi[0]-Sn,$n=vi[1]-Mn,ti=vi[2]-vi[0]-mn,bi=vi[3]-vi[1]-zn}var xi=function(sa,ea,Aa,Sa){var Ba=md(sa.stretch-Sn,mn,_t,P.left),Wa=yd(sa.fixed-Wn,ti,sa.stretch,yr),mo=md(ea.stretch-Mn,zn,Ft,P.top),oo=yd(ea.fixed-$n,bi,ea.stretch,zr),zo=md(Aa.stretch-Sn,mn,_t,P.left),ko=yd(Aa.fixed-Wn,ti,Aa.stretch,yr),yo=md(Sa.stretch-Mn,zn,Ft,P.top),Qo=yd(Sa.fixed-$n,bi,Sa.stretch,zr),$o=new r(Ba,mo),co=new r(zo,mo),qo=new r(zo,yo),Vs=new r(Ba,yo),ff=new r(Wa/Pe,oo/Pe),ec=new r(ko/Pe,Qo/Pe),tc=R*Math.PI/180;if(tc){var rc=Math.sin(tc),Ph=Math.cos(tc),Pl=[Ph,-rc,rc,Ph];$o._matMult(Pl),co._matMult(Pl),Vs._matMult(Pl),qo._matMult(Pl)}var Md=sa.stretch+sa.fixed,jp=Aa.stretch+Aa.fixed,Sd=ea.stretch+ea.fixed,Kp=Sa.stretch+Sa.fixed,nl={x:Se.paddedRect.x+Th+Md,y:Se.paddedRect.y+Th+Sd,w:jp-Md,h:Kp-Sd},Rh=ti/Pe/_t,Ed=bi/Pe/Ft;return{tl:$o,tr:co,bl:Vs,br:qo,tex:nl,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ff,pixelOffsetBR:ec,minFontScaleX:Rh,minFontScaleY:Ed,isSDF:W}};if(!ae||!Se.stretchX&&!Se.stretchY)ve.push(xi({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:et+1},{fixed:0,stretch:yt+1}));else for(var Ni=Og(jt,ln,yr),wi=Og(ar,en,zr),Si=0;Si0&&(yr=Math.max(10,yr),this.circleDiameter=yr)}else{var zr=Pe.top*et-yt,ln=Pe.bottom*et+yt,en=Pe.left*et-yt,Sn=Pe.right*et+yt,mn=Pe.collisionPadding;if(mn&&(en-=mn[0]*et,zr-=mn[1]*et,Sn+=mn[2]*et,ln+=mn[3]*et),Ft){var Mn=new r(en,zr),zn=new r(Sn,zr),Wn=new r(en,ln),ti=new r(Sn,ln),$n=Ft*Math.PI/180;Mn._rotate($n),zn._rotate($n),Wn._rotate($n),ti._rotate($n),en=Math.min(Mn.x,zn.x,Wn.x,ti.x),Sn=Math.max(Mn.x,zn.x,Wn.x,ti.x),zr=Math.min(Mn.y,zn.y,Wn.y,ti.y),ln=Math.max(Mn.y,zn.y,Wn.y,ti.y)}R.emplaceBack(W.x,W.y,en,zr,Sn,ln,ae,ve,Se)}this.boxEndIndex=R.length},Ah=function(R,W){if(R===void 0&&(R=[]),W===void 0&&(W=jb),this.data=R,this.length=this.data.length,this.compare=W,this.length>0)for(var ae=(this.length>>1)-1;ae>=0;ae--)this._down(ae)};Ah.prototype.push=function(R){this.data.push(R),this.length++,this._up(this.length-1)},Ah.prototype.pop=function(){if(this.length!==0){var R=this.data[0],W=this.data.pop();return this.length--,this.length>0&&(this.data[0]=W,this._down(0)),R}},Ah.prototype.peek=function(){return this.data[0]},Ah.prototype._up=function(R){for(var W=this,ae=W.data,ve=W.compare,Se=ae[R];R>0;){var Pe=R-1>>1,et=ae[Pe];if(ve(Se,et)>=0)break;ae[R]=et,R=Pe}ae[R]=Se},Ah.prototype._down=function(R){for(var W=this,ae=W.data,ve=W.compare,Se=this.length>>1,Pe=ae[R];R=0)break;ae[R]=yt,R=et}ae[R]=Pe};function jb(P,R){return PR?1:0}function Kb(P,R,W){R===void 0&&(R=1),W===void 0&&(W=!1);for(var ae=1/0,ve=1/0,Se=-1/0,Pe=-1/0,et=P[0],yt=0;ytSe)&&(Se=_t.x),(!yt||_t.y>Pe)&&(Pe=_t.y)}var Ft=Se-ae,jt=Pe-ve,ar=Math.min(Ft,jt),er=ar/2,yr=new Ah([],Jb);if(ar===0)return new r(ae,ve);for(var zr=ae;zren.d||!en.d)&&(en=mn,W&&console.log("found best %d after %d probes",Math.round(1e4*mn.d)/1e4,Sn)),!(mn.max-en.d<=R)&&(er=mn.h/2,yr.push(new Mh(mn.p.x-er,mn.p.y-er,er,P)),yr.push(new Mh(mn.p.x+er,mn.p.y-er,er,P)),yr.push(new Mh(mn.p.x-er,mn.p.y+er,er,P)),yr.push(new Mh(mn.p.x+er,mn.p.y+er,er,P)),Sn+=4)}return W&&(console.log("num probes: "+Sn),console.log("best distance: "+en.d)),en.p}function Jb(P,R){return R.max-P.max}function Mh(P,R,W,ae){this.p=new r(P,R),this.h=W,this.d=Qb(this.p,ae),this.max=this.d+this.h*Math.SQRT2}function Qb(P,R){for(var W=!1,ae=1/0,ve=0;veP.y!=Ft.y>P.y&&P.x<(Ft.x-_t.x)*(P.y-_t.y)/(Ft.y-_t.y)+_t.x&&(W=!W),ae=Math.min(ae,of(P,_t,Ft))}return(W?1:-1)*Math.sqrt(ae)}function $b(P){for(var R=0,W=0,ae=0,ve=P[0],Se=0,Pe=ve.length,et=Pe-1;Se=Ai||Pl.y<0||Pl.y>=Ai||t3(P,Pl,Ph,W,ae,ve,wi,P.layers[0],P.collisionBoxArray,R.index,R.sourceLayerIndex,P.index,en,zn,$n,yt,mn,Wn,bi,er,R,Se,_t,Ft,Pe)};if(vi==="line")for(var Hi=0,ki=zg(R.geometry,0,0,Ai,Ai);Hi1){var mo=Yb(Wa,ti,W.vertical||yr,ae,zr,Sn);mo&&Si(Wa,mo)}}else if(R.type==="Polygon")for(var oo=0,zo=Dp(R.geometry,0);oo$f&&B(P.layerIds[0]+': Value for "text-size" is >= '+Dv+'. Reduce your "text-size".')):ln.kind==="composite"&&(en=[au*er.compositeTextSizes[0].evaluate(Pe,{},yr),au*er.compositeTextSizes[1].evaluate(Pe,{},yr)],(en[0]>$f||en[1]>$f)&&B(P.layerIds[0]+': Value for "text-size" is >= '+Dv+'. Reduce your "text-size".')),P.addSymbols(P.text,zr,en,et,Se,Pe,_t,R,yt.lineStartIndex,yt.lineLength,ar,yr);for(var Sn=0,mn=Ft;Sn$f&&B(P.layerIds[0]+': Value for "icon-size" is >= '+Dv+'. Reduce your "icon-size".')):$o.kind==="composite"&&(co=[au*zn.compositeIconSizes[0].evaluate(Mn,{},ti),au*zn.compositeIconSizes[1].evaluate(Mn,{},ti)],(co[0]>$f||co[1]>$f)&&B(P.layerIds[0]+': Value for "icon-size" is >= '+Dv+'. Reduce your "icon-size".')),P.addSymbols(P.icon,yo,co,mn,Sn,Mn,!1,R,vi.lineStartIndex,vi.lineLength,-1,ti),oa=P.icon.placedSymbolArray.length-1,Qo&&(ki=Qo.length*4,P.addSymbols(P.icon,Qo,co,mn,Sn,Mn,Us.vertical,R,vi.lineStartIndex,vi.lineLength,-1,ti),sa=P.icon.placedSymbolArray.length-1)}for(var qo in ae.horizontal){var Vs=ae.horizontal[qo];if(!xi){Aa=pe(Vs.text);var ff=et.layout.get("text-rotate").evaluate(Mn,{},ti);xi=new xd(yt,R,_t,Ft,jt,Vs,ar,er,yr,ff)}var ec=Vs.positionedLines.length===1;if(aa+=Bg(P,R,Vs,Se,et,yr,Mn,zr,vi,ae.vertical?Us.horizontal:Us.horizontalOnly,ec?Object.keys(ae.horizontal):[qo],ea,oa,zn,ti),ec)break}ae.vertical&&(xa+=Bg(P,R,ae.vertical,Se,et,yr,Mn,zr,vi,Us.vertical,["vertical"],ea,sa,zn,ti));var tc=xi?xi.boxStartIndex:P.collisionBoxArray.length,rc=xi?xi.boxEndIndex:P.collisionBoxArray.length,Ph=wi?wi.boxStartIndex:P.collisionBoxArray.length,Pl=wi?wi.boxEndIndex:P.collisionBoxArray.length,Md=Ni?Ni.boxStartIndex:P.collisionBoxArray.length,jp=Ni?Ni.boxEndIndex:P.collisionBoxArray.length,Sd=Si?Si.boxStartIndex:P.collisionBoxArray.length,Kp=Si?Si.boxEndIndex:P.collisionBoxArray.length,nl=-1,Rh=function(zv,rm){return zv&&zv.circleDiameter?Math.max(zv.circleDiameter,rm):rm};nl=Rh(xi,nl),nl=Rh(wi,nl),nl=Rh(Ni,nl),nl=Rh(Si,nl);var Ed=nl>-1?1:0;Ed&&(nl*=$n/Mo),P.glyphOffsetArray.length>=ya.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Mn.sortKey!==void 0&&P.addToSortKeyRanges(P.symbolInstances.length,Mn.sortKey),P.symbolInstances.emplaceBack(R.x,R.y,ea.right>=0?ea.right:-1,ea.center>=0?ea.center:-1,ea.left>=0?ea.left:-1,ea.vertical||-1,oa,sa,Aa,tc,rc,Ph,Pl,Md,jp,Sd,Kp,_t,aa,xa,Hi,ki,Ed,0,ar,Sa,Ba,nl)}function r3(P,R,W,ae){var ve=P.compareText;if(!(R in ve))ve[R]=[];else for(var Se=ve[R],Pe=Se.length-1;Pe>=0;Pe--)if(ae.dist(Se[Pe])0)&&(Pe.value.kind!=="constant"||Pe.value.value.length>0),Ft=yt.value.kind!=="constant"||!!yt.value.value||Object.keys(yt.parameters).length>0,jt=Se.get("symbol-sort-key");if(this.features=[],!(!_t&&!Ft)){for(var ar=W.iconDependencies,er=W.glyphDependencies,yr=W.availableImages,zr=new Ti(this.zoom),ln=0,en=R;ln=0;for(var xa=0,oa=bi.sections;xa=0;yt--)Pe[yt]={x:W[yt].x,y:W[yt].y,tileUnitDistanceFromAnchor:Se},yt>0&&(Se+=W[yt-1].dist(W[yt]));for(var _t=0;_t0},ya.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ya.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ya.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},ya.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},ya.prototype.addIndicesForPlacedSymbol=function(R,W){for(var ae=R.placedSymbolArray.get(W),ve=ae.vertexStartIndex+ae.numGlyphs*4,Se=ae.vertexStartIndex;Se1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(R),this.sortedAngle=R,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var ae=0,ve=this.symbolInstanceIndexes;ae=0&&_t.indexOf(et)===yt&&W.addIndicesForPlacedSymbol(W.text,et)}),Pe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Pe.verticalPlacedTextSymbolIndex),Pe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Pe.placedIconSymbolIndex),Pe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Pe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Be("SymbolBucket",ya,{omit:["layers","collisionBoxArray","features","compareText"]}),ya.MAX_GLYPHS=65535,ya.addDynamicAttributes=Gp;function o3(P,R){return R.replace(/{([^{}]+)}/g,function(W,ae){return ae in P?String(P[ae]):""})}var s3=new ca({"symbol-placement":new oi(Ar.layout_symbol["symbol-placement"]),"symbol-spacing":new oi(Ar.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new oi(Ar.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ei(Ar.layout_symbol["symbol-sort-key"]),"symbol-z-order":new oi(Ar.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new oi(Ar.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new oi(Ar.layout_symbol["icon-ignore-placement"]),"icon-optional":new oi(Ar.layout_symbol["icon-optional"]),"icon-rotation-alignment":new oi(Ar.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ei(Ar.layout_symbol["icon-size"]),"icon-text-fit":new oi(Ar.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new oi(Ar.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ei(Ar.layout_symbol["icon-image"]),"icon-rotate":new Ei(Ar.layout_symbol["icon-rotate"]),"icon-padding":new oi(Ar.layout_symbol["icon-padding"]),"icon-keep-upright":new oi(Ar.layout_symbol["icon-keep-upright"]),"icon-offset":new Ei(Ar.layout_symbol["icon-offset"]),"icon-anchor":new Ei(Ar.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new oi(Ar.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new oi(Ar.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new oi(Ar.layout_symbol["text-rotation-alignment"]),"text-field":new Ei(Ar.layout_symbol["text-field"]),"text-font":new Ei(Ar.layout_symbol["text-font"]),"text-size":new Ei(Ar.layout_symbol["text-size"]),"text-max-width":new Ei(Ar.layout_symbol["text-max-width"]),"text-line-height":new oi(Ar.layout_symbol["text-line-height"]),"text-letter-spacing":new Ei(Ar.layout_symbol["text-letter-spacing"]),"text-justify":new Ei(Ar.layout_symbol["text-justify"]),"text-radial-offset":new Ei(Ar.layout_symbol["text-radial-offset"]),"text-variable-anchor":new oi(Ar.layout_symbol["text-variable-anchor"]),"text-anchor":new Ei(Ar.layout_symbol["text-anchor"]),"text-max-angle":new oi(Ar.layout_symbol["text-max-angle"]),"text-writing-mode":new oi(Ar.layout_symbol["text-writing-mode"]),"text-rotate":new Ei(Ar.layout_symbol["text-rotate"]),"text-padding":new oi(Ar.layout_symbol["text-padding"]),"text-keep-upright":new oi(Ar.layout_symbol["text-keep-upright"]),"text-transform":new Ei(Ar.layout_symbol["text-transform"]),"text-offset":new Ei(Ar.layout_symbol["text-offset"]),"text-allow-overlap":new oi(Ar.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new oi(Ar.layout_symbol["text-ignore-placement"]),"text-optional":new oi(Ar.layout_symbol["text-optional"])}),l3=new ca({"icon-opacity":new Ei(Ar.paint_symbol["icon-opacity"]),"icon-color":new Ei(Ar.paint_symbol["icon-color"]),"icon-halo-color":new Ei(Ar.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ei(Ar.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ei(Ar.paint_symbol["icon-halo-blur"]),"icon-translate":new oi(Ar.paint_symbol["icon-translate"]),"icon-translate-anchor":new oi(Ar.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ei(Ar.paint_symbol["text-opacity"]),"text-color":new Ei(Ar.paint_symbol["text-color"],{runtimeType:Pn,getOverride:function(P){return P.textColor},hasOverride:function(P){return!!P.textColor}}),"text-halo-color":new Ei(Ar.paint_symbol["text-halo-color"]),"text-halo-width":new Ei(Ar.paint_symbol["text-halo-width"]),"text-halo-blur":new Ei(Ar.paint_symbol["text-halo-blur"]),"text-translate":new oi(Ar.paint_symbol["text-translate"]),"text-translate-anchor":new oi(Ar.paint_symbol["text-translate-anchor"])}),Wp={paint:l3,layout:s3},_h=function(R){this.type=R.property.overrides?R.property.overrides.runtimeType:Vr,this.defaultValue=R};_h.prototype.evaluate=function(R){if(R.formattedSection){var W=this.defaultValue.property.overrides;if(W&&W.hasOverride(R.formattedSection))return W.getOverride(R.formattedSection)}return R.feature&&R.featureState?this.defaultValue.evaluate(R.feature,R.featureState):this.defaultValue.property.specification.default},_h.prototype.eachChild=function(R){if(!this.defaultValue.isConstant()){var W=this.defaultValue.value;R(W._styleExpression.expression)}},_h.prototype.outputDefined=function(){return!1},_h.prototype.serialize=function(){return null},Be("FormatSectionOverride",_h,{omit:["defaultValue"]});var u3=function(P){function R(W){P.call(this,W,Wp)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.recalculate=function(ae,ve){if(P.prototype.recalculate.call(this,ae,ve),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var Se=this.layout.get("text-writing-mode");if(Se){for(var Pe=[],et=0,yt=Se;et",targetMapId:ve,sourceMapId:Pe.mapId})}}},Ch.prototype.receive=function(R){var W=R.data,ae=W.id;if(ae&&!(W.targetMapId&&this.mapId!==W.targetMapId))if(W.type===""){delete this.tasks[ae];var ve=this.cancelCallbacks[ae];delete this.cancelCallbacks[ae],ve&&ve()}else j()||W.mustQueue?(this.tasks[ae]=W,this.taskQueue.push(ae),this.invoker.trigger()):this.processTask(ae,W)},Ch.prototype.process=function(){if(this.taskQueue.length){var R=this.taskQueue.shift(),W=this.tasks[R];delete this.tasks[R],this.taskQueue.length&&this.invoker.trigger(),W&&this.processTask(R,W)}},Ch.prototype.processTask=function(R,W){var ae=this;if(W.type===""){var ve=this.callbacks[R];delete this.callbacks[R],ve&&(W.error?ve(Et(W.error)):ve(null,Et(W.data)))}else{var Se=!1,Pe=ue(this.globalScope)?void 0:[],et=W.hasCallback?function(ar,er){Se=!0,delete ae.cancelCallbacks[R],ae.target.postMessage({id:R,type:"",sourceMapId:ae.mapId,error:ar?Dt(ar):null,data:Dt(er,Pe)},Pe)}:function(ar){Se=!0},yt=null,_t=Et(W.data);if(this.parent[W.type])yt=this.parent[W.type](W.sourceMapId,_t,et);else if(this.parent.getWorkerSource){var Ft=W.type.split("."),jt=this.parent.getWorkerSource(W.sourceMapId,Ft[0],_t.source);yt=jt[Ft[1]](_t,et)}else et(new Error("Could not find function "+W.type));!Se&&yt&&yt.cancel&&(this.cancelCallbacks[R]=yt.cancel)}},Ch.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function b3(P,R,W){R=Math.pow(2,W)-R-1;var ae=Yg(P*256,R*256,W),ve=Yg((P+1)*256,(R+1)*256,W);return ae[0]+","+ae[1]+","+ve[0]+","+ve[1]}function Yg(P,R,W){var ae=2*Math.PI*6378137/256/Math.pow(2,W),ve=P*ae-2*Math.PI*6378137/2,Se=R*ae-2*Math.PI*6378137/2;return[ve,Se]}var io=function(R,W){R&&(W?this.setSouthWest(R).setNorthEast(W):R.length===4?this.setSouthWest([R[0],R[1]]).setNorthEast([R[2],R[3]]):this.setSouthWest(R[0]).setNorthEast(R[1]))};io.prototype.setNorthEast=function(R){return this._ne=R instanceof La?new La(R.lng,R.lat):La.convert(R),this},io.prototype.setSouthWest=function(R){return this._sw=R instanceof La?new La(R.lng,R.lat):La.convert(R),this},io.prototype.extend=function(R){var W=this._sw,ae=this._ne,ve,Se;if(R instanceof La)ve=R,Se=R;else if(R instanceof io){if(ve=R._sw,Se=R._ne,!ve||!Se)return this}else{if(Array.isArray(R))if(R.length===4||R.every(Array.isArray)){var Pe=R;return this.extend(io.convert(Pe))}else{var et=R;return this.extend(La.convert(et))}return this}return!W&&!ae?(this._sw=new La(ve.lng,ve.lat),this._ne=new La(Se.lng,Se.lat)):(W.lng=Math.min(ve.lng,W.lng),W.lat=Math.min(ve.lat,W.lat),ae.lng=Math.max(Se.lng,ae.lng),ae.lat=Math.max(Se.lat,ae.lat)),this},io.prototype.getCenter=function(){return new La((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},io.prototype.getSouthWest=function(){return this._sw},io.prototype.getNorthEast=function(){return this._ne},io.prototype.getNorthWest=function(){return new La(this.getWest(),this.getNorth())},io.prototype.getSouthEast=function(){return new La(this.getEast(),this.getSouth())},io.prototype.getWest=function(){return this._sw.lng},io.prototype.getSouth=function(){return this._sw.lat},io.prototype.getEast=function(){return this._ne.lng},io.prototype.getNorth=function(){return this._ne.lat},io.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},io.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},io.prototype.isEmpty=function(){return!(this._sw&&this._ne)},io.prototype.contains=function(R){var W=La.convert(R),ae=W.lng,ve=W.lat,Se=this._sw.lat<=ve&&ve<=this._ne.lat,Pe=this._sw.lng<=ae&&ae<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Pe=this._sw.lng>=ae&&ae>=this._ne.lng),Se&&Pe},io.convert=function(R){return!R||R instanceof io?R:new io(R)};var Xg=63710088e-1,La=function(R,W){if(isNaN(R)||isNaN(W))throw new Error("Invalid LngLat object: ("+R+", "+W+")");if(this.lng=+R,this.lat=+W,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};La.prototype.wrap=function(){return new La(b(this.lng,-180,180),this.lat)},La.prototype.toArray=function(){return[this.lng,this.lat]},La.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},La.prototype.distanceTo=function(R){var W=Math.PI/180,ae=this.lat*W,ve=R.lat*W,Se=Math.sin(ae)*Math.sin(ve)+Math.cos(ae)*Math.cos(ve)*Math.cos((R.lng-this.lng)*W),Pe=Xg*Math.acos(Math.min(Se,1));return Pe},La.prototype.toBounds=function(R){R===void 0&&(R=0);var W=40075017,ae=360*R/W,ve=ae/Math.cos(Math.PI/180*this.lat);return new io(new La(this.lng-ve,this.lat-ae),new La(this.lng+ve,this.lat+ae))},La.convert=function(R){if(R instanceof La)return R;if(Array.isArray(R)&&(R.length===2||R.length===3))return new La(Number(R[0]),Number(R[1]));if(!Array.isArray(R)&&typeof R=="object"&&R!==null)return new La(Number("lng"in R?R.lng:R.lon),Number(R.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Zg=2*Math.PI*Xg;function jg(P){return Zg*Math.cos(P*Math.PI/180)}function Kg(P){return(180+P)/360}function Jg(P){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+P*Math.PI/360)))/360}function Qg(P,R){return P/jg(R)}function w3(P){return P*360-180}function Xp(P){var R=180-P*360;return 360/Math.PI*Math.atan(Math.exp(R*Math.PI/180))-90}function T3(P,R){return P*jg(Xp(R))}function A3(P){return 1/Math.cos(P*Math.PI/180)}var Wc=function(R,W,ae){ae===void 0&&(ae=0),this.x=+R,this.y=+W,this.z=+ae};Wc.fromLngLat=function(R,W){W===void 0&&(W=0);var ae=La.convert(R);return new Wc(Kg(ae.lng),Jg(ae.lat),Qg(W,ae.lat))},Wc.prototype.toLngLat=function(){return new La(w3(this.x),Xp(this.y))},Wc.prototype.toAltitude=function(){return T3(this.z,this.y)},Wc.prototype.meterInMercatorCoordinateUnits=function(){return 1/Zg*A3(Xp(this.y))};var Yc=function(R,W,ae){this.z=R,this.x=W,this.y=ae,this.key=Fv(0,R,R,W,ae)};Yc.prototype.equals=function(R){return this.z===R.z&&this.x===R.x&&this.y===R.y},Yc.prototype.url=function(R,W){var ae=b3(this.x,this.y,this.z),ve=M3(this.z,this.x,this.y);return R[(this.x+this.y)%R.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(W==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",ve).replace("{bbox-epsg-3857}",ae)},Yc.prototype.getTilePoint=function(R){var W=Math.pow(2,this.z);return new r((R.x*W-this.x)*Ai,(R.y*W-this.y)*Ai)},Yc.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var $g=function(R,W){this.wrap=R,this.canonical=W,this.key=Fv(R,W.z,W.z,W.x,W.y)},ao=function(R,W,ae,ve,Se){this.overscaledZ=R,this.wrap=W,this.canonical=new Yc(ae,+ve,+Se),this.key=Fv(W,R,ae,ve,Se)};ao.prototype.equals=function(R){return this.overscaledZ===R.overscaledZ&&this.wrap===R.wrap&&this.canonical.equals(R.canonical)},ao.prototype.scaledTo=function(R){var W=this.canonical.z-R;return R>this.canonical.z?new ao(R,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ao(R,this.wrap,R,this.canonical.x>>W,this.canonical.y>>W)},ao.prototype.calculateScaledKey=function(R,W){var ae=this.canonical.z-R;return R>this.canonical.z?Fv(this.wrap*+W,R,this.canonical.z,this.canonical.x,this.canonical.y):Fv(this.wrap*+W,R,R,this.canonical.x>>ae,this.canonical.y>>ae)},ao.prototype.isChildOf=function(R){if(R.wrap!==this.wrap)return!1;var W=this.canonical.z-R.canonical.z;return R.overscaledZ===0||R.overscaledZ>W&&R.canonical.y===this.canonical.y>>W},ao.prototype.children=function(R){if(this.overscaledZ>=R)return[new ao(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var W=this.canonical.z+1,ae=this.canonical.x*2,ve=this.canonical.y*2;return[new ao(W,this.wrap,W,ae,ve),new ao(W,this.wrap,W,ae+1,ve),new ao(W,this.wrap,W,ae,ve+1),new ao(W,this.wrap,W,ae+1,ve+1)]},ao.prototype.isLessThan=function(R){return this.wrapR.wrap?!1:this.overscaledZR.overscaledZ?!1:this.canonical.xR.canonical.x?!1:this.canonical.y0;Se--)ve=1<=this.dim+1||W<-1||W>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(W+1)*this.stride+(R+1)},lf.prototype._unpackMapbox=function(R,W,ae){return(R*256*256+W*256+ae)/10-1e4},lf.prototype._unpackTerrarium=function(R,W,ae){return R*256+W+ae/256-32768},lf.prototype.getPixels=function(){return new us({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},lf.prototype.backfillBorder=function(R,W,ae){if(this.dim!==R.dim)throw new Error("dem dimension mismatch");var ve=W*this.dim,Se=W*this.dim+this.dim,Pe=ae*this.dim,et=ae*this.dim+this.dim;switch(W){case-1:ve=Se-1;break;case 1:Se=ve+1;break}switch(ae){case-1:Pe=et-1;break;case 1:et=Pe+1;break}for(var yt=-W*this.dim,_t=-ae*this.dim,Ft=Pe;Ft=0&&jt[3]>=0&&yt.insert(et,jt[0],jt[1],jt[2],jt[3])}},uf.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new mh.VectorTile(new hd(this.rawTileData)).layers,this.sourceLayerCoder=new Td(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},uf.prototype.query=function(R,W,ae,ve){var Se=this;this.loadVTLayers();for(var Pe=R.params||{},et=Ai/R.tileSize/R.scale,yt=Os(Pe.filter),_t=R.queryGeometry,Ft=R.queryPadding*et,jt=em(_t),ar=this.grid.query(jt.minX-Ft,jt.minY-Ft,jt.maxX+Ft,jt.maxY+Ft),er=em(R.cameraQueryGeometry),yr=this.grid3D.query(er.minX-Ft,er.minY-Ft,er.maxX+Ft,er.maxY+Ft,function(Wn,ti,$n,bi){return Ll(R.cameraQueryGeometry,Wn-Ft,ti-Ft,$n+Ft,bi+Ft)}),zr=0,ln=yr;zrve)Se=!1;else if(!W)Se=!0;else if(this.expirationTime=mr.maxzoom)&&mr.visibility!=="none"){n(dr,this.zoom,Ct);var xr=ur[mr.id]=mr.createBucket({index:Jt.bucketLayerIDs.length,layers:dr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Nt,sourceID:this.source});xr.populate(Ot,hr,this.tileID.canonical),Jt.bucketLayerIDs.push(dr.map(function(Tr){return Tr.id}))}}}}var pr,Gr,Pr,Dr,cn=i.mapObject(hr.glyphDependencies,function(Tr){return Object.keys(Tr).map(Number)});Object.keys(cn).length?It.send("getGlyphs",{uid:this.uid,stacks:cn},function(Tr,Cr){pr||(pr=Tr,Gr=Cr,En.call(kt))}):Gr={};var rn=Object.keys(hr.iconDependencies);rn.length?It.send("getImages",{icons:rn,source:this.source,tileID:this.tileID,type:"icons"},function(Tr,Cr){pr||(pr=Tr,Pr=Cr,En.call(kt))}):Pr={};var Cn=Object.keys(hr.patternDependencies);Cn.length?It.send("getImages",{icons:Cn,source:this.source,tileID:this.tileID,type:"patterns"},function(Tr,Cr){pr||(pr=Tr,Dr=Cr,En.call(kt))}):Dr={},En.call(this);function En(){if(pr)return Pt(pr);if(Gr&&Pr&&Dr){var Tr=new t(Gr),Cr=new i.ImageAtlas(Pr,Dr);for(var Wr in ur){var Ur=ur[Wr];Ur instanceof i.SymbolBucket?(n(Ur.layers,this.zoom,Ct),i.performSymbolLayout(Ur,Gr,Tr.positions,Pr,Cr.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Ur.hasPattern&&(Ur instanceof i.LineBucket||Ur instanceof i.FillBucket||Ur instanceof i.FillExtrusionBucket)&&(n(Ur.layers,this.zoom,Ct),Ur.addFeatures(hr,this.tileID.canonical,Cr.patternPositions))}this.status="done",Pt(null,{buckets:i.values(ur).filter(function(an){return!an.isEmpty()}),featureIndex:Jt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Tr.image,imageAtlas:Cr,glyphMap:this.returnDependencies?Gr:null,iconMap:this.returnDependencies?Pr:null,glyphPositions:this.returnDependencies?Tr.positions:null})}}};function n(gt,st,At){for(var Ct=new i.EvaluationParameters(st),It=0,Pt=gt;It=0!=!!st&>.reverse()}var d=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=function(st){this._feature=st,this.extent=i.EXTENT,this.type=st.type,this.properties=st.tags,"id"in st&&!isNaN(st.id)&&(this.id=parseInt(st.id,10))};w.prototype.loadGeometry=function(){if(this._feature.type===1){for(var st=[],At=0,Ct=this._feature.geometry;At"u"&&(Ct.push(Ht),Jt=Ct.length-1,Pt[Ht]=Jt),st.writeVarint(Jt);var ur=At.properties[Ht],hr=typeof ur;hr!=="string"&&hr!=="boolean"&&hr!=="number"&&(ur=JSON.stringify(ur));var vr=hr+":"+ur,Ye=kt[vr];typeof Ye>"u"&&(It.push(ur),Ye=It.length-1,kt[vr]=Ye),st.writeVarint(Ye)}}function V(gt,st){return(st<<3)+(gt&7)}function Y(gt){return gt<<1^gt>>31}function j(gt,st){for(var At=gt.loadGeometry(),Ct=gt.type,It=0,Pt=0,kt=At.length,Ht=0;Ht>1;ue(gt,st,kt,Ct,It,Pt%2),ie(gt,st,At,Ct,kt-1,Pt+1),ie(gt,st,At,kt+1,It,Pt+1)}}function ue(gt,st,At,Ct,It,Pt){for(;It>Ct;){if(It-Ct>600){var kt=It-Ct+1,Ht=At-Ct+1,Jt=Math.log(kt),ur=.5*Math.exp(2*Jt/3),hr=.5*Math.sqrt(Jt*ur*(kt-ur)/kt)*(Ht-kt/2<0?-1:1),vr=Math.max(Ct,Math.floor(At-Ht*ur/kt+hr)),Ye=Math.min(It,Math.floor(At+(kt-Ht)*ur/kt+hr));ue(gt,st,At,vr,Ye,Pt)}var Ge=st[2*At+Pt],Nt=Ct,Ot=It;for(J(gt,st,Ct,At),st[2*It+Pt]>Ge&&J(gt,st,Ct,It);NtGe;)Ot--}st[2*Ct+Pt]===Ge?J(gt,st,Ct,Ot):(Ot++,J(gt,st,Ot,It)),Ot<=At&&(Ct=Ot+1),At<=Ot&&(It=Ot-1)}}function J(gt,st,At,Ct){X(gt,At,Ct),X(st,2*At,2*Ct),X(st,2*At+1,2*Ct+1)}function X(gt,st,At){var Ct=gt[st];gt[st]=gt[At],gt[At]=Ct}function ee(gt,st,At,Ct,It,Pt,kt){for(var Ht=[0,gt.length-1,0],Jt=[],ur,hr;Ht.length;){var vr=Ht.pop(),Ye=Ht.pop(),Ge=Ht.pop();if(Ye-Ge<=kt){for(var Nt=Ge;Nt<=Ye;Nt++)ur=st[2*Nt],hr=st[2*Nt+1],ur>=At&&ur<=It&&hr>=Ct&&hr<=Pt&&Jt.push(gt[Nt]);continue}var Ot=Math.floor((Ge+Ye)/2);ur=st[2*Ot],hr=st[2*Ot+1],ur>=At&&ur<=It&&hr>=Ct&&hr<=Pt&&Jt.push(gt[Ot]);var Qt=(vr+1)%2;(vr===0?At<=ur:Ct<=hr)&&(Ht.push(Ge),Ht.push(Ot-1),Ht.push(Qt)),(vr===0?It>=ur:Pt>=hr)&&(Ht.push(Ot+1),Ht.push(Ye),Ht.push(Qt))}return Jt}function G(gt,st,At,Ct,It,Pt){for(var kt=[0,gt.length-1,0],Ht=[],Jt=It*It;kt.length;){var ur=kt.pop(),hr=kt.pop(),vr=kt.pop();if(hr-vr<=Pt){for(var Ye=vr;Ye<=hr;Ye++)Q(st[2*Ye],st[2*Ye+1],At,Ct)<=Jt&&Ht.push(gt[Ye]);continue}var Ge=Math.floor((vr+hr)/2),Nt=st[2*Ge],Ot=st[2*Ge+1];Q(Nt,Ot,At,Ct)<=Jt&&Ht.push(gt[Ge]);var Qt=(ur+1)%2;(ur===0?At-It<=Nt:Ct-It<=Ot)&&(kt.push(vr),kt.push(Ge-1),kt.push(Qt)),(ur===0?At+It>=Nt:Ct+It>=Ot)&&(kt.push(Ge+1),kt.push(hr),kt.push(Qt))}return Ht}function Q(gt,st,At,Ct){var It=gt-At,Pt=st-Ct;return It*It+Pt*Pt}var oe=function(gt){return gt[0]},$=function(gt){return gt[1]},Z=function(st,At,Ct,It,Pt){At===void 0&&(At=oe),Ct===void 0&&(Ct=$),It===void 0&&(It=64),Pt===void 0&&(Pt=Float64Array),this.nodeSize=It,this.points=st;for(var kt=st.length<65536?Uint16Array:Uint32Array,Ht=this.ids=new kt(st.length),Jt=this.coords=new Pt(st.length*2),ur=0;ur=It;hr--){var vr=+Date.now();Jt=this._cluster(Jt,hr),this.trees[hr]=new Z(Jt,Ve,Ue,kt,Float32Array),Ct&&console.log("z%d: %d clusters in %dms",hr,Jt.length,+Date.now()-vr)}return Ct&&console.timeEnd("total time"),this},ne.prototype.getClusters=function(st,At){var Ct=((st[0]+180)%360+360)%360-180,It=Math.max(-90,Math.min(90,st[1])),Pt=st[2]===180?180:((st[2]+180)%360+360)%360-180,kt=Math.max(-90,Math.min(90,st[3]));if(st[2]-st[0]>=360)Ct=-180,Pt=180;else if(Ct>Pt){var Ht=this.getClusters([Ct,It,180,kt],At),Jt=this.getClusters([-180,It,Pt,kt],At);return Ht.concat(Jt)}for(var ur=this.trees[this._limitZoom(At)],hr=ur.range(Re(Ct),be(kt),Re(Pt),be(It)),vr=[],Ye=0,Ge=hr;YeAt&&(Ot+=rr.numPoints||1)}if(Ot>=Jt){for(var Vt=vr.x*Nt,dr=vr.y*Nt,mr=Ht&&Nt>1?this._map(vr,!0):null,xr=(hr<<5)+(At+1)+this.points.length,pr=0,Gr=Ge;pr1)for(var rn=0,Cn=Ge;rn>5},ne.prototype._getOriginZoom=function(st){return(st-this.points.length)%32},ne.prototype._map=function(st,At){if(st.numPoints)return At?Le({},st.properties):st.properties;var Ct=this.points[st.index].properties,It=this.options.map(Ct);return At&&It===Ct?Le({},It):It};function ce(gt,st,At,Ct,It){return{x:gt,y:st,zoom:1/0,id:At,parentId:-1,numPoints:Ct,properties:It}}function ge(gt,st){var At=gt.geometry.coordinates,Ct=At[0],It=At[1];return{x:Re(Ct),y:be(It),zoom:1/0,index:st,parentId:-1}}function Te(gt){return{type:"Feature",id:gt.id,properties:we(gt),geometry:{type:"Point",coordinates:[Ae(gt.x),me(gt.y)]}}}function we(gt){var st=gt.numPoints,At=st>=1e4?Math.round(st/1e3)+"k":st>=1e3?Math.round(st/100)/10+"k":st;return Le(Le({},gt.properties),{cluster:!0,cluster_id:gt.id,point_count:st,point_count_abbreviated:At})}function Re(gt){return gt/360+.5}function be(gt){var st=Math.sin(gt*Math.PI/180),At=.5-.25*Math.log((1+st)/(1-st))/Math.PI;return At<0?0:At>1?1:At}function Ae(gt){return(gt-.5)*360}function me(gt){var st=(180-gt*360)*Math.PI/180;return 360*Math.atan(Math.exp(st))/Math.PI-90}function Le(gt,st){for(var At in st)gt[At]=st[At];return gt}function Ve(gt){return gt.x}function Ue(gt){return gt.y}function ke(gt,st,At,Ct){for(var It=Ct,Pt=At-st>>1,kt=At-st,Ht,Jt=gt[st],ur=gt[st+1],hr=gt[At],vr=gt[At+1],Ye=st+3;YeIt)Ht=Ye,It=Ge;else if(Ge===It){var Nt=Math.abs(Ye-Pt);NtCt&&(Ht-st>3&&ke(gt,st,Ht,Ct),gt[Ht+2]=It,At-Ht>3&&ke(gt,Ht,At,Ct))}function He(gt,st,At,Ct,It,Pt){var kt=It-At,Ht=Pt-Ct;if(kt!==0||Ht!==0){var Jt=((gt-At)*kt+(st-Ct)*Ht)/(kt*kt+Ht*Ht);Jt>1?(At=It,Ct=Pt):Jt>0&&(At+=kt*Jt,Ct+=Ht*Jt)}return kt=gt-At,Ht=st-Ct,kt*kt+Ht*Ht}function Ie(gt,st,At,Ct){var It={id:typeof gt>"u"?null:gt,type:st,geometry:At,tags:Ct,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return rt(It),It}function rt(gt){var st=gt.geometry,At=gt.type;if(At==="Point"||At==="MultiPoint"||At==="LineString")Ke(gt,st);else if(At==="Polygon"||At==="MultiLineString")for(var Ct=0;Ct0&&(Ct?kt+=(It*ur-Jt*Pt)/2:kt+=Math.sqrt(Math.pow(Jt-It,2)+Math.pow(ur-Pt,2))),It=Jt,Pt=ur}var hr=st.length-3;st[2]=1,ke(st,0,hr,At),st[hr+2]=1,st.size=Math.abs(kt),st.start=0,st.end=st.size}function xt(gt,st,At,Ct){for(var It=0;It1?1:At}function ze(gt,st,At,Ct,It,Pt,kt,Ht){if(At/=st,Ct/=st,Pt>=At&&kt=Ct)return null;for(var Jt=[],ur=0;ur=At&&Nt=Ct)continue;var Ot=[];if(Ye==="Point"||Ye==="MultiPoint")Ze(vr,Ot,At,Ct,It);else if(Ye==="LineString")Je(vr,Ot,At,Ct,It,!1,Ht.lineMetrics);else if(Ye==="MultiLineString")Fe(vr,Ot,At,Ct,It,!1);else if(Ye==="Polygon")Fe(vr,Ot,At,Ct,It,!0);else if(Ye==="MultiPolygon")for(var Qt=0;Qt=At&&kt<=Ct&&(st.push(gt[Pt]),st.push(gt[Pt+1]),st.push(gt[Pt+2]))}}function Je(gt,st,At,Ct,It,Pt,kt){for(var Ht=We(gt),Jt=It===0?ye:Ee,ur=gt.start,hr,vr,Ye=0;YeAt&&(vr=Jt(Ht,Ge,Nt,Qt,tr,At),kt&&(Ht.start=ur+hr*vr)):fr>Ct?rr=At&&(vr=Jt(Ht,Ge,Nt,Qt,tr,At),Vt=!0),rr>Ct&&fr<=Ct&&(vr=Jt(Ht,Ge,Nt,Qt,tr,Ct),Vt=!0),!Pt&&Vt&&(kt&&(Ht.end=ur+hr*vr),st.push(Ht),Ht=We(gt)),kt&&(ur+=hr)}var dr=gt.length-3;Ge=gt[dr],Nt=gt[dr+1],Ot=gt[dr+2],fr=It===0?Ge:Nt,fr>=At&&fr<=Ct&&xe(Ht,Ge,Nt,Ot),dr=Ht.length-3,Pt&&dr>=3&&(Ht[dr]!==Ht[0]||Ht[dr+1]!==Ht[1])&&xe(Ht,Ht[0],Ht[1],Ht[2]),Ht.length&&st.push(Ht)}function We(gt){var st=[];return st.size=gt.size,st.start=gt.start,st.end=gt.end,st}function Fe(gt,st,At,Ct,It,Pt){for(var kt=0;ktkt.maxX&&(kt.maxX=hr),vr>kt.maxY&&(kt.maxY=vr)}return kt}function vt(gt,st,At,Ct){var It=st.geometry,Pt=st.type,kt=[];if(Pt==="Point"||Pt==="MultiPoint")for(var Ht=0;Ht0&&st.size<(It?kt:Ct)){At.numPoints+=st.length/3;return}for(var Ht=[],Jt=0;Jtkt)&&(At.numSimplified++,Ht.push(st[Jt]),Ht.push(st[Jt+1])),At.numPoints++;It&&ct(Ht,Pt),gt.push(Ht)}function ct(gt,st){for(var At=0,Ct=0,It=gt.length,Pt=It-2;Ct0===st)for(Ct=0,It=gt.length;Ct24)throw new Error("maxZoom should be in the 0-24 range");if(st.promoteId&&st.generateId)throw new Error("promoteId and generateId cannot be used together.");var Ct=$e(gt,st);this.tiles={},this.tileCoords=[],At&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",st.indexMaxZoom,st.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ct=Me(Ct,st),Ct.length&&this.splitTile(Ct,0,0,0),At&&(Ct.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Bt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Bt.prototype.splitTile=function(gt,st,At,Ct,It,Pt,kt){for(var Ht=[gt,st,At,Ct],Jt=this.options,ur=Jt.debug;Ht.length;){Ct=Ht.pop(),At=Ht.pop(),st=Ht.pop(),gt=Ht.pop();var hr=1<1&&console.time("creation"),Ye=this.tiles[vr]=bt(gt,st,At,Ct,Jt),this.tileCoords.push({z:st,x:At,y:Ct}),ur)){ur>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",st,At,Ct,Ye.numFeatures,Ye.numPoints,Ye.numSimplified),console.timeEnd("creation"));var Ge="z"+st;this.stats[Ge]=(this.stats[Ge]||0)+1,this.total++}if(Ye.source=gt,It){if(st===Jt.maxZoom||st===It)continue;var Nt=1<1&&console.time("clipping");var Ot=.5*Jt.buffer/Jt.extent,Qt=.5-Ot,tr=.5+Ot,fr=1+Ot,rr,Vt,dr,mr,xr,pr;rr=Vt=dr=mr=null,xr=ze(gt,hr,At-Ot,At+tr,0,Ye.minX,Ye.maxX,Jt),pr=ze(gt,hr,At+Qt,At+fr,0,Ye.minX,Ye.maxX,Jt),gt=null,xr&&(rr=ze(xr,hr,Ct-Ot,Ct+tr,1,Ye.minY,Ye.maxY,Jt),Vt=ze(xr,hr,Ct+Qt,Ct+fr,1,Ye.minY,Ye.maxY,Jt),xr=null),pr&&(dr=ze(pr,hr,Ct-Ot,Ct+tr,1,Ye.minY,Ye.maxY,Jt),mr=ze(pr,hr,Ct+Qt,Ct+fr,1,Ye.minY,Ye.maxY,Jt),pr=null),ur>1&&console.timeEnd("clipping"),Ht.push(rr||[],st+1,At*2,Ct*2),Ht.push(Vt||[],st+1,At*2,Ct*2+1),Ht.push(dr||[],st+1,At*2+1,Ct*2),Ht.push(mr||[],st+1,At*2+1,Ct*2+1)}}},Bt.prototype.getTile=function(gt,st,At){var Ct=this.options,It=Ct.extent,Pt=Ct.debug;if(gt<0||gt>24)return null;var kt=1<1&&console.log("drilling down to z%d-%d-%d",gt,st,At);for(var Jt=gt,ur=st,hr=At,vr;!vr&&Jt>0;)Jt--,ur=Math.floor(ur/2),hr=Math.floor(hr/2),vr=this.tiles[ir(Jt,ur,hr)];return!vr||!vr.source?null:(Pt>1&&console.log("found parent tile z%d-%d-%d",Jt,ur,hr),Pt>1&&console.time("drilling down"),this.splitTile(vr.source,Jt,ur,hr,gt,st,At),Pt>1&&console.timeEnd("drilling down"),this.tiles[Ht]?it(this.tiles[Ht],It):null)};function ir(gt,st,At){return((1<=0?0:he.button},x.remove=function(he){he.parentNode&&he.parentNode.removeChild(he)};function l(he,K,de){var re,pe,Oe,Qe=i.browser.devicePixelRatio>1?"@2x":"",ut=i.getJSON(K.transformRequest(K.normalizeSpriteURL(he,Qe,".json"),i.ResourceType.SpriteJSON),function(qt,cr){ut=null,Oe||(Oe=qt,re=cr,Wt())}),Rt=i.getImage(K.transformRequest(K.normalizeSpriteURL(he,Qe,".png"),i.ResourceType.SpriteImage),function(qt,cr){Rt=null,Oe||(Oe=qt,pe=cr,Wt())});function Wt(){if(Oe)de(Oe);else if(re&&pe){var qt=i.browser.getImageData(pe),cr={};for(var lr in re){var Fr=re[lr],Xr=Fr.width,Yr=Fr.height,Hr=Fr.x,Kr=Fr.y,fn=Fr.sdf,Fn=Fr.pixelRatio,Nn=Fr.stretchX,Yn=Fr.stretchY,Xn=Fr.content,Gn=new i.RGBAImage({width:Xr,height:Yr});i.RGBAImage.copy(qt,Gn,{x:Hr,y:Kr},{x:0,y:0},{width:Xr,height:Yr}),cr[lr]={data:Gn,pixelRatio:Fn,sdf:fn,stretchX:Nn,stretchY:Yn,content:Xn}}de(null,cr)}}return{cancel:function(){ut&&(ut.cancel(),ut=null),Rt&&(Rt.cancel(),Rt=null)}}}function m(he){var K=he.userImage;if(K&&K.render){var de=K.render();if(de)return he.data.replace(new Uint8Array(K.data.buffer)),!0}return!1}var h=1,b=function(he){function K(){he.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return he&&(K.__proto__=he),K.prototype=Object.create(he&&he.prototype),K.prototype.constructor=K,K.prototype.isLoaded=function(){return this.loaded},K.prototype.setLoaded=function(re){if(this.loaded!==re&&(this.loaded=re,re)){for(var pe=0,Oe=this.requestors;pe=0?1.2:1))}A.prototype.draw=function(he){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(he,this.buffer,this.middle);for(var K=this.ctx.getImageData(0,0,this.size,this.size),de=new Uint8ClampedArray(this.size*this.size),re=0;re65535){qt(new Error("glyphs > 65535 not supported"));return}if(Fr.ranges[Yr]){qt(null,{stack:cr,id:lr,glyph:Xr});return}var Hr=Fr.requests[Yr];Hr||(Hr=Fr.requests[Yr]=[],E.loadGlyphRange(cr,Yr,re.url,re.requestManager,function(Kr,fn){if(fn){for(var Fn in fn)re._doesCharSupportLocalGlyph(+Fn)||(Fr.glyphs[+Fn]=fn[+Fn]);Fr.ranges[Yr]=!0}for(var Nn=0,Yn=Hr;Nn1&&(Wt=K[++Rt]);var cr=Math.abs(qt-Wt.left),lr=Math.abs(qt-Wt.right),Fr=Math.min(cr,lr),Xr=void 0,Yr=Oe/re*(pe+1);if(Wt.isDash){var Hr=pe-Math.abs(Yr);Xr=Math.sqrt(Fr*Fr+Hr*Hr)}else Xr=pe-Math.sqrt(Fr*Fr+Yr*Yr);this.data[ut+qt]=Math.max(0,Math.min(255,Xr+128))}},z.prototype.addRegularDash=function(K){for(var de=K.length-1;de>=0;--de){var re=K[de],pe=K[de+1];re.zeroLength?K.splice(de,1):pe&&pe.isDash===re.isDash&&(pe.left=re.left,K.splice(de,1))}var Oe=K[0],Qe=K[K.length-1];Oe.isDash===Qe.isDash&&(Oe.left=Qe.left-this.width,Qe.right=Oe.right+this.width);for(var ut=this.width*this.nextRow,Rt=0,Wt=K[Rt],qt=0;qt1&&(Wt=K[++Rt]);var cr=Math.abs(qt-Wt.left),lr=Math.abs(qt-Wt.right),Fr=Math.min(cr,lr),Xr=Wt.isDash?Fr:-Fr;this.data[ut+qt]=Math.max(0,Math.min(255,Xr+128))}},z.prototype.addDash=function(K,de){var re=de?7:0,pe=2*re+1;if(this.nextRow+pe>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var Oe=0,Qe=0;Qe=re.minX&&K.x=re.minY&&K.y0&&(qt[new i.OverscaledTileID(re.overscaledZ,ut,pe.z,Qe,pe.y-1).key]={backfilled:!1},qt[new i.OverscaledTileID(re.overscaledZ,re.wrap,pe.z,pe.x,pe.y-1).key]={backfilled:!1},qt[new i.OverscaledTileID(re.overscaledZ,Wt,pe.z,Rt,pe.y-1).key]={backfilled:!1}),pe.y+10&&(Oe.resourceTiming=re._resourceTiming,re._resourceTiming=[]),re.fire(new i.Event("data",Oe))})},K.prototype.onAdd=function(re){this.map=re,this.load()},K.prototype.setData=function(re){var pe=this;return this._data=re,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Oe){if(Oe){pe.fire(new i.ErrorEvent(Oe));return}var Qe={dataType:"source",sourceDataType:"content"};pe._collectResourceTiming&&pe._resourceTiming&&pe._resourceTiming.length>0&&(Qe.resourceTiming=pe._resourceTiming,pe._resourceTiming=[]),pe.fire(new i.Event("data",Qe))}),this},K.prototype.getClusterExpansionZoom=function(re,pe){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:re,source:this.id},pe),this},K.prototype.getClusterChildren=function(re,pe){return this.actor.send("geojson.getClusterChildren",{clusterId:re,source:this.id},pe),this},K.prototype.getClusterLeaves=function(re,pe,Oe,Qe){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:re,limit:pe,offset:Oe},Qe),this},K.prototype._updateWorkerData=function(re){var pe=this;this._loaded=!1;var Oe=i.extend({},this.workerOptions),Qe=this._data;typeof Qe=="string"?(Oe.request=this.map._requestManager.transformRequest(i.browser.resolveURL(Qe),i.ResourceType.Source),Oe.request.collectResourceTiming=this._collectResourceTiming):Oe.data=JSON.stringify(Qe),this.actor.send(this.type+".loadData",Oe,function(ut,Rt){pe._removed||Rt&&Rt.abandoned||(pe._loaded=!0,Rt&&Rt.resourceTiming&&Rt.resourceTiming[pe.id]&&(pe._resourceTiming=Rt.resourceTiming[pe.id].slice(0)),pe.actor.send(pe.type+".coalesce",{source:Oe.source},null),re(ut))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(re,pe){var Oe=this,Qe=re.actor?"reloadTile":"loadTile";re.actor=this.actor;var ut={type:this.type,uid:re.uid,tileID:re.tileID,zoom:re.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};re.request=this.actor.send(Qe,ut,function(Rt,Wt){return delete re.request,re.unloadVectorData(),re.aborted?pe(null):Rt?pe(Rt):(re.loadVectorData(Wt,Oe.map.painter,Qe==="reloadTile"),pe(null))})},K.prototype.abortTile=function(re){re.request&&(re.request.cancel(),delete re.request),re.aborted=!0},K.prototype.unloadTile=function(re){re.unloadVectorData(),this.actor.send("removeTile",{uid:re.uid,type:this.type,source:this.id})},K.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},K.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K}(i.Evented),Y=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),j=function(he){function K(de,re,pe,Oe){he.call(this),this.id=de,this.dispatcher=pe,this.coordinates=re.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Oe),this.options=re}return he&&(K.__proto__=he),K.prototype=Object.create(he&&he.prototype),K.prototype.constructor=K,K.prototype.load=function(re,pe){var Oe=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(Qe,ut){Oe._loaded=!0,Qe?Oe.fire(new i.ErrorEvent(Qe)):ut&&(Oe.image=ut,re&&(Oe.coordinates=re),pe&&pe(),Oe._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(re){var pe=this;return!this.image||!re.url?this:(this.options.url=re.url,this.load(re.coordinates,function(){pe.texture=null}),this)},K.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},K.prototype.onAdd=function(re){this.map=re,this.load()},K.prototype.setCoordinates=function(re){var pe=this;this.coordinates=re;var Oe=re.map(i.MercatorCoordinate.fromLngLat);this.tileID=te(Oe),this.minzoom=this.maxzoom=this.tileID.z;var Qe=Oe.map(function(ut){return pe.tileID.getTilePoint(ut)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(Qe[0].x,Qe[0].y,0,0),this._boundsArray.emplaceBack(Qe[1].x,Qe[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(Qe[3].x,Qe[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(Qe[2].x,Qe[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})),this},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var re=this.map.painter.context,pe=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(re,this.image,pe.RGBA),this.texture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE));for(var Oe in this.tiles){var Qe=this.tiles[Oe];Qe.state!=="loaded"&&(Qe.state="loaded",Qe.texture=this.texture)}}},K.prototype.loadTile=function(re,pe){this.tileID&&this.tileID.equals(re.tileID.canonical)?(this.tiles[String(re.tileID.wrap)]=re,re.buckets={},pe(null)):(re.state="errored",pe(null))},K.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return!1},K}(i.Evented);function te(he){for(var K=1/0,de=1/0,re=-1/0,pe=-1/0,Oe=0,Qe=he;Oepe.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+pe.start(0)+" and "+pe.end(0)+"-second mark."))):this.video.currentTime=re}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(re){this.map||(this.map=re,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var re=this.map.painter.context,pe=re.gl;this.boundsBuffer||(this.boundsBuffer=re.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),pe.texSubImage2D(pe.TEXTURE_2D,0,0,0,pe.RGBA,pe.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(re,this.video,pe.RGBA),this.texture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE));for(var Oe in this.tiles){var Qe=this.tiles[Oe];Qe.state!=="loaded"&&(Qe.state="loaded",Qe.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this.video&&!this.video.paused},K}(j),ue=function(he){function K(de,re,pe,Oe){he.call(this,de,re,pe,Oe),re.coordinates?(!Array.isArray(re.coordinates)||re.coordinates.length!==4||re.coordinates.some(function(Qe){return!Array.isArray(Qe)||Qe.length!==2||Qe.some(function(ut){return typeof ut!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+de,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+de,null,'missing required property "coordinates"'))),re.animate&&typeof re.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+de,null,'optional "animate" property must be a boolean value'))),re.canvas?typeof re.canvas!="string"&&!(re.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+de,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+de,null,'missing required property "canvas"'))),this.options=re,this.animate=re.animate!==void 0?re.animate:!0}return he&&(K.__proto__=he),K.prototype=Object.create(he&&he.prototype),K.prototype.constructor=K,K.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},K.prototype.getCanvas=function(){return this.canvas},K.prototype.onAdd=function(re){this.map=re,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var re=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,re=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,re=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var pe=this.map.painter.context,Oe=pe.gl;this.boundsBuffer||(this.boundsBuffer=pe.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(re||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(pe,this.canvas,Oe.RGBA,{premultiply:!0});for(var Qe in this.tiles){var ut=this.tiles[Qe];ut.state!=="loaded"&&(ut.state="loaded",ut.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this._playing},K.prototype._hasInvalidDimensions=function(){for(var re=0,pe=[this.canvas.width,this.canvas.height];rethis.max){var ut=this._getAndRemoveByKey(this.order[0]);ut&&this.onRemove(ut)}return this},ge.prototype.has=function(K){return K.wrapped().key in this.data},ge.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},ge.prototype._getAndRemoveByKey=function(K){var de=this.data[K].shift();return de.timeout&&clearTimeout(de.timeout),this.data[K].length===0&&delete this.data[K],this.order.splice(this.order.indexOf(K),1),de.value},ge.prototype.getByKey=function(K){var de=this.data[K];return de?de[0].value:null},ge.prototype.get=function(K){if(!this.has(K))return null;var de=this.data[K.wrapped().key][0];return de.value},ge.prototype.remove=function(K,de){if(!this.has(K))return this;var re=K.wrapped().key,pe=de===void 0?0:this.data[re].indexOf(de),Oe=this.data[re][pe];return this.data[re].splice(pe,1),Oe.timeout&&clearTimeout(Oe.timeout),this.data[re].length===0&&delete this.data[re],this.onRemove(Oe.value),this.order.splice(this.order.indexOf(re),1),this},ge.prototype.setMaxSize=function(K){for(this.max=K;this.order.length>this.max;){var de=this._getAndRemoveByKey(this.order[0]);de&&this.onRemove(de)}return this},ge.prototype.filter=function(K){var de=[];for(var re in this.data)for(var pe=0,Oe=this.data[re];pe1||(Math.abs(cr)>1&&(Math.abs(cr+Fr)===1?cr+=Fr:Math.abs(cr-Fr)===1&&(cr-=Fr)),!(!qt.dem||!Wt.dem)&&(Wt.dem.backfillBorder(qt.dem,cr,lr),Wt.neighboringTiles&&Wt.neighboringTiles[Xr]&&(Wt.neighboringTiles[Xr].backfilled=!0)))}},K.prototype.getTile=function(re){return this.getTileByID(re.key)},K.prototype.getTileByID=function(re){return this._tiles[re]},K.prototype._retainLoadedChildren=function(re,pe,Oe,Qe){for(var ut in this._tiles){var Rt=this._tiles[ut];if(!(Qe[ut]||!Rt.hasData()||Rt.tileID.overscaledZ<=pe||Rt.tileID.overscaledZ>Oe)){for(var Wt=Rt.tileID;Rt&&Rt.tileID.overscaledZ>pe+1;){var qt=Rt.tileID.scaledTo(Rt.tileID.overscaledZ-1);Rt=this._tiles[qt.key],Rt&&Rt.hasData()&&(Wt=qt)}for(var cr=Wt;cr.overscaledZ>pe;)if(cr=cr.scaledTo(cr.overscaledZ-1),re[cr.key]){Qe[Wt.key]=Wt;break}}}},K.prototype.findLoadedParent=function(re,pe){if(re.key in this._loadedParentTiles){var Oe=this._loadedParentTiles[re.key];return Oe&&Oe.tileID.overscaledZ>=pe?Oe:null}for(var Qe=re.overscaledZ-1;Qe>=pe;Qe--){var ut=re.scaledTo(Qe),Rt=this._getLoadedTile(ut);if(Rt)return Rt}},K.prototype._getLoadedTile=function(re){var pe=this._tiles[re.key];if(pe&&pe.hasData())return pe;var Oe=this._cache.getByKey(re.wrapped().key);return Oe},K.prototype.updateCacheSize=function(re){var pe=Math.ceil(re.width/this._source.tileSize)+1,Oe=Math.ceil(re.height/this._source.tileSize)+1,Qe=pe*Oe,ut=5,Rt=Math.floor(Qe*ut),Wt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Rt):Rt;this._cache.setMaxSize(Wt)},K.prototype.handleWrapJump=function(re){var pe=this._prevLng===void 0?re:this._prevLng,Oe=re-pe,Qe=Oe/360,ut=Math.round(Qe);if(this._prevLng=re,ut){var Rt={};for(var Wt in this._tiles){var qt=this._tiles[Wt];qt.tileID=qt.tileID.unwrapTo(qt.tileID.wrap+ut),Rt[qt.tileID.key]=qt}this._tiles=Rt;for(var cr in this._timers)clearTimeout(this._timers[cr]),delete this._timers[cr];for(var lr in this._tiles){var Fr=this._tiles[lr];this._setTileReloadTimer(lr,Fr)}}},K.prototype.update=function(re){var pe=this;if(this.transform=re,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(re),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Oe;this.used?this._source.tileID?Oe=re.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(si){return new i.OverscaledTileID(si.canonical.z,si.wrap,si.canonical.z,si.canonical.x,si.canonical.y)}):(Oe=re.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Oe=Oe.filter(function(si){return pe._source.hasTile(si)}))):Oe=[];var Qe=re.coveringZoomLevel(this._source),ut=Math.max(Qe-K.maxOverzooming,this._source.minzoom),Rt=Math.max(Qe+K.maxUnderzooming,this._source.minzoom),Wt=this._updateRetainedTiles(Oe,Qe);if(Jt(this._source.type)){for(var qt={},cr={},lr=Object.keys(Wt),Fr=0,Xr=lr;Frthis._source.maxzoom){var fn=Hr.children(this._source.maxzoom)[0],Fn=this.getTile(fn);if(Fn&&Fn.hasData()){Oe[fn.key]=fn;continue}}else{var Nn=Hr.children(this._source.maxzoom);if(Oe[Nn[0].key]&&Oe[Nn[1].key]&&Oe[Nn[2].key]&&Oe[Nn[3].key])continue}for(var Yn=Kr.wasRequested(),Xn=Hr.overscaledZ-1;Xn>=ut;--Xn){var Gn=Hr.scaledTo(Xn);if(Qe[Gn.key]||(Qe[Gn.key]=!0,Kr=this.getTile(Gn),!Kr&&Yn&&(Kr=this._addTile(Gn)),Kr&&(Oe[Gn.key]=Gn,Yn=Kr.wasRequested(),Kr.hasData())))break}}}return Oe},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var re in this._tiles){for(var pe=[],Oe=void 0,Qe=this._tiles[re].tileID;Qe.overscaledZ>0;){if(Qe.key in this._loadedParentTiles){Oe=this._loadedParentTiles[Qe.key];break}pe.push(Qe.key);var ut=Qe.scaledTo(Qe.overscaledZ-1);if(Oe=this._getLoadedTile(ut),Oe)break;Qe=ut}for(var Rt=0,Wt=pe;Rt0)&&(pe.hasData()&&pe.state!=="reloading"?this._cache.add(pe.tileID,pe,pe.getExpiryTimeout()):(pe.aborted=!0,this._abortTile(pe),this._unloadTile(pe))))},K.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var re in this._tiles)this._removeTile(re);this._cache.reset()},K.prototype.tilesIn=function(re,pe,Oe){var Qe=this,ut=[],Rt=this.transform;if(!Rt)return ut;for(var Wt=Oe?Rt.getCameraQueryGeometry(re):re,qt=re.map(function(Xn){return Rt.pointCoordinate(Xn)}),cr=Wt.map(function(Xn){return Rt.pointCoordinate(Xn)}),lr=this.getIds(),Fr=1/0,Xr=1/0,Yr=-1/0,Hr=-1/0,Kr=0,fn=cr;Kr=0&&yi[1].y+si>=0){var hi=qt.map(function(Ji){return jn.getTilePoint(Ji)}),Fi=cr.map(function(Ji){return jn.getTilePoint(Ji)});ut.push({tile:Gn,tileID:jn,queryGeometry:hi,cameraQueryGeometry:Fi,scale:ei})}}},Yn=0;Yn=i.browser.now())return!0}return!1},K.prototype.setFeatureState=function(re,pe,Oe){re=re||"_geojsonTileLayer",this._state.updateState(re,pe,Oe)},K.prototype.removeFeatureState=function(re,pe,Oe){re=re||"_geojsonTileLayer",this._state.removeFeatureState(re,pe,Oe)},K.prototype.getFeatureState=function(re,pe){return re=re||"_geojsonTileLayer",this._state.getState(re,pe)},K.prototype.setDependencies=function(re,pe,Oe){var Qe=this._tiles[re];Qe&&Qe.setDependencies(pe,Oe)},K.prototype.reloadTilesForDependencies=function(re,pe){for(var Oe in this._tiles){var Qe=this._tiles[Oe];Qe.hasDependency(re,pe)&&this._reloadTile(Oe,"reloading")}this._cache.filter(function(ut){return!ut.hasDependency(re,pe)})},K}(i.Evented);kt.maxOverzooming=10,kt.maxUnderzooming=3;function Ht(he,K){var de=Math.abs(he.wrap*2)-+(he.wrap<0),re=Math.abs(K.wrap*2)-+(K.wrap<0);return he.overscaledZ-K.overscaledZ||re-de||K.canonical.y-he.canonical.y||K.canonical.x-he.canonical.x}function Jt(he){return he==="raster"||he==="image"||he==="video"}function ur(){return new i.window.Worker(ro.workerUrl)}var hr="mapboxgl_preloaded_worker_pool",vr=function(){this.active={}};vr.prototype.acquire=function(K){if(!this.workers)for(this.workers=[];this.workers.length0?(pe-Qe)/ut:0;return this.points[Oe].mult(1-Rt).add(this.points[de].mult(Rt))};var Tr=function(K,de,re){var pe=this.boxCells=[],Oe=this.circleCells=[];this.xCellCount=Math.ceil(K/re),this.yCellCount=Math.ceil(de/re);for(var Qe=0;Qethis.width||pe<0||de>this.height)return Oe?!1:[];var ut=[];if(K<=0&&de<=0&&this.width<=re&&this.height<=pe){if(Oe)return!0;for(var Rt=0;Rt0:ut}},Tr.prototype._queryCircle=function(K,de,re,pe,Oe){var Qe=K-re,ut=K+re,Rt=de-re,Wt=de+re;if(ut<0||Qe>this.width||Wt<0||Rt>this.height)return pe?!1:[];var qt=[],cr={hitTest:pe,circle:{x:K,y:de,radius:re},seenUids:{box:{},circle:{}}};return this._forEachCell(Qe,Rt,ut,Wt,this._queryCellCircle,qt,cr,Oe),pe?qt.length>0:qt},Tr.prototype.query=function(K,de,re,pe,Oe){return this._query(K,de,re,pe,!1,Oe)},Tr.prototype.hitTest=function(K,de,re,pe,Oe){return this._query(K,de,re,pe,!0,Oe)},Tr.prototype.hitTestCircle=function(K,de,re,pe){return this._queryCircle(K,de,re,!0,pe)},Tr.prototype._queryCell=function(K,de,re,pe,Oe,Qe,ut,Rt){var Wt=ut.seenUids,qt=this.boxCells[Oe];if(qt!==null)for(var cr=this.bboxes,lr=0,Fr=qt;lr=cr[Yr+0]&&pe>=cr[Yr+1]&&(!Rt||Rt(this.boxKeys[Xr]))){if(ut.hitTest)return Qe.push(!0),!0;Qe.push({key:this.boxKeys[Xr],x1:cr[Yr],y1:cr[Yr+1],x2:cr[Yr+2],y2:cr[Yr+3]})}}}var Hr=this.circleCells[Oe];if(Hr!==null)for(var Kr=this.circles,fn=0,Fn=Hr;fnut*ut+Rt*Rt},Tr.prototype._circleAndRectCollide=function(K,de,re,pe,Oe,Qe,ut){var Rt=(Qe-pe)/2,Wt=Math.abs(K-(pe+Rt));if(Wt>Rt+re)return!1;var qt=(ut-Oe)/2,cr=Math.abs(de-(Oe+qt));if(cr>qt+re)return!1;if(Wt<=Rt||cr<=qt)return!0;var lr=Wt-Rt,Fr=cr-qt;return lr*lr+Fr*Fr<=re*re};function Cr(he,K,de,re,pe){var Oe=i.create();return K?(i.scale(Oe,Oe,[1/pe,1/pe,1]),de||i.rotateZ(Oe,Oe,re.angle)):i.multiply(Oe,re.labelPlaneMatrix,he),Oe}function Wr(he,K,de,re,pe){if(K){var Oe=i.clone(he);return i.scale(Oe,Oe,[pe,pe,1]),de||i.rotateZ(Oe,Oe,-re.angle),Oe}else return re.glCoordMatrix}function Ur(he,K){var de=[he.x,he.y,0,1];wr(de,de,K);var re=de[3];return{point:new i.Point(de[0]/re,de[1]/re),signedDistanceFromCamera:re}}function an(he,K){return .5+.5*(he/K)}function pn(he,K){var de=he[0]/he[3],re=he[1]/he[3],pe=de>=-K[0]&&de<=K[0]&&re>=-K[1]&&re<=K[1];return pe}function gn(he,K,de,re,pe,Oe,Qe,ut){var Rt=re?he.textSizeData:he.iconSizeData,Wt=i.evaluateSizeForZoom(Rt,de.transform.zoom),qt=[256/de.width*2+1,256/de.height*2+1],cr=re?he.text.dynamicLayoutVertexArray:he.icon.dynamicLayoutVertexArray;cr.clear();for(var lr=he.lineVertexArray,Fr=re?he.text.placedSymbolArray:he.icon.placedSymbolArray,Xr=de.transform.width/de.transform.height,Yr=!1,Hr=0;HrOe)return{useVertical:!0}}return(he===i.WritingMode.vertical?K.yde.x)?{needsFlipping:!0}:null}function ni(he,K,de,re,pe,Oe,Qe,ut,Rt,Wt,qt,cr,lr,Fr){var Xr=K/24,Yr=he.lineOffsetX*Xr,Hr=he.lineOffsetY*Xr,Kr;if(he.numGlyphs>1){var fn=he.glyphStartIndex+he.numGlyphs,Fn=he.lineStartIndex,Nn=he.lineStartIndex+he.lineLength,Yn=_n(Xr,ut,Yr,Hr,de,qt,cr,he,Rt,Oe,lr);if(!Yn)return{notEnoughRoom:!0};var Xn=Ur(Yn.first.point,Qe).point,Gn=Ur(Yn.last.point,Qe).point;if(re&&!de){var jn=kn(he.writingMode,Xn,Gn,Fr);if(jn)return jn}Kr=[Yn.first];for(var ei=he.glyphStartIndex+1;ei0?Fi.point:ci(cr,hi,si,1,pe),Gi=kn(he.writingMode,si,Ji,Fr);if(Gi)return Gi}var Ai=di(Xr*ut.getoffsetX(he.glyphStartIndex),Yr,Hr,de,qt,cr,he.segment,he.lineStartIndex,he.lineStartIndex+he.lineLength,Rt,Oe,lr);if(!Ai)return{notEnoughRoom:!0};Kr=[Ai]}for(var Yi=0,Ui=Kr;Yi0?1:-1,Xr=0;re&&(Fr*=-1,Xr=Math.PI),Fr<0&&(Xr+=Math.PI);for(var Yr=Fr>0?ut+Qe:ut+Qe+1,Hr=pe,Kr=pe,fn=0,Fn=0,Nn=Math.abs(lr),Yn=[];fn+Fn<=Nn;){if(Yr+=Fr,Yr=Rt)return null;if(Kr=Hr,Yn.push(Hr),Hr=cr[Yr],Hr===void 0){var Xn=new i.Point(Wt.getx(Yr),Wt.gety(Yr)),Gn=Ur(Xn,qt);if(Gn.signedDistanceFromCamera>0)Hr=cr[Yr]=Gn.point;else{var jn=Yr-Fr,ei=fn===0?Oe:new i.Point(Wt.getx(jn),Wt.gety(jn));Hr=ci(ei,Xn,Kr,Nn-fn+1,qt)}}fn+=Fn,Fn=Kr.dist(Hr)}var si=(Nn-fn)/Fn,yi=Hr.sub(Kr),hi=yi.mult(si)._add(Kr);hi._add(yi._unit()._perp()._mult(de*Fr));var Fi=Xr+Math.atan2(Hr.y-Kr.y,Hr.x-Kr.x);return Yn.push(hi),{point:hi,angle:Fi,path:Yn}}var li=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ri(he,K){for(var de=0;de=1;ia--)Ui.push(Ai.path[ia]);for(var qi=1;qi0){for(var Vi=Ui[0].clone(),Qi=Ui[0].clone(),Na=1;Na=Fi.x&&Qi.x<=Ji.x&&Vi.y>=Fi.y&&Qi.y<=Ji.y?ma=[Ui]:Qi.xJi.x||Qi.yJi.y?ma=[]:ma=i.clipLine([Ui],Fi.x,Fi.y,Ji.x,Ji.y)}for(var fo=0,Ns=ma;fo=this.screenRightBoundary||pethis.screenBottomBoundary},$r.prototype.isInsideGrid=function(K,de,re,pe){return re>=0&&K=0&&de0){var Nn;return this.prevPlacement&&this.prevPlacement.variableOffsets[lr.crossTileID]&&this.prevPlacement.placements[lr.crossTileID]&&this.prevPlacement.placements[lr.crossTileID].text&&(Nn=this.prevPlacement.variableOffsets[lr.crossTileID].anchor),this.variableOffsets[lr.crossTileID]={textOffset:Hr,width:re,height:pe,anchor:K,textBoxScale:Oe,prevAnchor:Nn},this.markUsedJustification(Fr,K,lr,Xr),Fr.allowVerticalPlacement&&(this.markUsedOrientation(Fr,Xr,lr),this.placedOrientations[lr.crossTileID]=Xr),{shift:Kr,placedGlyphBoxes:fn}}},kr.prototype.placeLayerBucketPart=function(K,de,re){var pe=this,Oe=K.parameters,Qe=Oe.bucket,ut=Oe.layout,Rt=Oe.posMatrix,Wt=Oe.textLabelPlaneMatrix,qt=Oe.labelToScreenMatrix,cr=Oe.textPixelRatio,lr=Oe.holdingForFade,Fr=Oe.collisionBoxArray,Xr=Oe.partiallyEvaluatedTextSize,Yr=Oe.collisionGroup,Hr=ut.get("text-optional"),Kr=ut.get("icon-optional"),fn=ut.get("text-allow-overlap"),Fn=ut.get("icon-allow-overlap"),Nn=ut.get("text-rotation-alignment")==="map",Yn=ut.get("text-pitch-alignment")==="map",Xn=ut.get("icon-text-fit")!=="none",Gn=ut.get("symbol-z-order")==="viewport-y",jn=fn&&(Fn||!Qe.hasIconData()||Kr),ei=Fn&&(fn||!Qe.hasTextData()||Hr);!Qe.collisionArrays&&Fr&&Qe.deserializeCollisionBoxes(Fr);var si=function(Ai,Yi){if(!de[Ai.crossTileID]){if(lr){pe.placements[Ai.crossTileID]=new An(!1,!1,!1);return}var Ui=!1,ia=!1,qi=!0,Ta=null,Ki={box:null,offscreen:null},ma={box:null,offscreen:null},Vi=null,Qi=null,Na=null,fo=0,Ns=0,Bs=0;Yi.textFeatureIndex?fo=Yi.textFeatureIndex:Ai.useRuntimeCollisionCircles&&(fo=Ai.featureIndex),Yi.verticalTextFeatureIndex&&(Ns=Yi.verticalTextFeatureIndex);var el=Yi.textBox;if(el){var _l=function(Ga){var ss=i.WritingMode.horizontal;if(Qe.allowVerticalPlacement&&!Ga&&pe.prevPlacement){var ls=pe.prevPlacement.placedOrientations[Ai.crossTileID];ls&&(pe.placedOrientations[Ai.crossTileID]=ls,ss=ls,pe.markUsedOrientation(Qe,ss,Ai))}return ss},of=function(Ga,ss){if(Qe.allowVerticalPlacement&&Ai.numVerticalGlyphVertices>0&&Yi.verticalTextBox)for(var ls=0,vh=Qe.writingModes;ls0&&(os=os.filter(function(Ga){return Ga!==Ko.anchor}),os.unshift(Ko.anchor))}var tl=function(Ga,ss,ls){for(var vh=Ga.x2-Ga.x1,bv=Ga.y2-Ga.y1,wp=Ai.textBoxScale,Tp=Xn&&!Fn?ss:null,Vc={box:[],offscreen:!1},Ap=fn?os.length*2:os.length,dh=0;dh=os.length,wv=pe.attemptAnchorPlacement(Mp,Ga,vh,bv,wp,Nn,Yn,cr,Rt,Yr,Sp,Ai,Qe,ls,Tp);if(wv&&(Vc=wv.placedGlyphBoxes,Vc&&Vc.box&&Vc.box.length)){Ui=!0,Ta=wv.shift;break}}return Vc},ru=function(){return tl(el,Yi.iconBox,i.WritingMode.horizontal)},rl=function(){var Ga=Yi.verticalTextBox,ss=Ki&&Ki.box&&Ki.box.length;return Qe.allowVerticalPlacement&&!ss&&Ai.numVerticalGlyphVertices>0&&Ga?tl(Ga,Yi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};of(ru,rl),Ki&&(Ui=Ki.box,qi=Ki.offscreen);var lh=_l(Ki&&Ki.box);if(!Ui&&pe.prevPlacement){var Zf=pe.prevPlacement.variableOffsets[Ai.crossTileID];Zf&&(pe.variableOffsets[Ai.crossTileID]=Zf,pe.markUsedJustification(Qe,Zf.anchor,Ai,lh))}}else{var Cl=function(Ga,ss){var ls=pe.collisionIndex.placeCollisionBox(Ga,fn,cr,Rt,Yr.predicate);return ls&&ls.box&&ls.box.length&&(pe.markUsedOrientation(Qe,ss,Ai),pe.placedOrientations[Ai.crossTileID]=ss),ls},jo=function(){return Cl(el,i.WritingMode.horizontal)},Ll=function(){var Ga=Yi.verticalTextBox;return Qe.allowVerticalPlacement&&Ai.numVerticalGlyphVertices>0&&Ga?Cl(Ga,i.WritingMode.vertical):{box:null,offscreen:null}};of(jo,Ll),_l(Ki&&Ki.box&&Ki.box.length)}}if(Vi=Ki,Ui=Vi&&Vi.box&&Vi.box.length>0,qi=Vi&&Vi.offscreen,Ai.useRuntimeCollisionCircles){var po=Qe.text.placedSymbolArray.get(Ai.centerJustifiedTextSymbolIndex),uh=i.evaluateSizeForFeature(Qe.textSizeData,Xr,po),Uc=ut.get("text-padding"),Io=Ai.collisionCircleDiameter;Qi=pe.collisionIndex.placeCollisionCircles(fn,po,Qe.lineVertexArray,Qe.glyphOffsetArray,uh,Rt,Wt,qt,re,Yn,Yr.predicate,Io,Uc),Ui=fn||Qi.circles.length>0&&!Qi.collisionDetected,qi=qi&&Qi.offscreen}if(Yi.iconFeatureIndex&&(Bs=Yi.iconFeatureIndex),Yi.iconBox){var jf=function(Ga){var ss=Xn&&Ta?Sr(Ga,Ta.x,Ta.y,Nn,Yn,pe.transform.angle):Ga;return pe.collisionIndex.placeCollisionBox(ss,Fn,cr,Rt,Yr.predicate)};ma&&ma.box&&ma.box.length&&Yi.verticalIconBox?(Na=jf(Yi.verticalIconBox),ia=Na.box.length>0):(Na=jf(Yi.iconBox),ia=Na.box.length>0),qi=qi&&Na.offscreen}var fh=Hr||Ai.numHorizontalGlyphVertices===0&&Ai.numVerticalGlyphVertices===0,ch=Kr||Ai.numIconVertices===0;if(!fh&&!ch?ia=Ui=ia&&Ui:ch?fh||(ia=ia&&Ui):Ui=ia&&Ui,Ui&&Vi&&Vi.box&&(ma&&ma.box&&Ns?pe.collisionIndex.insertCollisionBox(Vi.box,ut.get("text-ignore-placement"),Qe.bucketInstanceId,Ns,Yr.ID):pe.collisionIndex.insertCollisionBox(Vi.box,ut.get("text-ignore-placement"),Qe.bucketInstanceId,fo,Yr.ID)),ia&&Na&&pe.collisionIndex.insertCollisionBox(Na.box,ut.get("icon-ignore-placement"),Qe.bucketInstanceId,Bs,Yr.ID),Qi&&(Ui&&pe.collisionIndex.insertCollisionCircles(Qi.circles,ut.get("text-ignore-placement"),Qe.bucketInstanceId,fo,Yr.ID),re)){var hh=Qe.bucketInstanceId,Kf=pe.collisionCircleArrays[hh];Kf===void 0&&(Kf=pe.collisionCircleArrays[hh]=new Bn);for(var Jf=0;Jf=0;--hi){var Fi=yi[hi];si(Qe.symbolInstances.get(Fi),Qe.collisionArrays[Fi])}else for(var Ji=K.symbolInstanceStart;Ji=0&&(Qe>=0&&qt!==Qe?K.text.placedSymbolArray.get(qt).crossTileID=0:K.text.placedSymbolArray.get(qt).crossTileID=re.crossTileID)}},kr.prototype.markUsedOrientation=function(K,de,re){for(var pe=de===i.WritingMode.horizontal||de===i.WritingMode.horizontalOnly?de:0,Oe=de===i.WritingMode.vertical?de:0,Qe=[re.leftJustifiedTextSymbolIndex,re.centerJustifiedTextSymbolIndex,re.rightJustifiedTextSymbolIndex],ut=0,Rt=Qe;ut0||Yn>0,si=Fn.numIconVertices>0,yi=pe.placedOrientations[Fn.crossTileID],hi=yi===i.WritingMode.vertical,Fi=yi===i.WritingMode.horizontal||yi===i.WritingMode.horizontalOnly;if(ei){var Ji=Vr(jn.text),Gi=hi?Qr:Ji;Xr(K.text,Nn,Gi);var Ai=Fi?Qr:Ji;Xr(K.text,Yn,Ai);var Yi=jn.text.isHidden();[Fn.rightJustifiedTextSymbolIndex,Fn.centerJustifiedTextSymbolIndex,Fn.leftJustifiedTextSymbolIndex].forEach(function(Bs){Bs>=0&&(K.text.placedSymbolArray.get(Bs).hidden=Yi||hi?1:0)}),Fn.verticalPlacedTextSymbolIndex>=0&&(K.text.placedSymbolArray.get(Fn.verticalPlacedTextSymbolIndex).hidden=Yi||Fi?1:0);var Ui=pe.variableOffsets[Fn.crossTileID];Ui&&pe.markUsedJustification(K,Ui.anchor,Fn,yi);var ia=pe.placedOrientations[Fn.crossTileID];ia&&(pe.markUsedJustification(K,"left",Fn,ia),pe.markUsedOrientation(K,ia,Fn))}if(si){var qi=Vr(jn.icon),Ta=!(lr&&Fn.verticalPlacedIconSymbolIndex&&hi);if(Fn.placedIconSymbolIndex>=0){var Ki=Ta?qi:Qr;Xr(K.icon,Fn.numIconVertices,Ki),K.icon.placedSymbolArray.get(Fn.placedIconSymbolIndex).hidden=jn.icon.isHidden()}if(Fn.verticalPlacedIconSymbolIndex>=0){var ma=Ta?Qr:qi;Xr(K.icon,Fn.numVerticalIconVertices,ma),K.icon.placedSymbolArray.get(Fn.verticalPlacedIconSymbolIndex).hidden=jn.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Vi=K.collisionArrays[fn];if(Vi){var Qi=new i.Point(0,0);if(Vi.textBox||Vi.verticalTextBox){var Na=!0;if(Wt){var fo=pe.variableOffsets[Xn];fo?(Qi=Di(fo.anchor,fo.width,fo.height,fo.textOffset,fo.textBoxScale),qt&&Qi._rotate(cr?pe.transform.angle:-pe.transform.angle)):Na=!1}Vi.textBox&&Ar(K.textCollisionBox.collisionVertexArray,jn.text.placed,!Na||hi,Qi.x,Qi.y),Vi.verticalTextBox&&Ar(K.textCollisionBox.collisionVertexArray,jn.text.placed,!Na||Fi,Qi.x,Qi.y)}var Ns=!!(!Fi&&Vi.verticalIconBox);Vi.iconBox&&Ar(K.iconCollisionBox.collisionVertexArray,jn.icon.placed,Ns,lr?Qi.x:0,lr?Qi.y:0),Vi.verticalIconBox&&Ar(K.iconCollisionBox.collisionVertexArray,jn.icon.placed,!Ns,lr?Qi.x:0,lr?Qi.y:0)}}},Hr=0;HrK},kr.prototype.setStale=function(){this.stale=!0};function Ar(he,K,de,re,pe){he.emplaceBack(K?1:0,de?1:0,re||0,pe||0),he.emplaceBack(K?1:0,de?1:0,re||0,pe||0),he.emplaceBack(K?1:0,de?1:0,re||0,pe||0),he.emplaceBack(K?1:0,de?1:0,re||0,pe||0)}var Or=Math.pow(2,25),xn=Math.pow(2,24),In=Math.pow(2,17),hn=Math.pow(2,16),sn=Math.pow(2,9),Er=Math.pow(2,8),Zr=Math.pow(2,1);function Vr(he){if(he.opacity===0&&!he.placed)return 0;if(he.opacity===1&&he.placed)return 4294967295;var K=he.placed?1:0,de=Math.floor(he.opacity*127);return de*Or+K*xn+de*In+K*hn+de*sn+K*Er+de*Zr+K}var Qr=0,wn=function(K){this._sortAcrossTiles=K.layout.get("symbol-z-order")!=="viewport-y"&&K.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};wn.prototype.continuePlacement=function(K,de,re,pe,Oe){for(var Qe=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var ut=K[this._currentPlacementIndex],Rt=de[ut],Wt=this.placement.collisionIndex.transform.zoom;if(Rt.type==="symbol"&&(!Rt.minzoom||Rt.minzoom<=Wt)&&(!Rt.maxzoom||Rt.maxzoom>Wt)){this._inProgressLayer||(this._inProgressLayer=new wn(Rt));var qt=this._inProgressLayer.continuePlacement(re[Rt.source],this.placement,this._showCollisionBoxes,Rt,Qe);if(qt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ln.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Pn=512/i.EXTENT/2,Un=function(K,de,re){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=re;for(var pe=0;peK.overscaledZ)for(var Wt in Rt){var qt=Rt[Wt];qt.tileID.isChildOf(K)&&qt.findMatches(de.symbolInstances,K,Qe)}else{var cr=K.scaledTo(Number(ut)),lr=Rt[cr.key];lr&&lr.findMatches(de.symbolInstances,K,Qe)}}for(var Fr=0;Fr0)throw new Error("Unimplemented: "+Qe.map(function(ut){return ut.command}).join(", ")+".");return Oe.forEach(function(ut){ut.command!=="setTransition"&&pe[ut.command].apply(pe,ut.args)}),this.stylesheet=re,!0},K.prototype.addImage=function(re,pe){if(this.getImage(re))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(re,pe),this._afterImageUpdated(re)},K.prototype.updateImage=function(re,pe){this.imageManager.updateImage(re,pe)},K.prototype.getImage=function(re){return this.imageManager.getImage(re)},K.prototype.removeImage=function(re){if(!this.getImage(re))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(re),this._afterImageUpdated(re)},K.prototype._afterImageUpdated=function(re){this._availableImages=this.imageManager.listImages(),this._changedImages[re]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},K.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},K.prototype.addSource=function(re,pe,Oe){var Qe=this;if(Oe===void 0&&(Oe={}),this._checkLoaded(),this.sourceCaches[re]!==void 0)throw new Error("There is already a source with this ID");if(!pe.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(pe).join(", ")+".");var ut=["vector","raster","geojson","video","image"],Rt=ut.indexOf(pe.type)>=0;if(!(Rt&&this._validate(i.validateStyle.source,"sources."+re,pe,null,Oe))){this.map&&this.map._collectResourceTiming&&(pe.collectResourceTiming=!0);var Wt=this.sourceCaches[re]=new kt(re,pe,this.dispatcher);Wt.style=this,Wt.setEventedParent(this,function(){return{isSourceLoaded:Qe.loaded(),source:Wt.serialize(),sourceId:re}}),Wt.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(re){if(this._checkLoaded(),this.sourceCaches[re]===void 0)throw new Error("There is no source with this ID");for(var pe in this._layers)if(this._layers[pe].source===re)return this.fire(new i.ErrorEvent(new Error('Source "'+re+'" cannot be removed while layer "'+pe+'" is using it.')));var Oe=this.sourceCaches[re];delete this.sourceCaches[re],delete this._updatedSources[re],Oe.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:re})),Oe.setEventedParent(null),Oe.clearTiles(),Oe.onRemove&&Oe.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(re,pe){this._checkLoaded();var Oe=this.sourceCaches[re].getSource();Oe.setData(pe),this._changed=!0},K.prototype.getSource=function(re){return this.sourceCaches[re]&&this.sourceCaches[re].getSource()},K.prototype.addLayer=function(re,pe,Oe){Oe===void 0&&(Oe={}),this._checkLoaded();var Qe=re.id;if(this.getLayer(Qe)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+Qe+'" already exists on this map')));return}var ut;if(re.type==="custom"){if(pi(this,i.validateCustomStyleLayer(re)))return;ut=i.createStyleLayer(re)}else{if(typeof re.source=="object"&&(this.addSource(Qe,re.source),re=i.clone$1(re),re=i.extend(re,{source:Qe})),this._validate(i.validateStyle.layer,"layers."+Qe,re,{arrayIndex:-1},Oe))return;ut=i.createStyleLayer(re),this._validateLayer(ut),ut.setEventedParent(this,{layer:{id:Qe}}),this._serializedLayers[ut.id]=ut.serialize()}var Rt=pe?this._order.indexOf(pe):this._order.length;if(pe&&Rt===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+pe+'" does not exist on this map.')));return}if(this._order.splice(Rt,0,Qe),this._layerOrderChanged=!0,this._layers[Qe]=ut,this._removedLayers[Qe]&&ut.source&&ut.type!=="custom"){var Wt=this._removedLayers[Qe];delete this._removedLayers[Qe],Wt.type!==ut.type?this._updatedSources[ut.source]="clear":(this._updatedSources[ut.source]="reload",this.sourceCaches[ut.source].pause())}this._updateLayer(ut),ut.onAdd&&ut.onAdd(this.map)},K.prototype.moveLayer=function(re,pe){this._checkLoaded(),this._changed=!0;var Oe=this._layers[re];if(!Oe){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be moved.")));return}if(re!==pe){var Qe=this._order.indexOf(re);this._order.splice(Qe,1);var ut=pe?this._order.indexOf(pe):this._order.length;if(pe&&ut===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+pe+'" does not exist on this map.')));return}this._order.splice(ut,0,re),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(re){this._checkLoaded();var pe=this._layers[re];if(!pe){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be removed.")));return}pe.setEventedParent(null);var Oe=this._order.indexOf(re);this._order.splice(Oe,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[re]=pe,delete this._layers[re],delete this._serializedLayers[re],delete this._updatedLayers[re],delete this._updatedPaintProps[re],pe.onRemove&&pe.onRemove(this.map)},K.prototype.getLayer=function(re){return this._layers[re]},K.prototype.hasLayer=function(re){return re in this._layers},K.prototype.setLayerZoomRange=function(re,pe,Oe){this._checkLoaded();var Qe=this.getLayer(re);if(!Qe){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot have zoom extent.")));return}Qe.minzoom===pe&&Qe.maxzoom===Oe||(pe!=null&&(Qe.minzoom=pe),Oe!=null&&(Qe.maxzoom=Oe),this._updateLayer(Qe))},K.prototype.setFilter=function(re,pe,Oe){Oe===void 0&&(Oe={}),this._checkLoaded();var Qe=this.getLayer(re);if(!Qe){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(Qe.filter,pe)){if(pe==null){Qe.filter=void 0,this._updateLayer(Qe);return}this._validate(i.validateStyle.filter,"layers."+Qe.id+".filter",pe,null,Oe)||(Qe.filter=i.clone$1(pe),this._updateLayer(Qe))}},K.prototype.getFilter=function(re){return i.clone$1(this.getLayer(re).filter)},K.prototype.setLayoutProperty=function(re,pe,Oe,Qe){Qe===void 0&&(Qe={}),this._checkLoaded();var ut=this.getLayer(re);if(!ut){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(ut.getLayoutProperty(pe),Oe)||(ut.setLayoutProperty(pe,Oe,Qe),this._updateLayer(ut))},K.prototype.getLayoutProperty=function(re,pe){var Oe=this.getLayer(re);if(!Oe){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style.")));return}return Oe.getLayoutProperty(pe)},K.prototype.setPaintProperty=function(re,pe,Oe,Qe){Qe===void 0&&(Qe={}),this._checkLoaded();var ut=this.getLayer(re);if(!ut){this.fire(new i.ErrorEvent(new Error("The layer '"+re+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(ut.getPaintProperty(pe),Oe)){var Rt=ut.setPaintProperty(pe,Oe,Qe);Rt&&this._updateLayer(ut),this._changed=!0,this._updatedPaintProps[re]=!0}},K.prototype.getPaintProperty=function(re,pe){return this.getLayer(re).getPaintProperty(pe)},K.prototype.setFeatureState=function(re,pe){this._checkLoaded();var Oe=re.source,Qe=re.sourceLayer,ut=this.sourceCaches[Oe];if(ut===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+Oe+"' does not exist in the map's style.")));return}var Rt=ut.getSource().type;if(Rt==="geojson"&&Qe){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Rt==="vector"&&!Qe){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}re.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ut.setFeatureState(Qe,re.id,pe)},K.prototype.removeFeatureState=function(re,pe){this._checkLoaded();var Oe=re.source,Qe=this.sourceCaches[Oe];if(Qe===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+Oe+"' does not exist in the map's style.")));return}var ut=Qe.getSource().type,Rt=ut==="vector"?re.sourceLayer:void 0;if(ut==="vector"&&!Rt){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(pe&&typeof re.id!="string"&&typeof re.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}Qe.removeFeatureState(Rt,re.id,pe)},K.prototype.getFeatureState=function(re){this._checkLoaded();var pe=re.source,Oe=re.sourceLayer,Qe=this.sourceCaches[pe];if(Qe===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+pe+"' does not exist in the map's style.")));return}var ut=Qe.getSource().type;if(ut==="vector"&&!Oe){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return re.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),Qe.getFeatureState(Oe,re.id)},K.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},K.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(re){return re.serialize()}),layers:this._serializeLayers(this._order)},function(re){return re!==void 0})},K.prototype._updateLayer=function(re){this._updatedLayers[re.id]=!0,re.source&&!this._updatedSources[re.source]&&this.sourceCaches[re.source].getSource().type!=="raster"&&(this._updatedSources[re.source]="reload",this.sourceCaches[re.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(re){for(var pe=this,Oe=function(Fi){return pe._layers[Fi].type==="fill-extrusion"},Qe={},ut=[],Rt=this._order.length-1;Rt>=0;Rt--){var Wt=this._order[Rt];if(Oe(Wt)){Qe[Wt]=Rt;for(var qt=0,cr=re;qt=0;fn--){var Fn=this._order[fn];if(Oe(Fn))for(var Nn=ut.length-1;Nn>=0;Nn--){var Yn=ut[Nn].feature;if(Qe[Yn.layer.id]"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{return!1}}return zt=r(zt),p(ne,Jt()?Reflect.construct(zt,Xt||[],r(ne).constructor):zt.apply(ne,Xt))}function p(ne,zt){if(zt&&(f(zt)==="object"||typeof zt=="function"))return zt;if(zt!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e(ne)}function r(ne){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Xt){return Xt.__proto__||Object.getPrototypeOf(Xt)},r(ne)}function e(ne){if(ne===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne}function a(ne,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Super expression must either be null or a function");ne.prototype=Object.create(zt&&zt.prototype,{constructor:{value:ne,writable:!0,configurable:!0}}),Object.defineProperty(ne,"prototype",{writable:!1}),zt&&n(ne,zt)}function n(ne,zt){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Jt,Wt){return Jt.__proto__=Wt,Jt},n(ne,zt)}function f(ne){"@babel/helpers - typeof";return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(zt){return typeof zt}:function(zt){return zt&&typeof Symbol=="function"&&zt.constructor===Symbol&&zt!==Symbol.prototype?"symbol":typeof zt},f(ne)}var c=t(59968),l=t(35984),m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;U.Buffer=o,U.SlowBuffer=z,U.INSPECT_MAX_BYTES=50;var h=2147483647;U.kMaxLength=h,o.TYPED_ARRAY_SUPPORT=b(),!o.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function b(){try{var ne=new Uint8Array(1),zt={foo:function(){return 42}};return Object.setPrototypeOf(zt,Uint8Array.prototype),Object.setPrototypeOf(ne,zt),ne.foo()===42}catch{return!1}}Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}});function u(ne){if(ne>h)throw new RangeError('The value "'+ne+'" is invalid for option "size"');var zt=new Uint8Array(ne);return Object.setPrototypeOf(zt,o.prototype),zt}function o(ne,zt,Xt){if(typeof ne=="number"){if(typeof zt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(ne)}return d(ne,zt,Xt)}o.poolSize=8192;function d(ne,zt,Xt){if(typeof ne=="string")return y(ne,zt);if(ArrayBuffer.isView(ne))return T(ne);if(ne==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+f(ne));if(le(ne,ArrayBuffer)||ne&&le(ne.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(le(ne,SharedArrayBuffer)||ne&&le(ne.buffer,SharedArrayBuffer)))return s(ne,zt,Xt);if(typeof ne=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Jt=ne.valueOf&&ne.valueOf();if(Jt!=null&&Jt!==ne)return o.from(Jt,zt,Xt);var Wt=L(ne);if(Wt)return Wt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ne[Symbol.toPrimitive]=="function")return o.from(ne[Symbol.toPrimitive]("string"),zt,Xt);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+f(ne))}o.from=function(ne,zt,Xt){return d(ne,zt,Xt)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array);function w(ne){if(typeof ne!="number")throw new TypeError('"size" argument must be of type number');if(ne<0)throw new RangeError('The value "'+ne+'" is invalid for option "size"')}function A(ne,zt,Xt){return w(ne),ne<=0?u(ne):zt!==void 0?typeof Xt=="string"?u(ne).fill(zt,Xt):u(ne).fill(zt):u(ne)}o.alloc=function(ne,zt,Xt){return A(ne,zt,Xt)};function _(ne){return w(ne),u(ne<0?0:M(ne)|0)}o.allocUnsafe=function(ne){return _(ne)},o.allocUnsafeSlow=function(ne){return _(ne)};function y(ne,zt){if((typeof zt!="string"||zt==="")&&(zt="utf8"),!o.isEncoding(zt))throw new TypeError("Unknown encoding: "+zt);var Xt=D(ne,zt)|0,Jt=u(Xt),Wt=Jt.write(ne,zt);return Wt!==Xt&&(Jt=Jt.slice(0,Wt)),Jt}function E(ne){for(var zt=ne.length<0?0:M(ne.length)|0,Xt=u(zt),Jt=0;Jt=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return ne|0}function z(ne){return+ne!=ne&&(ne=0),o.alloc(+ne)}o.isBuffer=function(zt){return zt!=null&&zt._isBuffer===!0&&zt!==o.prototype},o.compare=function(zt,Xt){if(le(zt,Uint8Array)&&(zt=o.from(zt,zt.offset,zt.byteLength)),le(Xt,Uint8Array)&&(Xt=o.from(Xt,Xt.offset,Xt.byteLength)),!o.isBuffer(zt)||!o.isBuffer(Xt))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(zt===Xt)return 0;for(var Jt=zt.length,Wt=Xt.length,Ft=0,xt=Math.min(Jt,Wt);FtWt.length?(o.isBuffer(xt)||(xt=o.from(xt)),xt.copy(Wt,Ft)):Uint8Array.prototype.set.call(Wt,xt,Ft);else if(o.isBuffer(xt))xt.copy(Wt,Ft);else throw new TypeError('"list" argument must be an Array of Buffers');Ft+=xt.length}return Wt};function D(ne,zt){if(o.isBuffer(ne))return ne.length;if(ArrayBuffer.isView(ne)||le(ne,ArrayBuffer))return ne.byteLength;if(typeof ne!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+f(ne));var Xt=ne.length,Jt=arguments.length>2&&arguments[2]===!0;if(!Jt&&Xt===0)return 0;for(var Wt=!1;;)switch(zt){case"ascii":case"latin1":case"binary":return Xt;case"utf8":case"utf-8":return Vt(ne).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Xt*2;case"hex":return Xt>>>1;case"base64":return Kt(ne).length;default:if(Wt)return Jt?-1:Vt(ne).length;zt=(""+zt).toLowerCase(),Wt=!0}}o.byteLength=D;function N(ne,zt,Xt){var Jt=!1;if((zt===void 0||zt<0)&&(zt=0),zt>this.length||((Xt===void 0||Xt>this.length)&&(Xt=this.length),Xt<=0)||(Xt>>>=0,zt>>>=0,Xt<=zt))return"";for(ne||(ne="utf8");;)switch(ne){case"hex":return Q(this,zt,Xt);case"utf8":case"utf-8":return ut(this,zt,Xt);case"ascii":return tt(this,zt,Xt);case"latin1":case"binary":return V(this,zt,Xt);case"base64":return it(this,zt,Xt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ot(this,zt,Xt);default:if(Jt)throw new TypeError("Unknown encoding: "+ne);ne=(ne+"").toLowerCase(),Jt=!0}}o.prototype._isBuffer=!0;function I(ne,zt,Xt){var Jt=ne[zt];ne[zt]=ne[Xt],ne[Xt]=Jt}o.prototype.swap16=function(){var zt=this.length;if(zt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Xt=0;XtXt&&(zt+=" ... "),""},m&&(o.prototype[m]=o.prototype.inspect),o.prototype.compare=function(zt,Xt,Jt,Wt,Ft){if(le(zt,Uint8Array)&&(zt=o.from(zt,zt.offset,zt.byteLength)),!o.isBuffer(zt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+f(zt));if(Xt===void 0&&(Xt=0),Jt===void 0&&(Jt=zt?zt.length:0),Wt===void 0&&(Wt=0),Ft===void 0&&(Ft=this.length),Xt<0||Jt>zt.length||Wt<0||Ft>this.length)throw new RangeError("out of range index");if(Wt>=Ft&&Xt>=Jt)return 0;if(Wt>=Ft)return-1;if(Xt>=Jt)return 1;if(Xt>>>=0,Jt>>>=0,Wt>>>=0,Ft>>>=0,this===zt)return 0;for(var xt=Ft-Wt,yt=Jt-Xt,Et=Math.min(xt,yt),Mt=this.slice(Wt,Ft),Nt=zt.slice(Xt,Jt),jt=0;jt2147483647?Xt=2147483647:Xt<-2147483648&&(Xt=-2147483648),Xt=+Xt,he(Xt)&&(Xt=Wt?0:ne.length-1),Xt<0&&(Xt=ne.length+Xt),Xt>=ne.length){if(Wt)return-1;Xt=ne.length-1}else if(Xt<0)if(Wt)Xt=0;else return-1;if(typeof zt=="string"&&(zt=o.from(zt,Jt)),o.isBuffer(zt))return zt.length===0?-1:B(ne,zt,Xt,Jt,Wt);if(typeof zt=="number")return zt=zt&255,typeof Uint8Array.prototype.indexOf=="function"?Wt?Uint8Array.prototype.indexOf.call(ne,zt,Xt):Uint8Array.prototype.lastIndexOf.call(ne,zt,Xt):B(ne,[zt],Xt,Jt,Wt);throw new TypeError("val must be string, number or Buffer")}function B(ne,zt,Xt,Jt,Wt){var Ft=1,xt=ne.length,yt=zt.length;if(Jt!==void 0&&(Jt=String(Jt).toLowerCase(),Jt==="ucs2"||Jt==="ucs-2"||Jt==="utf16le"||Jt==="utf-16le")){if(ne.length<2||zt.length<2)return-1;Ft=2,xt/=2,yt/=2,Xt/=2}function Et(me,be){return Ft===1?me[be]:me.readUInt16BE(be*Ft)}var Mt;if(Wt){var Nt=-1;for(Mt=Xt;Mtxt&&(Xt=xt-yt),Mt=Xt;Mt>=0;Mt--){for(var jt=!0,ie=0;ieWt&&(Jt=Wt)):Jt=Wt;var Ft=zt.length;Jt>Ft/2&&(Jt=Ft/2);var xt;for(xt=0;xt>>0,isFinite(Jt)?(Jt=Jt>>>0,Wt===void 0&&(Wt="utf8")):(Wt=Jt,Jt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ft=this.length-Xt;if((Jt===void 0||Jt>Ft)&&(Jt=Ft),zt.length>0&&(Jt<0||Xt<0)||Xt>this.length)throw new RangeError("Attempt to write outside buffer bounds");Wt||(Wt="utf8");for(var xt=!1;;)switch(Wt){case"hex":return O(this,zt,Xt,Jt);case"utf8":case"utf-8":return H(this,zt,Xt,Jt);case"ascii":case"latin1":case"binary":return Y(this,zt,Xt,Jt);case"base64":return j(this,zt,Xt,Jt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,zt,Xt,Jt);default:if(xt)throw new TypeError("Unknown encoding: "+Wt);Wt=(""+Wt).toLowerCase(),xt=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function it(ne,zt,Xt){return zt===0&&Xt===ne.length?c.fromByteArray(ne):c.fromByteArray(ne.slice(zt,Xt))}function ut(ne,zt,Xt){Xt=Math.min(ne.length,Xt);for(var Jt=[],Wt=zt;Wt239?4:Ft>223?3:Ft>191?2:1;if(Wt+yt<=Xt){var Et=void 0,Mt=void 0,Nt=void 0,jt=void 0;switch(yt){case 1:Ft<128&&(xt=Ft);break;case 2:Et=ne[Wt+1],(Et&192)===128&&(jt=(Ft&31)<<6|Et&63,jt>127&&(xt=jt));break;case 3:Et=ne[Wt+1],Mt=ne[Wt+2],(Et&192)===128&&(Mt&192)===128&&(jt=(Ft&15)<<12|(Et&63)<<6|Mt&63,jt>2047&&(jt<55296||jt>57343)&&(xt=jt));break;case 4:Et=ne[Wt+1],Mt=ne[Wt+2],Nt=ne[Wt+3],(Et&192)===128&&(Mt&192)===128&&(Nt&192)===128&&(jt=(Ft&15)<<18|(Et&63)<<12|(Mt&63)<<6|Nt&63,jt>65535&&jt<1114112&&(xt=jt))}}xt===null?(xt=65533,yt=1):xt>65535&&(xt-=65536,Jt.push(xt>>>10&1023|55296),xt=56320|xt&1023),Jt.push(xt),Wt+=yt}return X(Jt)}var J=4096;function X(ne){var zt=ne.length;if(zt<=J)return String.fromCharCode.apply(String,ne);for(var Xt="",Jt=0;JtJt)&&(Xt=Jt);for(var Wt="",Ft=zt;FtJt&&(zt=Jt),Xt<0?(Xt+=Jt,Xt<0&&(Xt=0)):Xt>Jt&&(Xt=Jt),XtXt)throw new RangeError("Trying to access beyond buffer length")}o.prototype.readUintLE=o.prototype.readUIntLE=function(zt,Xt,Jt){zt=zt>>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=this[zt],Ft=1,xt=0;++xt>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=this[zt+--Xt],Ft=1;Xt>0&&(Ft*=256);)Wt+=this[zt+--Xt]*Ft;return Wt},o.prototype.readUint8=o.prototype.readUInt8=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,1,this.length),this[zt]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,2,this.length),this[zt]|this[zt+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,2,this.length),this[zt]<<8|this[zt+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),(this[zt]|this[zt+1]<<8|this[zt+2]<<16)+this[zt+3]*16777216},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),this[zt]*16777216+(this[zt+1]<<16|this[zt+2]<<8|this[zt+3])},o.prototype.readBigUInt64LE=xe(function(zt){zt=zt>>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=Xt+this[++zt]*Math.pow(2,8)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,24),Ft=this[++zt]+this[++zt]*Math.pow(2,8)+this[++zt]*Math.pow(2,16)+Jt*Math.pow(2,24);return BigInt(Wt)+(BigInt(Ft)<>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=Xt*Math.pow(2,24)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,8)+this[++zt],Ft=this[++zt]*Math.pow(2,24)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,8)+Jt;return(BigInt(Wt)<>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=this[zt],Ft=1,xt=0;++xt=Ft&&(Wt-=Math.pow(2,8*Xt)),Wt},o.prototype.readIntBE=function(zt,Xt,Jt){zt=zt>>>0,Xt=Xt>>>0,Jt||$(zt,Xt,this.length);for(var Wt=Xt,Ft=1,xt=this[zt+--Wt];Wt>0&&(Ft*=256);)xt+=this[zt+--Wt]*Ft;return Ft*=128,xt>=Ft&&(xt-=Math.pow(2,8*Xt)),xt},o.prototype.readInt8=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,1,this.length),this[zt]&128?(255-this[zt]+1)*-1:this[zt]},o.prototype.readInt16LE=function(zt,Xt){zt=zt>>>0,Xt||$(zt,2,this.length);var Jt=this[zt]|this[zt+1]<<8;return Jt&32768?Jt|4294901760:Jt},o.prototype.readInt16BE=function(zt,Xt){zt=zt>>>0,Xt||$(zt,2,this.length);var Jt=this[zt+1]|this[zt]<<8;return Jt&32768?Jt|4294901760:Jt},o.prototype.readInt32LE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),this[zt]|this[zt+1]<<8|this[zt+2]<<16|this[zt+3]<<24},o.prototype.readInt32BE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),this[zt]<<24|this[zt+1]<<16|this[zt+2]<<8|this[zt+3]},o.prototype.readBigInt64LE=xe(function(zt){zt=zt>>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=this[zt+4]+this[zt+5]*Math.pow(2,8)+this[zt+6]*Math.pow(2,16)+(Jt<<24);return(BigInt(Wt)<>>0,Lt(zt,"offset");var Xt=this[zt],Jt=this[zt+7];(Xt===void 0||Jt===void 0)&&Ht(zt,this.length-8);var Wt=(Xt<<24)+this[++zt]*Math.pow(2,16)+this[++zt]*Math.pow(2,8)+this[++zt];return(BigInt(Wt)<>>0,Xt||$(zt,4,this.length),l.read(this,zt,!0,23,4)},o.prototype.readFloatBE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,4,this.length),l.read(this,zt,!1,23,4)},o.prototype.readDoubleLE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,8,this.length),l.read(this,zt,!0,52,8)},o.prototype.readDoubleBE=function(zt,Xt){return zt=zt>>>0,Xt||$(zt,8,this.length),l.read(this,zt,!1,52,8)};function Z(ne,zt,Xt,Jt,Wt,Ft){if(!o.isBuffer(ne))throw new TypeError('"buffer" argument must be a Buffer instance');if(zt>Wt||ztne.length)throw new RangeError("Index out of range")}o.prototype.writeUintLE=o.prototype.writeUIntLE=function(zt,Xt,Jt,Wt){if(zt=+zt,Xt=Xt>>>0,Jt=Jt>>>0,!Wt){var Ft=Math.pow(2,8*Jt)-1;Z(this,zt,Xt,Jt,Ft,0)}var xt=1,yt=0;for(this[Xt]=zt&255;++yt>>0,Jt=Jt>>>0,!Wt){var Ft=Math.pow(2,8*Jt)-1;Z(this,zt,Xt,Jt,Ft,0)}var xt=Jt-1,yt=1;for(this[Xt+xt]=zt&255;--xt>=0&&(yt*=256);)this[Xt+xt]=zt/yt&255;return Xt+Jt},o.prototype.writeUint8=o.prototype.writeUInt8=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,1,255,0),this[Xt]=zt&255,Xt+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,65535,0),this[Xt]=zt&255,this[Xt+1]=zt>>>8,Xt+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,65535,0),this[Xt]=zt>>>8,this[Xt+1]=zt&255,Xt+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,4294967295,0),this[Xt+3]=zt>>>24,this[Xt+2]=zt>>>16,this[Xt+1]=zt>>>8,this[Xt]=zt&255,Xt+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,4294967295,0),this[Xt]=zt>>>24,this[Xt+1]=zt>>>16,this[Xt+2]=zt>>>8,this[Xt+3]=zt&255,Xt+4};function st(ne,zt,Xt,Jt,Wt){mt(zt,Jt,Wt,ne,Xt,7);var Ft=Number(zt&BigInt(4294967295));ne[Xt++]=Ft,Ft=Ft>>8,ne[Xt++]=Ft,Ft=Ft>>8,ne[Xt++]=Ft,Ft=Ft>>8,ne[Xt++]=Ft;var xt=Number(zt>>BigInt(32)&BigInt(4294967295));return ne[Xt++]=xt,xt=xt>>8,ne[Xt++]=xt,xt=xt>>8,ne[Xt++]=xt,xt=xt>>8,ne[Xt++]=xt,Xt}function nt(ne,zt,Xt,Jt,Wt){mt(zt,Jt,Wt,ne,Xt,7);var Ft=Number(zt&BigInt(4294967295));ne[Xt+7]=Ft,Ft=Ft>>8,ne[Xt+6]=Ft,Ft=Ft>>8,ne[Xt+5]=Ft,Ft=Ft>>8,ne[Xt+4]=Ft;var xt=Number(zt>>BigInt(32)&BigInt(4294967295));return ne[Xt+3]=xt,xt=xt>>8,ne[Xt+2]=xt,xt=xt>>8,ne[Xt+1]=xt,xt=xt>>8,ne[Xt]=xt,Xt+8}o.prototype.writeBigUInt64LE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return st(this,zt,Xt,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeBigUInt64BE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return nt(this,zt,Xt,BigInt(0),BigInt("0xffffffffffffffff"))}),o.prototype.writeIntLE=function(zt,Xt,Jt,Wt){if(zt=+zt,Xt=Xt>>>0,!Wt){var Ft=Math.pow(2,8*Jt-1);Z(this,zt,Xt,Jt,Ft-1,-Ft)}var xt=0,yt=1,Et=0;for(this[Xt]=zt&255;++xt>0)-Et&255;return Xt+Jt},o.prototype.writeIntBE=function(zt,Xt,Jt,Wt){if(zt=+zt,Xt=Xt>>>0,!Wt){var Ft=Math.pow(2,8*Jt-1);Z(this,zt,Xt,Jt,Ft-1,-Ft)}var xt=Jt-1,yt=1,Et=0;for(this[Xt+xt]=zt&255;--xt>=0&&(yt*=256);)zt<0&&Et===0&&this[Xt+xt+1]!==0&&(Et=1),this[Xt+xt]=(zt/yt>>0)-Et&255;return Xt+Jt},o.prototype.writeInt8=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,1,127,-128),zt<0&&(zt=255+zt+1),this[Xt]=zt&255,Xt+1},o.prototype.writeInt16LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,32767,-32768),this[Xt]=zt&255,this[Xt+1]=zt>>>8,Xt+2},o.prototype.writeInt16BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,2,32767,-32768),this[Xt]=zt>>>8,this[Xt+1]=zt&255,Xt+2},o.prototype.writeInt32LE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,2147483647,-2147483648),this[Xt]=zt&255,this[Xt+1]=zt>>>8,this[Xt+2]=zt>>>16,this[Xt+3]=zt>>>24,Xt+4},o.prototype.writeInt32BE=function(zt,Xt,Jt){return zt=+zt,Xt=Xt>>>0,Jt||Z(this,zt,Xt,4,2147483647,-2147483648),zt<0&&(zt=4294967295+zt+1),this[Xt]=zt>>>24,this[Xt+1]=zt>>>16,this[Xt+2]=zt>>>8,this[Xt+3]=zt&255,Xt+4},o.prototype.writeBigInt64LE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return st(this,zt,Xt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),o.prototype.writeBigInt64BE=xe(function(zt){var Xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return nt(this,zt,Xt,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ct(ne,zt,Xt,Jt,Wt,Ft){if(Xt+Jt>ne.length)throw new RangeError("Index out of range");if(Xt<0)throw new RangeError("Index out of range")}function gt(ne,zt,Xt,Jt,Wt){return zt=+zt,Xt=Xt>>>0,Wt||ct(ne,zt,Xt,4),l.write(ne,zt,Xt,Jt,23,4),Xt+4}o.prototype.writeFloatLE=function(zt,Xt,Jt){return gt(this,zt,Xt,!0,Jt)},o.prototype.writeFloatBE=function(zt,Xt,Jt){return gt(this,zt,Xt,!1,Jt)};function Tt(ne,zt,Xt,Jt,Wt){return zt=+zt,Xt=Xt>>>0,Wt||ct(ne,zt,Xt,8),l.write(ne,zt,Xt,Jt,52,8),Xt+8}o.prototype.writeDoubleLE=function(zt,Xt,Jt){return Tt(this,zt,Xt,!0,Jt)},o.prototype.writeDoubleBE=function(zt,Xt,Jt){return Tt(this,zt,Xt,!1,Jt)},o.prototype.copy=function(zt,Xt,Jt,Wt){if(!o.isBuffer(zt))throw new TypeError("argument should be a Buffer");if(Jt||(Jt=0),!Wt&&Wt!==0&&(Wt=this.length),Xt>=zt.length&&(Xt=zt.length),Xt||(Xt=0),Wt>0&&Wt=this.length)throw new RangeError("Index out of range");if(Wt<0)throw new RangeError("sourceEnd out of bounds");Wt>this.length&&(Wt=this.length),zt.length-Xt>>0,Jt=Jt===void 0?this.length:Jt>>>0,zt||(zt=0);var xt;if(typeof zt=="number")for(xt=Xt;xtMath.pow(2,32)?Wt=bt(String(Xt)):typeof Xt=="bigint"&&(Wt=String(Xt),(Xt>Math.pow(BigInt(2),BigInt(32))||Xt<-Math.pow(BigInt(2),BigInt(32)))&&(Wt=bt(Wt)),Wt+="n"),Jt+=" It must be ".concat(zt,". Received ").concat(Wt),Jt},RangeError);function bt(ne){for(var zt="",Xt=ne.length,Jt=ne[0]==="-"?1:0;Xt>=Jt+4;Xt-=3)zt="_".concat(ne.slice(Xt-3,Xt)).concat(zt);return"".concat(ne.slice(0,Xt)).concat(zt)}function At(ne,zt,Xt){Lt(zt,"offset"),(ne[zt]===void 0||ne[zt+Xt]===void 0)&&Ht(zt,ne.length-(Xt+1))}function mt(ne,zt,Xt,Jt,Wt,Ft){if(ne>Xt||ne3?zt===0||zt===BigInt(0)?yt=">= 0".concat(xt," and < 2").concat(xt," ** ").concat((Ft+1)*8).concat(xt):yt=">= -(2".concat(xt," ** ").concat((Ft+1)*8-1).concat(xt,") and < 2 ** ")+"".concat((Ft+1)*8-1).concat(xt):yt=">= ".concat(zt).concat(xt," and <= ").concat(Xt).concat(xt),new wt.ERR_OUT_OF_RANGE("value",yt,ne)}At(Jt,Wt,Ft)}function Lt(ne,zt){if(typeof ne!="number")throw new wt.ERR_INVALID_ARG_TYPE(zt,"number",ne)}function Ht(ne,zt,Xt){throw Math.floor(ne)!==ne?(Lt(ne,Xt),new wt.ERR_OUT_OF_RANGE(Xt||"offset","an integer",ne)):zt<0?new wt.ERR_BUFFER_OUT_OF_BOUNDS:new wt.ERR_OUT_OF_RANGE(Xt||"offset",">= ".concat(Xt?1:0," and <= ").concat(zt),ne)}var Ut=/[^+/0-9A-Za-z-_]/g;function kt(ne){if(ne=ne.split("=")[0],ne=ne.trim().replace(Ut,""),ne.length<2)return"";for(;ne.length%4!==0;)ne=ne+"=";return ne}function Vt(ne,zt){zt=zt||1/0;for(var Xt,Jt=ne.length,Wt=null,Ft=[],xt=0;xt55295&&Xt<57344){if(!Wt){if(Xt>56319){(zt-=3)>-1&&Ft.push(239,191,189);continue}else if(xt+1===Jt){(zt-=3)>-1&&Ft.push(239,191,189);continue}Wt=Xt;continue}if(Xt<56320){(zt-=3)>-1&&Ft.push(239,191,189),Wt=Xt;continue}Xt=(Wt-55296<<10|Xt-56320)+65536}else Wt&&(zt-=3)>-1&&Ft.push(239,191,189);if(Wt=null,Xt<128){if((zt-=1)<0)break;Ft.push(Xt)}else if(Xt<2048){if((zt-=2)<0)break;Ft.push(Xt>>6|192,Xt&63|128)}else if(Xt<65536){if((zt-=3)<0)break;Ft.push(Xt>>12|224,Xt>>6&63|128,Xt&63|128)}else if(Xt<1114112){if((zt-=4)<0)break;Ft.push(Xt>>18|240,Xt>>12&63|128,Xt>>6&63|128,Xt&63|128)}else throw new Error("Invalid code point")}return Ft}function It(ne){for(var zt=[],Xt=0;Xt>8,Wt=Xt%256,Ft.push(Wt),Ft.push(Jt);return Ft}function Kt(ne){return c.toByteArray(kt(ne))}function $t(ne,zt,Xt,Jt){var Wt;for(Wt=0;Wt=zt.length||Wt>=ne.length);++Wt)zt[Wt+Xt]=ne[Wt];return Wt}function le(ne,zt){return ne instanceof zt||ne!=null&&ne.constructor!=null&&ne.constructor.name!=null&&ne.constructor.name===zt.name}function he(ne){return ne!==ne}var de=function(){for(var ne="0123456789abcdef",zt=new Array(256),Xt=0;Xt<16;++Xt)for(var Jt=Xt*16,Wt=0;Wt<16;++Wt)zt[Jt+Wt]=ne[Xt]+ne[Wt];return zt}();function xe(ne){return typeof BigInt>"u"?Se:ne}function Se(){throw new Error("BigInt not supported")}},25928:function(G){G.exports=C,G.exports.isMobile=C,G.exports.default=C;var U=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,g=/android|ipad|playbook|silk/i;function C(i){i||(i={});var S=i.ua;if(!S&&typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),typeof S!="string")return!1;var x=U.test(S)&&!t.test(S)||!!i.tablet&&g.test(S);return!x&&i.tablet&&i.featureDetect&&navigator&&navigator.maxTouchPoints>1&&S.indexOf("Macintosh")!==-1&&S.indexOf("Safari")!==-1&&(x=!0),x}},48932:function(G,U,t){t.r(U),t.d(U,{sankeyCenter:function(){return a},sankeyCircular:function(){return L},sankeyJustify:function(){return e},sankeyLeft:function(){return p},sankeyRight:function(){return r}});var g=t(84706),C=t(34712),i=t(10132),S=t(6688),x=t.n(S);function v(wt){return wt.target.depth}function p(wt){return wt.depth}function r(wt,Rt){return Rt-1-wt.height}function e(wt,Rt){return wt.sourceLinks.length?wt.depth:Rt-1}function a(wt){return wt.targetLinks.length?wt.depth:wt.sourceLinks.length?(0,g.SY)(wt.sourceLinks,v)-1:0}function n(wt){return function(){return wt}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(wt){return typeof wt}:function(wt){return wt&&typeof Symbol=="function"&&wt.constructor===Symbol&&wt!==Symbol.prototype?"symbol":typeof wt};function c(wt,Rt){return m(wt.source,Rt.source)||wt.index-Rt.index}function l(wt,Rt){return m(wt.target,Rt.target)||wt.index-Rt.index}function m(wt,Rt){return wt.partOfCycle===Rt.partOfCycle?wt.y0-Rt.y0:wt.circularLinkType==="top"||Rt.circularLinkType==="bottom"?-1:1}function h(wt){return wt.value}function b(wt){return(wt.y0+wt.y1)/2}function u(wt){return b(wt.source)}function o(wt){return b(wt.target)}function d(wt){return wt.index}function w(wt){return wt.nodes}function A(wt){return wt.links}function _(wt,Rt){var bt=wt.get(Rt);if(!bt)throw new Error("missing: "+Rt);return bt}function y(wt,Rt){return Rt(wt)}var E=25,T=10,s=.3;function L(){var wt=0,Rt=0,bt=1,At=1,mt=24,Lt,Ht=d,Ut=e,kt=w,Vt=A,It=32,re=2,Kt,$t=null;function le(){var Jt={nodes:kt.apply(null,arguments),links:Vt.apply(null,arguments)};he(Jt),M(Jt,Ht,$t),de(Jt),ne(Jt),z(Jt,Ht),zt(Jt,It,Ht),Xt(Jt);for(var Wt=4,Ft=0;Ft"u"?"undefined":f(yt))!=="object"&&(yt=Ft.source=_(Wt,yt)),(typeof Et>"u"?"undefined":f(Et))!=="object"&&(Et=Ft.target=_(Wt,Et)),yt.sourceLinks.push(Ft),Et.targetLinks.push(Ft)}),Jt}function de(Jt){Jt.nodes.forEach(function(Wt){Wt.partOfCycle=!1,Wt.value=Math.max((0,g.oh)(Wt.sourceLinks,h),(0,g.oh)(Wt.targetLinks,h)),Wt.sourceLinks.forEach(function(Ft){Ft.circular&&(Wt.partOfCycle=!0,Wt.circularLinkType=Ft.circularLinkType)}),Wt.targetLinks.forEach(function(Ft){Ft.circular&&(Wt.partOfCycle=!0,Wt.circularLinkType=Ft.circularLinkType)})})}function xe(Jt){var Wt=0,Ft=0,xt=0,yt=0,Et=(0,g.kv)(Jt.nodes,function(Mt){return Mt.column});return Jt.links.forEach(function(Mt){Mt.circular&&(Mt.circularLinkType=="top"?Wt=Wt+Mt.width:Ft=Ft+Mt.width,Mt.target.column==0&&(yt=yt+Mt.width),Mt.source.column==Et&&(xt=xt+Mt.width))}),Wt=Wt>0?Wt+E+T:Wt,Ft=Ft>0?Ft+E+T:Ft,xt=xt>0?xt+E+T:xt,yt=yt>0?yt+E+T:yt,{top:Wt,bottom:Ft,left:yt,right:xt}}function Se(Jt,Wt){var Ft=(0,g.kv)(Jt.nodes,function(ie){return ie.column}),xt=bt-wt,yt=At-Rt,Et=xt+Wt.right+Wt.left,Mt=yt+Wt.top+Wt.bottom,Nt=xt/Et,jt=yt/Mt;return wt=wt*Nt+Wt.left,bt=Wt.right==0?bt:bt*Nt,Rt=Rt*jt+Wt.top,At=At*jt,Jt.nodes.forEach(function(ie){ie.x0=wt+ie.column*((bt-wt-mt)/Ft),ie.x1=ie.x0+mt}),jt}function ne(Jt){var Wt,Ft,xt;for(Wt=Jt.nodes,Ft=[],xt=0;Wt.length;++xt,Wt=Ft,Ft=[])Wt.forEach(function(yt){yt.depth=xt,yt.sourceLinks.forEach(function(Et){Ft.indexOf(Et.target)<0&&!Et.circular&&Ft.push(Et.target)})});for(Wt=Jt.nodes,Ft=[],xt=0;Wt.length;++xt,Wt=Ft,Ft=[])Wt.forEach(function(yt){yt.height=xt,yt.targetLinks.forEach(function(Et){Ft.indexOf(Et.source)<0&&!Et.circular&&Ft.push(Et.source)})});Jt.nodes.forEach(function(yt){yt.column=Math.floor(Ut.call(null,yt,xt))})}function zt(Jt,Wt,Ft){var xt=(0,C.UJ)().key(function(ie){return ie.column}).sortKeys(g.XE).entries(Jt.nodes).map(function(ie){return ie.values});Mt(Ft),jt();for(var yt=1,Et=Wt;Et>0;--Et)Nt(yt*=.99,Ft),jt();function Mt(ie){if(Kt){var me=1/0;xt.forEach(function(ce){var Te=At*Kt/(ce.length+1);me=Te0))if(ce==0&&Le==1)Be=Te.y1-Te.y0,Te.y0=At/2-Be/2,Te.y1=At/2+Be/2;else if(ce==be-1&&Le==1)Be=Te.y1-Te.y0,Te.y0=At/2-Be/2,Te.y1=At/2+Be/2;else{var ir=0,pe=(0,g.mo)(Te.sourceLinks,o),Xe=(0,g.mo)(Te.targetLinks,u);pe&&Xe?ir=(pe+Xe)/2:ir=pe||Xe;var Ke=(ir-b(Te))*ie;Te.y0+=Ke,Te.y1+=Ke}})})}function jt(){xt.forEach(function(ie){var me,be,ve=Rt,Le=ie.length,ce;for(ie.sort(m),ce=0;ce0&&(me.y0+=be,me.y1+=be),ve=me.y1+Lt;if(be=ve-Lt-At,be>0)for(ve=me.y0-=be,me.y1-=be,ce=Le-2;ce>=0;--ce)me=ie[ce],be=me.y1+Lt-ve,be>0&&(me.y0-=be,me.y1-=be),ve=me.y0})}}function Xt(Jt){Jt.nodes.forEach(function(Wt){Wt.sourceLinks.sort(l),Wt.targetLinks.sort(c)}),Jt.nodes.forEach(function(Wt){var Ft=Wt.y0,xt=Ft,yt=Wt.y1,Et=yt;Wt.sourceLinks.forEach(function(Mt){Mt.circular?(Mt.y0=yt-Mt.width/2,yt=yt-Mt.width):(Mt.y0=Ft+Mt.width/2,Ft+=Mt.width)}),Wt.targetLinks.forEach(function(Mt){Mt.circular?(Mt.y1=Et-Mt.width/2,Et=Et-Mt.width):(Mt.y1=xt+Mt.width/2,xt+=Mt.width)})})}return le}function M(wt,Rt,bt){var At=0;if(bt===null){for(var mt=[],Lt=0;LtRt.source.column)}function I(wt,Rt){var bt=0;wt.sourceLinks.forEach(function(mt){bt=mt.circular&&!gt(mt,Rt)?bt+1:bt});var At=0;return wt.targetLinks.forEach(function(mt){At=mt.circular&&!gt(mt,Rt)?At+1:At}),bt+At}function k(wt){var Rt=wt.source.sourceLinks,bt=0;Rt.forEach(function(Lt){bt=Lt.circular?bt+1:bt});var At=wt.target.targetLinks,mt=0;return At.forEach(function(Lt){mt=Lt.circular?mt+1:mt}),!(bt>1||mt>1)}function B(wt,Rt,bt){return wt.sort(Y),wt.forEach(function(At,mt){var Lt=0;if(gt(At,bt)&&k(At))At.circularPathData.verticalBuffer=Lt+At.width/2;else{var Ht=0;for(Ht;HtLt?Ut:Lt}At.circularPathData.verticalBuffer=Lt+At.width/2}}),wt}function O(wt,Rt,bt,At){var mt=5,Lt=(0,g.SY)(wt.links,function(kt){return kt.source.y0});wt.links.forEach(function(kt){kt.circular&&(kt.circularPathData={})});var Ht=wt.links.filter(function(kt){return kt.circularLinkType=="top"});B(Ht,Rt,At);var Ut=wt.links.filter(function(kt){return kt.circularLinkType=="bottom"});B(Ut,Rt,At),wt.links.forEach(function(kt){if(kt.circular){if(kt.circularPathData.arcRadius=kt.width+T,kt.circularPathData.leftNodeBuffer=mt,kt.circularPathData.rightNodeBuffer=mt,kt.circularPathData.sourceWidth=kt.source.x1-kt.source.x0,kt.circularPathData.sourceX=kt.source.x0+kt.circularPathData.sourceWidth,kt.circularPathData.targetX=kt.target.x0,kt.circularPathData.sourceY=kt.y0,kt.circularPathData.targetY=kt.y1,gt(kt,At)&&k(kt))kt.circularPathData.leftSmallArcRadius=T+kt.width/2,kt.circularPathData.leftLargeArcRadius=T+kt.width/2,kt.circularPathData.rightSmallArcRadius=T+kt.width/2,kt.circularPathData.rightLargeArcRadius=T+kt.width/2,kt.circularLinkType=="bottom"?(kt.circularPathData.verticalFullExtent=kt.source.y1+E+kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.rightLargeArcRadius):(kt.circularPathData.verticalFullExtent=kt.source.y0-E-kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.rightLargeArcRadius);else{var Vt=kt.source.column,It=kt.circularLinkType,re=wt.links.filter(function(le){return le.source.column==Vt&&le.circularLinkType==It});kt.circularLinkType=="bottom"?re.sort(et):re.sort(j);var Kt=0;re.forEach(function(le,he){le.circularLinkID==kt.circularLinkID&&(kt.circularPathData.leftSmallArcRadius=T+kt.width/2+Kt,kt.circularPathData.leftLargeArcRadius=T+kt.width/2+he*Rt+Kt),Kt=Kt+le.width}),Vt=kt.target.column,re=wt.links.filter(function(le){return le.target.column==Vt&&le.circularLinkType==It}),kt.circularLinkType=="bottom"?re.sort(ut):re.sort(it),Kt=0,re.forEach(function(le,he){le.circularLinkID==kt.circularLinkID&&(kt.circularPathData.rightSmallArcRadius=T+kt.width/2+Kt,kt.circularPathData.rightLargeArcRadius=T+kt.width/2+he*Rt+Kt),Kt=Kt+le.width}),kt.circularLinkType=="bottom"?(kt.circularPathData.verticalFullExtent=Math.max(bt,kt.source.y1,kt.target.y1)+E+kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent-kt.circularPathData.rightLargeArcRadius):(kt.circularPathData.verticalFullExtent=Lt-E-kt.circularPathData.verticalBuffer,kt.circularPathData.verticalLeftInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.leftLargeArcRadius,kt.circularPathData.verticalRightInnerExtent=kt.circularPathData.verticalFullExtent+kt.circularPathData.rightLargeArcRadius)}kt.circularPathData.leftInnerExtent=kt.circularPathData.sourceX+kt.circularPathData.leftNodeBuffer,kt.circularPathData.rightInnerExtent=kt.circularPathData.targetX-kt.circularPathData.rightNodeBuffer,kt.circularPathData.leftFullExtent=kt.circularPathData.sourceX+kt.circularPathData.leftLargeArcRadius+kt.circularPathData.leftNodeBuffer,kt.circularPathData.rightFullExtent=kt.circularPathData.targetX-kt.circularPathData.rightLargeArcRadius-kt.circularPathData.rightNodeBuffer}if(kt.circular)kt.path=H(kt);else{var $t=(0,i.ak)().source(function(le){var he=le.source.x0+(le.source.x1-le.source.x0),de=le.y0;return[he,de]}).target(function(le){var he=le.target.x0,de=le.y1;return[he,de]});kt.path=$t(kt)}})}function H(wt){var Rt="";return wt.circularLinkType=="top"?Rt="M"+wt.circularPathData.sourceX+" "+wt.circularPathData.sourceY+" L"+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.sourceY+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftSmallArcRadius+" 0 0 0 "+wt.circularPathData.leftFullExtent+" "+(wt.circularPathData.sourceY-wt.circularPathData.leftSmallArcRadius)+" L"+wt.circularPathData.leftFullExtent+" "+wt.circularPathData.verticalLeftInnerExtent+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftLargeArcRadius+" 0 0 0 "+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.verticalFullExtent+" L"+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.verticalFullExtent+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightLargeArcRadius+" 0 0 0 "+wt.circularPathData.rightFullExtent+" "+wt.circularPathData.verticalRightInnerExtent+" L"+wt.circularPathData.rightFullExtent+" "+(wt.circularPathData.targetY-wt.circularPathData.rightSmallArcRadius)+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightSmallArcRadius+" 0 0 0 "+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.targetY+" L"+wt.circularPathData.targetX+" "+wt.circularPathData.targetY:Rt="M"+wt.circularPathData.sourceX+" "+wt.circularPathData.sourceY+" L"+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.sourceY+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftSmallArcRadius+" 0 0 1 "+wt.circularPathData.leftFullExtent+" "+(wt.circularPathData.sourceY+wt.circularPathData.leftSmallArcRadius)+" L"+wt.circularPathData.leftFullExtent+" "+wt.circularPathData.verticalLeftInnerExtent+" A"+wt.circularPathData.leftLargeArcRadius+" "+wt.circularPathData.leftLargeArcRadius+" 0 0 1 "+wt.circularPathData.leftInnerExtent+" "+wt.circularPathData.verticalFullExtent+" L"+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.verticalFullExtent+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightLargeArcRadius+" 0 0 1 "+wt.circularPathData.rightFullExtent+" "+wt.circularPathData.verticalRightInnerExtent+" L"+wt.circularPathData.rightFullExtent+" "+(wt.circularPathData.targetY+wt.circularPathData.rightSmallArcRadius)+" A"+wt.circularPathData.rightLargeArcRadius+" "+wt.circularPathData.rightSmallArcRadius+" 0 0 1 "+wt.circularPathData.rightInnerExtent+" "+wt.circularPathData.targetY+" L"+wt.circularPathData.targetX+" "+wt.circularPathData.targetY,Rt}function Y(wt,Rt){return J(wt)==J(Rt)?wt.circularLinkType=="bottom"?et(wt,Rt):j(wt,Rt):J(Rt)-J(wt)}function j(wt,Rt){return wt.y0-Rt.y0}function et(wt,Rt){return Rt.y0-wt.y0}function it(wt,Rt){return wt.y1-Rt.y1}function ut(wt,Rt){return Rt.y1-wt.y1}function J(wt){return wt.target.column-wt.source.column}function X(wt){return wt.target.x0-wt.source.x1}function tt(wt,Rt){var bt=D(wt),At=X(Rt)/Math.tan(bt),mt=ct(wt)=="up"?wt.y1+At:wt.y1-At;return mt}function V(wt,Rt){var bt=D(wt),At=X(Rt)/Math.tan(bt),mt=ct(wt)=="up"?wt.y1-At:wt.y1+At;return mt}function Q(wt,Rt,bt,At){wt.links.forEach(function(mt){if(!mt.circular&&mt.target.column-mt.source.column>1){var Lt=mt.source.column+1,Ht=mt.target.column-1,Ut=1,kt=Ht-Lt+1;for(Ut=1;Lt<=Ht;Lt++,Ut++)wt.nodes.forEach(function(Vt){if(Vt.column==Lt){var It=Ut/(kt+1),re=Math.pow(1-It,3),Kt=3*It*Math.pow(1-It,2),$t=3*Math.pow(It,2)*(1-It),le=Math.pow(It,3),he=re*mt.y0+Kt*mt.y0+$t*mt.y1+le*mt.y1,de=he-mt.width/2,xe=he+mt.width/2,Se;de>Vt.y0&&deVt.y0&&xeVt.y1&&$(ne,Se,Rt,bt)})):deVt.y1&&(Se=xe-Vt.y0+10,Vt=$(Vt,Se,Rt,bt),wt.nodes.forEach(function(ne){y(ne,At)==y(Vt,At)||ne.column!=Vt.column||ne.y0Vt.y1&&$(ne,Se,Rt,bt)}))}})}})}function ot(wt,Rt){return wt.y0>Rt.y0&&wt.y0Rt.y0&&wt.y1Rt.y1}function $(wt,Rt,bt,At){return wt.y0+Rt>=bt&&wt.y1+Rt<=At&&(wt.y0=wt.y0+Rt,wt.y1=wt.y1+Rt,wt.targetLinks.forEach(function(mt){mt.y1=mt.y1+Rt}),wt.sourceLinks.forEach(function(mt){mt.y0=mt.y0+Rt})),wt}function Z(wt,Rt,bt,At){wt.nodes.forEach(function(mt){At&&mt.y+(mt.y1-mt.y0)>Rt&&(mt.y=mt.y-(mt.y+(mt.y1-mt.y0)-Rt));var Lt=wt.links.filter(function(kt){return y(kt.source,bt)==y(mt,bt)}),Ht=Lt.length;Ht>1&&Lt.sort(function(kt,Vt){if(!kt.circular&&!Vt.circular){if(kt.target.column==Vt.target.column)return kt.y1-Vt.y1;if(nt(kt,Vt)){if(kt.target.column>Vt.target.column){var It=V(Vt,kt);return kt.y1-It}if(Vt.target.column>kt.target.column){var re=V(kt,Vt);return re-Vt.y1}}else return kt.y1-Vt.y1}if(kt.circular&&!Vt.circular)return kt.circularLinkType=="top"?-1:1;if(Vt.circular&&!kt.circular)return Vt.circularLinkType=="top"?1:-1;if(kt.circular&&Vt.circular)return kt.circularLinkType===Vt.circularLinkType&&kt.circularLinkType=="top"?kt.target.column===Vt.target.column?kt.target.y1-Vt.target.y1:Vt.target.column-kt.target.column:kt.circularLinkType===Vt.circularLinkType&&kt.circularLinkType=="bottom"?kt.target.column===Vt.target.column?Vt.target.y1-kt.target.y1:kt.target.column-Vt.target.column:kt.circularLinkType=="top"?-1:1});var Ut=mt.y0;Lt.forEach(function(kt){kt.y0=Ut+kt.width/2,Ut=Ut+kt.width}),Lt.forEach(function(kt,Vt){if(kt.circularLinkType=="bottom"){var It=Vt+1,re=0;for(It;It1&&mt.sort(function(Ut,kt){if(!Ut.circular&&!kt.circular){if(Ut.source.column==kt.source.column)return Ut.y0-kt.y0;if(nt(Ut,kt)){if(kt.source.column0?"up":"down"}function gt(wt,Rt){return y(wt.source,Rt)==y(wt.target,Rt)}function Tt(wt,Rt,bt){var At=wt.nodes,mt=wt.links,Lt=!1,Ht=!1;if(mt.forEach(function(Kt){Kt.circularLinkType=="top"?Lt=!0:Kt.circularLinkType=="bottom"&&(Ht=!0)}),Lt==!1||Ht==!1){var Ut=(0,g.SY)(At,function(Kt){return Kt.y0}),kt=(0,g.kv)(At,function(Kt){return Kt.y1}),Vt=kt-Ut,It=bt-Rt,re=It/Vt;At.forEach(function(Kt){var $t=(Kt.y1-Kt.y0)*re;Kt.y0=(Kt.y0-Ut)*re,Kt.y1=Kt.y0+$t}),mt.forEach(function(Kt){Kt.y0=(Kt.y0-Ut)*re,Kt.y1=(Kt.y1-Ut)*re,Kt.width=Kt.width*re})}}},26800:function(G,U,t){t.r(U),t.d(U,{sankey:function(){return d},sankeyCenter:function(){return p},sankeyJustify:function(){return v},sankeyLeft:function(){return S},sankeyLinkHorizontal:function(){return y},sankeyRight:function(){return x}});var g=t(84706),C=t(34712);function i(E){return E.target.depth}function S(E){return E.depth}function x(E,T){return T-1-E.height}function v(E,T){return E.sourceLinks.length?E.depth:T-1}function p(E){return E.targetLinks.length?E.depth:E.sourceLinks.length?(0,g.SY)(E.sourceLinks,i)-1:0}function r(E){return function(){return E}}function e(E,T){return n(E.source,T.source)||E.index-T.index}function a(E,T){return n(E.target,T.target)||E.index-T.index}function n(E,T){return E.y0-T.y0}function f(E){return E.value}function c(E){return(E.y0+E.y1)/2}function l(E){return c(E.source)*E.value}function m(E){return c(E.target)*E.value}function h(E){return E.index}function b(E){return E.nodes}function u(E){return E.links}function o(E,T){var s=E.get(T);if(!s)throw new Error("missing: "+T);return s}function d(){var E=0,T=0,s=1,L=1,M=24,z=8,D=h,N=v,I=b,k=u,B=32,O=2/3;function H(){var J={nodes:I.apply(null,arguments),links:k.apply(null,arguments)};return Y(J),j(J),et(J),it(J),ut(J),J}H.update=function(J){return ut(J),J},H.nodeId=function(J){return arguments.length?(D=typeof J=="function"?J:r(J),H):D},H.nodeAlign=function(J){return arguments.length?(N=typeof J=="function"?J:r(J),H):N},H.nodeWidth=function(J){return arguments.length?(M=+J,H):M},H.nodePadding=function(J){return arguments.length?(z=+J,H):z},H.nodes=function(J){return arguments.length?(I=typeof J=="function"?J:r(J),H):I},H.links=function(J){return arguments.length?(k=typeof J=="function"?J:r(J),H):k},H.size=function(J){return arguments.length?(E=T=0,s=+J[0],L=+J[1],H):[s-E,L-T]},H.extent=function(J){return arguments.length?(E=+J[0][0],s=+J[1][0],T=+J[0][1],L=+J[1][1],H):[[E,T],[s,L]]},H.iterations=function(J){return arguments.length?(B=+J,H):B};function Y(J){J.nodes.forEach(function(tt,V){tt.index=V,tt.sourceLinks=[],tt.targetLinks=[]});var X=(0,C.kH)(J.nodes,D);J.links.forEach(function(tt,V){tt.index=V;var Q=tt.source,ot=tt.target;typeof Q!="object"&&(Q=tt.source=o(X,Q)),typeof ot!="object"&&(ot=tt.target=o(X,ot)),Q.sourceLinks.push(tt),ot.targetLinks.push(tt)})}function j(J){J.nodes.forEach(function(X){X.value=Math.max((0,g.oh)(X.sourceLinks,f),(0,g.oh)(X.targetLinks,f))})}function et(J){var X,tt,V;for(X=J.nodes,tt=[],V=0;X.length;++V,X=tt,tt=[])X.forEach(function(ot){ot.depth=V,ot.sourceLinks.forEach(function($){tt.indexOf($.target)<0&&tt.push($.target)})});for(X=J.nodes,tt=[],V=0;X.length;++V,X=tt,tt=[])X.forEach(function(ot){ot.height=V,ot.targetLinks.forEach(function($){tt.indexOf($.source)<0&&tt.push($.source)})});var Q=(s-E-M)/(V-1);J.nodes.forEach(function(ot){ot.x1=(ot.x0=E+Math.max(0,Math.min(V-1,Math.floor(N.call(null,ot,V))))*Q)+M})}function it(J){var X=(0,C.UJ)().key(function(st){return st.x0}).sortKeys(g.XE).entries(J.nodes).map(function(st){return st.values});Q(),Z();for(var tt=1,V=B;V>0;--V)$(tt*=.99),Z(),ot(tt),Z();function Q(){var st=(0,g.kv)(X,function(gt){return gt.length}),nt=O*(L-T)/(st-1);z>nt&&(z=nt);var ct=(0,g.SY)(X,function(gt){return(L-T-(gt.length-1)*z)/(0,g.oh)(gt,f)});X.forEach(function(gt){gt.forEach(function(Tt,wt){Tt.y1=(Tt.y0=wt)+Tt.value*ct})}),J.links.forEach(function(gt){gt.width=gt.value*ct})}function ot(st){X.forEach(function(nt){nt.forEach(function(ct){if(ct.targetLinks.length){var gt=((0,g.oh)(ct.targetLinks,l)/(0,g.oh)(ct.targetLinks,f)-c(ct))*st;ct.y0+=gt,ct.y1+=gt}})})}function $(st){X.slice().reverse().forEach(function(nt){nt.forEach(function(ct){if(ct.sourceLinks.length){var gt=((0,g.oh)(ct.sourceLinks,m)/(0,g.oh)(ct.sourceLinks,f)-c(ct))*st;ct.y0+=gt,ct.y1+=gt}})})}function Z(){X.forEach(function(st){var nt,ct,gt=T,Tt=st.length,wt;for(st.sort(n),wt=0;wt0&&(nt.y0+=ct,nt.y1+=ct),gt=nt.y1+z;if(ct=gt-z-L,ct>0)for(gt=nt.y0-=ct,nt.y1-=ct,wt=Tt-2;wt>=0;--wt)nt=st[wt],ct=nt.y1+z-gt,ct>0&&(nt.y0-=ct,nt.y1-=ct),gt=nt.y0})}}function ut(J){J.nodes.forEach(function(X){X.sourceLinks.sort(a),X.targetLinks.sort(e)}),J.nodes.forEach(function(X){var tt=X.y0,V=tt;X.sourceLinks.forEach(function(Q){Q.y0=tt+Q.width/2,tt+=Q.width}),X.targetLinks.forEach(function(Q){Q.y1=V+Q.width/2,V+=Q.width})})}return H}var w=t(10132);function A(E){return[E.source.x1,E.y0]}function _(E){return[E.target.x0,E.y1]}function y(){return(0,w.ak)().source(A).target(_)}},33428:function(G,U,t){var g,C;(function(){var i={version:"3.8.0"},S=[].slice,x=function(ft){return S.call(ft)},v=self.document;function p(ft){return ft&&(ft.ownerDocument||ft.document||ft).documentElement}function r(ft){return ft&&(ft.ownerDocument&&ft.ownerDocument.defaultView||ft.document&&ft||ft.defaultView)}if(v)try{x(v.documentElement.childNodes)[0].nodeType}catch{x=function(Ct){for(var Bt=Ct.length,ee=new Array(Bt);Bt--;)ee[Bt]=Ct[Bt];return ee}}if(Date.now||(Date.now=function(){return+new Date}),v)try{v.createElement("DIV").style.setProperty("opacity",0,"")}catch{var e=this.Element.prototype,a=e.setAttribute,n=e.setAttributeNS,f=this.CSSStyleDeclaration.prototype,c=f.setProperty;e.setAttribute=function(Ct,Bt){a.call(this,Ct,Bt+"")},e.setAttributeNS=function(Ct,Bt,ee){n.call(this,Ct,Bt,ee+"")},f.setProperty=function(Ct,Bt,ee){c.call(this,Ct,Bt+"",ee)}}i.ascending=l;function l(ft,Ct){return ftCt?1:ft>=Ct?0:NaN}i.descending=function(ft,Ct){return Ctft?1:Ct>=ft?0:NaN},i.min=function(ft,Ct){var Bt=-1,ee=ft.length,ae,fe;if(arguments.length===1){for(;++Bt=fe){ae=fe;break}for(;++Btfe&&(ae=fe)}else{for(;++Bt=fe){ae=fe;break}for(;++Btfe&&(ae=fe)}return ae},i.max=function(ft,Ct){var Bt=-1,ee=ft.length,ae,fe;if(arguments.length===1){for(;++Bt=fe){ae=fe;break}for(;++Btae&&(ae=fe)}else{for(;++Bt=fe){ae=fe;break}for(;++Btae&&(ae=fe)}return ae},i.extent=function(ft,Ct){var Bt=-1,ee=ft.length,ae,fe,De;if(arguments.length===1){for(;++Bt=fe){ae=De=fe;break}for(;++Btfe&&(ae=fe),De=fe){ae=De=fe;break}for(;++Btfe&&(ae=fe),De1)return De/(Ye-1)},i.deviation=function(){var ft=i.variance.apply(this,arguments);return ft&&Math.sqrt(ft)};function b(ft){return{left:function(Ct,Bt,ee,ae){for(arguments.length<3&&(ee=0),arguments.length<4&&(ae=Ct.length);ee>>1;ft(Ct[fe],Bt)<0?ee=fe+1:ae=fe}return ee},right:function(Ct,Bt,ee,ae){for(arguments.length<3&&(ee=0),arguments.length<4&&(ae=Ct.length);ee>>1;ft(Ct[fe],Bt)>0?ae=fe:ee=fe+1}return ee}}}var u=b(l);i.bisectLeft=u.left,i.bisect=i.bisectRight=u.right,i.bisector=function(ft){return b(ft.length===1?function(Ct,Bt){return l(ft(Ct),Bt)}:ft)},i.shuffle=function(ft,Ct,Bt){(ee=arguments.length)<3&&(Bt=ft.length,ee<2&&(Ct=0));for(var ee=Bt-Ct,ae,fe;ee;)fe=Math.random()*ee--|0,ae=ft[ee+Ct],ft[ee+Ct]=ft[fe+Ct],ft[fe+Ct]=ae;return ft},i.permute=function(ft,Ct){for(var Bt=Ct.length,ee=new Array(Bt);Bt--;)ee[Bt]=ft[Ct[Bt]];return ee},i.pairs=function(ft){for(var Ct=0,Bt=ft.length-1,ee=ft[0],ae=new Array(Bt<0?0:Bt);Ct=0;)for(De=ft[Ct],Bt=De.length;--Bt>=0;)fe[--ae]=De[Bt];return fe};var d=Math.abs;i.range=function(ft,Ct,Bt){if(arguments.length<3&&(Bt=1,arguments.length<2&&(Ct=ft,ft=0)),(Ct-ft)/Bt===1/0)throw new Error("infinite range");var ee=[],ae=w(d(Bt)),fe=-1,De;if(ft*=ae,Ct*=ae,Bt*=ae,Bt<0)for(;(De=ft+Bt*++fe)>Ct;)ee.push(De/ae);else for(;(De=ft+Bt*++fe)=Ct.length)return ae?ae.call(ft,Ye):ee?Ye.sort(ee):Ye;for(var nr=-1,_r=Ye.length,Lr=Ct[Ze++],Jr,on,Rr,Br=new _,jr;++nr<_r;)(jr=Br.get(Jr=Lr(on=Ye[nr])))?jr.push(on):Br.set(Jr,[on]);return Ee?(on=Ee(),Rr=function(un,vn){on.set(un,fe(Ee,vn,Ze))}):(on={},Rr=function(un,vn){on[un]=fe(Ee,vn,Ze)}),Br.forEach(Rr),on}function De(Ee,Ye){if(Ye>=Ct.length)return Ee;var Ze=[],nr=Bt[Ye++];return Ee.forEach(function(_r,Lr){Ze.push({key:_r,values:De(Lr,Ye)})}),nr?Ze.sort(function(_r,Lr){return nr(_r.key,Lr.key)}):Ze}return ft.map=function(Ee,Ye){return fe(Ye,Ee,0)},ft.entries=function(Ee){return De(fe(i.map,Ee,0),0)},ft.key=function(Ee){return Ct.push(Ee),ft},ft.sortKeys=function(Ee){return Bt[Ct.length-1]=Ee,ft},ft.sortValues=function(Ee){return ee=Ee,ft},ft.rollup=function(Ee){return ae=Ee,ft},ft},i.set=function(ft){var Ct=new I;if(ft)for(var Bt=0,ee=ft.length;Bt=0&&(ee=ft.slice(Bt+1),ft=ft.slice(0,Bt)),ft)return arguments.length<2?this[ft].on(ee):this[ft].on(ee,Ct);if(arguments.length===2){if(Ct==null)for(ft in this)this.hasOwnProperty(ft)&&this[ft].on(ee,null);return this}};function et(ft){var Ct=[],Bt=new _;function ee(){for(var ae=Ct,fe=-1,De=ae.length,Ee;++fe=0&&(Bt=ft.slice(0,Ct))!=="xmlns"&&(ft=ft.slice(Ct+1)),gt.hasOwnProperty(Bt)?{space:gt[Bt],local:ft}:ft}},Z.attr=function(ft,Ct){if(arguments.length<2){if(typeof ft=="string"){var Bt=this.node();return ft=i.ns.qualify(ft),ft.local?Bt.getAttributeNS(ft.space,ft.local):Bt.getAttribute(ft)}for(Ct in ft)this.each(Tt(Ct,ft[Ct]));return this}return this.each(Tt(ft,Ct))};function Tt(ft,Ct){ft=i.ns.qualify(ft);function Bt(){this.removeAttribute(ft)}function ee(){this.removeAttributeNS(ft.space,ft.local)}function ae(){this.setAttribute(ft,Ct)}function fe(){this.setAttributeNS(ft.space,ft.local,Ct)}function De(){var Ye=Ct.apply(this,arguments);Ye==null?this.removeAttribute(ft):this.setAttribute(ft,Ye)}function Ee(){var Ye=Ct.apply(this,arguments);Ye==null?this.removeAttributeNS(ft.space,ft.local):this.setAttributeNS(ft.space,ft.local,Ye)}return Ct==null?ft.local?ee:Bt:typeof Ct=="function"?ft.local?Ee:De:ft.local?fe:ae}function wt(ft){return ft.trim().replace(/\s+/g," ")}Z.classed=function(ft,Ct){if(arguments.length<2){if(typeof ft=="string"){var Bt=this.node(),ee=(ft=bt(ft)).length,ae=-1;if(Ct=Bt.classList){for(;++ae=0;)(fe=Bt[ee])&&(ae&&ae!==fe.nextSibling&&ae.parentNode.insertBefore(fe,ae),ae=fe);return this},Z.sort=function(ft){ft=re.apply(this,arguments);for(var Ct=-1,Bt=this.length;++Ct=Ct&&(Ct=ae+1);!(Ye=De[Ct])&&++Ct0&&(ft=ft.slice(0,ae));var De=xe.get(ft);De&&(ft=De,fe=ne);function Ee(){var nr=this[ee];nr&&(this.removeEventListener(ft,nr,nr.$),delete this[ee])}function Ye(){var nr=fe(Ct,x(arguments));Ee.call(this),this.addEventListener(ft,this[ee]=nr,nr.$=Bt),nr._=Ct}function Ze(){var nr=new RegExp("^__on([^.]+)"+i.requote(ft)+"$"),_r;for(var Lr in this)if(_r=Lr.match(nr)){var Jr=this[Lr];this.removeEventListener(_r[1],Jr,Jr.$),delete this[Lr]}}return ae?Ct?Ye:Ee:Ct?Y:Ze}var xe=i.map({mouseenter:"mouseover",mouseleave:"mouseout"});v&&xe.forEach(function(ft){"on"+ft in v&&xe.remove(ft)});function Se(ft,Ct){return function(Bt){var ee=i.event;i.event=Bt,Ct[0]=this.__data__;try{ft.apply(this,Ct)}finally{i.event=ee}}}function ne(ft,Ct){var Bt=Se(ft,Ct);return function(ee){var ae=this,fe=ee.relatedTarget;(!fe||fe!==ae&&!(fe.compareDocumentPosition(ae)&8))&&Bt.call(ae,ee)}}var zt,Xt=0;function Jt(ft){var Ct=".dragsuppress-"+ ++Xt,Bt="click"+Ct,ee=i.select(r(ft)).on("touchmove"+Ct,it).on("dragstart"+Ct,it).on("selectstart"+Ct,it);if(zt==null&&(zt="onselectstart"in ft?!1:O(ft.style,"userSelect")),zt){var ae=p(ft).style,fe=ae[zt];ae[zt]="none"}return function(De){if(ee.on(Ct,null),zt&&(ae[zt]=fe),De){var Ee=function(){ee.on(Bt,null)};ee.on(Bt,function(){it(),Ee()},!0),setTimeout(Ee,0)}}}i.mouse=function(ft){return Ft(ft,ut())};var Wt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ft(ft,Ct){Ct.changedTouches&&(Ct=Ct.changedTouches[0]);var Bt=ft.ownerSVGElement||ft;if(Bt.createSVGPoint){var ee=Bt.createSVGPoint();if(Wt<0){var ae=r(ft);if(ae.scrollX||ae.scrollY){Bt=i.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var fe=Bt[0][0].getScreenCTM();Wt=!(fe.f||fe.e),Bt.remove()}}return Wt?(ee.x=Ct.pageX,ee.y=Ct.pageY):(ee.x=Ct.clientX,ee.y=Ct.clientY),ee=ee.matrixTransform(ft.getScreenCTM().inverse()),[ee.x,ee.y]}var De=ft.getBoundingClientRect();return[Ct.clientX-De.left-ft.clientLeft,Ct.clientY-De.top-ft.clientTop]}i.touch=function(ft,Ct,Bt){if(arguments.length<3&&(Bt=Ct,Ct=ut().changedTouches),Ct){for(var ee=0,ae=Ct.length,fe;ee1?ie:ft<-1?-ie:Math.asin(ft)}function ce(ft){return((ft=Math.exp(ft))-1/ft)/2}function Te(ft){return((ft=Math.exp(ft))+1/ft)/2}function Be(ft){return((ft=Math.exp(2*ft))-1)/(ft+1)}var ir=Math.SQRT2,pe=2,Xe=4;i.interpolateZoom=function(ft,Ct){var Bt=ft[0],ee=ft[1],ae=ft[2],fe=Ct[0],De=Ct[1],Ee=Ct[2],Ye=fe-Bt,Ze=De-ee,nr=Ye*Ye+Ze*Ze,_r,Lr;if(nr0&&(Kn=Kn.transition().duration(De)),Kn.call(vn.event)}function ii(){Br&&Br.domain(Rr.range().map(function(Kn){return(Kn-ft.x)/ft.k}).map(Rr.invert)),un&&un.domain(jr.range().map(function(Kn){return(Kn-ft.y)/ft.k}).map(jr.invert))}function fi(Kn){Ee++||Kn({type:"zoomstart"})}function Oi(Kn){ii(),Kn({type:"zoom",scale:ft.k,translate:[ft.x,ft.y]})}function Mi(Kn){--Ee||(Kn({type:"zoomend"}),Bt=null)}function Ii(){var Kn=this,Bi=on.of(Kn,arguments),Ti=0,Zi=i.select(r(Kn)).on(Ze,Ka).on(nr,Ja),ba=qr(i.mouse(Kn)),na=Jt(Kn);Ge.call(Kn),fi(Bi);function Ka(){Ti=1,ui(i.mouse(Kn),ba),Oi(Bi)}function Ja(){Zi.on(Ze,null).on(nr,null),na(Ti),Mi(Bi)}}function ra(){var Kn=this,Bi=on.of(Kn,arguments),Ti={},Zi=0,ba,na=".zoom-"+i.event.changedTouches[0].identifier,Ka="touchmove"+na,Ja="touchend"+na,to=[],wa=i.select(Kn),uo=Jt(Kn);Ei(),fi(Bi),wa.on(Ye,null).on(Lr,Ei);function oi(){var eo=i.touches(Kn);return ba=ft.k,eo.forEach(function(ca){ca.identifier in Ti&&(Ti[ca.identifier]=qr(ca))}),eo}function Ei(){var eo=i.event.target;i.select(eo).on(Ka,Ao).on(Ja,Lo),to.push(eo);for(var ca=i.event.changedTouches,Va=0,Oa=ca.length;Va1){var Ea=is[0],_l=is[1],ji=Ea[0]-_l[0],_a=Ea[1]-_l[1];Zi=ji*ji+_a*_a}}function Ao(){var eo=i.touches(Kn),ca,Va,Oa,is;Ge.call(Kn);for(var bs=0,Ea=eo.length;bs1?1:Ct,Bt=Bt<0?0:Bt>1?1:Bt,ae=Bt<=.5?Bt*(1+Ct):Bt+Ct-Bt*Ct,ee=2*Bt-ae;function fe(Ee){return Ee>360?Ee-=360:Ee<0&&(Ee+=360),Ee<60?ee+(ae-ee)*Ee/60:Ee<180?ae:Ee<240?ee+(ae-ee)*(240-Ee)/60:ee}function De(Ee){return Math.round(fe(Ee)*255)}return new fr(De(ft+120),De(ft),De(ft-120))}i.hcl=Ie;function Ie(ft,Ct,Bt){return this instanceof Ie?(this.h=+ft,this.c=+Ct,void(this.l=+Bt)):arguments.length<2?ft instanceof Ie?new Ie(ft.h,ft.c,ft.l):ft instanceof Ve?Ne(ft.l,ft.a,ft.b):Ne((ft=Gr((ft=i.rgb(ft)).r,ft.g,ft.b)).l,ft.a,ft.b):new Ie(ft,Ct,Bt)}var Pe=Ie.prototype=new ge;Pe.brighter=function(ft){return new Ie(this.h,this.c,Math.min(100,this.l+Je*(arguments.length?ft:1)))},Pe.darker=function(ft){return new Ie(this.h,this.c,Math.max(0,this.l-Je*(arguments.length?ft:1)))},Pe.rgb=function(){return ke(this.h,this.c,this.l).rgb()};function ke(ft,Ct,Bt){return isNaN(ft)&&(ft=0),isNaN(Ct)&&(Ct=0),new Ve(Bt,Math.cos(ft*=me)*Ct,Math.sin(ft)*Ct)}i.lab=Ve;function Ve(ft,Ct,Bt){return this instanceof Ve?(this.l=+ft,this.a=+Ct,void(this.b=+Bt)):arguments.length<2?ft instanceof Ve?new Ve(ft.l,ft.a,ft.b):ft instanceof Ie?ke(ft.h,ft.c,ft.l):Gr((ft=fr(ft)).r,ft.g,ft.b):new Ve(ft,Ct,Bt)}var Je=18,ur=.95047,hr=1,vr=1.08883,Yt=Ve.prototype=new ge;Yt.brighter=function(ft){return new Ve(Math.min(100,this.l+Je*(arguments.length?ft:1)),this.a,this.b)},Yt.darker=function(ft){return new Ve(Math.max(0,this.l-Je*(arguments.length?ft:1)),this.a,this.b)},Yt.rgb=function(){return Gt(this.l,this.a,this.b)};function Gt(ft,Ct,Bt){var ee=(ft+16)/116,ae=ee+Ct/500,fe=ee-Bt/200;return ae=Oe(ae)*ur,ee=Oe(ee)*hr,fe=Oe(fe)*vr,new fr(er(3.2404542*ae-1.5371385*ee-.4985314*fe),er(-.969266*ae+1.8760108*ee+.041556*fe),er(.0556434*ae-.2040259*ee+1.0572252*fe))}function Ne(ft,Ct,Bt){return ft>0?new Ie(Math.atan2(Bt,Ct)*be,Math.sqrt(Ct*Ct+Bt*Bt),ft):new Ie(NaN,NaN,ft)}function Oe(ft){return ft>.206893034?ft*ft*ft:(ft-.13793103448275862)/7.787037}function Qe(ft){return ft>.008856?Math.pow(ft,.3333333333333333):7.787037*ft+.13793103448275862}function er(ft){return Math.round(255*(ft<=.00304?12.92*ft:1.055*Math.pow(ft,.4166666666666667)-.055))}i.rgb=fr;function fr(ft,Ct,Bt){return this instanceof fr?(this.r=~~ft,this.g=~~Ct,void(this.b=~~Bt)):arguments.length<2?ft instanceof fr?new fr(ft.r,ft.g,ft.b):xr(""+ft,fr,Ce):new fr(ft,Ct,Bt)}function rr(ft){return new fr(ft>>16,ft>>8&255,ft&255)}function He(ft){return rr(ft)+""}var dr=fr.prototype=new ge;dr.brighter=function(ft){ft=Math.pow(.7,arguments.length?ft:1);var Ct=this.r,Bt=this.g,ee=this.b,ae=30;return!Ct&&!Bt&&!ee?new fr(ae,ae,ae):(Ct&&Ct>4,ee=ee>>4|ee,ae=Ye&240,ae=ae>>4|ae,fe=Ye&15,fe=fe<<4|fe):ft.length===7&&(ee=(Ye&16711680)>>16,ae=(Ye&65280)>>8,fe=Ye&255)),Ct(ee,ae,fe))}function pr(ft,Ct,Bt){var ee=Math.min(ft/=255,Ct/=255,Bt/=255),ae=Math.max(ft,Ct,Bt),fe=ae-ee,De,Ee,Ye=(ae+ee)/2;return fe?(Ee=Ye<.5?fe/(ae+ee):fe/(2-ae-ee),ft==ae?De=(Ct-Bt)/fe+(Ct0&&Ye<1?0:De),new se(De,Ee,Ye)}function Gr(ft,Ct,Bt){ft=Pr(ft),Ct=Pr(Ct),Bt=Pr(Bt);var ee=Qe((.4124564*ft+.3575761*Ct+.1804375*Bt)/ur),ae=Qe((.2126729*ft+.7151522*Ct+.072175*Bt)/hr),fe=Qe((.0193339*ft+.119192*Ct+.9503041*Bt)/vr);return Ve(116*ae-16,500*(ee-ae),200*(ae-fe))}function Pr(ft){return(ft/=255)<=.04045?ft/12.92:Math.pow((ft+.055)/1.055,2.4)}function Dr(ft){var Ct=parseFloat(ft);return ft.charAt(ft.length-1)==="%"?Math.round(Ct*2.55):Ct}var cn=i.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});cn.forEach(function(ft,Ct){cn.set(ft,rr(Ct))});function rn(ft){return typeof ft=="function"?ft:function(){return ft}}i.functor=rn,i.xhr=Cn(k);function Cn(ft){return function(Ct,Bt,ee){return arguments.length===2&&typeof Bt=="function"&&(ee=Bt,Bt=null),En(Ct,Bt,ft,ee)}}function En(ft,Ct,Bt,ee){var ae={},fe=i.dispatch("beforesend","progress","load","error"),De={},Ee=new XMLHttpRequest,Ye=null;self.XDomainRequest&&!("withCredentials"in Ee)&&/^(http(s)?:)?\/\//.test(ft)&&(Ee=new XDomainRequest),"onload"in Ee?Ee.onload=Ee.onerror=Ze:Ee.onreadystatechange=function(){Ee.readyState>3&&Ze()};function Ze(){var nr=Ee.status,_r;if(!nr&&Cr(Ee)||nr>=200&&nr<300||nr===304){try{_r=Bt.call(ae,Ee)}catch(Lr){fe.error.call(ae,Lr);return}fe.load.call(ae,_r)}else fe.error.call(ae,Ee)}return Ee.onprogress=function(nr){var _r=i.event;i.event=nr;try{fe.progress.call(ae,Ee)}finally{i.event=_r}},ae.header=function(nr,_r){return nr=(nr+"").toLowerCase(),arguments.length<2?De[nr]:(_r==null?delete De[nr]:De[nr]=_r+"",ae)},ae.mimeType=function(nr){return arguments.length?(Ct=nr==null?null:nr+"",ae):Ct},ae.responseType=function(nr){return arguments.length?(Ye=nr,ae):Ye},ae.response=function(nr){return Bt=nr,ae},["get","post"].forEach(function(nr){ae[nr]=function(){return ae.send.apply(ae,[nr].concat(x(arguments)))}}),ae.send=function(nr,_r,Lr){if(arguments.length===2&&typeof _r=="function"&&(Lr=_r,_r=null),Ee.open(nr,ft,!0),Ct!=null&&!("accept"in De)&&(De.accept=Ct+",*/*"),Ee.setRequestHeader)for(var Jr in De)Ee.setRequestHeader(Jr,De[Jr]);return Ct!=null&&Ee.overrideMimeType&&Ee.overrideMimeType(Ct),Ye!=null&&(Ee.responseType=Ye),Lr!=null&&ae.on("error",Lr).on("load",function(on){Lr(null,on)}),fe.beforesend.call(ae,Ee),Ee.send(_r??null),ae},ae.abort=function(){return Ee.abort(),ae},i.rebind(ae,fe,"on"),ee==null?ae:ae.get(Tr(ee))}function Tr(ft){return ft.length===1?function(Ct,Bt){ft(Ct==null?Bt:null)}:ft}function Cr(ft){var Ct=ft.responseType;return Ct&&Ct!=="text"?ft.response:ft.responseText}i.dsv=function(ft,Ct){var Bt=new RegExp('["'+ft+` +]`),ee=ft.charCodeAt(0);function ae(Ze,nr,_r){arguments.length<3&&(_r=nr,nr=null);var Lr=En(Ze,Ct,nr==null?fe:De(nr),_r);return Lr.row=function(Jr){return arguments.length?Lr.response((nr=Jr)==null?fe:De(Jr)):nr},Lr}function fe(Ze){return ae.parse(Ze.responseText)}function De(Ze){return function(nr){return ae.parse(nr.responseText,Ze)}}ae.parse=function(Ze,nr){var _r;return ae.parseRows(Ze,function(Lr,Jr){if(_r)return _r(Lr,Jr-1);var on=function(Rr){for(var Br={},jr=Lr.length,un=0;un=on)return Lr;if(un)return un=!1,_r;var Hn=Rr;if(Ze.charCodeAt(Hn)===34){for(var qn=Hn;qn++24?(isFinite(Ct)&&(clearTimeout(pn),pn=setTimeout(kn,Ct)),an=0):(an=1,gn(kn))}i.timer.flush=function(){ni(),ci()};function ni(){for(var ft=Date.now(),Ct=Wr;Ct;)ft>=Ct.t&&Ct.c(ft-Ct.t)&&(Ct.c=null),Ct=Ct.n;return ft}function ci(){for(var ft,Ct=Wr,Bt=1/0;Ct;)Ct.c?(Ct.t=0;--Ee)Rr.push(ae[Ze[_r[Ee]][2]]);for(Ee=+Jr;Ee1&&ve(ft[Bt[ee-2]],ft[Bt[ee-1]],ft[ae])<=0;)--ee;Bt[ee++]=ae}return Bt.slice(0,ee)}function wr(ft,Ct){return ft[0]-Ct[0]||ft[1]-Ct[1]}i.geom.polygon=function(ft){return tt(ft,nn),ft};var nn=i.geom.polygon.prototype=[];nn.area=function(){for(var ft=-1,Ct=this.length,Bt,ee=this[Ct-1],ae=0;++ftyt)Ee=Ee.L;else if(De=Ct-sn(Ee,Bt),De>yt){if(!Ee.R){ee=Ee;break}Ee=Ee.R}else{fe>-yt?(ee=Ee.P,ae=Ee):De>-yt?(ee=Ee,ae=Ee.N):ee=ae=Ee;break}var Ye=Ar(ft);if(Bn.insert(ee,Ye),!(!ee&&!ae)){if(ee===ae){Ln(ee),ae=Ar(ee.site),Bn.insert(Ye,ae),Ye.edge=ae.edge=ai(ee.site,Ye.site),wn(ee),wn(ae);return}if(!ae){Ye.edge=ai(ee.site,Ye.site);return}Ln(ee),Ln(ae);var Ze=ee.site,nr=Ze.x,_r=Ze.y,Lr=ft.x-nr,Jr=ft.y-_r,on=ae.site,Rr=on.x-nr,Br=on.y-_r,jr=2*(Lr*Br-Jr*Rr),un=Lr*Lr+Jr*Jr,vn=Rr*Rr+Br*Br,qr={x:(Br*un-Jr*vn)/jr+nr,y:(Lr*vn-Rr*un)/jr+_r};Ci(ae.edge,Ze,on,qr),Ye.edge=ai(Ze,ft,null,qr),ae.edge=ai(ft,on,null,qr),wn(ee),wn(ae)}}function hn(ft,Ct){var Bt=ft.site,ee=Bt.x,ae=Bt.y,fe=ae-Ct;if(!fe)return ee;var De=ft.P;if(!De)return-1/0;Bt=De.site;var Ee=Bt.x,Ye=Bt.y,Ze=Ye-Ct;if(!Ze)return Ee;var nr=Ee-ee,_r=1/fe-1/Ze,Lr=nr/Ze;return _r?(-Lr+Math.sqrt(Lr*Lr-2*_r*(nr*nr/(-2*Ze)-Ye+Ze/2+ae-fe/2)))/_r+ee:(ee+Ee)/2}function sn(ft,Ct){var Bt=ft.N;if(Bt)return hn(Bt,Ct);var ee=ft.site;return ee.y===Ct?ee.x:1/0}function Er(ft){this.site=ft,this.edges=[]}Er.prototype.prepare=function(){for(var ft=this.edges,Ct=ft.length,Bt;Ct--;)Bt=ft[Ct].edge,(!Bt.b||!Bt.a)&&ft.splice(Ct,1);return ft.sort(Hr),ft.length};function Zr(ft){for(var Ct=ft[0][0],Bt=ft[1][0],ee=ft[0][1],ae=ft[1][1],fe,De,Ee,Ye,Ze=An,nr=Ze.length,_r,Lr,Jr,on,Rr,Br;nr--;)if(_r=Ze[nr],!(!_r||!_r.prepare()))for(Jr=_r.edges,on=Jr.length,Lr=0;Lryt||d(Ye-De)>yt)&&(Jr.splice(Lr,0,new pa(pi(_r.site,Br,d(Ee-Ct)yt?{x:Ct,y:d(fe-Ct)yt?{x:d(De-ae)yt?{x:Bt,y:d(fe-Bt)yt?{x:d(De-ee)=-Et)){var Lr=Ye*Ye+Ze*Ze,Jr=nr*nr+Br*Br,on=(Br*Lr-Ze*Jr)/_r,Rr=(Ye*Jr-nr*Lr)/_r,Br=Rr+Ee,jr=Sr.pop()||new Qr;jr.arc=ft,jr.site=ae,jr.x=on+De,jr.y=Br+Math.sqrt(on*on+Rr*Rr),jr.cy=Br,ft.circle=jr;for(var un=null,vn=Di._;vn;)if(jr.y0)){if(Rr/=Jr,Jr<0){if(Rr<_r)return;Rr0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}if(Rr=Bt-Ee,!(!Jr&&Rr<0)){if(Rr/=Jr,Jr<0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}else if(Jr>0){if(Rr<_r)return;Rr0)){if(Rr/=on,on<0){if(Rr<_r)return;Rr0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}if(Rr=ee-Ye,!(!on&&Rr<0)){if(Rr/=on,on<0){if(Rr>Lr)return;Rr>_r&&(_r=Rr)}else if(on>0){if(Rr<_r)return;Rr0&&(ae.a={x:Ee+_r*Jr,y:Ye+_r*on}),Lr<1&&(ae.b={x:Ee+Lr*Jr,y:Ye+Lr*on}),ae}}}}}}function Un(ft){for(var Ct=Tn,Bt=Pn(ft[0][0],ft[0][1],ft[1][0],ft[1][1]),ee=Ct.length,ae;ee--;)ae=Ct[ee],(!On(ae,ft)||!Bt(ae)||d(ae.a.x-ae.b.x)=fe)return;if(nr>Lr){if(!ee)ee={x:on,y:De};else if(ee.y>=Ee)return;Bt={x:on,y:Ee}}else{if(!ee)ee={x:on,y:Ee};else if(ee.y1)if(nr>Lr){if(!ee)ee={x:(De-jr)/Br,y:De};else if(ee.y>=Ee)return;Bt={x:(Ee-jr)/Br,y:Ee}}else{if(!ee)ee={x:(Ee-jr)/Br,y:Ee};else if(ee.y=fe)return;Bt={x:fe,y:Br*fe+jr}}else{if(!ee)ee={x:fe,y:Br*fe+jr};else if(ee.x=nr&&jr.x<=Lr&&jr.y>=_r&&jr.y<=Jr?[[nr,Jr],[Lr,Jr],[Lr,_r],[nr,_r]]:[];un.point=Ye[Rr]}),Ze}function Ee(Ye){return Ye.map(function(Ze,nr){return{x:Math.round(ee(Ze,nr)/yt)*yt,y:Math.round(ae(Ze,nr)/yt)*yt,i:nr}})}return De.links=function(Ye){return Bu(Ee(Ye)).edges.filter(function(Ze){return Ze.l&&Ze.r}).map(function(Ze){return{source:Ye[Ze.l.i],target:Ye[Ze.r.i]}})},De.triangles=function(Ye){var Ze=[];return Bu(Ee(Ye)).cells.forEach(function(nr,_r){for(var Lr=nr.site,Jr=nr.edges.sort(Hr),on=-1,Rr=Jr.length,Br,jr=Jr[Rr-1].edge,un=jr.l===Lr?jr.r:jr.l;++onvn&&(vn=nr.x),nr.y>qr&&(qr=nr.y),Jr.push(nr.x),on.push(nr.y);else for(Rr=0;Rrvn&&(vn=Hn),qn>qr&&(qr=qn),Jr.push(Hn),on.push(qn)}var ui=vn-jr,Qn=qr-un;ui>Qn?qr=un+ui:vn=jr+Qn;function ii(Mi,Ii,ra,ka,la,Kn,Bi,Ti){if(!(isNaN(ra)||isNaN(ka)))if(Mi.leaf){var Zi=Mi.x,ba=Mi.y;if(Zi!=null)if(d(Zi-ra)+d(ba-ka)<.01)fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti);else{var na=Mi.point;Mi.x=Mi.y=Mi.point=null,fi(Mi,na,Zi,ba,la,Kn,Bi,Ti),fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}else Mi.x=ra,Mi.y=ka,Mi.point=Ii}else fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}function fi(Mi,Ii,ra,ka,la,Kn,Bi,Ti){var Zi=(la+Bi)*.5,ba=(Kn+Ti)*.5,na=ra>=Zi,Ka=ka>=ba,Ja=Ka<<1|na;Mi.leaf=!1,Mi=Mi.nodes[Ja]||(Mi.nodes[Ja]=ho()),na?la=Zi:Bi=Zi,Ka?Kn=ba:Ti=ba,ii(Mi,Ii,ra,ka,la,Kn,Bi,Ti)}var Oi=ho();if(Oi.add=function(Mi){ii(Oi,Mi,+_r(Mi,++Rr),+Lr(Mi,Rr),jr,un,vn,qr)},Oi.visit=function(Mi){ll(Mi,Oi,jr,un,vn,qr)},Oi.find=function(Mi){return vu(Oi,Mi[0],Mi[1],jr,un,vn,qr)},Rr=-1,Ct==null){for(;++Rrfe||Lr>De||Jr=Hn,Qn=Bt>=qn,ii=Qn<<1|ui,fi=ii+4;iiBt&&(fe=Ct.slice(Bt,fe),Ee[De]?Ee[De]+=fe:Ee[++De]=fe),(ee=ee[0])===(ae=ae[0])?Ee[De]?Ee[De]+=ae:Ee[++De]=ae:(Ee[++De]=null,Ye.push({i:De,x:za(ee,ae)})),Bt=$a.lastIndex;return Bt=0&&!(ee=i.interpolators[Bt](ft,Ct)););return ee}i.interpolators=[function(ft,Ct){var Bt=typeof Ct;return(Bt==="string"?cn.has(Ct.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ct)?Ra:Ua:Ct instanceof ge?Ra:Array.isArray(Ct)?_o:Bt==="object"&&isNaN(Ct)?ul:za)(ft,Ct)}],i.interpolateArray=_o;function _o(ft,Ct){var Bt=[],ee=[],ae=ft.length,fe=Ct.length,De=Math.min(ft.length,Ct.length),Ee;for(Ee=0;Ee=0?ft.slice(0,Ct):ft,ee=Ct>=0?ft.slice(Ct+1):"in";return Bt=bo.get(Bt)||Tf,ee=yc.get(ee)||k,ts(ee(Bt.apply(null,S.call(arguments,1))))};function ts(ft){return function(Ct){return Ct<=0?0:Ct>=1?1:ft(Ct)}}function Za(ft){return function(Ct){return 1-ft(1-Ct)}}function Hu(ft){return function(Ct){return .5*(Ct<.5?ft(2*Ct):2-ft(2-2*Ct))}}function Cs(ft){return ft*ft}function es(ft){return ft*ft*ft}function Vu(ft){if(ft<=0)return 0;if(ft>=1)return 1;var Ct=ft*ft,Bt=Ct*ft;return 4*(ft<.5?Bt:3*(ft-Ct)+Bt-.75)}function Af(ft){return function(Ct){return Math.pow(Ct,ft)}}function xc(ft){return 1-Math.cos(ft*ie)}function du(ft){return Math.pow(2,10*(ft-1))}function bc(ft){return 1-Math.sqrt(1-ft*ft)}function wc(ft,Ct){var Bt;return arguments.length<2&&(Ct=.45),arguments.length?Bt=Ct/Nt*Math.asin(1/ft):(ft=1,Bt=Ct/4),function(ee){return 1+ft*Math.pow(2,-10*ee)*Math.sin((ee-Bt)*Nt/Ct)}}function Tc(ft){return ft||(ft=1.70158),function(Ct){return Ct*Ct*((ft+1)*Ct-ft)}}function Gu(ft){return ft<.36363636363636365?7.5625*ft*ft:ft<.7272727272727273?7.5625*(ft-=.5454545454545454)*ft+.75:ft<.9090909090909091?7.5625*(ft-=.8181818181818182)*ft+.9375:7.5625*(ft-=.9545454545454546)*ft+.984375}i.interpolateHcl=Ac;function Ac(ft,Ct){ft=i.hcl(ft),Ct=i.hcl(Ct);var Bt=ft.h,ee=ft.c,ae=ft.l,fe=Ct.h-Bt,De=Ct.c-ee,Ee=Ct.l-ae;return isNaN(De)&&(De=0,ee=isNaN(ee)?Ct.c:ee),isNaN(fe)?(fe=0,Bt=isNaN(Bt)?Ct.h:Bt):fe>180?fe-=360:fe<-180&&(fe+=360),function(Ye){return ke(Bt+fe*Ye,ee+De*Ye,ae+Ee*Ye)+""}}i.interpolateHsl=Mc;function Mc(ft,Ct){ft=i.hsl(ft),Ct=i.hsl(Ct);var Bt=ft.h,ee=ft.s,ae=ft.l,fe=Ct.h-Bt,De=Ct.s-ee,Ee=Ct.l-ae;return isNaN(De)&&(De=0,ee=isNaN(ee)?Ct.s:ee),isNaN(fe)?(fe=0,Bt=isNaN(Bt)?Ct.h:Bt):fe>180?fe-=360:fe<-180&&(fe+=360),function(Ye){return Ce(Bt+fe*Ye,ee+De*Ye,ae+Ee*Ye)+""}}i.interpolateLab=Mf;function Mf(ft,Ct){ft=i.lab(ft),Ct=i.lab(Ct);var Bt=ft.l,ee=ft.a,ae=ft.b,fe=Ct.l-Bt,De=Ct.a-ee,Ee=Ct.b-ae;return function(Ye){return Gt(Bt+fe*Ye,ee+De*Ye,ae+Ee*Ye)+""}}i.interpolateRound=Sf;function Sf(ft,Ct){return Ct-=ft,function(Bt){return Math.round(ft+Ct*Bt)}}i.transform=function(ft){var Ct=v.createElementNS(i.ns.prefix.svg,"g");return(i.transform=function(Bt){if(Bt!=null){Ct.setAttribute("transform",Bt);var ee=Ct.transform.baseVal.consolidate()}return new Xs(ee?ee.matrix:Ef)})(ft)};function Xs(ft){var Ct=[ft.a,ft.b],Bt=[ft.c,ft.d],ee=zl(Ct),ae=cl(Ct,Bt),fe=zl(kl(Bt,Ct,-ae))||0;Ct[0]*Bt[1]180?Ct+=360:Ct-ft>180&&(ft+=360),ee.push({i:Bt.push(vs(Bt)+"rotate(",null,")")-2,x:za(ft,Ct)})):Ct&&Bt.push(vs(Bt)+"rotate("+Ct+")")}function _f(ft,Ct,Bt,ee){ft!==Ct?ee.push({i:Bt.push(vs(Bt)+"skewX(",null,")")-2,x:za(ft,Ct)}):Ct&&Bt.push(vs(Bt)+"skewX("+Ct+")")}function Cf(ft,Ct,Bt,ee){if(ft[0]!==Ct[0]||ft[1]!==Ct[1]){var ae=Bt.push(vs(Bt)+"scale(",null,",",null,")");ee.push({i:ae-4,x:za(ft[0],Ct[0])},{i:ae-2,x:za(ft[1],Ct[1])})}else(Ct[0]!==1||Ct[1]!==1)&&Bt.push(vs(Bt)+"scale("+Ct+")")}function gu(ft,Ct){var Bt=[],ee=[];return ft=i.transform(ft),Ct=i.transform(Ct),Sc(ft.translate,Ct.translate,Bt,ee),pu(ft.rotate,Ct.rotate,Bt,ee),_f(ft.skew,Ct.skew,Bt,ee),Cf(ft.scale,Ct.scale,Bt,ee),ft=Ct=null,function(ae){for(var fe=-1,De=ee.length,Ee;++fe0?fe=qr:(Bt.c=null,Bt.t=NaN,Bt=null,Ct.end({type:"end",alpha:fe=0})):qr>0&&(Ct.start({type:"start",alpha:fe=qr}),Bt=_n(ft.tick)),ft):fe},ft.start=function(){var qr,Hn=Jr.length,qn=on.length,ui=ee[0],Qn=ee[1],ii,fi;for(qr=0;qr=0;)fe.push(nr=Ze[Ye]),nr.parent=Ee,nr.depth=Ee.depth+1;Bt&&(Ee.value=0),Ee.children=Ze}else Bt&&(Ee.value=+Bt.call(ee,Ee,Ee.depth)||0),delete Ee.children;return wo(ae,function(_r){var Lr,Jr;ft&&(Lr=_r.children)&&Lr.sort(ft),Bt&&(Jr=_r.parent)&&(Jr.value+=_r.value)}),De}return ee.sort=function(ae){return arguments.length?(ft=ae,ee):ft},ee.children=function(ae){return arguments.length?(Ct=ae,ee):Ct},ee.value=function(ae){return arguments.length?(Bt=ae,ee):Bt},ee.revalue=function(ae){return Bt&&(pl(ae,function(fe){fe.children&&(fe.value=0)}),wo(ae,function(fe){var De;fe.children||(fe.value=+Bt.call(ee,fe,fe.depth)||0),(De=fe.parent)&&(De.value+=fe.value)})),ae},ee};function dl(ft,Ct){return i.rebind(ft,Ct,"sort","children","value"),ft.nodes=ft,ft.links=_c,ft}function pl(ft,Ct){for(var Bt=[ft];(ft=Bt.pop())!=null;)if(Ct(ft),(ae=ft.children)&&(ee=ae.length))for(var ee,ae;--ee>=0;)Bt.push(ae[ee])}function wo(ft,Ct){for(var Bt=[ft],ee=[];(ft=Bt.pop())!=null;)if(ee.push(ft),(De=ft.children)&&(fe=De.length))for(var ae=-1,fe,De;++aeae&&(ae=Ee),ee.push(Ee)}for(De=0;Deee&&(Bt=Ct,ee=ae);return Bt}function Pf(ft){return ft.reduce(Vo,0)}function Vo(ft,Ct){return ft+Ct[1]}i.layout.histogram=function(){var ft=!0,Ct=Number,Bt=js,ee=Rf;function ae(fe,Lr){for(var Ee=[],Ye=fe.map(Ct,this),Ze=Bt.call(this,Ye,Lr),nr=ee.call(this,Ze,Ye,Lr),_r,Lr=-1,Jr=Ye.length,on=nr.length-1,Rr=ft?1:1/Jr,Br;++Lr0)for(Lr=-1;++Lr=Ze[0]&&Br<=Ze[1]&&(_r=Ee[i.bisect(nr,Br,1,on)-1],_r.y+=Rr,_r.push(fe[Lr]));return Ee}return ae.value=function(fe){return arguments.length?(Ct=fe,ae):Ct},ae.range=function(fe){return arguments.length?(Bt=rn(fe),ae):Bt},ae.bins=function(fe){return arguments.length?(ee=typeof fe=="number"?function(De){return Ku(De,fe)}:rn(fe),ae):ee},ae.frequency=function(fe){return arguments.length?(ft=!!fe,ae):ft},ae};function Rf(ft,Ct){return Ku(ft,Math.ceil(Math.log(Ct.length)/Math.LN2+1))}function Ku(ft,Ct){for(var Bt=-1,ee=+ft[0],ae=(ft[1]-ee)/Ct,fe=[];++Bt<=Ct;)fe[Bt]=ae*Bt+ee;return fe}function js(ft){return[i.min(ft),i.max(ft)]}i.layout.pack=function(){var ft=i.layout.hierarchy().sort(Ps),Ct=0,Bt=[1,1],ee;function ae(fe,De){var Ee=ft.call(this,fe,De),Ye=Ee[0],Ze=Bt[0],nr=Bt[1],_r=ee==null?Math.sqrt:typeof ee=="function"?ee:function(){return ee};if(Ye.x=Ye.y=0,wo(Ye,function(Jr){Jr.r=+_r(Jr.value)}),wo(Ye,Go),Ct){var Lr=Ct*(ee?1:Math.max(2*Ye.r/Ze,2*Ye.r/nr))/2;wo(Ye,function(Jr){Jr.r+=Lr}),wo(Ye,Go),wo(Ye,function(Jr){Jr.r-=Lr})}return Rs(Ye,Ze/2,nr/2,ee?1:1/Math.max(2*Ye.r/Ze,2*Ye.r/nr)),Ee}return ae.size=function(fe){return arguments.length?(Bt=fe,ae):Bt},ae.radius=function(fe){return arguments.length?(ee=fe==null||typeof fe=="function"?fe:+fe,ae):ee},ae.padding=function(fe){return arguments.length?(Ct=+fe,ae):Ct},dl(ae,ft)};function Ps(ft,Ct){return ft.value-Ct.value}function Tu(ft,Ct){var Bt=ft._pack_next;ft._pack_next=Ct,Ct._pack_prev=ft,Ct._pack_next=Bt,Bt._pack_prev=Ct}function Da(ft,Ct){ft._pack_next=Ct,Ct._pack_prev=ft}function Bl(ft,Ct){var Bt=Ct.x-ft.x,ee=Ct.y-ft.y,ae=ft.r+Ct.r;return .999*ae*ae>Bt*Bt+ee*ee}function Go(ft){if(!(Ct=ft.children)||!(Lr=Ct.length))return;var Ct,Bt=1/0,ee=-1/0,ae=1/0,fe=-1/0,De,Ee,Ye,Ze,nr,_r,Lr;function Jr(qr){Bt=Math.min(qr.x-qr.r,Bt),ee=Math.max(qr.x+qr.r,ee),ae=Math.min(qr.y-qr.r,ae),fe=Math.max(qr.y+qr.r,fe)}if(Ct.forEach(ds),De=Ct[0],De.x=-De.r,De.y=0,Jr(De),Lr>1&&(Ee=Ct[1],Ee.x=Ee.r,Ee.y=0,Jr(Ee),Lr>2))for(Ye=Ct[2],Wo(De,Ee,Ye),Jr(Ye),Tu(De,Ye),De._pack_prev=Ye,Tu(Ye,Ee),Ee=De._pack_next,Ze=3;ZeBr.x&&(Br=Hn),Hn.depth>jr.depth&&(jr=Hn)});var un=Ct(Rr,Br)/2-Rr.x,vn=Bt[0]/(Br.x+Ct(Br,Rr)/2+un),qr=Bt[1]/(jr.depth||1);pl(Jr,function(Hn){Hn.x=(Hn.x+un)*vn,Hn.y=Hn.depth*qr})}return Lr}function fe(nr){for(var _r={A:null,children:[nr]},Lr=[_r],Jr;(Jr=Lr.pop())!=null;)for(var on=Jr.children,Rr,Br=0,jr=on.length;Br0&&(Ul(Lc(Rr,nr,Lr),nr,Hn),jr+=Hn,un+=Hn),vn+=Rr.m,jr+=Jr.m,qr+=Br.m,un+=on.m;Rr&&!Do(on)&&(on.t=Rr,on.m+=vn-un),Jr&&!Yo(Br)&&(Br.t=Jr,Br.m+=jr-qr,Lr=nr)}return Lr}function Ze(nr){nr.x*=Bt[0],nr.y=nr.depth*Bt[1]}return ae.separation=function(nr){return arguments.length?(Ct=nr,ae):Ct},ae.size=function(nr){return arguments.length?(ee=(Bt=nr)==null?Ze:null,ae):ee?null:Bt},ae.nodeSize=function(nr){return arguments.length?(ee=(Bt=nr)==null?null:Ze,ae):ee?Bt:null},dl(ae,ft)};function ps(ft,Ct){return ft.parent==Ct.parent?1:2}function Yo(ft){var Ct=ft.children;return Ct.length?Ct[0]:ft.t}function Do(ft){var Ct=ft.children,Bt;return(Bt=Ct.length)?Ct[Bt-1]:ft.t}function Ul(ft,Ct,Bt){var ee=Bt/(Ct.i-ft.i);Ct.c-=ee,Ct.s+=Bt,ft.c+=ee,Ct.z+=Bt,Ct.m+=Bt}function Cc(ft){for(var Ct=0,Bt=0,ee=ft.children,ae=ee.length,fe;--ae>=0;)fe=ee[ae],fe.z+=Ct,fe.m+=Ct,Ct+=fe.s+(Bt+=fe.c)}function Lc(ft,Ct,Bt){return ft.a.parent===Ct.parent?ft.a:Bt}i.layout.cluster=function(){var ft=i.layout.hierarchy().sort(null).value(null),Ct=ps,Bt=[1,1],ee=!1;function ae(fe,De){var Ee=ft.call(this,fe,De),Ye=Ee[0],Ze,nr=0;wo(Ye,function(Rr){var Br=Rr.children;Br&&Br.length?(Rr.x=Rc(Br),Rr.y=Pc(Br)):(Rr.x=Ze?nr+=Ct(Rr,Ze):0,Rr.y=0,Ze=Rr)});var _r=Ju(Ye),Lr=Df(Ye),Jr=_r.x-Ct(_r,Lr)/2,on=Lr.x+Ct(Lr,_r)/2;return wo(Ye,ee?function(Rr){Rr.x=(Rr.x-Ye.x)*Bt[0],Rr.y=(Ye.y-Rr.y)*Bt[1]}:function(Rr){Rr.x=(Rr.x-Jr)/(on-Jr)*Bt[0],Rr.y=(1-(Ye.y?Rr.y/Ye.y:1))*Bt[1]}),Ee}return ae.separation=function(fe){return arguments.length?(Ct=fe,ae):Ct},ae.size=function(fe){return arguments.length?(ee=(Bt=fe)==null,ae):ee?null:Bt},ae.nodeSize=function(fe){return arguments.length?(ee=(Bt=fe)!=null,ae):ee?Bt:null},dl(ae,ft)};function Pc(ft){return 1+i.max(ft,function(Ct){return Ct.y})}function Rc(ft){return ft.reduce(function(Ct,Bt){return Ct+Bt.x},0)/ft.length}function Ju(ft){var Ct=ft.children;return Ct&&Ct.length?Ju(Ct[0]):ft}function Df(ft){var Ct=ft.children,Bt;return Ct&&(Bt=Ct.length)?Df(Ct[Bt-1]):ft}i.layout.treemap=function(){var ft=i.layout.hierarchy(),Ct=Math.round,Bt=[1,1],ee=null,ae=xl,fe=!1,De,Ee="squarify",Ye=.5*(1+Math.sqrt(5));function Ze(Rr,Br){for(var jr=-1,un=Rr.length,vn,qr;++jr0;)un.push(qr=vn[Qn-1]),un.area+=qr.area,Ee!=="squarify"||(qn=Lr(un,ui))<=Hn?(vn.pop(),Hn=qn):(un.area-=un.pop().area,Jr(un,ui,jr,!1),ui=Math.min(jr.dx,jr.dy),un.length=un.area=0,Hn=1/0);un.length&&(Jr(un,ui,jr,!0),un.length=un.area=0),Br.forEach(nr)}}function _r(Rr){var Br=Rr.children;if(Br&&Br.length){var jr=ae(Rr),un=Br.slice(),vn,qr=[];for(Ze(un,jr.dx*jr.dy/Rr.value),qr.area=0;vn=un.pop();)qr.push(vn),qr.area+=vn.area,vn.z!=null&&(Jr(qr,vn.z?jr.dx:jr.dy,jr,!un.length),qr.length=qr.area=0);Br.forEach(_r)}}function Lr(Rr,Br){for(var jr=Rr.area,un,vn=0,qr=1/0,Hn=-1,qn=Rr.length;++Hnvn&&(vn=un));return jr*=jr,Br*=Br,jr?Math.max(Br*vn*Ye/jr,jr/(Br*qr*Ye)):1/0}function Jr(Rr,Br,jr,un){var vn=-1,qr=Rr.length,Hn=jr.x,qn=jr.y,ui=Br?Ct(Rr.area/Br):0,Qn;if(Br==jr.dx){for((un||ui>jr.dy)&&(ui=jr.dy);++vnjr.dx)&&(ui=jr.dx);++vn1);return ft+Ct*ee*Math.sqrt(-2*Math.log(fe)/fe)}},logNormal:function(){var ft=i.random.normal.apply(i,arguments);return function(){return Math.exp(ft())}},bates:function(ft){var Ct=i.random.irwinHall(ft);return function(){return Ct()/ft}},irwinHall:function(ft){return function(){for(var Ct=0,Bt=0;Bt2?Ff:If,Ze=ee?hl:Uo;return ae=Ye(ft,Ct,Ze,Bt),fe=Ye(Ct,ft,Ze,qa),Ee}function Ee(Ye){return ae(Ye)}return Ee.invert=function(Ye){return fe(Ye)},Ee.domain=function(Ye){return arguments.length?(ft=Ye.map(Number),De()):ft},Ee.range=function(Ye){return arguments.length?(Ct=Ye,De()):Ct},Ee.rangeRound=function(Ye){return Ee.range(Ye).interpolate(Sf)},Ee.clamp=function(Ye){return arguments.length?(ee=Ye,De()):ee},Ee.interpolate=function(Ye){return arguments.length?(Bt=Ye,De()):Bt},Ee.ticks=function(Ye){return Xo(ft,Ye)},Ee.tickFormat=function(Ye,Ze){return d3_scale_linearTickFormat(ft,Ye,Ze)},Ee.nice=function(Ye){return kf(ft,Ye),De()},Ee.copy=function(){return zf(ft,Ct,Bt,ee)},De()}function Qu(ft,Ct){return i.rebind(ft,Ct,"range","rangeRound","interpolate","clamp")}function kf(ft,Ct){return Hl(ft,gs(vo(ft,Ct)[2])),Hl(ft,gs(vo(ft,Ct)[2])),ft}function vo(ft,Ct){Ct==null&&(Ct=10);var Bt=Co(ft),ee=Bt[1]-Bt[0],ae=Math.pow(10,Math.floor(Math.log(ee/Ct)/Math.LN10)),fe=Ct/ee*ae;return fe<=.15?ae*=10:fe<=.35?ae*=5:fe<=.75&&(ae*=2),Bt[0]=Math.ceil(Bt[0]/ae)*ae,Bt[1]=Math.floor(Bt[1]/ae)*ae+ae*.5,Bt[2]=ae,Bt}function Xo(ft,Ct){return i.range.apply(i,vo(ft,Ct))}i.scale.log=function(){return Ds(i.scale.linear().domain([0,1]),10,!0,[1,10])};function Ds(ft,Ct,Bt,ee){function ae(Ee){return(Bt?Math.log(Ee<0?0:Ee):-Math.log(Ee>0?0:-Ee))/Math.log(Ct)}function fe(Ee){return Bt?Math.pow(Ct,Ee):-Math.pow(Ct,-Ee)}function De(Ee){return ft(ae(Ee))}return De.invert=function(Ee){return fe(ft.invert(Ee))},De.domain=function(Ee){return arguments.length?(Bt=Ee[0]>=0,ft.domain((ee=Ee.map(Number)).map(ae)),De):ee},De.base=function(Ee){return arguments.length?(Ct=+Ee,ft.domain(ee.map(ae)),De):Ct},De.nice=function(){var Ee=Hl(ee.map(ae),Bt?Math:wl);return ft.domain(Ee),ee=Ee.map(fe),De},De.ticks=function(){var Ee=Co(ee),Ye=[],Ze=Ee[0],nr=Ee[1],_r=Math.floor(ae(Ze)),Lr=Math.ceil(ae(nr)),Jr=Ct%1?2:Ct;if(isFinite(Lr-_r)){if(Bt){for(;_r0;on--)Ye.push(fe(_r)*on);for(_r=0;Ye[_r]nr;Lr--);Ye=Ye.slice(_r,Lr)}return Ye},De.copy=function(){return Ds(ft.copy(),Ct,Bt,ee)},Qu(De,ft)}var wl={floor:function(ft){return-Math.ceil(-ft)},ceil:function(ft){return-Math.floor(-ft)}};i.scale.pow=function(){return Au(i.scale.linear(),1,[0,1])};function Au(ft,Ct,Bt){var ee=Js(Ct),ae=Js(1/Ct);function fe(De){return ft(ee(De))}return fe.invert=function(De){return ae(ft.invert(De))},fe.domain=function(De){return arguments.length?(ft.domain((Bt=De.map(Number)).map(ee)),fe):Bt},fe.ticks=function(De){return Xo(Bt,De)},fe.tickFormat=function(De,Ee){return d3_scale_linearTickFormat(Bt,De,Ee)},fe.nice=function(De){return fe.domain(kf(Bt,De))},fe.exponent=function(De){return arguments.length?(ee=Js(Ct=De),ae=Js(1/Ct),ft.domain(Bt.map(ee)),fe):Ct},fe.copy=function(){return Au(ft.copy(),Ct,Bt)},Qu(fe,ft)}function Js(ft){return function(Ct){return Ct<0?-Math.pow(-Ct,ft):Math.pow(Ct,ft)}}i.scale.sqrt=function(){return i.scale.pow().exponent(.5)},i.scale.ordinal=function(){return Qs([],{t:"range",a:[[]]})};function Qs(ft,Ct){var Bt,ee,ae;function fe(Ee){return ee[((Bt.get(Ee)||(Ct.t==="range"?Bt.set(Ee,ft.push(Ee)):NaN))-1)%ee.length]}function De(Ee,Ye){return i.range(ft.length).map(function(Ze){return Ee+Ye*Ze})}return fe.domain=function(Ee){if(!arguments.length)return ft;ft=[],Bt=new _;for(var Ye=-1,Ze=Ee.length,nr;++Ye0?Bt[fe-1]:ft[0],feLr?0:1;if(nr=jt)return Ye(nr,on)+(Ze?Ye(Ze,1-on):"")+"Z";var Rr,Br,jr,un,vn=0,qr=0,Hn,qn,ui,Qn,ii,fi,Oi,Mi,Ii=[];if((un=(+De.apply(this,arguments)||0)/2)&&(jr=ee===Mu?Math.sqrt(Ze*Ze+nr*nr):+ee.apply(this,arguments),on||(qr*=-1),nr&&(qr=Le(jr/nr*Math.sin(un))),Ze&&(vn=Le(jr/Ze*Math.sin(un)))),nr){Hn=nr*Math.cos(_r+qr),qn=nr*Math.sin(_r+qr),ui=nr*Math.cos(Lr-qr),Qn=nr*Math.sin(Lr-qr);var ra=Math.abs(Lr-_r-2*qr)<=Mt?0:1;if(qr&&Wl(Hn,qn,ui,Qn)===on^ra){var ka=(_r+Lr)/2;Hn=nr*Math.cos(ka),qn=nr*Math.sin(ka),ui=Qn=null}}else Hn=qn=0;if(Ze){ii=Ze*Math.cos(Lr-vn),fi=Ze*Math.sin(Lr-vn),Oi=Ze*Math.cos(_r+vn),Mi=Ze*Math.sin(_r+vn);var la=Math.abs(_r-Lr+2*vn)<=Mt?0:1;if(vn&&Wl(ii,fi,Oi,Mi)===1-on^la){var Kn=(_r+Lr)/2;ii=Ze*Math.cos(Kn),fi=Ze*Math.sin(Kn),Oi=Mi=null}}else ii=fi=0;if(Jr>yt&&(Rr=Math.min(Math.abs(nr-Ze)/2,+Bt.apply(this,arguments)))>.001){Br=Ze0?0:1}function Yl(ft,Ct,Bt,ee,ae){var fe=ft[0]-Ct[0],De=ft[1]-Ct[1],Ee=(ae?ee:-ee)/Math.sqrt(fe*fe+De*De),Ye=Ee*De,Ze=-Ee*fe,nr=ft[0]+Ye,_r=ft[1]+Ze,Lr=Ct[0]+Ye,Jr=Ct[1]+Ze,on=(nr+Lr)/2,Rr=(_r+Jr)/2,Br=Lr-nr,jr=Jr-_r,un=Br*Br+jr*jr,vn=Bt-ee,qr=nr*Jr-Lr*_r,Hn=(jr<0?-1:1)*Math.sqrt(Math.max(0,vn*vn*un-qr*qr)),qn=(qr*jr-Br*Hn)/un,ui=(-qr*Br-jr*Hn)/un,Qn=(qr*jr+Br*Hn)/un,ii=(-qr*Br+jr*Hn)/un,fi=qn-on,Oi=ui-Rr,Mi=Qn-on,Ii=ii-Rr;return fi*fi+Oi*Oi>Mi*Mi+Ii*Ii&&(qn=Qn,ui=ii),[[qn-Ye,ui-Ze],[qn*Bt/vn,ui*Bt/vn]]}function Fs(){return!0}function Xl(ft){var Ct=di,Bt=li,ee=Fs,ae=Ha,fe=ae.key,De=.7;function Ee(Ye){var Ze=[],nr=[],_r=-1,Lr=Ye.length,Jr,on=rn(Ct),Rr=rn(Bt);function Br(){Ze.push("M",ae(ft(nr),De))}for(;++_r1?ft.join("L"):ft+"Z"}function ns(ft){return ft.join("L")+"Z"}function qu(ft){for(var Ct=0,Bt=ft.length,ee=ft[0],ae=[ee[0],",",ee[1]];++Ct1&&ae.push("H",ee[0]),ae.join("")}function $s(ft){for(var Ct=0,Bt=ft.length,ee=ft[0],ae=[ee[0],",",ee[1]];++Ct1){Ee=Ct[1],fe=ft[Ye],Ye++,ee+="C"+(ae[0]+De[0])+","+(ae[1]+De[1])+","+(fe[0]-Ee[0])+","+(fe[1]-Ee[1])+","+fe[0]+","+fe[1];for(var Ze=2;Ze9&&(fe=Bt*3/Math.sqrt(fe),De[Ee]=fe*ee,De[Ee+1]=fe*ae));for(Ee=-1;++Ee<=Ye;)fe=(ft[Math.min(Ye,Ee+1)][0]-ft[Math.max(0,Ee-1)][0])/(6*(1+De[Ee]*De[Ee])),Ct.push([fe||0,De[Ee]*fe||0]);return Ct}function Cu(ft){return ft.length<3?Ha(ft):ft[0]+lo(ft,Ql(ft))}i.svg.line.radial=function(){var ft=Xl(Hf);return ft.radius=ft.x,delete ft.x,ft.angle=ft.y,delete ft.y,ft};function Hf(ft){for(var Ct,Bt=-1,ee=ft.length,ae,fe;++BtMt)+",1 "+_r}function Ze(nr,_r,Lr,Jr){return"Q 0,0 "+Jr}return fe.radius=function(nr){return arguments.length?(Bt=rn(nr),fe):Bt},fe.source=function(nr){return arguments.length?(ft=rn(nr),fe):ft},fe.target=function(nr){return arguments.length?(Ct=rn(nr),fe):Ct},fe.startAngle=function(nr){return arguments.length?(ee=rn(nr),fe):ee},fe.endAngle=function(nr){return arguments.length?(ae=rn(nr),fe):ae},fe};function rf(ft){return ft.radius}i.svg.diagonal=function(){var ft=ef,Ct=qs,Bt=ql;function ee(ae,fe){var De=ft.call(this,ae,fe),Ee=Ct.call(this,ae,fe),Ye=(De.y+Ee.y)/2,Ze=[De,{x:De.x,y:Ye},{x:Ee.x,y:Ye},Ee];return Ze=Ze.map(Bt),"M"+Ze[0]+"C"+Ze[1]+" "+Ze[2]+" "+Ze[3]}return ee.source=function(ae){return arguments.length?(ft=rn(ae),ee):ft},ee.target=function(ae){return arguments.length?(Ct=rn(ae),ee):Ct},ee.projection=function(ae){return arguments.length?(Bt=ae,ee):Bt},ee};function ql(ft){return[ft.x,ft.y]}i.svg.diagonal.radial=function(){var ft=i.svg.diagonal(),Ct=ql,Bt=ft.projection;return ft.projection=function(ee){return arguments.length?Bt(Vf(Ct=ee)):Ct},ft};function Vf(ft){return function(){var Ct=ft.apply(this,arguments),Bt=Ct[0],ee=Ct[1]-ie;return[Bt*Math.cos(ee),Bt*Math.sin(ee)]}}i.svg.symbol=function(){var ft=oe,Ct=qt;function Bt(ee,ae){return(Me.get(ft.call(this,ee,ae))||we)(Ct.call(this,ee,ae))}return Bt.type=function(ee){return arguments.length?(ft=rn(ee),Bt):ft},Bt.size=function(ee){return arguments.length?(Ct=rn(ee),Bt):Ct},Bt};function qt(){return 64}function oe(){return"circle"}function we(ft){var Ct=Math.sqrt(ft/Mt);return"M0,"+Ct+"A"+Ct+","+Ct+" 0 1,1 0,"+-Ct+"A"+Ct+","+Ct+" 0 1,1 0,"+Ct+"Z"}var Me=i.map({circle:we,cross:function(ft){var Ct=Math.sqrt(ft/5)/2;return"M"+-3*Ct+","+-Ct+"H"+-Ct+"V"+-3*Ct+"H"+Ct+"V"+-Ct+"H"+3*Ct+"V"+Ct+"H"+Ct+"V"+3*Ct+"H"+-Ct+"V"+Ct+"H"+-3*Ct+"Z"},diamond:function(ft){var Ct=Math.sqrt(ft/(2*ze)),Bt=Ct*ze;return"M0,"+-Ct+"L"+Bt+",0 0,"+Ct+" "+-Bt+",0Z"},square:function(ft){var Ct=Math.sqrt(ft)/2;return"M"+-Ct+","+-Ct+"L"+Ct+","+-Ct+" "+Ct+","+Ct+" "+-Ct+","+Ct+"Z"},"triangle-down":function(ft){var Ct=Math.sqrt(ft/Ue),Bt=Ct*Ue/2;return"M0,"+Bt+"L"+Ct+","+-Bt+" "+-Ct+","+-Bt+"Z"},"triangle-up":function(ft){var Ct=Math.sqrt(ft/Ue),Bt=Ct*Ue/2;return"M0,"+-Bt+"L"+Ct+","+Bt+" "+-Ct+","+Bt+"Z"}});i.svg.symbolTypes=Me.keys();var Ue=Math.sqrt(3),ze=Math.tan(30*me);Z.transition=function(ft){for(var Ct=Ir||++Mr,Bt=Rn(ft),ee=[],ae,fe,De=Nr||{time:Date.now(),ease:Vu,delay:0,duration:250},Ee=-1,Ye=this.length;++Ee0;)_r[--un].call(ft,jr);if(Br>=1)return De.event&&De.event.end.call(ft,ft.__data__,Ct),--fe.count?delete fe[ee]:delete ft[Bt],1}De||(Ee=ae.time,Ye=_n(Lr,0,Ee),De=fe[ee]={tween:new _,time:Ee,timer:Ye,delay:ae.delay,duration:ae.duration,ease:ae.ease,index:Ct},ae=null,++fe.count)}i.svg.axis=function(){var ft=i.scale.linear(),Ct=Zn,Bt=6,ee=6,ae=3,fe=[10],De=null,Ee;function Ye(Ze){Ze.each(function(){var nr=i.select(this),_r=this.__chart__||ft,Lr=this.__chart__=ft.copy(),Jr=De??(Lr.ticks?Lr.ticks.apply(Lr,fe):Lr.domain()),on=Ee??(Lr.tickFormat?Lr.tickFormat.apply(Lr,fe):k),Rr=nr.selectAll(".tick").data(Jr,Lr),Br=Rr.enter().insert("g",".domain").attr("class","tick").style("opacity",yt),jr=i.transition(Rr.exit()).style("opacity",yt).remove(),un=i.transition(Rr.order()).style("opacity",1),vn=Math.max(Bt,0)+ae,qr,Hn=bl(Lr),qn=nr.selectAll(".domain").data([0]),ui=(qn.enter().append("path").attr("class","domain"),i.transition(qn));Br.append("line"),Br.append("text");var Qn=Br.select("line"),ii=un.select("line"),fi=Rr.select("text").text(on),Oi=Br.select("text"),Mi=un.select("text"),Ii=Ct==="top"||Ct==="left"?-1:1,ra,ka,la,Kn;if(Ct==="bottom"||Ct==="top"?(qr=Pi,ra="x",la="y",ka="x2",Kn="y2",fi.attr("dy",Ii<0?"0em":".71em").style("text-anchor","middle"),ui.attr("d","M"+Hn[0]+","+Ii*ee+"V0H"+Hn[1]+"V"+Ii*ee)):(qr=Ri,ra="y",la="x",ka="y2",Kn="x2",fi.attr("dy",".32em").style("text-anchor",Ii<0?"end":"start"),ui.attr("d","M"+Ii*ee+","+Hn[0]+"H0V"+Hn[1]+"H"+Ii*ee)),Qn.attr(Kn,Ii*Bt),Oi.attr(la,Ii*vn),ii.attr(ka,0).attr(Kn,Ii*Bt),Mi.attr(ra,0).attr(la,Ii*vn),Lr.rangeBand){var Bi=Lr,Ti=Bi.rangeBand()/2;_r=Lr=function(Zi){return Bi(Zi)+Ti}}else _r.rangeBand?_r=Lr:jr.call(qr,Lr,_r);Br.call(qr,_r,Lr),un.call(qr,Lr,Lr)})}return Ye.scale=function(Ze){return arguments.length?(ft=Ze,Ye):ft},Ye.orient=function(Ze){return arguments.length?(Ct=Ze in Li?Ze+"":Zn,Ye):Ct},Ye.ticks=function(){return arguments.length?(fe=x(arguments),Ye):fe},Ye.tickValues=function(Ze){return arguments.length?(De=Ze,Ye):De},Ye.tickFormat=function(Ze){return arguments.length?(Ee=Ze,Ye):Ee},Ye.tickSize=function(Ze){var nr=arguments.length;return nr?(Bt=+Ze,ee=+arguments[nr-1],Ye):Bt},Ye.innerTickSize=function(Ze){return arguments.length?(Bt=+Ze,Ye):Bt},Ye.outerTickSize=function(Ze){return arguments.length?(ee=+Ze,Ye):ee},Ye.tickPadding=function(Ze){return arguments.length?(ae=+Ze,Ye):ae},Ye.tickSubdivide=function(){return arguments.length&&Ye},Ye};var Zn="bottom",Li={top:1,right:1,bottom:1,left:1};function Pi(ft,Ct,Bt){ft.attr("transform",function(ee){var ae=Ct(ee);return"translate("+(isFinite(ae)?ae:Bt(ee))+",0)"})}function Ri(ft,Ct,Bt){ft.attr("transform",function(ee){var ae=Ct(ee);return"translate(0,"+(isFinite(ae)?ae:Bt(ee))+")"})}i.svg.brush=function(){var ft=J(nr,"brushstart","brush","brushend"),Ct=null,Bt=null,ee=[0,0],ae=[0,0],fe,De,Ee=!0,Ye=!0,Ze=Xi[0];function nr(Rr){Rr.each(function(){var Br=i.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",on).on("touchstart.brush",on),jr=Br.selectAll(".background").data([0]);jr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Br.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var un=Br.selectAll(".resize").data(Ze,k);un.exit().remove(),un.enter().append("g").attr("class",function(qn){return"resize "+qn}).style("cursor",function(qn){return zi[qn]}).append("rect").attr("x",function(qn){return/[ew]$/.test(qn)?-3:null}).attr("y",function(qn){return/^[ns]/.test(qn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),un.style("display",nr.empty()?"none":null);var vn=i.transition(Br),qr=i.transition(jr),Hn;Ct&&(Hn=bl(Ct),qr.attr("x",Hn[0]).attr("width",Hn[1]-Hn[0]),Lr(vn)),Bt&&(Hn=bl(Bt),qr.attr("y",Hn[0]).attr("height",Hn[1]-Hn[0]),Jr(vn)),_r(vn)})}nr.event=function(Rr){Rr.each(function(){var Br=ft.of(this,arguments),jr={x:ee,y:ae,i:fe,j:De},un=this.__chart__||jr;this.__chart__=jr,Ir?i.select(this).transition().each("start.brush",function(){fe=un.i,De=un.j,ee=un.x,ae=un.y,Br({type:"brushstart"})}).tween("brush:brush",function(){var vn=_o(ee,jr.x),qr=_o(ae,jr.y);return fe=De=null,function(Hn){ee=jr.x=vn(Hn),ae=jr.y=qr(Hn),Br({type:"brush",mode:"resize"})}}).each("end.brush",function(){fe=jr.i,De=jr.j,Br({type:"brush",mode:"resize"}),Br({type:"brushend"})}):(Br({type:"brushstart"}),Br({type:"brush",mode:"resize"}),Br({type:"brushend"}))})};function _r(Rr){Rr.selectAll(".resize").attr("transform",function(Br){return"translate("+ee[+/e$/.test(Br)]+","+ae[+/^s/.test(Br)]+")"})}function Lr(Rr){Rr.select(".extent").attr("x",ee[0]),Rr.selectAll(".extent,.n>rect,.s>rect").attr("width",ee[1]-ee[0])}function Jr(Rr){Rr.select(".extent").attr("y",ae[0]),Rr.selectAll(".extent,.e>rect,.w>rect").attr("height",ae[1]-ae[0])}function on(){var Rr=this,Br=i.select(i.event.target),jr=ft.of(Rr,arguments),un=i.select(Rr),vn=Br.datum(),qr=!/^(n|s)$/.test(vn)&&Ct,Hn=!/^(e|w)$/.test(vn)&&Bt,qn=Br.classed("extent"),ui=Jt(Rr),Qn,ii=i.mouse(Rr),fi,Oi=i.select(r(Rr)).on("keydown.brush",ra).on("keyup.brush",ka);if(i.event.changedTouches?Oi.on("touchmove.brush",la).on("touchend.brush",Bi):Oi.on("mousemove.brush",la).on("mouseup.brush",Bi),un.interrupt().selectAll("*").interrupt(),qn)ii[0]=ee[0]-ii[0],ii[1]=ae[0]-ii[1];else if(vn){var Mi=+/w$/.test(vn),Ii=+/^n/.test(vn);fi=[ee[1-Mi]-ii[0],ae[1-Ii]-ii[1]],ii[0]=ee[Mi],ii[1]=ae[Ii]}else i.event.altKey&&(Qn=ii.slice());un.style("pointer-events","none").selectAll(".resize").style("display",null),i.select("body").style("cursor",Br.style("cursor")),jr({type:"brushstart"}),la();function ra(){i.event.keyCode==32&&(qn||(Qn=null,ii[0]-=ee[1],ii[1]-=ae[1],qn=2),it())}function ka(){i.event.keyCode==32&&qn==2&&(ii[0]+=ee[1],ii[1]+=ae[1],qn=0,it())}function la(){var Ti=i.mouse(Rr),Zi=!1;fi&&(Ti[0]+=fi[0],Ti[1]+=fi[1]),qn||(i.event.altKey?(Qn||(Qn=[(ee[0]+ee[1])/2,(ae[0]+ae[1])/2]),ii[0]=ee[+(Ti[0]"u"&&(R=1e-6);var W,at,vt,St,Pt;for(vt=P,Pt=0;Pt<8;Pt++){if(St=this.sampleCurveX(vt)-P,Math.abs(St)at)return at;for(;WSt?W=vt:at=vt,vt=(at-W)*.5+W}return vt},p.prototype.solve=function(P,R){return this.sampleCurveY(this.solveCurveX(P,R))};var r=e;function e(P,R){this.x=P,this.y=R}e.prototype={clone:function(){return new e(this.x,this.y)},add:function(P){return this.clone()._add(P)},sub:function(P){return this.clone()._sub(P)},multByPoint:function(P){return this.clone()._multByPoint(P)},divByPoint:function(P){return this.clone()._divByPoint(P)},mult:function(P){return this.clone()._mult(P)},div:function(P){return this.clone()._div(P)},rotate:function(P){return this.clone()._rotate(P)},rotateAround:function(P,R){return this.clone()._rotateAround(P,R)},matMult:function(P){return this.clone()._matMult(P)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(P){return this.x===P.x&&this.y===P.y},dist:function(P){return Math.sqrt(this.distSqr(P))},distSqr:function(P){var R=P.x-this.x,W=P.y-this.y;return R*R+W*W},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(P){return Math.atan2(this.y-P.y,this.x-P.x)},angleWith:function(P){return this.angleWithSep(P.x,P.y)},angleWithSep:function(P,R){return Math.atan2(this.x*R-this.y*P,this.x*P+this.y*R)},_matMult:function(P){var R=P[0]*this.x+P[1]*this.y,W=P[2]*this.x+P[3]*this.y;return this.x=R,this.y=W,this},_add:function(P){return this.x+=P.x,this.y+=P.y,this},_sub:function(P){return this.x-=P.x,this.y-=P.y,this},_mult:function(P){return this.x*=P,this.y*=P,this},_div:function(P){return this.x/=P,this.y/=P,this},_multByPoint:function(P){return this.x*=P.x,this.y*=P.y,this},_divByPoint:function(P){return this.x/=P.x,this.y/=P.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var P=this.y;return this.y=this.x,this.x=-P,this},_rotate:function(P){var R=Math.cos(P),W=Math.sin(P),at=R*this.x-W*this.y,vt=W*this.x+R*this.y;return this.x=at,this.y=vt,this},_rotateAround:function(P,R){var W=Math.cos(P),at=Math.sin(P),vt=R.x+W*(this.x-R.x)-at*(this.y-R.y),St=R.y+at*(this.x-R.x)+W*(this.y-R.y);return this.x=vt,this.y=St,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},e.convert=function(P){return P instanceof e?P:Array.isArray(P)?new e(P[0],P[1]):P};var a=typeof self<"u"?self:{};function n(P,R){if(Array.isArray(P)){if(!Array.isArray(R)||P.length!==R.length)return!1;for(var W=0;W=1)return 1;var R=P*P,W=R*P;return 4*(P<.5?W:3*(P-R)+W-.75)}function l(P,R,W,at){var vt=new v(P,R,W,at);return function(St){return vt.solve(St)}}var m=l(.25,.1,.25,1);function h(P,R,W){return Math.min(W,Math.max(R,P))}function b(P,R,W){var at=W-R,vt=((P-R)%at+at)%at+R;return vt===R?W:vt}function u(P,R,W){if(!P.length)return W(null,[]);var at=P.length,vt=new Array(P.length),St=null;P.forEach(function(Pt,te){R(Pt,function(ye,_e){ye&&(St=ye),vt[te]=_e,--at===0&&W(St,vt)})})}function o(P){var R=[];for(var W in P)R.push(P[W]);return R}function d(P,R){var W=[];for(var at in P)at in R||W.push(at);return W}function w(P){for(var R=[],W=arguments.length-1;W-- >0;)R[W]=arguments[W+1];for(var at=0,vt=R;at>R/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,P)}return P()}function T(P){return P<=1?1:Math.pow(2,Math.ceil(Math.log(P)/Math.LN2))}function s(P){return P?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(P):!1}function L(P,R){P.forEach(function(W){R[W]&&(R[W]=R[W].bind(R))})}function M(P,R){return P.indexOf(R,P.length-R.length)!==-1}function z(P,R,W){var at={};for(var vt in P)at[vt]=R.call(W||this,P[vt],vt,P);return at}function D(P,R,W){var at={};for(var vt in P)R.call(W||this,P[vt],vt,P)&&(at[vt]=P[vt]);return at}function N(P){return Array.isArray(P)?P.map(N):typeof P=="object"&&P?z(P,N):P}function I(P,R){for(var W=0;W=0)return!0;return!1}var k={};function B(P){k[P]||(typeof console<"u"&&console.warn(P),k[P]=!0)}function O(P,R,W){return(W.y-P.y)*(R.x-P.x)>(R.y-P.y)*(W.x-P.x)}function H(P){for(var R=0,W=0,at=P.length,vt=at-1,St=void 0,Pt=void 0;W@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,W={};if(P.replace(R,function(vt,St,Pt,te){var ye=Pt||te;return W[St]=ye?ye.toLowerCase():!0,""}),W["max-age"]){var at=parseInt(W["max-age"],10);isNaN(at)?delete W["max-age"]:W["max-age"]=at}return W}var it=null;function ut(P){if(it==null){var R=P.navigator?P.navigator.userAgent:null;it=!!P.safari||!!(R&&(/\b(iPad|iPhone|iPod)\b/.test(R)||R.match("Safari")&&!R.match("Chrome")))}return it}function J(P){try{var R=a[P];return R.setItem("_mapbox_test_",1),R.removeItem("_mapbox_test_"),!0}catch{return!1}}function X(P){return a.btoa(encodeURIComponent(P).replace(/%([0-9A-F]{2})/g,function(R,W){return String.fromCharCode(+("0x"+W))}))}function tt(P){return decodeURIComponent(a.atob(P).split("").map(function(R){return"%"+("00"+R.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var V=a.performance&&a.performance.now?a.performance.now.bind(a.performance):Date.now.bind(Date),Q=a.requestAnimationFrame||a.mozRequestAnimationFrame||a.webkitRequestAnimationFrame||a.msRequestAnimationFrame,ot=a.cancelAnimationFrame||a.mozCancelAnimationFrame||a.webkitCancelAnimationFrame||a.msCancelAnimationFrame,$,Z,st={now:V,frame:function(R){var W=Q(R);return{cancel:function(){return ot(W)}}},getImageData:function(R,W){W===void 0&&(W=0);var at=a.document.createElement("canvas"),vt=at.getContext("2d");if(!vt)throw new Error("failed to create canvas 2d context");return at.width=R.width,at.height=R.height,vt.drawImage(R,0,0,R.width,R.height),vt.getImageData(-W,-W,R.width+2*W,R.height+2*W)},resolveURL:function(R){return $||($=a.document.createElement("a")),$.href=R,$.href},hardwareConcurrency:a.navigator&&a.navigator.hardwareConcurrency||4,get devicePixelRatio(){return a.devicePixelRatio},get prefersReducedMotion(){return a.matchMedia?(Z==null&&(Z=a.matchMedia("(prefers-reduced-motion: reduce)")),Z.matches):!1}},nt={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},ct={supported:!1,testSupport:bt},gt,Tt=!1,wt,Rt=!1;a.document&&(wt=a.document.createElement("img"),wt.onload=function(){gt&&At(gt),gt=null,Rt=!0},wt.onerror=function(){Tt=!0,gt=null},wt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function bt(P){Tt||!wt||(Rt?At(P):gt=P)}function At(P){var R=P.createTexture();P.bindTexture(P.TEXTURE_2D,R);try{if(P.texImage2D(P.TEXTURE_2D,0,P.RGBA,P.RGBA,P.UNSIGNED_BYTE,wt),P.isContextLost())return;ct.supported=!0}catch{}P.deleteTexture(R),Tt=!0}var mt="01";function Lt(){for(var P="1",R="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",W="",at=0;at<10;at++)W+=R[Math.floor(Math.random()*62)];var vt=12*60*60*1e3,St=[P,mt,W].join(""),Pt=Date.now()+vt;return{token:St,tokenExpiresAt:Pt}}var Ht=function(R,W){this._transformRequestFn=R,this._customAccessToken=W,this._createSkuToken()};Ht.prototype._createSkuToken=function(){var R=Lt();this._skuToken=R.token,this._skuTokenExpiresAt=R.tokenExpiresAt},Ht.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},Ht.prototype.transformRequest=function(R,W){return this._transformRequestFn?this._transformRequestFn(R,W)||{url:R}:{url:R}},Ht.prototype.normalizeStyleURL=function(R,W){if(!Ut(R))return R;var at=$t(R);return at.path="/styles/v1"+at.path,this._makeAPIURL(at,this._customAccessToken||W)},Ht.prototype.normalizeGlyphsURL=function(R,W){if(!Ut(R))return R;var at=$t(R);return at.path="/fonts/v1"+at.path,this._makeAPIURL(at,this._customAccessToken||W)},Ht.prototype.normalizeSourceURL=function(R,W){if(!Ut(R))return R;var at=$t(R);return at.path="/v4/"+at.authority+".json",at.params.push("secure"),this._makeAPIURL(at,this._customAccessToken||W)},Ht.prototype.normalizeSpriteURL=function(R,W,at,vt){var St=$t(R);return Ut(R)?(St.path="/styles/v1"+St.path+"/sprite"+W+at,this._makeAPIURL(St,this._customAccessToken||vt)):(St.path+=""+W+at,le(St))},Ht.prototype.normalizeTileURL=function(R,W){if(this._isSkuTokenExpired()&&this._createSkuToken(),R&&!Ut(R))return R;var at=$t(R),vt=/(\.(png|jpg)\d*)(?=$)/,St=/^.+\/v4\//,Pt=st.devicePixelRatio>=2||W===512?"@2x":"",te=ct.supported?".webp":"$1";at.path=at.path.replace(vt,""+Pt+te),at.path=at.path.replace(St,"/"),at.path="/v4"+at.path;var ye=this._customAccessToken||re(at.params)||nt.ACCESS_TOKEN;return nt.REQUIRE_ACCESS_TOKEN&&ye&&this._skuToken&&at.params.push("sku="+this._skuToken),this._makeAPIURL(at,ye)},Ht.prototype.canonicalizeTileURL=function(R,W){var at="/v4/",vt=/\.[\w]+$/,St=$t(R);if(!St.path.match(/(^\/v4\/)/)||!St.path.match(vt))return R;var Pt="mapbox://tiles/";Pt+=St.path.replace(at,"");var te=St.params;return W&&(te=te.filter(function(ye){return!ye.match(/^access_token=/)})),te.length&&(Pt+="?"+te.join("&")),Pt},Ht.prototype.canonicalizeTileset=function(R,W){for(var at=W?Ut(W):!1,vt=[],St=0,Pt=R.tiles||[];St=0&&R.params.splice(St,1)}if(vt.path!=="/"&&(R.path=""+vt.path+R.path),!nt.REQUIRE_ACCESS_TOKEN)return le(R);if(W=W||nt.ACCESS_TOKEN,!W)throw new Error("An API access token is required to use Mapbox GL. "+at);if(W[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+at);return R.params=R.params.filter(function(Pt){return Pt.indexOf("access_token")===-1}),R.params.push("access_token="+W),le(R)};function Ut(P){return P.indexOf("mapbox:")===0}var kt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Vt(P){return kt.test(P)}function It(P){return P.indexOf("sku=")>0&&Vt(P)}function re(P){for(var R=0,W=P;R=1&&a.localStorage.setItem(W,JSON.stringify(this.eventData))}catch{B("Unable to write to LocalStorage")}},xe.prototype.processRequests=function(R){},xe.prototype.postEvent=function(R,W,at,vt){var St=this;if(nt.EVENTS_URL){var Pt=$t(nt.EVENTS_URL);Pt.params.push("access_token="+(vt||nt.ACCESS_TOKEN||""));var te={event:this.type,created:new Date(R).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:x,skuId:mt,userId:this.anonId},ye=W?w(te,W):te,_e={url:le(Pt),headers:{"Content-Type":"text/plain"},body:JSON.stringify([ye])};this.pendingRequest=Ve(_e,function(Fe){St.pendingRequest=null,at(Fe),St.saveEventData(),St.processRequests(vt)})}},xe.prototype.queueRequest=function(R,W){this.queue.push(R),this.processRequests(W)};var Se=function(P){function R(){P.call(this,"map.load"),this.success={},this.skuToken=""}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.postMapLoadEvent=function(at,vt,St,Pt){this.skuToken=St,(nt.EVENTS_URL&&Pt||nt.ACCESS_TOKEN&&Array.isArray(at)&&at.some(function(te){return Ut(te)||Vt(te)}))&&this.queueRequest({id:vt,timestamp:Date.now()},Pt)},R.prototype.processRequests=function(at){var vt=this;if(!(this.pendingRequest||this.queue.length===0)){var St=this.queue.shift(),Pt=St.id,te=St.timestamp;Pt&&this.success[Pt]||(this.anonId||this.fetchEventData(),s(this.anonId)||(this.anonId=E()),this.postEvent(te,{skuToken:this.skuToken},function(ye){ye||Pt&&(vt.success[Pt]=!0)},at))}},R}(xe),ne=function(P){function R(W){P.call(this,"appUserTurnstile"),this._customAccessToken=W}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.postTurnstileEvent=function(at,vt){nt.EVENTS_URL&&nt.ACCESS_TOKEN&&Array.isArray(at)&&at.some(function(St){return Ut(St)||Vt(St)})&&this.queueRequest(Date.now(),vt)},R.prototype.processRequests=function(at){var vt=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var St=de(nt.ACCESS_TOKEN),Pt=St?St.u:nt.ACCESS_TOKEN,te=Pt!==this.eventData.tokenU;s(this.anonId)||(this.anonId=E(),te=!0);var ye=this.queue.shift();if(this.eventData.lastSuccess){var _e=new Date(this.eventData.lastSuccess),Fe=new Date(ye),je=(ye-this.eventData.lastSuccess)/(24*60*60*1e3);te=te||je>=1||je<-1||_e.getDate()!==Fe.getDate()}else te=!0;if(!te)return this.processRequests();this.postEvent(ye,{"enabled.telemetry":!1},function(ar){ar||(vt.eventData.lastSuccess=ye,vt.eventData.tokenU=Pt)},at)}},R}(xe),zt=new ne,Xt=zt.postTurnstileEvent.bind(zt),Jt=new Se,Wt=Jt.postMapLoadEvent.bind(Jt),Ft="mapbox-tiles",xt=500,yt=50,Et=1e3*60*7,Mt;function Nt(){a.caches&&!Mt&&(Mt=a.caches.open(Ft))}var jt;function ie(P,R){if(jt===void 0)try{new Response(new ReadableStream),jt=!0}catch{jt=!1}jt?R(P.body):P.blob().then(R)}function me(P,R,W){if(Nt(),!!Mt){var at={status:R.status,statusText:R.statusText,headers:new a.Headers};R.headers.forEach(function(Pt,te){return at.headers.set(te,Pt)});var vt=et(R.headers.get("Cache-Control")||"");if(!vt["no-store"]){vt["max-age"]&&at.headers.set("Expires",new Date(W+vt["max-age"]*1e3).toUTCString());var St=new Date(at.headers.get("Expires")).getTime()-W;StDate.now()&&!W["no-cache"]}var ce=1/0;function Te(P){ce++,ce>yt&&(P.getActor().send("enforceCacheSizeLimit",xt),ce=0)}function Be(P){Nt(),Mt&&Mt.then(function(R){R.keys().then(function(W){for(var at=0;at=200&&W.status<300||W.status===0)&&W.response!==null){var vt=W.response;if(P.type==="json")try{vt=JSON.parse(W.response)}catch(St){return R(St)}R(null,vt,W.getResponseHeader("Cache-Control"),W.getResponseHeader("Expires"))}else R(new $e(W.statusText,W.status,P.url))},W.send(P.body),{cancel:function(){return W.abort()}}}var Ie=function(P,R){if(!se(P.url)){if(a.fetch&&a.Request&&a.AbortController&&a.Request.prototype.hasOwnProperty("signal"))return Ae(P,R);if(j()&&self.worker&&self.worker.actor){var W=!0;return self.worker.actor.send("getResource",P,R,void 0,W)}}return Ce(P,R)},Pe=function(P,R){return Ie(w(P,{type:"json"}),R)},ke=function(P,R){return Ie(w(P,{type:"arrayBuffer"}),R)},Ve=function(P,R){return Ie(w(P,{method:"POST"}),R)};function Je(P){var R=a.document.createElement("a");return R.href=P,R.protocol===a.document.location.protocol&&R.host===a.document.location.host}var ur="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function hr(P,R,W,at){var vt=new a.Image,St=a.URL;vt.onload=function(){R(null,vt),St.revokeObjectURL(vt.src),vt.onload=null,a.requestAnimationFrame(function(){vt.src=ur})},vt.onerror=function(){return R(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var Pt=new a.Blob([new Uint8Array(P)],{type:"image/png"});vt.cacheControl=W,vt.expires=at,vt.src=P.byteLength?St.createObjectURL(Pt):ur}function vr(P,R){var W=new a.Blob([new Uint8Array(P)],{type:"image/png"});a.createImageBitmap(W).then(function(at){R(null,at)}).catch(function(at){R(new Error("Could not load image because of "+at.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Yt,Gt,Ne=function(){Yt=[],Gt=0};Ne();var Oe=function(P,R){if(ct.supported&&(P.headers||(P.headers={}),P.headers.accept="image/webp,*/*"),Gt>=nt.MAX_PARALLEL_IMAGE_REQUESTS){var W={requestParameters:P,callback:R,cancelled:!1,cancel:function(){this.cancelled=!0}};return Yt.push(W),W}Gt++;var at=!1,vt=function(){if(!at)for(at=!0,Gt--;Yt.length&&Gt0||this._oneTimeListeners&&this._oneTimeListeners[R]&&this._oneTimeListeners[R].length>0||this._eventedParent&&this._eventedParent.listens(R)},dr.prototype.setEventedParent=function(R,W){return this._eventedParent=R,this._eventedParentData=W,this};var mr=8,xr={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},pr={"*":{type:"source"}},Gr=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Pr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Dr={type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},cn={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},rn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},Cn={type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},En={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Tr={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Cr=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Wr={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ur={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},an={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},pn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},gn={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_n={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},kn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ni={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ci={type:"array",value:"*"},di={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},li={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},ri={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},wr={type:"array",value:"*",minimum:1},nn={anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},$r=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],dn={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},Vn={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Tn={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},An={"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Bn={"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},Jn={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},gi={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Di={"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},Sr={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},kr={"*":{type:"string"}},Ar={$version:mr,$root:xr,sources:pr,source:Gr,source_vector:Pr,source_raster:Dr,source_raster_dem:cn,source_geojson:rn,source_video:Cn,source_image:En,layer:Tr,layout:Cr,layout_background:Wr,layout_fill:Ur,layout_circle:an,layout_heatmap:pn,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:gn,layout_symbol:_n,layout_raster:kn,layout_hillshade:ni,filter:ci,filter_operator:di,geometry_type:li,function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:ri,expression:wr,light:nn,paint:$r,paint_fill:dn,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:Vn,paint_circle:Tn,paint_heatmap:An,paint_symbol:Bn,paint_raster:Jn,paint_hillshade:gi,paint_background:Di,transition:Sr,"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:kr},Or=function(R,W,at,vt){this.message=(R?R+": ":"")+at,vt&&(this.identifier=vt),W!=null&&W.__line__&&(this.line=W.__line__)};function xn(P){var R=P.key,W=P.value;return W?[new Or(R,W,"constants have been deprecated as of v8")]:[]}function In(P){for(var R=[],W=arguments.length-1;W-- >0;)R[W]=arguments[W+1];for(var at=0,vt=R;at":P.itemType.kind==="value"?"array":"array<"+R+">"}else return P.kind}var Eo=[Hr,Qr,wn,Ln,Pn,pi,Un,pa(On),Ci];function xo(P,R){if(R.kind==="error")return null;if(P.kind==="array"){if(R.kind==="array"&&(R.N===0&&R.itemType.kind==="value"||!xo(P.itemType,R.itemType))&&(typeof P.N!="number"||P.N===R.N))return null}else{if(P.kind===R.kind)return null;if(P.kind==="value")for(var W=0,at=Eo;W255?255:_e}function vt(_e){return _e<0?0:_e>1?1:_e}function St(_e){return _e[_e.length-1]==="%"?at(parseFloat(_e)/100*255):at(parseInt(_e))}function Pt(_e){return _e[_e.length-1]==="%"?vt(parseFloat(_e)/100):vt(parseFloat(_e))}function te(_e,Fe,je){return je<0?je+=1:je>1&&(je-=1),je*6<1?_e+(Fe-_e)*je*6:je*2<1?Fe:je*3<2?_e+(Fe-_e)*(2/3-je)*6:_e}function ye(_e){var Fe=_e.replace(/ /g,"").toLowerCase();if(Fe in W)return W[Fe].slice();if(Fe[0]==="#"){if(Fe.length===4){var je=parseInt(Fe.substr(1),16);return je>=0&&je<=4095?[(je&3840)>>4|(je&3840)>>8,je&240|(je&240)>>4,je&15|(je&15)<<4,1]:null}else if(Fe.length===7){var je=parseInt(Fe.substr(1),16);return je>=0&&je<=16777215?[(je&16711680)>>16,(je&65280)>>8,je&255,1]:null}return null}var ar=Fe.indexOf("("),tr=Fe.indexOf(")");if(ar!==-1&&tr+1===Fe.length){var yr=Fe.substr(0,ar),zr=Fe.substr(ar+1,tr-(ar+1)).split(","),ln=1;switch(yr){case"rgba":if(zr.length!==4)return null;ln=Pt(zr.pop());case"rgb":return zr.length!==3?null:[St(zr[0]),St(zr[1]),St(zr[2]),ln];case"hsla":if(zr.length!==4)return null;ln=Pt(zr.pop());case"hsl":if(zr.length!==3)return null;var tn=(parseFloat(zr[0])%360+360)%360/360,Sn=Pt(zr[1]),mn=Pt(zr[2]),Mn=mn<=.5?mn*(Sn+1):mn+Sn-mn*Sn,zn=mn*2-Mn;return[at(te(zn,Mn,tn+1/3)*255),at(te(zn,Mn,tn)*255),at(te(zn,Mn,tn-1/3)*255),ln];default:return null}}return null}try{R.parseCSSColor=ye}catch{}}),wf=Bu.parseCSSColor,$i=function(R,W,at,vt){vt===void 0&&(vt=1),this.r=R,this.g=W,this.b=at,this.a=vt};$i.parse=function(R){if(R){if(R instanceof $i)return R;if(typeof R=="string"){var W=wf(R);if(W)return new $i(W[0]/255*W[3],W[1]/255*W[3],W[2]/255*W[3],W[3])}}},$i.prototype.toString=function(){var R=this.toArray(),W=R[0],at=R[1],vt=R[2],St=R[3];return"rgba("+Math.round(W)+","+Math.round(at)+","+Math.round(vt)+","+St+")"},$i.prototype.toArray=function(){var R=this,W=R.r,at=R.g,vt=R.b,St=R.a;return St===0?[0,0,0,0]:[W*255/St,at*255/St,vt*255/St,St]},$i.black=new $i(0,0,0,1),$i.white=new $i(1,1,1,1),$i.transparent=new $i(0,0,0,0),$i.red=new $i(1,0,0,1);var Fl=function(R,W,at){R?this.sensitivity=W?"variant":"case":this.sensitivity=W?"accent":"base",this.locale=at,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Fl.prototype.compare=function(R,W){return this.collator.compare(R,W)},Fl.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Uu=function(R,W,at,vt,St){this.text=R,this.image=W,this.scale=at,this.fontStack=vt,this.textColor=St},Xa=function(R){this.sections=R};Xa.fromString=function(R){return new Xa([new Uu(R,null,null,null,null)])},Xa.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(R){return R.text.length!==0||R.image&&R.image.name.length!==0})},Xa.factory=function(R){return R instanceof Xa?R:Xa.fromString(R)},Xa.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(R){return R.text}).join("")},Xa.prototype.serialize=function(){for(var R=["format"],W=0,at=this.sections;W=0&&P<=255&&typeof R=="number"&&R>=0&&R<=255&&typeof W=="number"&&W>=0&&W<=255)){var vt=typeof at=="number"?[P,R,W,at]:[P,R,W];return"Invalid rgba value ["+vt.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof at>"u"||typeof at=="number"&&at>=0&&at<=1?null:"Invalid rgba value ["+[P,R,W,at].join(", ")+"]: 'a' must be between 0 and 1."}function vu(P){if(P===null)return!0;if(typeof P=="string")return!0;if(typeof P=="boolean")return!0;if(typeof P=="number")return!0;if(P instanceof $i)return!0;if(P instanceof Fl)return!0;if(P instanceof Xa)return!0;if(P instanceof ho)return!0;if(Array.isArray(P)){for(var R=0,W=P;R2){var te=R[1];if(typeof te!="string"||!(te in fl)||te==="object")return W.error('The item type argument of "array" must be one of string, number, boolean',1);Pt=fl[te],at++}else Pt=On;var ye;if(R.length>3){if(R[2]!==null&&(typeof R[2]!="number"||R[2]<0||R[2]!==Math.floor(R[2])))return W.error('The length argument to "array" must be a positive integer literal',2);ye=R[2],at++}vt=pa(Pt,ye)}else vt=fl[St];for(var _e=[];at1)&&W.push(vt)}}return W.concat(this.args.map(function(St){return St.serialize()}))};var qa=function(R){this.type=pi,this.sections=R};qa.parse=function(R,W){if(R.length<2)return W.error("Expected at least one argument.");var at=R[1];if(!Array.isArray(at)&&typeof at=="object")return W.error("First argument must be an image or text section.");for(var vt=[],St=!1,Pt=1;Pt<=R.length-1;++Pt){var te=R[Pt];if(St&&typeof te=="object"&&!Array.isArray(te)){St=!1;var ye=null;if(te["font-scale"]&&(ye=W.parse(te["font-scale"],1,Qr),!ye))return null;var _e=null;if(te["text-font"]&&(_e=W.parse(te["text-font"],1,pa(wn)),!_e))return null;var Fe=null;if(te["text-color"]&&(Fe=W.parse(te["text-color"],1,Pn),!Fe))return null;var je=vt[vt.length-1];je.scale=ye,je.font=_e,je.textColor=Fe}else{var ar=W.parse(R[Pt],1,On);if(!ar)return null;var tr=ar.type.kind;if(tr!=="string"&&tr!=="value"&&tr!=="null"&&tr!=="resolvedImage")return W.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");St=!0,vt.push({content:ar,scale:null,font:null,textColor:null})}}return new qa(vt)},qa.prototype.evaluate=function(R){var W=function(at){var vt=at.content.evaluate(R);return Ra(vt)===Ci?new Uu("",vt,null,null,null):new Uu(ul(vt),null,at.scale?at.scale.evaluate(R):null,at.font?at.font.evaluate(R).join(","):null,at.textColor?at.textColor.evaluate(R):null)};return new Xa(this.sections.map(W))},qa.prototype.eachChild=function(R){for(var W=0,at=this.sections;W-1),at},_o.prototype.eachChild=function(R){R(this.input)},_o.prototype.outputDefined=function(){return!1},_o.prototype.serialize=function(){return["image",this.input.serialize()]};var Tf={"to-boolean":Ln,"to-color":Pn,"to-number":Qr,"to-string":wn},bo=function(R,W){this.type=R,this.args=W};bo.parse=function(R,W){if(R.length<2)return W.error("Expected at least one argument.");var at=R[0];if((at==="to-boolean"||at==="to-string")&&R.length!==2)return W.error("Expected one argument.");for(var vt=Tf[at],St=[],Pt=1;Pt4?at="Invalid rbga value "+JSON.stringify(W)+": expected an array containing either three or four numeric values.":at=ll(W[0],W[1],W[2],W[3]),!at))return new $i(W[0]/255,W[1]/255,W[2]/255,W[3])}throw new Ua(at||"Could not parse color from value '"+(typeof W=="string"?W:String(JSON.stringify(W)))+"'")}else if(this.type.kind==="number"){for(var ye=null,_e=0,Fe=this.args;_e=R[2]||P[1]<=R[1]||P[3]>=R[3])}function bc(P,R){var W=Af(P[0]),at=xc(P[1]),vt=Math.pow(2,R.z);return[Math.round(W*vt*es),Math.round(at*vt*es)]}function wc(P,R,W){var at=P[0]-R[0],vt=P[1]-R[1],St=P[0]-W[0],Pt=P[1]-W[1];return at*Pt-St*vt===0&&at*St<=0&&vt*Pt<=0}function Tc(P,R,W){return R[1]>P[1]!=W[1]>P[1]&&P[0]<(W[0]-R[0])*(P[1]-R[1])/(W[1]-R[1])+R[0]}function Gu(P,R){for(var W=!1,at=0,vt=R.length;at0&&je<0||Fe<0&&je>0}function Sf(P,R,W,at){var vt=[R[0]-P[0],R[1]-P[1]],St=[at[0]-W[0],at[1]-W[1]];return Mc(St,vt)===0?!1:!!(Mf(P,R,W,at)&&Mf(W,at,P,R))}function Xs(P,R,W){for(var at=0,vt=W;atW[2]){var vt=at*.5,St=P[0]-W[0]>vt?-at:W[0]-P[0]>vt?at:0;St===0&&(St=P[0]-W[2]>vt?-at:W[2]-P[0]>vt?at:0),P[0]+=St}Vu(R,P)}function Sc(P){P[0]=P[1]=1/0,P[2]=P[3]=-1/0}function pu(P,R,W,at){for(var vt=Math.pow(2,at.z)*es,St=[at.x*es,at.y*es],Pt=[],te=0,ye=P;te=0)return!1;var W=!0;return P.eachChild(function(at){W&&!Ol(at,R)&&(W=!1)}),W}var Ls=function(R,W){this.type=W.type,this.name=R,this.boundExpression=W};Ls.parse=function(R,W){if(R.length!==2||typeof R[1]!="string")return W.error("'var' expression requires exactly one string literal argument.");var at=R[1];return W.scope.has(at)?new Ls(at,W.scope.get(at)):W.error('Unknown variable "'+at+'". Make sure "'+at+'" has been bound in an enclosing "let" expression before using it.',1)},Ls.prototype.evaluate=function(R){return this.boundExpression.evaluate(R)},Ls.prototype.eachChild=function(){},Ls.prototype.outputDefined=function(){return!1},Ls.prototype.serialize=function(){return["var",this.name]};var rs=function(R,W,at,vt,St){W===void 0&&(W=[]),vt===void 0&&(vt=new Zr),St===void 0&&(St=[]),this.registry=R,this.path=W,this.key=W.map(function(Pt){return"["+Pt+"]"}).join(""),this.scope=vt,this.errors=St,this.expectedType=at};rs.prototype.parse=function(R,W,at,vt,St){return St===void 0&&(St={}),W?this.concat(W,at,vt)._parse(R,St):this._parse(R,St)},rs.prototype._parse=function(R,W){(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number")&&(R=["literal",R]);function at(Fe,je,ar){return ar==="assert"?new $a(je,[Fe]):ar==="coerce"?new bo(je,[Fe]):Fe}if(Array.isArray(R)){if(R.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var vt=R[0];if(typeof vt!="string")return this.error("Expression name must be a string, but found "+typeof vt+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var St=this.registry[vt];if(St){var Pt=St.parse(R,this);if(!Pt)return null;if(this.expectedType){var te=this.expectedType,ye=Pt.type;if((te.kind==="string"||te.kind==="number"||te.kind==="boolean"||te.kind==="object"||te.kind==="array")&&ye.kind==="value")Pt=at(Pt,te,W.typeAnnotation||"assert");else if((te.kind==="color"||te.kind==="formatted"||te.kind==="resolvedImage")&&(ye.kind==="value"||ye.kind==="string"))Pt=at(Pt,te,W.typeAnnotation||"coerce");else if(this.checkSubtype(te,ye))return null}if(!(Pt instanceof za)&&Pt.type.kind!=="resolvedImage"&&Wu(Pt)){var _e=new ts;try{Pt=new za(Pt.type,Pt.evaluate(_e))}catch(Fe){return this.error(Fe.message),null}}return Pt}return this.error('Unknown expression "'+vt+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof R>"u"?this.error("'undefined' value invalid. Use null instead."):typeof R=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof R+" instead.")},rs.prototype.concat=function(R,W,at){var vt=typeof R=="number"?this.path.concat(R):this.path,St=at?this.scope.concat(at):this.scope;return new rs(this.registry,vt,W||null,St,this.errors)},rs.prototype.error=function(R){for(var W=[],at=arguments.length-1;at-- >0;)W[at]=arguments[at+1];var vt=""+this.key+W.map(function(St){return"["+St+"]"}).join("");this.errors.push(new Er(vt,R))},rs.prototype.checkSubtype=function(R,W){var at=xo(R,W);return at&&this.error(at),at};function Wu(P){if(P instanceof Ls)return Wu(P.boundExpression);if(P instanceof Za&&P.name==="error")return!1;if(P instanceof Cs)return!1;if(P instanceof Uo)return!1;var R=P instanceof bo||P instanceof $a,W=!0;return P.eachChild(function(at){R?W=W&&Wu(at):W=W&&at instanceof za}),W?hl(P)&&Ol(P,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function vl(P,R){for(var W=P.length-1,at=0,vt=W,St=0,Pt,te;at<=vt;)if(St=Math.floor((at+vt)/2),Pt=P[St],te=P[St+1],Pt<=R){if(St===W||RR)vt=St-1;else throw new Ua("Input is not a number.");return 0}var Ho=function(R,W,at){this.type=R,this.input=W,this.labels=[],this.outputs=[];for(var vt=0,St=at;vt=te)return W.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',_e);var je=W.parse(ye,Fe,St);if(!je)return null;St=St||je.type,vt.push([te,je])}return new Ho(St,at,vt)},Ho.prototype.evaluate=function(R){var W=this.labels,at=this.outputs;if(W.length===1)return at[0].evaluate(R);var vt=this.input.evaluate(R);if(vt<=W[0])return at[0].evaluate(R);var St=W.length;if(vt>=W[St-1])return at[St-1].evaluate(R);var Pt=vl(W,vt);return at[Pt].evaluate(R)},Ho.prototype.eachChild=function(R){R(this.input);for(var W=0,at=this.outputs;W0&&R.push(this.labels[W]),R.push(this.outputs[W].serialize());return R};function Ca(P,R,W){return P*(1-W)+R*W}function Yu(P,R,W){return new $i(Ca(P.r,R.r,W),Ca(P.g,R.g,W),Ca(P.b,R.b,W),Ca(P.a,R.a,W))}function Ec(P,R,W){return P.map(function(at,vt){return Ca(at,R[vt],W)})}var mu=Object.freeze({__proto__:null,number:Ca,color:Yu,array:Ec}),dl=.95047,pl=1,wo=1.08883,yu=4/29,ml=6/29,xu=3*ml*ml,_c=ml*ml*ml,Lf=Math.PI/180,Xu=180/Math.PI;function Zu(P){return P>_c?Math.pow(P,.3333333333333333):P/xu+yu}function ju(P){return P>ml?P*P*P:xu*(P-yu)}function yl(P){return 255*(P<=.0031308?12.92*P:1.055*Math.pow(P,.4166666666666667)-.055)}function bu(P){return P/=255,P<=.04045?P/12.92:Math.pow((P+.055)/1.055,2.4)}function Nl(P){var R=bu(P.r),W=bu(P.g),at=bu(P.b),vt=Zu((.4124564*R+.3575761*W+.1804375*at)/dl),St=Zu((.2126729*R+.7151522*W+.072175*at)/pl),Pt=Zu((.0193339*R+.119192*W+.9503041*at)/wo);return{l:116*St-16,a:500*(vt-St),b:200*(St-Pt),alpha:P.a}}function wu(P){var R=(P.l+16)/116,W=isNaN(P.a)?R:R+P.a/500,at=isNaN(P.b)?R:R-P.b/200;return R=pl*ju(R),W=dl*ju(W),at=wo*ju(at),new $i(yl(3.2404542*W-1.5371385*R-.4985314*at),yl(-.969266*W+1.8760108*R+.041556*at),yl(.0556434*W-.2040259*R+1.0572252*at),P.alpha)}function ga(P,R,W){return{l:Ca(P.l,R.l,W),a:Ca(P.a,R.a,W),b:Ca(P.b,R.b,W),alpha:Ca(P.alpha,R.alpha,W)}}function Pf(P){var R=Nl(P),W=R.l,at=R.a,vt=R.b,St=Math.atan2(vt,at)*Xu;return{h:St<0?St+360:St,c:Math.sqrt(at*at+vt*vt),l:W,alpha:P.a}}function Vo(P){var R=P.h*Lf,W=P.c,at=P.l;return wu({l:at,a:Math.cos(R)*W,b:Math.sin(R)*W,alpha:P.alpha})}function Rf(P,R,W){var at=R-P;return P+W*(at>180||at<-180?at-360*Math.round(at/360):at)}function Ku(P,R,W){return{h:Rf(P.h,R.h,W),c:Ca(P.c,R.c,W),l:Ca(P.l,R.l,W),alpha:Ca(P.alpha,R.alpha,W)}}var js={forward:Nl,reverse:wu,interpolate:ga},Ps={forward:Pf,reverse:Vo,interpolate:Ku},Tu=Object.freeze({__proto__:null,lab:js,hcl:Ps}),Da=function(R,W,at,vt,St){this.type=R,this.operator=W,this.interpolation=at,this.input=vt,this.labels=[],this.outputs=[];for(var Pt=0,te=St;Pt1}))return W.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);vt={name:"cubic-bezier",controlPoints:ye}}else return W.error("Unknown interpolation type "+String(vt[0]),1,0);if(R.length-1<4)return W.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if((R.length-1)%2!==0)return W.error("Expected an even number of arguments.");if(St=W.parse(St,2,Qr),!St)return null;var _e=[],Fe=null;at==="interpolate-hcl"||at==="interpolate-lab"?Fe=Pn:W.expectedType&&W.expectedType.kind!=="value"&&(Fe=W.expectedType);for(var je=0;je=ar)return W.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',yr);var ln=W.parse(tr,zr,Fe);if(!ln)return null;Fe=Fe||ln.type,_e.push([ar,ln])}return Fe.kind!=="number"&&Fe.kind!=="color"&&!(Fe.kind==="array"&&Fe.itemType.kind==="number"&&typeof Fe.N=="number")?W.error("Type "+ea(Fe)+" is not interpolatable."):new Da(Fe,at,vt,St,_e)},Da.prototype.evaluate=function(R){var W=this.labels,at=this.outputs;if(W.length===1)return at[0].evaluate(R);var vt=this.input.evaluate(R);if(vt<=W[0])return at[0].evaluate(R);var St=W.length;if(vt>=W[St-1])return at[St-1].evaluate(R);var Pt=vl(W,vt),te=W[Pt],ye=W[Pt+1],_e=Da.interpolationFactor(this.interpolation,vt,te,ye),Fe=at[Pt].evaluate(R),je=at[Pt+1].evaluate(R);return this.operator==="interpolate"?mu[this.type.kind.toLowerCase()](Fe,je,_e):this.operator==="interpolate-hcl"?Ps.reverse(Ps.interpolate(Ps.forward(Fe),Ps.forward(je),_e)):js.reverse(js.interpolate(js.forward(Fe),js.forward(je),_e))},Da.prototype.eachChild=function(R){R(this.input);for(var W=0,at=this.outputs;W=at.length)throw new Ua("Array index out of bounds: "+W+" > "+(at.length-1)+".");if(W!==Math.floor(W))throw new Ua("Array index must be an integer, but found "+W+" instead.");return at[W]},Ks.prototype.eachChild=function(R){R(this.index),R(this.input)},Ks.prototype.outputDefined=function(){return!1},Ks.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Rs=function(R,W){this.type=Ln,this.needle=R,this.haystack=W};Rs.parse=function(R,W){if(R.length!==3)return W.error("Expected 2 arguments, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1,On),vt=W.parse(R[2],2,On);return!at||!vt?null:Qa(at.type,[Ln,wn,Qr,Hr,On])?new Rs(at,vt):W.error("Expected first argument to be of type boolean, string, number or null, but found "+ea(at.type)+" instead")},Rs.prototype.evaluate=function(R){var W=this.needle.evaluate(R),at=this.haystack.evaluate(R);if(!at)return!1;if(!sl(W,["boolean","string","number","null"]))throw new Ua("Expected first argument to be of type boolean, string, number or null, but found "+ea(Ra(W))+" instead.");if(!sl(at,["string","array"]))throw new Ua("Expected second argument to be of type array or string, but found "+ea(Ra(at))+" instead.");return at.indexOf(W)>=0},Rs.prototype.eachChild=function(R){R(this.needle),R(this.haystack)},Rs.prototype.outputDefined=function(){return!0},Rs.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Wo=function(R,W,at){this.type=Qr,this.needle=R,this.haystack=W,this.fromIndex=at};Wo.parse=function(R,W){if(R.length<=2||R.length>=5)return W.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1,On),vt=W.parse(R[2],2,On);if(!at||!vt)return null;if(!Qa(at.type,[Ln,wn,Qr,Hr,On]))return W.error("Expected first argument to be of type boolean, string, number or null, but found "+ea(at.type)+" instead");if(R.length===4){var St=W.parse(R[3],3,Qr);return St?new Wo(at,vt,St):null}else return new Wo(at,vt)},Wo.prototype.evaluate=function(R){var W=this.needle.evaluate(R),at=this.haystack.evaluate(R);if(!sl(W,["boolean","string","number","null"]))throw new Ua("Expected first argument to be of type boolean, string, number or null, but found "+ea(Ra(W))+" instead.");if(!sl(at,["string","array"]))throw new Ua("Expected second argument to be of type array or string, but found "+ea(Ra(at))+" instead.");if(this.fromIndex){var vt=this.fromIndex.evaluate(R);return at.indexOf(W,vt)}return at.indexOf(W)},Wo.prototype.eachChild=function(R){R(this.needle),R(this.haystack),this.fromIndex&&R(this.fromIndex)},Wo.prototype.outputDefined=function(){return!1},Wo.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var R=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),R]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ps=function(R,W,at,vt,St,Pt){this.inputType=R,this.type=W,this.input=at,this.cases=vt,this.outputs=St,this.otherwise=Pt};ps.parse=function(R,W){if(R.length<5)return W.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if(R.length%2!==1)return W.error("Expected an even number of arguments.");var at,vt;W.expectedType&&W.expectedType.kind!=="value"&&(vt=W.expectedType);for(var St={},Pt=[],te=2;teNumber.MAX_SAFE_INTEGER)return Fe.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof tr=="number"&&Math.floor(tr)!==tr)return Fe.error("Numeric branch labels must be integer values.");if(!at)at=Ra(tr);else if(Fe.checkSubtype(at,Ra(tr)))return null;if(typeof St[String(tr)]<"u")return Fe.error("Branch labels must be unique.");St[String(tr)]=Pt.length}var yr=W.parse(_e,te,vt);if(!yr)return null;vt=vt||yr.type,Pt.push(yr)}var zr=W.parse(R[1],1,On);if(!zr)return null;var ln=W.parse(R[R.length-1],R.length-1,vt);return!ln||zr.type.kind!=="value"&&W.concat(1).checkSubtype(at,zr.type)?null:new ps(at,vt,zr,St,Pt,ln)},ps.prototype.evaluate=function(R){var W=this.input.evaluate(R),at=Ra(W)===this.inputType&&this.outputs[this.cases[W]]||this.otherwise;return at.evaluate(R)},ps.prototype.eachChild=function(R){R(this.input),this.outputs.forEach(R),R(this.otherwise)},ps.prototype.outputDefined=function(){return this.outputs.every(function(R){return R.outputDefined()})&&this.otherwise.outputDefined()},ps.prototype.serialize=function(){for(var R=this,W=["match",this.input.serialize()],at=Object.keys(this.cases).sort(),vt=[],St={},Pt=0,te=at;Pt=5)return W.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1,On),vt=W.parse(R[2],2,Qr);if(!at||!vt)return null;if(!Qa(at.type,[pa(On),wn,On]))return W.error("Expected first argument to be of type array or string, but found "+ea(at.type)+" instead");if(R.length===4){var St=W.parse(R[3],3,Qr);return St?new Do(at.type,at,vt,St):null}else return new Do(at.type,at,vt)},Do.prototype.evaluate=function(R){var W=this.input.evaluate(R),at=this.beginIndex.evaluate(R);if(!sl(W,["string","array"]))throw new Ua("Expected first argument to be of type array or string, but found "+ea(Ra(W))+" instead.");if(this.endIndex){var vt=this.endIndex.evaluate(R);return W.slice(at,vt)}return W.slice(at)},Do.prototype.eachChild=function(R){R(this.input),R(this.beginIndex),this.endIndex&&R(this.endIndex)},Do.prototype.outputDefined=function(){return!1},Do.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var R=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),R]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function Ul(P,R){return P==="=="||P==="!="?R.kind==="boolean"||R.kind==="string"||R.kind==="number"||R.kind==="null"||R.kind==="value":R.kind==="string"||R.kind==="number"||R.kind==="value"}function Cc(P,R,W){return R===W}function Lc(P,R,W){return R!==W}function Pc(P,R,W){return RW}function Ju(P,R,W){return R<=W}function Df(P,R,W){return R>=W}function xl(P,R,W,at){return at.compare(R,W)===0}function ja(P,R,W,at){return!xl(P,R,W,at)}function Co(P,R,W,at){return at.compare(R,W)<0}function bl(P,R,W,at){return at.compare(R,W)>0}function If(P,R,W,at){return at.compare(R,W)<=0}function Hl(P,R,W,at){return at.compare(R,W)>=0}function gs(P,R,W){var at=P!=="=="&&P!=="!=";return function(){function vt(St,Pt,te){this.type=Ln,this.lhs=St,this.rhs=Pt,this.collator=te,this.hasUntypedArgument=St.type.kind==="value"||Pt.type.kind==="value"}return vt.parse=function(Pt,te){if(Pt.length!==3&&Pt.length!==4)return te.error("Expected two or three arguments.");var ye=Pt[0],_e=te.parse(Pt[1],1,On);if(!_e)return null;if(!Ul(ye,_e.type))return te.concat(1).error('"'+ye+`" comparisons are not supported for type '`+ea(_e.type)+"'.");var Fe=te.parse(Pt[2],2,On);if(!Fe)return null;if(!Ul(ye,Fe.type))return te.concat(2).error('"'+ye+`" comparisons are not supported for type '`+ea(Fe.type)+"'.");if(_e.type.kind!==Fe.type.kind&&_e.type.kind!=="value"&&Fe.type.kind!=="value")return te.error("Cannot compare types '"+ea(_e.type)+"' and '"+ea(Fe.type)+"'.");at&&(_e.type.kind==="value"&&Fe.type.kind!=="value"?_e=new $a(Fe.type,[_e]):_e.type.kind!=="value"&&Fe.type.kind==="value"&&(Fe=new $a(_e.type,[Fe])));var je=null;if(Pt.length===4){if(_e.type.kind!=="string"&&Fe.type.kind!=="string"&&_e.type.kind!=="value"&&Fe.type.kind!=="value")return te.error("Cannot use collator to compare non-string types.");if(je=te.parse(Pt[3],3,ai),!je)return null}return new vt(_e,Fe,je)},vt.prototype.evaluate=function(Pt){var te=this.lhs.evaluate(Pt),ye=this.rhs.evaluate(Pt);if(at&&this.hasUntypedArgument){var _e=Ra(te),Fe=Ra(ye);if(_e.kind!==Fe.kind||!(_e.kind==="string"||_e.kind==="number"))throw new Ua('Expected arguments for "'+P+'" to be (string, string) or (number, number), but found ('+_e.kind+", "+Fe.kind+") instead.")}if(this.collator&&!at&&this.hasUntypedArgument){var je=Ra(te),ar=Ra(ye);if(je.kind!=="string"||ar.kind!=="string")return R(Pt,te,ye)}return this.collator?W(Pt,te,ye,this.collator.evaluate(Pt)):R(Pt,te,ye)},vt.prototype.eachChild=function(Pt){Pt(this.lhs),Pt(this.rhs),this.collator&&Pt(this.collator)},vt.prototype.outputDefined=function(){return!0},vt.prototype.serialize=function(){var Pt=[P];return this.eachChild(function(te){Pt.push(te.serialize())}),Pt},vt}()}var Dc=gs("==",Cc,xl),Ff=gs("!=",Lc,ja),zf=gs("<",Pc,Co),Qu=gs(">",Rc,bl),kf=gs("<=",Ju,If),vo=gs(">=",Df,Hl),Xo=function(R,W,at,vt,St){this.type=wn,this.number=R,this.locale=W,this.currency=at,this.minFractionDigits=vt,this.maxFractionDigits=St};Xo.parse=function(R,W){if(R.length!==3)return W.error("Expected two arguments.");var at=W.parse(R[1],1,Qr);if(!at)return null;var vt=R[2];if(typeof vt!="object"||Array.isArray(vt))return W.error("NumberFormat options argument must be an object.");var St=null;if(vt.locale&&(St=W.parse(vt.locale,1,wn),!St))return null;var Pt=null;if(vt.currency&&(Pt=W.parse(vt.currency,1,wn),!Pt))return null;var te=null;if(vt["min-fraction-digits"]&&(te=W.parse(vt["min-fraction-digits"],1,Qr),!te))return null;var ye=null;return vt["max-fraction-digits"]&&(ye=W.parse(vt["max-fraction-digits"],1,Qr),!ye)?null:new Xo(at,St,Pt,te,ye)},Xo.prototype.evaluate=function(R){return new Intl.NumberFormat(this.locale?this.locale.evaluate(R):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(R):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(R):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(R):void 0}).format(this.number.evaluate(R))},Xo.prototype.eachChild=function(R){R(this.number),this.locale&&R(this.locale),this.currency&&R(this.currency),this.minFractionDigits&&R(this.minFractionDigits),this.maxFractionDigits&&R(this.maxFractionDigits)},Xo.prototype.outputDefined=function(){return!1},Xo.prototype.serialize=function(){var R={};return this.locale&&(R.locale=this.locale.serialize()),this.currency&&(R.currency=this.currency.serialize()),this.minFractionDigits&&(R["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(R["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),R]};var Ds=function(R){this.type=Qr,this.input=R};Ds.parse=function(R,W){if(R.length!==2)return W.error("Expected 1 argument, but found "+(R.length-1)+" instead.");var at=W.parse(R[1],1);return at?at.type.kind!=="array"&&at.type.kind!=="string"&&at.type.kind!=="value"?W.error("Expected argument of type string or array, but found "+ea(at.type)+" instead."):new Ds(at):null},Ds.prototype.evaluate=function(R){var W=this.input.evaluate(R);if(typeof W=="string")return W.length;if(Array.isArray(W))return W.length;throw new Ua("Expected value to be of type string or array, but found "+ea(Ra(W))+" instead.")},Ds.prototype.eachChild=function(R){R(this.input)},Ds.prototype.outputDefined=function(){return!1},Ds.prototype.serialize=function(){var R=["length"];return this.eachChild(function(W){R.push(W.serialize())}),R};var wl={"==":Dc,"!=":Ff,">":Qu,"<":zf,">=":vo,"<=":kf,array:$a,at:Ks,boolean:$a,case:Yo,coalesce:Go,collator:Cs,format:qa,image:_o,in:Rs,"index-of":Wo,interpolate:Da,"interpolate-hcl":Da,"interpolate-lab":Da,length:Ds,let:ds,literal:za,match:ps,number:$a,"number-format":Xo,object:$a,slice:Do,step:Ho,string:$a,"to-boolean":bo,"to-color":bo,"to-number":bo,"to-string":bo,var:Ls,within:Uo};function Au(P,R){var W=R[0],at=R[1],vt=R[2],St=R[3];W=W.evaluate(P),at=at.evaluate(P),vt=vt.evaluate(P);var Pt=St?St.evaluate(P):1,te=ll(W,at,vt,Pt);if(te)throw new Ua(te);return new $i(W/255*Pt,at/255*Pt,vt/255*Pt,Pt)}function Js(P,R){return P in R}function Qs(P,R){var W=R[P];return typeof W>"u"?null:W}function Of(P,R,W,at){for(;W<=at;){var vt=W+at>>1;if(R[vt]===P)return!0;R[vt]>P?at=vt-1:W=vt+1}return!1}function ms(P){return{type:P}}Za.register(wl,{error:[mi,[wn],function(P,R){var W=R[0];throw new Ua(W.evaluate(P))}],typeof:[wn,[On],function(P,R){var W=R[0];return ea(Ra(W.evaluate(P)))}],"to-rgba":[pa(Qr,4),[Pn],function(P,R){var W=R[0];return W.evaluate(P).toArray()}],rgb:[Pn,[Qr,Qr,Qr],Au],rgba:[Pn,[Qr,Qr,Qr,Qr],Au],has:{type:Ln,overloads:[[[wn],function(P,R){var W=R[0];return Js(W.evaluate(P),P.properties())}],[[wn,Un],function(P,R){var W=R[0],at=R[1];return Js(W.evaluate(P),at.evaluate(P))}]]},get:{type:On,overloads:[[[wn],function(P,R){var W=R[0];return Qs(W.evaluate(P),P.properties())}],[[wn,Un],function(P,R){var W=R[0],at=R[1];return Qs(W.evaluate(P),at.evaluate(P))}]]},"feature-state":[On,[wn],function(P,R){var W=R[0];return Qs(W.evaluate(P),P.featureState||{})}],properties:[Un,[],function(P){return P.properties()}],"geometry-type":[wn,[],function(P){return P.geometryType()}],id:[On,[],function(P){return P.id()}],zoom:[Qr,[],function(P){return P.globals.zoom}],"heatmap-density":[Qr,[],function(P){return P.globals.heatmapDensity||0}],"line-progress":[Qr,[],function(P){return P.globals.lineProgress||0}],accumulated:[On,[],function(P){return P.globals.accumulated===void 0?null:P.globals.accumulated}],"+":[Qr,ms(Qr),function(P,R){for(var W=0,at=0,vt=R;at":[Ln,[wn,On],function(P,R){var W=R[0],at=R[1],vt=P.properties()[W.value],St=at.value;return typeof vt==typeof St&&vt>St}],"filter-id->":[Ln,[On],function(P,R){var W=R[0],at=P.id(),vt=W.value;return typeof at==typeof vt&&at>vt}],"filter-<=":[Ln,[wn,On],function(P,R){var W=R[0],at=R[1],vt=P.properties()[W.value],St=at.value;return typeof vt==typeof St&&vt<=St}],"filter-id-<=":[Ln,[On],function(P,R){var W=R[0],at=P.id(),vt=W.value;return typeof at==typeof vt&&at<=vt}],"filter->=":[Ln,[wn,On],function(P,R){var W=R[0],at=R[1],vt=P.properties()[W.value],St=at.value;return typeof vt==typeof St&&vt>=St}],"filter-id->=":[Ln,[On],function(P,R){var W=R[0],at=P.id(),vt=W.value;return typeof at==typeof vt&&at>=vt}],"filter-has":[Ln,[On],function(P,R){var W=R[0];return W.value in P.properties()}],"filter-has-id":[Ln,[],function(P){return P.id()!==null&&P.id()!==void 0}],"filter-type-in":[Ln,[pa(wn)],function(P,R){var W=R[0];return W.value.indexOf(P.geometryType())>=0}],"filter-id-in":[Ln,[pa(On)],function(P,R){var W=R[0];return W.value.indexOf(P.id())>=0}],"filter-in-small":[Ln,[wn,pa(On)],function(P,R){var W=R[0],at=R[1];return at.value.indexOf(P.properties()[W.value])>=0}],"filter-in-large":[Ln,[wn,pa(On)],function(P,R){var W=R[0],at=R[1];return Of(P.properties()[W.value],at.value,0,at.value.length-1)}],all:{type:Ln,overloads:[[[Ln,Ln],function(P,R){var W=R[0],at=R[1];return W.evaluate(P)&&at.evaluate(P)}],[ms(Ln),function(P,R){for(var W=0,at=R;W-1}function Al(P){return!!P.expression&&P.expression.interpolated}function va(P){return P instanceof Number?"number":P instanceof String?"string":P instanceof Boolean?"boolean":Array.isArray(P)?"array":P===null?"null":typeof P}function Ml(P){return typeof P=="object"&&P!==null&&!Array.isArray(P)}function Mu(P){return P}function Nf(P,R){var W=R.type==="color",at=P.stops&&typeof P.stops[0][0]=="object",vt=at||P.property!==void 0,St=at||!vt,Pt=P.type||(Al(R)?"exponential":"interval");if(W&&(P=In({},P),P.stops&&(P.stops=P.stops.map(function($n){return[$n[0],$i.parse($n[1])]})),P.default?P.default=$i.parse(P.default):P.default=$i.parse(R.default)),P.colorSpace&&P.colorSpace!=="rgb"&&!Tu[P.colorSpace])throw new Error("Unknown color space: "+P.colorSpace);var te,ye,_e;if(Pt==="exponential")te=$u;else if(Pt==="interval")te=Su;else if(Pt==="categorical"){te=Gl,ye=Object.create(null);for(var Fe=0,je=P.stops;Fe=P.stops[at-1][0])return P.stops[at-1][1];var vt=vl(P.stops.map(function(St){return St[0]}),W);return P.stops[vt][1]}function $u(P,R,W){var at=P.base!==void 0?P.base:1;if(va(W)!=="number")return Sl(P.default,R.default);var vt=P.stops.length;if(vt===1||W<=P.stops[0][0])return P.stops[0][1];if(W>=P.stops[vt-1][0])return P.stops[vt-1][1];var St=vl(P.stops.map(function(je){return je[0]}),W),Pt=Yl(W,at,P.stops[St][0],P.stops[St+1][0]),te=P.stops[St][1],ye=P.stops[St+1][1],_e=mu[R.type]||Mu;if(P.colorSpace&&P.colorSpace!=="rgb"){var Fe=Tu[P.colorSpace];_e=function(je,ar){return Fe.reverse(Fe.interpolate(Fe.forward(je),Fe.forward(ar),Pt))}}return typeof te.evaluate=="function"?{evaluate:function(){for(var ar=[],tr=arguments.length;tr--;)ar[tr]=arguments[tr];var yr=te.evaluate.apply(void 0,ar),zr=ye.evaluate.apply(void 0,ar);if(!(yr===void 0||zr===void 0))return _e(yr,zr,Pt)}}:_e(te,ye,Pt)}function Wl(P,R,W){return R.type==="color"?W=$i.parse(W):R.type==="formatted"?W=Xa.fromString(W.toString()):R.type==="resolvedImage"?W=ho.fromString(W.toString()):va(W)!==R.type&&(R.type!=="enum"||!R.values[W])&&(W=void 0),Sl(W,P.default,R.default)}function Yl(P,R,W,at){var vt=at-W,St=P-W;return vt===0?0:R===1?St/vt:(Math.pow(R,St)-1)/(Math.pow(R,vt)-1)}var Fs=function(R,W){this.expression=R,this._warningHistory={},this._evaluator=new ts,this._defaultValue=W?Bf(W):null,this._enumValues=W&&W.type==="enum"?W.values:null};Fs.prototype.evaluateWithoutErrorHandling=function(R,W,at,vt,St,Pt){return this._evaluator.globals=R,this._evaluator.feature=W,this._evaluator.featureState=at,this._evaluator.canonical=vt,this._evaluator.availableImages=St||null,this._evaluator.formattedSection=Pt,this.expression.evaluate(this._evaluator)},Fs.prototype.evaluate=function(R,W,at,vt,St,Pt){this._evaluator.globals=R,this._evaluator.feature=W||null,this._evaluator.featureState=at||null,this._evaluator.canonical=vt,this._evaluator.availableImages=St||null,this._evaluator.formattedSection=Pt||null;try{var te=this.expression.evaluate(this._evaluator);if(te==null||typeof te=="number"&&te!==te)return this._defaultValue;if(this._enumValues&&!(te in this._enumValues))throw new Ua("Expected value to be one of "+Object.keys(this._enumValues).map(function(ye){return JSON.stringify(ye)}).join(", ")+", but found "+JSON.stringify(te)+" instead.");return te}catch(ye){return this._warningHistory[ye.message]||(this._warningHistory[ye.message]=!0,typeof console<"u"&&console.warn(ye.message)),this._defaultValue}};function Xl(P){return Array.isArray(P)&&P.length>0&&typeof P[0]=="string"&&P[0]in wl}function zs(P,R){var W=new rs(wl,[],R?Ic(R):void 0),at=W.parse(P,void 0,void 0,void 0,R&&R.type==="string"?{typeAnnotation:"coerce"}:void 0);return at?Tl(new Fs(at,R)):Is(W.errors)}var Ha=function(R,W){this.kind=R,this._styleExpression=W,this.isStateDependent=R!=="constant"&&!Zs(W.expression)};Ha.prototype.evaluateWithoutErrorHandling=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluateWithoutErrorHandling(R,W,at,vt,St,Pt)},Ha.prototype.evaluate=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluate(R,W,at,vt,St,Pt)};var ns=function(R,W,at,vt){this.kind=R,this.zoomStops=at,this._styleExpression=W,this.isStateDependent=R!=="camera"&&!Zs(W.expression),this.interpolationType=vt};ns.prototype.evaluateWithoutErrorHandling=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluateWithoutErrorHandling(R,W,at,vt,St,Pt)},ns.prototype.evaluate=function(R,W,at,vt,St,Pt){return this._styleExpression.evaluate(R,W,at,vt,St,Pt)},ns.prototype.interpolationFactor=function(R,W,at){return this.interpolationType?Da.interpolationFactor(this.interpolationType,R,W,at):0};function qu(P,R){if(P=zs(P,R),P.result==="error")return P;var W=P.value.expression,at=hl(W);if(!at&&!ys(R))return Is([new Er("","data expressions not supported")]);var vt=Ol(W,["zoom"]);if(!vt&&!Vl(R))return Is([new Er("","zoom expressions not supported")]);var St=Zl(W);if(!St&&!vt)return Is([new Er("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(St instanceof Er)return Is([St]);if(St instanceof Da&&!Al(R))return Is([new Er("",'"interpolate" expressions cannot be used with this property')]);if(!St)return Tl(at?new Ha("constant",P.value):new Ha("source",P.value));var Pt=St instanceof Da?St.interpolation:void 0;return Tl(at?new ns("camera",P.value,St.labels,Pt):new ns("composite",P.value,St.labels,Pt))}var $s=function(R,W){this._parameters=R,this._specification=W,In(this,Nf(this._parameters,this._specification))};$s.deserialize=function(R){return new $s(R._parameters,R._specification)},$s.serialize=function(R){return{_parameters:R._parameters,_specification:R._specification}};function Eu(P,R){if(Ml(P))return new $s(P,R);if(Xl(P)){var W=qu(P,R);if(W.result==="error")throw new Error(W.value.map(function(vt){return vt.key+": "+vt.message}).join(", "));return W.value}else{var at=P;return typeof P=="string"&&R.type==="color"&&(at=$i.parse(P)),{kind:"constant",evaluate:function(){return at}}}}function Zl(P){var R=null;if(P instanceof ds)R=Zl(P.result);else if(P instanceof Go)for(var W=0,at=P.args;Wat.maximum?[new Or(R,W,W+" is greater than the maximum value "+at.maximum)]:[]}function Uf(P){var R=P.valueSpec,W=hn(P.value.type),at,vt={},St,Pt,te=W!=="categorical"&&P.value.property===void 0,ye=!te,_e=va(P.value.stops)==="array"&&va(P.value.stops[0])==="array"&&va(P.value.stops[0][0])==="object",Fe=lo({key:P.key,value:P.value,valueSpec:P.styleSpec.function,style:P.style,styleSpec:P.styleSpec,objectElementValidators:{stops:je,default:yr}});return W==="identity"&&te&&Fe.push(new Or(P.key,P.value,'missing required property "property"')),W!=="identity"&&!P.value.stops&&Fe.push(new Or(P.key,P.value,'missing required property "stops"')),W==="exponential"&&P.valueSpec.expression&&!Al(P.valueSpec)&&Fe.push(new Or(P.key,P.value,"exponential functions not supported")),P.styleSpec.$version>=8&&(ye&&!ys(P.valueSpec)?Fe.push(new Or(P.key,P.value,"property functions not supported")):te&&!Vl(P.valueSpec)&&Fe.push(new Or(P.key,P.value,"zoom functions not supported"))),(W==="categorical"||_e)&&P.value.property===void 0&&Fe.push(new Or(P.key,P.value,'"property" property is required')),Fe;function je(zr){if(W==="identity")return[new Or(zr.key,zr.value,'identity function may not have a "stops" property')];var ln=[],tn=zr.value;return ln=ln.concat(jl({key:zr.key,value:tn,valueSpec:zr.valueSpec,style:zr.style,styleSpec:zr.styleSpec,arrayElementValidator:ar})),va(tn)==="array"&&tn.length===0&&ln.push(new Or(zr.key,tn,"array must have at least one stop")),ln}function ar(zr){var ln=[],tn=zr.value,Sn=zr.key;if(va(tn)!=="array")return[new Or(Sn,tn,"array expected, "+va(tn)+" found")];if(tn.length!==2)return[new Or(Sn,tn,"array length 2 expected, length "+tn.length+" found")];if(_e){if(va(tn[0])!=="object")return[new Or(Sn,tn,"object expected, "+va(tn[0])+" found")];if(tn[0].zoom===void 0)return[new Or(Sn,tn,"object stop key must have zoom")];if(tn[0].value===void 0)return[new Or(Sn,tn,"object stop key must have value")];if(Pt&&Pt>hn(tn[0].zoom))return[new Or(Sn,tn[0].zoom,"stop zoom values must appear in ascending order")];hn(tn[0].zoom)!==Pt&&(Pt=hn(tn[0].zoom),St=void 0,vt={}),ln=ln.concat(lo({key:Sn+"[0]",value:tn[0],valueSpec:{zoom:{}},style:zr.style,styleSpec:zr.styleSpec,objectElementValidators:{zoom:El,value:tr}}))}else ln=ln.concat(tr({key:Sn+"[0]",value:tn[0],valueSpec:{},style:zr.style,styleSpec:zr.styleSpec},tn));return Xl(sn(tn[1]))?ln.concat([new Or(Sn+"[1]",tn[1],"expressions are not allowed in function stops.")]):ln.concat(Ir({key:Sn+"[1]",value:tn[1],valueSpec:R,style:zr.style,styleSpec:zr.styleSpec}))}function tr(zr,ln){var tn=va(zr.value),Sn=hn(zr.value),mn=zr.value!==null?zr.value:ln;if(!at)at=tn;else if(tn!==at)return[new Or(zr.key,mn,tn+" stop domain type must match previous stop domain type "+at)];if(tn!=="number"&&tn!=="string"&&tn!=="boolean")return[new Or(zr.key,mn,"stop domain value must be a number, string, or boolean")];if(tn!=="number"&&W!=="categorical"){var Mn="number expected, "+tn+" found";return ys(R)&&W===void 0&&(Mn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Or(zr.key,mn,Mn)]}return W==="categorical"&&tn==="number"&&(!isFinite(Sn)||Math.floor(Sn)!==Sn)?[new Or(zr.key,mn,"integer expected, found "+Sn)]:W!=="categorical"&&tn==="number"&&St!==void 0&&Sn=2&&P[1]!=="$id"&&P[1]!=="$type";case"in":return P.length>=3&&(typeof P[1]!="string"||Array.isArray(P[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return P.length!==3||Array.isArray(P[1])||Array.isArray(P[2]);case"any":case"all":for(var R=0,W=P.slice(1);RR?1:0}function Jl(P){if(!Array.isArray(P))return!1;if(P[0]==="within")return!0;for(var R=1;R"||R==="<="||R===">="?Cu(P[1],P[2],R):R==="any"?Hf(P.slice(1)):R==="all"?["all"].concat(P.slice(1).map(Ql)):R==="none"?["all"].concat(P.slice(1).map(Ql).map(qs)):R==="in"?$l(P[1],P.slice(2)):R==="!in"?qs($l(P[1],P.slice(2))):R==="has"?ef(P[1]):R==="!has"?qs(ef(P[1])):R==="within"?P:!0;return W}function Cu(P,R,W){switch(P){case"$type":return["filter-type-"+W,R];case"$id":return["filter-id-"+W,R];default:return["filter-"+W,P,R]}}function Hf(P){return["any"].concat(P.map(Ql))}function $l(P,R){if(R.length===0)return!1;switch(P){case"$type":return["filter-type-in",["literal",R]];case"$id":return["filter-id-in",["literal",R]];default:return R.length>200&&!R.some(function(W){return typeof W!=typeof R[0]})?["filter-in-large",P,["literal",R.sort(tf)]]:["filter-in-small",P,["literal",R]]}}function ef(P){switch(P){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",P]}}function qs(P){return["!",P]}function rf(P){return _u(sn(P.value))?ks(In({},P,{expressionContext:"filter",valueSpec:{value:"boolean"}})):ql(P)}function ql(P){var R=P.value,W=P.key;if(va(R)!=="array")return[new Or(W,R,"array expected, "+va(R)+" found")];var at=P.styleSpec,vt,St=[];if(R.length<1)return[new Or(W,R,"filter array must have at least 1 element")];switch(St=St.concat(Kl({key:W+"[0]",value:R[0],valueSpec:at.filter_operator,style:P.style,styleSpec:P.styleSpec})),hn(R[0])){case"<":case"<=":case">":case">=":R.length>=2&&hn(R[1])==="$type"&&St.push(new Or(W,R,'"$type" cannot be use with operator "'+R[0]+'"'));case"==":case"!=":R.length!==3&&St.push(new Or(W,R,'filter array for operator "'+R[0]+'" must have 3 elements'));case"in":case"!in":R.length>=2&&(vt=va(R[1]),vt!=="string"&&St.push(new Or(W+"[1]",R[1],"string expected, "+vt+" found")));for(var Pt=2;Pt=Fe[tr+0]&&at>=Fe[tr+1])?(Pt[ar]=!0,St.push(_e[ar])):Pt[ar]=!1}}},da.prototype._forEachCell=function(P,R,W,at,vt,St,Pt,te){for(var ye=this._convertToCellCoord(P),_e=this._convertToCellCoord(R),Fe=this._convertToCellCoord(W),je=this._convertToCellCoord(at),ar=ye;ar<=Fe;ar++)for(var tr=_e;tr<=je;tr++){var yr=this.d*tr+ar;if(!(te&&!te(this._convertFromCellCoord(ar),this._convertFromCellCoord(tr),this._convertFromCellCoord(ar+1),this._convertFromCellCoord(tr+1)))&&vt.call(this,P,R,W,at,yr,St,Pt,te))return}},da.prototype._convertFromCellCoord=function(P){return(P-this.padding)/this.scale},da.prototype._convertToCellCoord=function(P){return Math.max(0,Math.min(this.d-1,Math.floor(P*this.scale)+this.padding))},da.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var P=this.cells,R=Xi+this.cells.length+1+1,W=0,at=0;at=0)){var je=P[Fe];_e[Fe]=Ct[ye].shallow.indexOf(Fe)>=0?je:De(je,R)}P instanceof Error&&(_e.message=P.message)}if(_e.$name)throw new Error("$name property is reserved for worker serialization logic.");return ye!=="Object"&&(_e.$name=ye),_e}throw new Error("can't serialize object of type "+typeof P)}function Ee(P){if(P==null||typeof P=="boolean"||typeof P=="number"||typeof P=="string"||P instanceof Boolean||P instanceof Number||P instanceof String||P instanceof Date||P instanceof RegExp||ae(P)||fe(P)||ArrayBuffer.isView(P)||P instanceof Ia)return P;if(Array.isArray(P))return P.map(Ee);if(typeof P=="object"){var R=P.$name||"Object",W=Ct[R],at=W.klass;if(!at)throw new Error("can't deserialize unregistered class "+R);if(at.deserialize)return at.deserialize(P);for(var vt=Object.create(at.prototype),St=0,Pt=Object.keys(P);St=0?ye:Ee(ye)}}return vt}throw new Error("can't deserialize object of type "+typeof P)}var Ye=function(){this.first=!0};Ye.prototype.update=function(R,W){var at=Math.floor(R);return this.first?(this.first=!1,this.lastIntegerZoom=at,this.lastIntegerZoomTime=0,this.lastZoom=R,this.lastFloorZoom=at,!0):(this.lastFloorZoom>at?(this.lastIntegerZoom=at+1,this.lastIntegerZoomTime=W):this.lastFloorZoom=128&&P<=255},Arabic:function(P){return P>=1536&&P<=1791},"Arabic Supplement":function(P){return P>=1872&&P<=1919},"Arabic Extended-A":function(P){return P>=2208&&P<=2303},"Hangul Jamo":function(P){return P>=4352&&P<=4607},"Unified Canadian Aboriginal Syllabics":function(P){return P>=5120&&P<=5759},Khmer:function(P){return P>=6016&&P<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(P){return P>=6320&&P<=6399},"General Punctuation":function(P){return P>=8192&&P<=8303},"Letterlike Symbols":function(P){return P>=8448&&P<=8527},"Number Forms":function(P){return P>=8528&&P<=8591},"Miscellaneous Technical":function(P){return P>=8960&&P<=9215},"Control Pictures":function(P){return P>=9216&&P<=9279},"Optical Character Recognition":function(P){return P>=9280&&P<=9311},"Enclosed Alphanumerics":function(P){return P>=9312&&P<=9471},"Geometric Shapes":function(P){return P>=9632&&P<=9727},"Miscellaneous Symbols":function(P){return P>=9728&&P<=9983},"Miscellaneous Symbols and Arrows":function(P){return P>=11008&&P<=11263},"CJK Radicals Supplement":function(P){return P>=11904&&P<=12031},"Kangxi Radicals":function(P){return P>=12032&&P<=12255},"Ideographic Description Characters":function(P){return P>=12272&&P<=12287},"CJK Symbols and Punctuation":function(P){return P>=12288&&P<=12351},Hiragana:function(P){return P>=12352&&P<=12447},Katakana:function(P){return P>=12448&&P<=12543},Bopomofo:function(P){return P>=12544&&P<=12591},"Hangul Compatibility Jamo":function(P){return P>=12592&&P<=12687},Kanbun:function(P){return P>=12688&&P<=12703},"Bopomofo Extended":function(P){return P>=12704&&P<=12735},"CJK Strokes":function(P){return P>=12736&&P<=12783},"Katakana Phonetic Extensions":function(P){return P>=12784&&P<=12799},"Enclosed CJK Letters and Months":function(P){return P>=12800&&P<=13055},"CJK Compatibility":function(P){return P>=13056&&P<=13311},"CJK Unified Ideographs Extension A":function(P){return P>=13312&&P<=19903},"Yijing Hexagram Symbols":function(P){return P>=19904&&P<=19967},"CJK Unified Ideographs":function(P){return P>=19968&&P<=40959},"Yi Syllables":function(P){return P>=40960&&P<=42127},"Yi Radicals":function(P){return P>=42128&&P<=42191},"Hangul Jamo Extended-A":function(P){return P>=43360&&P<=43391},"Hangul Syllables":function(P){return P>=44032&&P<=55215},"Hangul Jamo Extended-B":function(P){return P>=55216&&P<=55295},"Private Use Area":function(P){return P>=57344&&P<=63743},"CJK Compatibility Ideographs":function(P){return P>=63744&&P<=64255},"Arabic Presentation Forms-A":function(P){return P>=64336&&P<=65023},"Vertical Forms":function(P){return P>=65040&&P<=65055},"CJK Compatibility Forms":function(P){return P>=65072&&P<=65103},"Small Form Variants":function(P){return P>=65104&&P<=65135},"Arabic Presentation Forms-B":function(P){return P>=65136&&P<=65279},"Halfwidth and Fullwidth Forms":function(P){return P>=65280&&P<=65519}};function nr(P){for(var R=0,W=P;R=65097&&P<=65103)||Ze["CJK Compatibility Ideographs"](P)||Ze["CJK Compatibility"](P)||Ze["CJK Radicals Supplement"](P)||Ze["CJK Strokes"](P)||Ze["CJK Symbols and Punctuation"](P)&&!(P>=12296&&P<=12305)&&!(P>=12308&&P<=12319)&&P!==12336||Ze["CJK Unified Ideographs Extension A"](P)||Ze["CJK Unified Ideographs"](P)||Ze["Enclosed CJK Letters and Months"](P)||Ze["Hangul Compatibility Jamo"](P)||Ze["Hangul Jamo Extended-A"](P)||Ze["Hangul Jamo Extended-B"](P)||Ze["Hangul Jamo"](P)||Ze["Hangul Syllables"](P)||Ze.Hiragana(P)||Ze["Ideographic Description Characters"](P)||Ze.Kanbun(P)||Ze["Kangxi Radicals"](P)||Ze["Katakana Phonetic Extensions"](P)||Ze.Katakana(P)&&P!==12540||Ze["Halfwidth and Fullwidth Forms"](P)&&P!==65288&&P!==65289&&P!==65293&&!(P>=65306&&P<=65310)&&P!==65339&&P!==65341&&P!==65343&&!(P>=65371&&P<=65503)&&P!==65507&&!(P>=65512&&P<=65519)||Ze["Small Form Variants"](P)&&!(P>=65112&&P<=65118)&&!(P>=65123&&P<=65126)||Ze["Unified Canadian Aboriginal Syllabics"](P)||Ze["Unified Canadian Aboriginal Syllabics Extended"](P)||Ze["Vertical Forms"](P)||Ze["Yijing Hexagram Symbols"](P)||Ze["Yi Syllables"](P)||Ze["Yi Radicals"](P))}function Rr(P){return!!(Ze["Latin-1 Supplement"](P)&&(P===167||P===169||P===174||P===177||P===188||P===189||P===190||P===215||P===247)||Ze["General Punctuation"](P)&&(P===8214||P===8224||P===8225||P===8240||P===8241||P===8251||P===8252||P===8258||P===8263||P===8264||P===8265||P===8273)||Ze["Letterlike Symbols"](P)||Ze["Number Forms"](P)||Ze["Miscellaneous Technical"](P)&&(P>=8960&&P<=8967||P>=8972&&P<=8991||P>=8996&&P<=9e3||P===9003||P>=9085&&P<=9114||P>=9150&&P<=9165||P===9167||P>=9169&&P<=9179||P>=9186&&P<=9215)||Ze["Control Pictures"](P)&&P!==9251||Ze["Optical Character Recognition"](P)||Ze["Enclosed Alphanumerics"](P)||Ze["Geometric Shapes"](P)||Ze["Miscellaneous Symbols"](P)&&!(P>=9754&&P<=9759)||Ze["Miscellaneous Symbols and Arrows"](P)&&(P>=11026&&P<=11055||P>=11088&&P<=11097||P>=11192&&P<=11243)||Ze["CJK Symbols and Punctuation"](P)||Ze.Katakana(P)||Ze["Private Use Area"](P)||Ze["CJK Compatibility Forms"](P)||Ze["Small Form Variants"](P)||Ze["Halfwidth and Fullwidth Forms"](P)||P===8734||P===8756||P===8757||P>=9984&&P<=10087||P>=10102&&P<=10131||P===65532||P===65533)}function Br(P){return!(on(P)||Rr(P))}function jr(P){return Ze.Arabic(P)||Ze["Arabic Supplement"](P)||Ze["Arabic Extended-A"](P)||Ze["Arabic Presentation Forms-A"](P)||Ze["Arabic Presentation Forms-B"](P)}function un(P){return P>=1424&&P<=2303||Ze["Arabic Presentation Forms-A"](P)||Ze["Arabic Presentation Forms-B"](P)}function vn(P,R){return!(!R&&un(P)||P>=2304&&P<=3583||P>=3840&&P<=4255||Ze.Khmer(P))}function qr(P){for(var R=0,W=P;R-1&&(Qn=qn.error),ui&&ui(P)};function Oi(){Mi.fire(new rr("pluginStateChange",{pluginStatus:Qn,pluginURL:ii}))}var Mi=new dr,Ii=function(){return Qn},ra=function(P){return P({pluginStatus:Qn,pluginURL:ii}),Mi.on("pluginStateChange",P),P},ka=function(P,R,W){if(W===void 0&&(W=!1),Qn===qn.deferred||Qn===qn.loading||Qn===qn.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");ii=st.resolveURL(P),Qn=qn.deferred,ui=R,Oi(),W||la()},la=function(){if(Qn!==qn.deferred||!ii)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Qn=qn.loading,Oi(),ii&&ke({url:ii},function(P){P?fi(P):(Qn=qn.loaded,Oi())})},Kn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Qn===qn.loaded||Kn.applyArabicShaping!=null},isLoading:function(){return Qn===qn.loading},setState:function(R){Qn=R.pluginStatus,ii=R.pluginURL},isParsed:function(){return Kn.applyArabicShaping!=null&&Kn.processBidirectionalText!=null&&Kn.processStyledBidirectionalText!=null},getPluginURL:function(){return ii}},Bi=function(){!Kn.isLoading()&&!Kn.isLoaded()&&Ii()==="deferred"&&la()},Ti=function(R,W){this.zoom=R,W?(this.now=W.now,this.fadeDuration=W.fadeDuration,this.zoomHistory=W.zoomHistory,this.transition=W.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ye,this.transition={})};Ti.prototype.isSupportedScript=function(R){return Hn(R,Kn.isLoaded())},Ti.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ti.prototype.getCrossfadeParameters=function(){var R=this.zoom,W=R-Math.floor(R),at=this.crossFadingFactor();return R>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:W+(1-W)*at}:{fromScale:.5,toScale:1,t:1-(1-at)*W}};var Zi=function(R,W){this.property=R,this.value=W,this.expression=Eu(W===void 0?R.specification.default:W,R.specification)};Zi.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Zi.prototype.possiblyEvaluate=function(R,W,at){return this.property.possiblyEvaluate(this,R,W,at)};var ba=function(R){this.property=R,this.value=new Zi(R,void 0)};ba.prototype.transitioned=function(R,W){return new Ka(this.property,this.value,W,w({},R.transition,this.transition),R.now)},ba.prototype.untransitioned=function(){return new Ka(this.property,this.value,null,{},0)};var na=function(R){this._properties=R,this._values=Object.create(R.defaultTransitionablePropertyValues)};na.prototype.getValue=function(R){return N(this._values[R].value.value)},na.prototype.setValue=function(R,W){this._values.hasOwnProperty(R)||(this._values[R]=new ba(this._values[R].property)),this._values[R].value=new Zi(this._values[R].property,W===null?void 0:N(W))},na.prototype.getTransition=function(R){return N(this._values[R].transition)},na.prototype.setTransition=function(R,W){this._values.hasOwnProperty(R)||(this._values[R]=new ba(this._values[R].property)),this._values[R].transition=N(W)||void 0},na.prototype.serialize=function(){for(var R={},W=0,at=Object.keys(this._values);Wthis.end)return this.prior=null,St;if(this.value.isDataDriven())return this.prior=null,St;if(vtPt.zoomHistory.lastIntegerZoom?{from:at,to:vt}:{from:St,to:vt}},R.prototype.interpolate=function(at){return at},R}(Ei),Lo=function(R){this.specification=R};Lo.prototype.possiblyEvaluate=function(R,W,at,vt){if(R.value!==void 0)if(R.expression.kind==="constant"){var St=R.expression.evaluate(W,null,{},at,vt);return this._calculate(St,St,St,W)}else return this._calculate(R.expression.evaluate(new Ti(Math.floor(W.zoom-1),W)),R.expression.evaluate(new Ti(Math.floor(W.zoom),W)),R.expression.evaluate(new Ti(Math.floor(W.zoom+1),W)),W)},Lo.prototype._calculate=function(R,W,at,vt){var St=vt.zoom;return St>vt.zoomHistory.lastIntegerZoom?{from:R,to:W}:{from:at,to:W}},Lo.prototype.interpolate=function(R){return R};var eo=function(R){this.specification=R};eo.prototype.possiblyEvaluate=function(R,W,at,vt){return!!R.expression.evaluate(W,null,{},at,vt)},eo.prototype.interpolate=function(){return!1};var ca=function(R){this.properties=R,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var W in R){var at=R[W];at.specification.overridable&&this.overridableProperties.push(W);var vt=this.defaultPropertyValues[W]=new Zi(at,void 0),St=this.defaultTransitionablePropertyValues[W]=new ba(at);this.defaultTransitioningPropertyValues[W]=St.untransitioned(),this.defaultPossiblyEvaluatedValues[W]=vt.possiblyEvaluate({})}};Bt("DataDrivenProperty",Ei),Bt("DataConstantProperty",oi),Bt("CrossFadedDataDrivenProperty",Ao),Bt("CrossFadedProperty",Lo),Bt("ColorRampProperty",eo);var Va="-transition",Oa=function(P){function R(W,at){if(P.call(this),this.id=W.id,this.type=W.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},W.type!=="custom"&&(W=W,this.metadata=W.metadata,this.minzoom=W.minzoom,this.maxzoom=W.maxzoom,W.type!=="background"&&(this.source=W.source,this.sourceLayer=W["source-layer"],this.filter=W.filter),at.layout&&(this._unevaluatedLayout=new to(at.layout)),at.paint)){this._transitionablePaint=new na(at.paint);for(var vt in W.paint)this.setPaintProperty(vt,W.paint[vt],{validate:!1});for(var St in W.layout)this.setLayoutProperty(St,W.layout[St],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new uo(at.paint)}}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},R.prototype.getLayoutProperty=function(at){return at==="visibility"?this.visibility:this._unevaluatedLayout.getValue(at)},R.prototype.setLayoutProperty=function(at,vt,St){if(St===void 0&&(St={}),vt!=null){var Pt="layers."+this.id+".layout."+at;if(this._validate(Pi,Pt,at,vt,St))return}if(at==="visibility"){this.visibility=vt;return}this._unevaluatedLayout.setValue(at,vt)},R.prototype.getPaintProperty=function(at){return M(at,Va)?this._transitionablePaint.getTransition(at.slice(0,-Va.length)):this._transitionablePaint.getValue(at)},R.prototype.setPaintProperty=function(at,vt,St){if(St===void 0&&(St={}),vt!=null){var Pt="layers."+this.id+".paint."+at;if(this._validate(Li,Pt,at,vt,St))return!1}if(M(at,Va))return this._transitionablePaint.setTransition(at.slice(0,-Va.length),vt||void 0),!1;var te=this._transitionablePaint._values[at],ye=te.property.specification["property-type"]==="cross-faded-data-driven",_e=te.value.isDataDriven(),Fe=te.value;this._transitionablePaint.setValue(at,vt),this._handleSpecialPaintPropertyUpdate(at);var je=this._transitionablePaint._values[at].value,ar=je.isDataDriven();return ar||_e||ye||this._handleOverridablePaintPropertyUpdate(at,Fe,je)},R.prototype._handleSpecialPaintPropertyUpdate=function(at){},R.prototype._handleOverridablePaintPropertyUpdate=function(at,vt,St){return!1},R.prototype.isHidden=function(at){return this.minzoom&&at=this.maxzoom?!0:this.visibility==="none"},R.prototype.updateTransitions=function(at){this._transitioningPaint=this._transitionablePaint.transitioned(at,this._transitioningPaint)},R.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},R.prototype.recalculate=function(at,vt){at.getCrossfadeParameters&&(this._crossfadeParameters=at.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(at,void 0,vt)),this.paint=this._transitioningPaint.possiblyEvaluate(at,void 0,vt)},R.prototype.serialize=function(){var at={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(at.layout=at.layout||{},at.layout.visibility=this.visibility),D(at,function(vt,St){return vt!==void 0&&!(St==="layout"&&!Object.keys(vt).length)&&!(St==="paint"&&!Object.keys(vt).length)})},R.prototype._validate=function(at,vt,St,Pt,te){return te===void 0&&(te={}),te&&te.validate===!1?!1:Ri(this,at.call(Dn,{key:vt,layerType:this.type,objectKey:St,value:Pt,styleSpec:Ar,style:{glyphs:!0,sprite:!0}}))},R.prototype.is3D=function(){return!1},R.prototype.isTileClipped=function(){return!1},R.prototype.hasOffscreenPass=function(){return!1},R.prototype.resize=function(){},R.prototype.isStateDependent=function(){for(var at in this.paint._values){var vt=this.paint.get(at);if(!(!(vt instanceof wa)||!ys(vt.property.specification))&&(vt.value.kind==="source"||vt.value.kind==="composite")&&vt.value.isStateDependent)return!0}return!1},R}(dr),is={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bs=function(R,W){this._structArray=R,this._pos1=W*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ea=128,_l=5,ji=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};ji.serialize=function(R,W){return R._trim(),W&&(R.isTransferred=!0,W.push(R.arrayBuffer)),{length:R.length,arrayBuffer:R.arrayBuffer}},ji.deserialize=function(R){var W=Object.create(this.prototype);return W.arrayBuffer=R.arrayBuffer,W.length=R.length,W.capacity=R.arrayBuffer.byteLength/W.bytesPerElement,W._refreshViews(),W},ji.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ji.prototype.clear=function(){this.length=0},ji.prototype.resize=function(R){this.reserve(R),this.length=R},ji.prototype.reserve=function(R){if(R>this.capacity){this.capacity=Math.max(R,Math.floor(this.capacity*_l),Ea),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var W=this.uint8;this._refreshViews(),W&&this.uint8.set(W)}},ji.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function _a(P,R){R===void 0&&(R=1);var W=0,at=0,vt=P.map(function(Pt){var te=zc(Pt.type),ye=W=ed(W,Math.max(R,te)),_e=Pt.components||1;return at=Math.max(at,te),W+=te*_e,{name:Pt.name,type:Pt.type,components:_e,offset:ye}}),St=ed(W,Math.max(at,R));return{members:vt,size:St,alignment:R}}function zc(P){return is[P].BYTES_PER_ELEMENT}function ed(P,R){return Math.ceil(P/R)*R}var nf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt){var St=this.length;return this.resize(St+1),this.emplace(St,at,vt)},R.prototype.emplace=function(at,vt,St){var Pt=at*2;return this.int16[Pt+0]=vt,this.int16[Pt+1]=St,at},R}(ji);nf.prototype.bytesPerElement=4,Bt("StructArrayLayout2i4",nf);var pv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt){var te=this.length;return this.resize(te+1),this.emplace(te,at,vt,St,Pt)},R.prototype.emplace=function(at,vt,St,Pt,te){var ye=at*4;return this.int16[ye+0]=vt,this.int16[ye+1]=St,this.int16[ye+2]=Pt,this.int16[ye+3]=te,at},R}(ji);pv.prototype.bytesPerElement=8,Bt("StructArrayLayout4i8",pv);var Lu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye){var _e=this.length;return this.resize(_e+1),this.emplace(_e,at,vt,St,Pt,te,ye)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e){var Fe=at*6;return this.int16[Fe+0]=vt,this.int16[Fe+1]=St,this.int16[Fe+2]=Pt,this.int16[Fe+3]=te,this.int16[Fe+4]=ye,this.int16[Fe+5]=_e,at},R}(ji);Lu.prototype.bytesPerElement=12,Bt("StructArrayLayout2i4i12",Lu);var Gf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye){var _e=this.length;return this.resize(_e+1),this.emplace(_e,at,vt,St,Pt,te,ye)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e){var Fe=at*4,je=at*8;return this.int16[Fe+0]=vt,this.int16[Fe+1]=St,this.uint8[je+4]=Pt,this.uint8[je+5]=te,this.uint8[je+6]=ye,this.uint8[je+7]=_e,at},R}(ji);Gf.prototype.bytesPerElement=8,Bt("StructArrayLayout2i4ub8",Gf);var Wf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt){var St=this.length;return this.resize(St+1),this.emplace(St,at,vt)},R.prototype.emplace=function(at,vt,St){var Pt=at*2;return this.float32[Pt+0]=vt,this.float32[Pt+1]=St,at},R}(ji);Wf.prototype.bytesPerElement=8,Bt("StructArrayLayout2f8",Wf);var Zo=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar){var tr=this.length;return this.resize(tr+1),this.emplace(tr,at,vt,St,Pt,te,ye,_e,Fe,je,ar)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr){var yr=at*10;return this.uint16[yr+0]=vt,this.uint16[yr+1]=St,this.uint16[yr+2]=Pt,this.uint16[yr+3]=te,this.uint16[yr+4]=ye,this.uint16[yr+5]=_e,this.uint16[yr+6]=Fe,this.uint16[yr+7]=je,this.uint16[yr+8]=ar,this.uint16[yr+9]=tr,at},R}(ji);Zo.prototype.bytesPerElement=20,Bt("StructArrayLayout10ui20",Zo);var Pu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr){var zr=this.length;return this.resize(zr+1),this.emplace(zr,at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr){var ln=at*12;return this.int16[ln+0]=vt,this.int16[ln+1]=St,this.int16[ln+2]=Pt,this.int16[ln+3]=te,this.uint16[ln+4]=ye,this.uint16[ln+5]=_e,this.uint16[ln+6]=Fe,this.uint16[ln+7]=je,this.int16[ln+8]=ar,this.int16[ln+9]=tr,this.int16[ln+10]=yr,this.int16[ln+11]=zr,at},R}(ji);Pu.prototype.bytesPerElement=24,Bt("StructArrayLayout4i4ui4i24",Pu);var gv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*3;return this.float32[te+0]=vt,this.float32[te+1]=St,this.float32[te+2]=Pt,at},R}(ji);gv.prototype.bytesPerElement=12,Bt("StructArrayLayout3f12",gv);var mv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at){var vt=this.length;return this.resize(vt+1),this.emplace(vt,at)},R.prototype.emplace=function(at,vt){var St=at*1;return this.uint32[St+0]=vt,at},R}(ji);mv.prototype.bytesPerElement=4,Bt("StructArrayLayout1ul4",mv);var kc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je){var ar=this.length;return this.resize(ar+1),this.emplace(ar,at,vt,St,Pt,te,ye,_e,Fe,je)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar){var tr=at*10,yr=at*5;return this.int16[tr+0]=vt,this.int16[tr+1]=St,this.int16[tr+2]=Pt,this.int16[tr+3]=te,this.int16[tr+4]=ye,this.int16[tr+5]=_e,this.uint32[yr+3]=Fe,this.uint16[tr+8]=je,this.uint16[tr+9]=ar,at},R}(ji);kc.prototype.bytesPerElement=20,Bt("StructArrayLayout6i1ul2ui20",kc);var ah=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye){var _e=this.length;return this.resize(_e+1),this.emplace(_e,at,vt,St,Pt,te,ye)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e){var Fe=at*6;return this.int16[Fe+0]=vt,this.int16[Fe+1]=St,this.int16[Fe+2]=Pt,this.int16[Fe+3]=te,this.int16[Fe+4]=ye,this.int16[Fe+5]=_e,at},R}(ji);ah.prototype.bytesPerElement=12,Bt("StructArrayLayout2i2i2i12",ah);var tu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te){var ye=this.length;return this.resize(ye+1),this.emplace(ye,at,vt,St,Pt,te)},R.prototype.emplace=function(at,vt,St,Pt,te,ye){var _e=at*4,Fe=at*8;return this.float32[_e+0]=vt,this.float32[_e+1]=St,this.float32[_e+2]=Pt,this.int16[Fe+6]=te,this.int16[Fe+7]=ye,at},R}(ji);tu.prototype.bytesPerElement=16,Bt("StructArrayLayout2f1f2i16",tu);var as=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt){var te=this.length;return this.resize(te+1),this.emplace(te,at,vt,St,Pt)},R.prototype.emplace=function(at,vt,St,Pt,te){var ye=at*12,_e=at*3;return this.uint8[ye+0]=vt,this.uint8[ye+1]=St,this.float32[_e+1]=Pt,this.float32[_e+2]=te,at},R}(ji);as.prototype.bytesPerElement=12,Bt("StructArrayLayout2ub2f12",as);var eu=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*3;return this.uint16[te+0]=vt,this.uint16[te+1]=St,this.uint16[te+2]=Pt,at},R}(ji);eu.prototype.bytesPerElement=6,Bt("StructArrayLayout3ui6",eu);var Oc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn){var Mn=this.length;return this.resize(Mn+1),this.emplace(Mn,at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn){var zn=at*24,Wn=at*12,ei=at*48;return this.int16[zn+0]=vt,this.int16[zn+1]=St,this.uint16[zn+2]=Pt,this.uint16[zn+3]=te,this.uint32[Wn+2]=ye,this.uint32[Wn+3]=_e,this.uint32[Wn+4]=Fe,this.uint16[zn+10]=je,this.uint16[zn+11]=ar,this.uint16[zn+12]=tr,this.float32[Wn+7]=yr,this.float32[Wn+8]=zr,this.uint8[ei+36]=ln,this.uint8[ei+37]=tn,this.uint8[ei+38]=Sn,this.uint32[Wn+10]=mn,this.int16[zn+22]=Mn,at},R}(ji);Oc.prototype.bytesPerElement=48,Bt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Oc);var oh=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn,zn,Wn,ei,$n,bi,vi,xi,Ni,wi,Si){var Vi=this.length;return this.resize(Vi+1),this.emplace(Vi,at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn,zn,Wn,ei,$n,bi,vi,xi,Ni,wi,Si)},R.prototype.emplace=function(at,vt,St,Pt,te,ye,_e,Fe,je,ar,tr,yr,zr,ln,tn,Sn,mn,Mn,zn,Wn,ei,$n,bi,vi,xi,Ni,wi,Si,Vi){var ki=at*34,aa=at*17;return this.int16[ki+0]=vt,this.int16[ki+1]=St,this.int16[ki+2]=Pt,this.int16[ki+3]=te,this.int16[ki+4]=ye,this.int16[ki+5]=_e,this.int16[ki+6]=Fe,this.int16[ki+7]=je,this.uint16[ki+8]=ar,this.uint16[ki+9]=tr,this.uint16[ki+10]=yr,this.uint16[ki+11]=zr,this.uint16[ki+12]=ln,this.uint16[ki+13]=tn,this.uint16[ki+14]=Sn,this.uint16[ki+15]=mn,this.uint16[ki+16]=Mn,this.uint16[ki+17]=zn,this.uint16[ki+18]=Wn,this.uint16[ki+19]=ei,this.uint16[ki+20]=$n,this.uint16[ki+21]=bi,this.uint16[ki+22]=vi,this.uint32[aa+12]=xi,this.float32[aa+13]=Ni,this.float32[aa+14]=wi,this.float32[aa+15]=Si,this.float32[aa+16]=Vi,at},R}(ji);oh.prototype.bytesPerElement=68,Bt("StructArrayLayout8i15ui1ul4f68",oh);var Yf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at){var vt=this.length;return this.resize(vt+1),this.emplace(vt,at)},R.prototype.emplace=function(at,vt){var St=at*1;return this.float32[St+0]=vt,at},R}(ji);Yf.prototype.bytesPerElement=4,Bt("StructArrayLayout1f4",Yf);var yv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*3;return this.int16[te+0]=vt,this.int16[te+1]=St,this.int16[te+2]=Pt,at},R}(ji);yv.prototype.bytesPerElement=6,Bt("StructArrayLayout3i6",yv);var Ru=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St){var Pt=this.length;return this.resize(Pt+1),this.emplace(Pt,at,vt,St)},R.prototype.emplace=function(at,vt,St,Pt){var te=at*2,ye=at*4;return this.uint32[te+0]=vt,this.uint16[ye+2]=St,this.uint16[ye+3]=Pt,at},R}(ji);Ru.prototype.bytesPerElement=8,Bt("StructArrayLayout1ul2ui8",Ru);var Nc=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt){var St=this.length;return this.resize(St+1),this.emplace(St,at,vt)},R.prototype.emplace=function(at,vt,St){var Pt=at*2;return this.uint16[Pt+0]=vt,this.uint16[Pt+1]=St,at},R}(ji);Nc.prototype.bytesPerElement=4,Bt("StructArrayLayout2ui4",Nc);var Xf=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at){var vt=this.length;return this.resize(vt+1),this.emplace(vt,at)},R.prototype.emplace=function(at,vt){var St=at*1;return this.uint16[St+0]=vt,at},R}(ji);Xf.prototype.bytesPerElement=2,Bt("StructArrayLayout1ui2",Xf);var af=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(at,vt,St,Pt){var te=this.length;return this.resize(te+1),this.emplace(te,at,vt,St,Pt)},R.prototype.emplace=function(at,vt,St,Pt,te){var ye=at*4;return this.float32[ye+0]=vt,this.float32[ye+1]=St,this.float32[ye+2]=Pt,this.float32[ye+3]=te,at},R}(ji);af.prototype.bytesPerElement=16,Bt("StructArrayLayout4f16",af);var rd=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return W.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},W.x1.get=function(){return this._structArray.int16[this._pos2+2]},W.y1.get=function(){return this._structArray.int16[this._pos2+3]},W.x2.get=function(){return this._structArray.int16[this._pos2+4]},W.y2.get=function(){return this._structArray.int16[this._pos2+5]},W.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},W.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},W.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},W.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(R.prototype,W),R}(bs);rd.prototype.size=20;var xv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new rd(this,at)},R}(kc);Bt("CollisionBoxArray",xv);var of=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return W.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},W.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},W.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},W.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},W.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},W.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},W.segment.get=function(){return this._structArray.uint16[this._pos2+10]},W.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},W.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},W.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},W.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},W.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},W.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},W.placedOrientation.set=function(at){this._structArray.uint8[this._pos1+37]=at},W.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},W.hidden.set=function(at){this._structArray.uint8[this._pos1+38]=at},W.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},W.crossTileID.set=function(at){this._structArray.uint32[this._pos4+10]=at},W.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(R.prototype,W),R}(bs);of.prototype.size=48;var bv=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new of(this,at)},R}(Oc);Bt("PlacedSymbolArray",bv);var Zf=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return W.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},W.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},W.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},W.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},W.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},W.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},W.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},W.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},W.key.get=function(){return this._structArray.uint16[this._pos2+8]},W.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},W.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},W.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},W.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},W.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},W.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},W.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},W.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},W.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},W.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},W.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},W.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},W.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},W.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},W.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},W.crossTileID.set=function(at){this._structArray.uint32[this._pos4+12]=at},W.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},W.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},W.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},W.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(R.prototype,W),R}(bs);Zf.prototype.size=68;var nd=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new Zf(this,at)},R}(oh);Bt("SymbolInstanceArray",nd);var id=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getoffsetX=function(at){return this.float32[at*1+0]},R}(Yf);Bt("GlyphOffsetArray",id);var tl=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.getx=function(at){return this.int16[at*3+0]},R.prototype.gety=function(at){return this.int16[at*3+1]},R.prototype.gettileUnitDistanceFromAnchor=function(at){return this.int16[at*3+2]},R}(yv);Bt("SymbolLineVertexArray",tl);var ad=function(P){function R(){P.apply(this,arguments)}P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R;var W={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return W.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},W.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},W.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(R.prototype,W),R}(bs);ad.prototype.size=8;var od=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.get=function(at){return new ad(this,at)},R}(Ru);Bt("FeatureIndexArray",od);var Tp=_a([{name:"a_pos",components:2,type:"Int16"}],4),sd=Tp.members,ro=function(R){R===void 0&&(R=[]),this.segments=R};ro.prototype.prepareSegment=function(R,W,at,vt){var St=this.segments[this.segments.length-1];return R>ro.MAX_VERTEX_ARRAY_LENGTH&&B("Max vertices per segment is "+ro.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+R),(!St||St.vertexLength+R>ro.MAX_VERTEX_ARRAY_LENGTH||St.sortKey!==vt)&&(St={vertexOffset:W.length,primitiveOffset:at.length,vertexLength:0,primitiveLength:0},vt!==void 0&&(St.sortKey=vt),this.segments.push(St)),St},ro.prototype.get=function(){return this.segments},ro.prototype.destroy=function(){for(var R=0,W=this.segments;R>>16)*ye&65535)<<16)&4294967295,Fe=Fe<<15|Fe>>>17,Fe=(Fe&65535)*_e+(((Fe>>>16)*_e&65535)<<16)&4294967295,Pt^=Fe,Pt=Pt<<13|Pt>>>19,te=(Pt&65535)*5+(((Pt>>>16)*5&65535)<<16)&4294967295,Pt=(te&65535)+27492+(((te>>>16)+58964&65535)<<16);switch(Fe=0,vt){case 3:Fe^=(W.charCodeAt(je+2)&255)<<16;case 2:Fe^=(W.charCodeAt(je+1)&255)<<8;case 1:Fe^=W.charCodeAt(je)&255,Fe=(Fe&65535)*ye+(((Fe>>>16)*ye&65535)<<16)&4294967295,Fe=Fe<<15|Fe>>>17,Fe=(Fe&65535)*_e+(((Fe>>>16)*_e&65535)<<16)&4294967295,Pt^=Fe}return Pt^=W.length,Pt^=Pt>>>16,Pt=(Pt&65535)*2246822507+(((Pt>>>16)*2246822507&65535)<<16)&4294967295,Pt^=Pt>>>13,Pt=(Pt&65535)*3266489909+(((Pt>>>16)*3266489909&65535)<<16)&4294967295,Pt^=Pt>>>16,Pt>>>0}P.exports=R}),rt=S(function(P){function R(W,at){for(var vt=W.length,St=at^vt,Pt=0,te;vt>=4;)te=W.charCodeAt(Pt)&255|(W.charCodeAt(++Pt)&255)<<8|(W.charCodeAt(++Pt)&255)<<16|(W.charCodeAt(++Pt)&255)<<24,te=(te&65535)*1540483477+(((te>>>16)*1540483477&65535)<<16),te^=te>>>24,te=(te&65535)*1540483477+(((te>>>16)*1540483477&65535)<<16),St=(St&65535)*1540483477+(((St>>>16)*1540483477&65535)<<16)^te,vt-=4,++Pt;switch(vt){case 3:St^=(W.charCodeAt(Pt+2)&255)<<16;case 2:St^=(W.charCodeAt(Pt+1)&255)<<8;case 1:St^=W.charCodeAt(Pt)&255,St=(St&65535)*1540483477+(((St>>>16)*1540483477&65535)<<16)}return St^=St>>>13,St=(St&65535)*1540483477+(((St>>>16)*1540483477&65535)<<16),St^=St>>>15,St>>>0}P.exports=R}),pt=dt,Ot=dt,Qt=rt;pt.murmur3=Ot,pt.murmur2=Qt;var ue=function(){this.ids=[],this.positions=[],this.indexed=!1};ue.prototype.add=function(R,W,at,vt){this.ids.push(We(R)),this.positions.push(W,at,vt)},ue.prototype.getPositions=function(R){for(var W=We(R),at=0,vt=this.ids.length-1;at>1;this.ids[St]>=W?vt=St:at=St+1}for(var Pt=[];this.ids[at]===W;){var te=this.positions[3*at],ye=this.positions[3*at+1],_e=this.positions[3*at+2];Pt.push({index:te,start:ye,end:_e}),at++}return Pt},ue.serialize=function(R,W){var at=new Float64Array(R.ids),vt=new Uint32Array(R.positions);return qe(at,vt,0,at.length-1),W&&W.push(at.buffer,vt.buffer),{ids:at,positions:vt}},ue.deserialize=function(R){var W=new ue;return W.ids=R.ids,W.positions=R.positions,W.indexed=!0,W};var Re=Math.pow(2,53)-1;function We(P){var R=+P;return!isNaN(R)&&R<=Re?R:pt(String(P))}function qe(P,R,W,at){for(;W>1],St=W-1,Pt=at+1;;){do St++;while(P[St]vt);if(St>=Pt)break;cr(P,St,Pt),cr(R,3*St,3*Pt),cr(R,3*St+1,3*Pt+1),cr(R,3*St+2,3*Pt+2)}Pt-WPt.x+1||yePt.y+1)&&B("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return W}function Ta(P,R){return{type:P.type,id:P.id,properties:P.properties,geometry:R?qi(P):[]}}function Ki(P,R,W,at,vt){P.emplaceBack(R*2+(at+1)/2,W*2+(vt+1)/2)}var ma=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(W){return W.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new nf,this.indexArray=new eu,this.segments=new ro,this.programConfigurations=new hi(R.layers,R.zoom),this.stateDependentLayerIds=this.layers.filter(function(W){return W.isStateDependent()}).map(function(W){return W.id})};ma.prototype.populate=function(R,W,at){var vt=this.layers[0],St=[],Pt=null;vt.type==="circle"&&(Pt=vt.layout.get("circle-sort-key"));for(var te=0,ye=R;te=Ai||ar<0||ar>=Ai)){var tr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,R.sortKey),yr=tr.vertexLength;Ki(this.layoutVertexArray,je,ar,-1,-1),Ki(this.layoutVertexArray,je,ar,1,-1),Ki(this.layoutVertexArray,je,ar,1,1),Ki(this.layoutVertexArray,je,ar,-1,1),this.indexArray.emplaceBack(yr,yr+1,yr+2),this.indexArray.emplaceBack(yr,yr+3,yr+2),tr.vertexLength+=4,tr.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,at,{},vt)},Bt("CircleBucket",ma,{omit:["layers"]});function Hi(P,R){for(var W=0;W=3){for(var St=0;St1){if(Bs(P,R))return!0;for(var at=0;at1?P.distSqr(W):P.distSqr(W.sub(R)._mult(vt)._add(R))}function Ll(P,R){for(var W=!1,at,vt,St,Pt=0;PtR.y!=St.y>R.y&&R.x<(St.x-vt.x)*(R.y-vt.y)/(St.y-vt.y)+vt.x&&(W=!W)}return W}function jo(P,R){for(var W=!1,at=0,vt=P.length-1;atR.y!=Pt.y>R.y&&R.x<(Pt.x-St.x)*(R.y-St.y)/(Pt.y-St.y)+St.x&&(W=!W)}return W}function Pl(P,R,W,at,vt){for(var St=0,Pt=P;St=te.x&&vt>=te.y)return!0}var ye=[new r(R,W),new r(R,vt),new r(at,vt),new r(at,W)];if(P.length>2)for(var _e=0,Fe=ye;_evt.x&&R.x>vt.x||P.yvt.y&&R.y>vt.y)return!1;var St=O(P,R,W[0]);return St!==O(P,R,W[1])||St!==O(P,R,W[2])||St!==O(P,R,W[3])}function Ko(P,R,W){var at=R.paint.get(P).value;return at.kind==="constant"?at.value:W.programConfigurations.get(R.id).getMaxValue(P)}function rl(P){return Math.sqrt(P[0]*P[0]+P[1]*P[1])}function ru(P,R,W,at,vt){if(!R[0]&&!R[1])return P;var St=r.convert(R)._mult(vt);W==="viewport"&&St._rotate(-at);for(var Pt=[],te=0;te0&&(St=1/Math.sqrt(St)),P[0]=R[0]*St,P[1]=R[1]*St,P[2]=R[2]*St,P}function I1(P,R){return P[0]*R[0]+P[1]*R[1]+P[2]*R[2]}function F1(P,R,W){var at=R[0],vt=R[1],St=R[2],Pt=W[0],te=W[1],ye=W[2];return P[0]=vt*ye-St*te,P[1]=St*Pt-at*ye,P[2]=at*te-vt*Pt,P}function z1(P,R,W){var at=R[0],vt=R[1],St=R[2];return P[0]=at*W[0]+vt*W[3]+St*W[6],P[1]=at*W[1]+vt*W[4]+St*W[7],P[2]=at*W[2]+vt*W[5]+St*W[8],P}var k1=Ep;(function(){var P=Uc();return function(R,W,at,vt,St,Pt){var te,ye;for(W||(W=3),at||(at=0),vt?ye=Math.min(vt*W+at,R.length):ye=R.length,te=at;teP.width||vt.height>P.height||W.x>P.width-vt.width||W.y>P.height-vt.height)throw new RangeError("out of range source coordinates for image copy");if(vt.width>R.width||vt.height>R.height||at.x>R.width-vt.width||at.y>R.height-vt.height)throw new RangeError("out of range destination coordinates for image copy");for(var Pt=P.data,te=R.data,ye=0;ye80*W){te=_e=P[0],ye=Fe=P[1];for(var yr=W;yr_e&&(_e=je),ar>Fe&&(Fe=ar);tr=Math.max(_e-te,Fe-ye),tr=tr!==0?1/tr:0}return Av(St,Pt,W,te,ye,tr),Pt}function tg(P,R,W,at,vt){var St,Pt;if(vt===Ip(P,R,W,at)>0)for(St=R;St=R;St-=at)Pt=ng(St,P[St],P[St+1],Pt);return Pt&&fd(Pt,Pt.next)&&(Sv(Pt),Pt=Pt.next),Pt}function $f(P,R){if(!P)return P;R||(R=P);var W=P,at;do if(at=!1,!W.steiner&&(fd(W,W.next)||no(W.prev,W,W.next)===0)){if(Sv(W),W=R=W.prev,W===W.next)break;at=!0}else W=W.next;while(at||W!==R);return R}function Av(P,R,W,at,vt,St,Pt){if(P){!Pt&&St&&ux(P,at,vt,St);for(var te=P,ye,_e;P.prev!==P.next;){if(ye=P.prev,_e=P.next,St?ex(P,at,vt,St):tx(P)){R.push(ye.i/W),R.push(P.i/W),R.push(_e.i/W),Sv(P),P=_e.next,te=_e.next;continue}if(P=_e,P===te){Pt?Pt===1?(P=rx($f(P),R,W),Av(P,R,W,at,vt,St,2)):Pt===2&&nx(P,R,W,at,vt,St):Av($f(P),R,W,at,vt,St,1);break}}}}function tx(P){var R=P.prev,W=P,at=P.next;if(no(R,W,at)>=0)return!1;for(var vt=P.next.next;vt!==P.prev;){if(dh(R.x,R.y,W.x,W.y,at.x,at.y,vt.x,vt.y)&&no(vt.prev,vt,vt.next)>=0)return!1;vt=vt.next}return!0}function ex(P,R,W,at){var vt=P.prev,St=P,Pt=P.next;if(no(vt,St,Pt)>=0)return!1;for(var te=vt.xSt.x?vt.x>Pt.x?vt.x:Pt.x:St.x>Pt.x?St.x:Pt.x,Fe=vt.y>St.y?vt.y>Pt.y?vt.y:Pt.y:St.y>Pt.y?St.y:Pt.y,je=Rp(te,ye,R,W,at),ar=Rp(_e,Fe,R,W,at),tr=P.prevZ,yr=P.nextZ;tr&&tr.z>=je&&yr&&yr.z<=ar;){if(tr!==P.prev&&tr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,tr.x,tr.y)&&no(tr.prev,tr,tr.next)>=0||(tr=tr.prevZ,yr!==P.prev&&yr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,yr.x,yr.y)&&no(yr.prev,yr,yr.next)>=0))return!1;yr=yr.nextZ}for(;tr&&tr.z>=je;){if(tr!==P.prev&&tr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,tr.x,tr.y)&&no(tr.prev,tr,tr.next)>=0)return!1;tr=tr.prevZ}for(;yr&&yr.z<=ar;){if(yr!==P.prev&&yr!==P.next&&dh(vt.x,vt.y,St.x,St.y,Pt.x,Pt.y,yr.x,yr.y)&&no(yr.prev,yr,yr.next)>=0)return!1;yr=yr.nextZ}return!0}function rx(P,R,W){var at=P;do{var vt=at.prev,St=at.next.next;!fd(vt,St)&&eg(vt,at,at.next,St)&&Mv(vt,St)&&Mv(St,vt)&&(R.push(vt.i/W),R.push(at.i/W),R.push(St.i/W),Sv(at),Sv(at.next),at=P=St),at=at.next}while(at!==P);return $f(at)}function nx(P,R,W,at,vt,St){var Pt=P;do{for(var te=Pt.next.next;te!==Pt.prev;){if(Pt.i!==te.i&&hx(Pt,te)){var ye=rg(Pt,te);Pt=$f(Pt,Pt.next),ye=$f(ye,ye.next),Av(Pt,R,W,at,vt,St),Av(ye,R,W,at,vt,St);return}te=te.next}Pt=Pt.next}while(Pt!==P)}function ix(P,R,W,at){var vt=[],St,Pt,te,ye,_e;for(St=0,Pt=R.length;St=W.next.y&&W.next.y!==W.y){var te=W.x+(vt-W.y)*(W.next.x-W.x)/(W.next.y-W.y);if(te<=at&&te>St){if(St=te,te===at){if(vt===W.y)return W;if(vt===W.next.y)return W.next}Pt=W.x=W.x&&W.x>=_e&&at!==W.x&&dh(vtPt.x||W.x===Pt.x&&lx(Pt,W)))&&(Pt=W,je=ar)),W=W.next;while(W!==ye);return Pt}function lx(P,R){return no(P.prev,P,R.prev)<0&&no(R.next,P,P.next)<0}function ux(P,R,W,at){var vt=P;do vt.z===null&&(vt.z=Rp(vt.x,vt.y,R,W,at)),vt.prevZ=vt.prev,vt.nextZ=vt.next,vt=vt.next;while(vt!==P);vt.prevZ.nextZ=null,vt.prevZ=null,fx(vt)}function fx(P){var R,W,at,vt,St,Pt,te,ye,_e=1;do{for(W=P,P=null,St=null,Pt=0;W;){for(Pt++,at=W,te=0,R=0;R<_e&&(te++,at=at.nextZ,!!at);R++);for(ye=_e;te>0||ye>0&&at;)te!==0&&(ye===0||!at||W.z<=at.z)?(vt=W,W=W.nextZ,te--):(vt=at,at=at.nextZ,ye--),St?St.nextZ=vt:P=vt,vt.prevZ=St,St=vt;W=at}St.nextZ=null,_e*=2}while(Pt>1);return P}function Rp(P,R,W,at,vt){return P=32767*(P-W)*vt,R=32767*(R-at)*vt,P=(P|P<<8)&16711935,P=(P|P<<4)&252645135,P=(P|P<<2)&858993459,P=(P|P<<1)&1431655765,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,P|R<<1}function cx(P){var R=P,W=P;do(R.x=0&&(P-Pt)*(at-te)-(W-Pt)*(R-te)>=0&&(W-Pt)*(St-te)-(vt-Pt)*(at-te)>=0}function hx(P,R){return P.next.i!==R.i&&P.prev.i!==R.i&&!vx(P,R)&&(Mv(P,R)&&Mv(R,P)&&dx(P,R)&&(no(P.prev,P,R.prev)||no(P,R.prev,R))||fd(P,R)&&no(P.prev,P,P.next)>0&&no(R.prev,R,R.next)>0)}function no(P,R,W){return(R.y-P.y)*(W.x-R.x)-(R.x-P.x)*(W.y-R.y)}function fd(P,R){return P.x===R.x&&P.y===R.y}function eg(P,R,W,at){var vt=hd(no(P,R,W)),St=hd(no(P,R,at)),Pt=hd(no(W,at,P)),te=hd(no(W,at,R));return!!(vt!==St&&Pt!==te||vt===0&&cd(P,W,R)||St===0&&cd(P,at,R)||Pt===0&&cd(W,P,at)||te===0&&cd(W,R,at))}function cd(P,R,W){return R.x<=Math.max(P.x,W.x)&&R.x>=Math.min(P.x,W.x)&&R.y<=Math.max(P.y,W.y)&&R.y>=Math.min(P.y,W.y)}function hd(P){return P>0?1:P<0?-1:0}function vx(P,R){var W=P;do{if(W.i!==P.i&&W.next.i!==P.i&&W.i!==R.i&&W.next.i!==R.i&&eg(W,W.next,P,R))return!0;W=W.next}while(W!==P);return!1}function Mv(P,R){return no(P.prev,P,P.next)<0?no(P,R,P.next)>=0&&no(P,P.prev,R)>=0:no(P,R,P.prev)<0||no(P,P.next,R)<0}function dx(P,R){var W=P,at=!1,vt=(P.x+R.x)/2,St=(P.y+R.y)/2;do W.y>St!=W.next.y>St&&W.next.y!==W.y&&vt<(W.next.x-W.x)*(St-W.y)/(W.next.y-W.y)+W.x&&(at=!at),W=W.next;while(W!==P);return at}function rg(P,R){var W=new Dp(P.i,P.x,P.y),at=new Dp(R.i,R.x,R.y),vt=P.next,St=R.prev;return P.next=R,R.prev=P,W.next=vt,vt.prev=W,at.next=W,W.prev=at,St.next=at,at.prev=St,at}function ng(P,R,W,at){var vt=new Dp(P,R,W);return at?(vt.next=at.next,vt.prev=at,at.next.prev=vt,at.next=vt):(vt.prev=vt,vt.next=vt),vt}function Sv(P){P.next.prev=P.prev,P.prev.next=P.next,P.prevZ&&(P.prevZ.nextZ=P.nextZ),P.nextZ&&(P.nextZ.prevZ=P.prevZ)}function Dp(P,R,W){this.i=P,this.x=R,this.y=W,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}ud.deviation=function(P,R,W,at){var vt=R&&R.length,St=vt?R[0]*W:P.length,Pt=Math.abs(Ip(P,0,St,W));if(vt)for(var te=0,ye=R.length;te0&&(at+=P[vt-1].length,W.holes.push(at))}return W},Pp.default=q1;function px(P,R,W,at,vt){ig(P,R,W||0,at||P.length-1,vt||gx)}function ig(P,R,W,at,vt){for(;at>W;){if(at-W>600){var St=at-W+1,Pt=R-W+1,te=Math.log(St),ye=.5*Math.exp(2*te/3),_e=.5*Math.sqrt(te*ye*(St-ye)/St)*(Pt-St/2<0?-1:1),Fe=Math.max(W,Math.floor(R-Pt*ye/St+_e)),je=Math.min(at,Math.floor(R+(St-Pt)*ye/St+_e));ig(P,R,Fe,je,vt)}var ar=P[R],tr=W,yr=at;for(Ev(P,W,R),vt(P[at],ar)>0&&Ev(P,W,at);tr0;)yr--}vt(P[W],ar)===0?Ev(P,W,yr):(yr++,Ev(P,yr,at)),yr<=R&&(W=yr+1),R<=yr&&(at=yr-1)}}function Ev(P,R,W){var at=P[R];P[R]=P[W],P[W]=at}function gx(P,R){return PR?1:0}function Fp(P,R){var W=P.length;if(W<=1)return[P];for(var at=[],vt,St,Pt=0;Pt1)for(var ye=0;ye>3}if(at--,W===1||W===2)vt+=P.readSVarint(),St+=P.readSVarint(),W===1&&(te&&Pt.push(te),te=[]),te.push(new r(vt,St));else if(W===7)te&&te.push(te[0].clone());else throw new Error("unknown command "+W)}return te&&Pt.push(te),Pt},ph.prototype.bbox=function(){var P=this._pbf;P.pos=this._geometry;for(var R=P.readVarint()+P.pos,W=1,at=0,vt=0,St=0,Pt=1/0,te=-1/0,ye=1/0,_e=-1/0;P.pos>3}if(at--,W===1||W===2)vt+=P.readSVarint(),St+=P.readSVarint(),vtte&&(te=vt),St_e&&(_e=St);else if(W!==7)throw new Error("unknown command "+W)}return[Pt,ye,te,_e]},ph.prototype.toGeoJSON=function(P,R,W){var at=this.extent*Math.pow(2,W),vt=this.extent*P,St=this.extent*R,Pt=this.loadGeometry(),te=ph.types[this.type],ye,_e;function Fe(tr){for(var yr=0;yr>3;R=at===1?P.readString():at===2?P.readFloat():at===3?P.readDouble():at===4?P.readVarint64():at===5?P.readVarint():at===6?P.readSVarint():at===7?P.readBoolean():null}return R}sg.prototype.feature=function(P){if(P<0||P>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[P];var R=this._pbf.readVarint()+this._pbf.pos;return new ag(this._pbf,R,this.extent,this._keys,this._values)};var Rx=Dx;function Dx(P,R){this.layers=P.readFields(Ix,{},R)}function Ix(P,R,W){if(P===3){var at=new og(W,W.readVarint()+W.pos);at.length&&(R[at.name]=at)}}var Fx=Rx,zx=ag,kx=og,gh={VectorTile:Fx,VectorTileFeature:zx,VectorTileLayer:kx},Ox=gh.VectorTileFeature.types,Nx=500,Op=Math.pow(2,13);function _v(P,R,W,at,vt,St,Pt,te){P.emplaceBack(R,W,Math.floor(at*Op)*2+Pt,vt*Op*2,St*Op*2,Math.round(te))}var iu=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(W){return W.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new Lu,this.indexArray=new eu,this.programConfigurations=new hi(R.layers,R.zoom),this.segments=new ro,this.stateDependentLayerIds=this.layers.filter(function(W){return W.isStateDependent()}).map(function(W){return W.id})};iu.prototype.populate=function(R,W,at){this.features=[],this.hasPattern=zp("fill-extrusion",this.layers,W);for(var vt=0,St=R;vt=1){var Mn=ln[Sn-1];if(!Bx(mn,Mn)){tr.vertexLength+4>ro.MAX_VERTEX_ARRAY_LENGTH&&(tr=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var zn=mn.sub(Mn)._perp()._unit(),Wn=Mn.dist(mn);tn+Wn>32768&&(tn=0),_v(this.layoutVertexArray,mn.x,mn.y,zn.x,zn.y,0,0,tn),_v(this.layoutVertexArray,mn.x,mn.y,zn.x,zn.y,0,1,tn),tn+=Wn,_v(this.layoutVertexArray,Mn.x,Mn.y,zn.x,zn.y,0,0,tn),_v(this.layoutVertexArray,Mn.x,Mn.y,zn.x,zn.y,0,1,tn);var ei=tr.vertexLength;this.indexArray.emplaceBack(ei,ei+2,ei+1),this.indexArray.emplaceBack(ei+1,ei+2,ei+3),tr.vertexLength+=4,tr.primitiveLength+=2}}}}if(tr.vertexLength+_e>ro.MAX_VERTEX_ARRAY_LENGTH&&(tr=this.segments.prepareSegment(_e,this.layoutVertexArray,this.indexArray)),Ox[R.type]==="Polygon"){for(var $n=[],bi=[],vi=tr.vertexLength,xi=0,Ni=ye;xiAi)||P.y===R.y&&(P.y<0||P.y>Ai)}function Ux(P){return P.every(function(R){return R.x<0})||P.every(function(R){return R.x>Ai})||P.every(function(R){return R.y<0})||P.every(function(R){return R.y>Ai})}var Hx=new ca({"fill-extrusion-opacity":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ao(Ar["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ei(Ar["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new oi(Ar["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),Vx={paint:Hx},Gx=function(P){function R(W){P.call(this,W,Vx)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.createBucket=function(at){return new iu(at)},R.prototype.queryRadius=function(){return rl(this.paint.get("fill-extrusion-translate"))},R.prototype.is3D=function(){return!0},R.prototype.queryIntersectsFeature=function(at,vt,St,Pt,te,ye,_e,Fe){var je=ru(at,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),ye.angle,_e),ar=this.paint.get("fill-extrusion-height").evaluate(vt,St),tr=this.paint.get("fill-extrusion-base").evaluate(vt,St),yr=Xx(je,Fe,ye,0),zr=Yx(Pt,tr,ar,Fe),ln=zr[0],tn=zr[1];return Wx(ln,tn,yr)},R}(Oa);function Cv(P,R){return P.x*R.x+P.y*R.y}function lg(P,R){if(P.length===1){for(var W=0,at=R[W++],vt;!vt||at.equals(vt);)if(vt=R[W++],!vt)return 1/0;for(;W=2&&R[_e-1].equals(R[_e-2]);)_e--;for(var Fe=0;Fe<_e-1&&R[Fe].equals(R[Fe+1]);)Fe++;if(!(_e<(ye?3:2))){at==="bevel"&&(St=1.05);var je=this.overscaling<=16?qx*Ai/(512*this.overscaling):0,ar=this.segments.prepareSegment(_e*10,this.layoutVertexArray,this.indexArray),tr,yr=void 0,zr=void 0,ln=void 0,tn=void 0;this.e1=this.e2=-1,ye&&(tr=R[_e-2],tn=R[Fe].sub(tr)._unit()._perp());for(var Sn=Fe;Sn<_e;Sn++)if(zr=Sn===_e-1?ye?R[Fe+1]:void 0:R[Sn+1],!(zr&&R[Sn].equals(zr))){tn&&(ln=tn),tr&&(yr=tr),tr=R[Sn],tn=zr?zr.sub(tr)._unit()._perp():ln,ln=ln||tn;var mn=ln.add(tn);(mn.x!==0||mn.y!==0)&&mn._unit();var Mn=ln.x*tn.x+ln.y*tn.y,zn=mn.x*tn.x+mn.y*tn.y,Wn=zn!==0?1/zn:1/0,ei=2*Math.sqrt(2-2*zn),$n=zn<$x&&yr&&zr,bi=ln.x*tn.y-ln.y*tn.x>0;if($n&&Sn>Fe){var vi=tr.dist(yr);if(vi>2*je){var xi=tr.sub(tr.sub(yr)._mult(je/vi)._round());this.updateDistance(yr,xi),this.addCurrentVertex(xi,ln,0,0,ar),yr=xi}}var Ni=yr&&zr,wi=Ni?at:ye?"butt":vt;if(Ni&&wi==="round"&&(WnSt&&(wi="bevel"),wi==="bevel"&&(Wn>2&&(wi="flipbevel"),Wn100)mn=tn.mult(-1);else{var Si=Wn*ln.add(tn).mag()/ln.sub(tn).mag();mn._perp()._mult(Si*(bi?-1:1))}this.addCurrentVertex(tr,mn,0,0,ar),this.addCurrentVertex(tr,mn.mult(-1),0,0,ar)}else if(wi==="bevel"||wi==="fakeround"){var Vi=-Math.sqrt(Wn*Wn-1),ki=bi?Vi:0,aa=bi?0:Vi;if(yr&&this.addCurrentVertex(tr,ln,ki,aa,ar),wi==="fakeround")for(var xa=Math.round(ei*180/Math.PI/tb),oa=1;oa2*je){var oo=tr.add(zr.sub(tr)._mult(je/mo)._round());this.updateDistance(tr,oo),this.addCurrentVertex(oo,tn,0,0,ar),tr=oo}}}}},Jo.prototype.addCurrentVertex=function(R,W,at,vt,St,Pt){Pt===void 0&&(Pt=!1);var te=W.x+W.y*at,ye=W.y-W.x*at,_e=-W.x+W.y*vt,Fe=-W.y-W.x*vt;this.addHalfVertex(R,te,ye,Pt,!1,at,St),this.addHalfVertex(R,_e,Fe,Pt,!0,-vt,St),this.distance>cg/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(R,W,at,vt,St,Pt))},Jo.prototype.addHalfVertex=function(R,W,at,vt,St,Pt,te){var ye=R.x,_e=R.y,Fe=this.lineClips?this.scaledDistance*(cg-1):this.scaledDistance,je=Fe*fg;if(this.layoutVertexArray.emplaceBack((ye<<1)+(vt?1:0),(_e<<1)+(St?1:0),Math.round(ug*W)+128,Math.round(ug*at)+128,(Pt===0?0:Pt<0?-1:1)+1|(je&63)<<2,je>>6),this.lineClips){var ar=this.scaledDistance-this.lineClips.start,tr=this.lineClips.end-this.lineClips.start,yr=ar/tr;this.layoutVertexArray2.emplaceBack(yr,this.lineClipsArray.length)}var zr=te.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,zr),te.primitiveLength++),St?this.e2=zr:this.e1=zr},Jo.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Jo.prototype.updateDistance=function(R,W){this.distance+=R.dist(W),this.updateScaledDistance()},Bt("LineBucket",Jo,{omit:["layers","patternFeatures"]});var rb=new ca({"line-cap":new oi(Ar.layout_line["line-cap"]),"line-join":new Ei(Ar.layout_line["line-join"]),"line-miter-limit":new oi(Ar.layout_line["line-miter-limit"]),"line-round-limit":new oi(Ar.layout_line["line-round-limit"]),"line-sort-key":new Ei(Ar.layout_line["line-sort-key"])}),nb=new ca({"line-opacity":new Ei(Ar.paint_line["line-opacity"]),"line-color":new Ei(Ar.paint_line["line-color"]),"line-translate":new oi(Ar.paint_line["line-translate"]),"line-translate-anchor":new oi(Ar.paint_line["line-translate-anchor"]),"line-width":new Ei(Ar.paint_line["line-width"]),"line-gap-width":new Ei(Ar.paint_line["line-gap-width"]),"line-offset":new Ei(Ar.paint_line["line-offset"]),"line-blur":new Ei(Ar.paint_line["line-blur"]),"line-dasharray":new Lo(Ar.paint_line["line-dasharray"]),"line-pattern":new Ao(Ar.paint_line["line-pattern"]),"line-gradient":new eo(Ar.paint_line["line-gradient"])}),hg={paint:nb,layout:rb},ib=function(P){function R(){P.apply(this,arguments)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.possiblyEvaluate=function(at,vt){return vt=new Ti(Math.floor(vt.zoom),{now:vt.now,fadeDuration:vt.fadeDuration,zoomHistory:vt.zoomHistory,transition:vt.transition}),P.prototype.possiblyEvaluate.call(this,at,vt)},R.prototype.evaluate=function(at,vt,St,Pt){return vt=w({},vt,{zoom:Math.floor(vt.zoom)}),P.prototype.evaluate.call(this,at,vt,St,Pt)},R}(Ei),vg=new ib(hg.paint.properties["line-width"].specification);vg.useIntegerZoom=!0;var ab=function(P){function R(W){P.call(this,W,hg),this.gradientVersion=0}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype._handleSpecialPaintPropertyUpdate=function(at){if(at==="line-gradient"){var vt=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=vt._styleExpression.expression instanceof Ho,this.gradientVersion=(this.gradientVersion+1)%f}},R.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},R.prototype.recalculate=function(at,vt){P.prototype.recalculate.call(this,at,vt),this.paint._values["line-floorwidth"]=vg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,at)},R.prototype.createBucket=function(at){return new Jo(at)},R.prototype.queryRadius=function(at){var vt=at,St=dg(Ko("line-width",this,vt),Ko("line-gap-width",this,vt)),Pt=Ko("line-offset",this,vt);return St/2+Math.abs(Pt)+rl(this.paint.get("line-translate"))},R.prototype.queryIntersectsFeature=function(at,vt,St,Pt,te,ye,_e){var Fe=ru(at,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ye.angle,_e),je=_e/2*dg(this.paint.get("line-width").evaluate(vt,St),this.paint.get("line-gap-width").evaluate(vt,St)),ar=this.paint.get("line-offset").evaluate(vt,St);return ar&&(Pt=ob(Pt,ar*_e)),fo(Fe,Pt,je)},R.prototype.isTileClipped=function(){return!0},R}(Oa);function dg(P,R){return R>0?R+2*P:P}function ob(P,R){for(var W=[],at=new r(0,0),vt=0;vt":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function db(P){for(var R="",W=0;W>1,Fe=-7,je=W?vt-1:0,ar=W?-1:1,tr=P[R+je];for(je+=ar,St=tr&(1<<-Fe)-1,tr>>=-Fe,Fe+=te;Fe>0;St=St*256+P[R+je],je+=ar,Fe-=8);for(Pt=St&(1<<-Fe)-1,St>>=-Fe,Fe+=at;Fe>0;Pt=Pt*256+P[R+je],je+=ar,Fe-=8);if(St===0)St=1-_e;else{if(St===ye)return Pt?NaN:(tr?-1:1)*(1/0);Pt=Pt+Math.pow(2,at),St=St-_e}return(tr?-1:1)*Pt*Math.pow(2,St-at)},gb=function(P,R,W,at,vt,St){var Pt,te,ye,_e=St*8-vt-1,Fe=(1<<_e)-1,je=Fe>>1,ar=vt===23?Math.pow(2,-24)-Math.pow(2,-77):0,tr=at?0:St-1,yr=at?1:-1,zr=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===1/0?(te=isNaN(R)?1:0,Pt=Fe):(Pt=Math.floor(Math.log(R)/Math.LN2),R*(ye=Math.pow(2,-Pt))<1&&(Pt--,ye*=2),Pt+je>=1?R+=ar/ye:R+=ar*Math.pow(2,1-je),R*ye>=2&&(Pt++,ye/=2),Pt+je>=Fe?(te=0,Pt=Fe):Pt+je>=1?(te=(R*ye-1)*Math.pow(2,vt),Pt=Pt+je):(te=R*Math.pow(2,je-1)*Math.pow(2,vt),Pt=0));vt>=8;P[W+tr]=te&255,tr+=yr,te/=256,vt-=8);for(Pt=Pt<0;P[W+tr]=Pt&255,tr+=yr,Pt/=256,_e-=8);P[W+tr-yr]|=zr*128},vd={read:pb,write:gb},dd=Ma;function Ma(P){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(P)?P:new Uint8Array(P||0),this.pos=0,this.type=0,this.length=this.buf.length}Ma.Varint=0,Ma.Fixed64=1,Ma.Bytes=2,Ma.Fixed32=5;var Np=65536*65536,gg=1/Np,mb=12,mg=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Ma.prototype={destroy:function(){this.buf=null},readFields:function(P,R,W){for(W=W||this.length;this.pos>3,St=this.pos;this.type=at&7,P(vt,R,this),this.pos===St&&this.skip(at)}return R},readMessage:function(P,R){return this.readFields(P,R,this.readVarint()+this.pos)},readFixed32:function(){var P=pd(this.buf,this.pos);return this.pos+=4,P},readSFixed32:function(){var P=xg(this.buf,this.pos);return this.pos+=4,P},readFixed64:function(){var P=pd(this.buf,this.pos)+pd(this.buf,this.pos+4)*Np;return this.pos+=8,P},readSFixed64:function(){var P=pd(this.buf,this.pos)+xg(this.buf,this.pos+4)*Np;return this.pos+=8,P},readFloat:function(){var P=vd.read(this.buf,this.pos,!0,23,4);return this.pos+=4,P},readDouble:function(){var P=vd.read(this.buf,this.pos,!0,52,8);return this.pos+=8,P},readVarint:function(P){var R=this.buf,W,at;return at=R[this.pos++],W=at&127,at<128||(at=R[this.pos++],W|=(at&127)<<7,at<128)||(at=R[this.pos++],W|=(at&127)<<14,at<128)||(at=R[this.pos++],W|=(at&127)<<21,at<128)?W:(at=R[this.pos],W|=(at&15)<<28,yb(W,P,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var P=this.readVarint();return P%2===1?(P+1)/-2:P/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var P=this.readVarint()+this.pos,R=this.pos;return this.pos=P,P-R>=mb&&mg?Db(this.buf,R,P):Rb(this.buf,R,P)},readBytes:function(){var P=this.readVarint()+this.pos,R=this.buf.subarray(this.pos,P);return this.pos=P,R},readPackedVarint:function(P,R){if(this.type!==Ma.Bytes)return P.push(this.readVarint(R));var W=lf(this);for(P=P||[];this.pos127;);else if(R===Ma.Bytes)this.pos=this.readVarint()+this.pos;else if(R===Ma.Fixed32)this.pos+=4;else if(R===Ma.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+R)},writeTag:function(P,R){this.writeVarint(P<<3|R)},realloc:function(P){for(var R=this.length||16;R268435455||P<0){xb(P,this);return}this.realloc(4),this.buf[this.pos++]=P&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=(P>>>=7)&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=(P>>>=7)&127|(P>127?128:0),!(P<=127)&&(this.buf[this.pos++]=P>>>7&127)))},writeSVarint:function(P){this.writeVarint(P<0?-P*2-1:P*2)},writeBoolean:function(P){this.writeVarint(!!P)},writeString:function(P){P=String(P),this.realloc(P.length*4),this.pos++;var R=this.pos;this.pos=Ib(this.buf,P,this.pos);var W=this.pos-R;W>=128&&yg(R,W,this),this.pos=R-1,this.writeVarint(W),this.pos+=W},writeFloat:function(P){this.realloc(4),vd.write(this.buf,P,this.pos,!0,23,4),this.pos+=4},writeDouble:function(P){this.realloc(8),vd.write(this.buf,P,this.pos,!0,52,8),this.pos+=8},writeBytes:function(P){var R=P.length;this.writeVarint(R),this.realloc(R);for(var W=0;W=128&&yg(W,at,this),this.pos=W-1,this.writeVarint(at),this.pos+=at},writeMessage:function(P,R,W){this.writeTag(P,Ma.Bytes),this.writeRawMessage(R,W)},writePackedVarint:function(P,R){R.length&&this.writeMessage(P,Tb,R)},writePackedSVarint:function(P,R){R.length&&this.writeMessage(P,Ab,R)},writePackedBoolean:function(P,R){R.length&&this.writeMessage(P,Eb,R)},writePackedFloat:function(P,R){R.length&&this.writeMessage(P,Mb,R)},writePackedDouble:function(P,R){R.length&&this.writeMessage(P,Sb,R)},writePackedFixed32:function(P,R){R.length&&this.writeMessage(P,_b,R)},writePackedSFixed32:function(P,R){R.length&&this.writeMessage(P,Cb,R)},writePackedFixed64:function(P,R){R.length&&this.writeMessage(P,Lb,R)},writePackedSFixed64:function(P,R){R.length&&this.writeMessage(P,Pb,R)},writeBytesField:function(P,R){this.writeTag(P,Ma.Bytes),this.writeBytes(R)},writeFixed32Field:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeFixed32(R)},writeSFixed32Field:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeSFixed32(R)},writeFixed64Field:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeFixed64(R)},writeSFixed64Field:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeSFixed64(R)},writeVarintField:function(P,R){this.writeTag(P,Ma.Varint),this.writeVarint(R)},writeSVarintField:function(P,R){this.writeTag(P,Ma.Varint),this.writeSVarint(R)},writeStringField:function(P,R){this.writeTag(P,Ma.Bytes),this.writeString(R)},writeFloatField:function(P,R){this.writeTag(P,Ma.Fixed32),this.writeFloat(R)},writeDoubleField:function(P,R){this.writeTag(P,Ma.Fixed64),this.writeDouble(R)},writeBooleanField:function(P,R){this.writeVarintField(P,!!R)}};function yb(P,R,W){var at=W.buf,vt,St;if(St=at[W.pos++],vt=(St&112)>>4,St<128||(St=at[W.pos++],vt|=(St&127)<<3,St<128)||(St=at[W.pos++],vt|=(St&127)<<10,St<128)||(St=at[W.pos++],vt|=(St&127)<<17,St<128)||(St=at[W.pos++],vt|=(St&127)<<24,St<128)||(St=at[W.pos++],vt|=(St&1)<<31,St<128))return mh(P,vt,R);throw new Error("Expected varint not more than 10 bytes")}function lf(P){return P.type===Ma.Bytes?P.readVarint()+P.pos:P.pos+1}function mh(P,R,W){return W?R*4294967296+(P>>>0):(R>>>0)*4294967296+(P>>>0)}function xb(P,R){var W,at;if(P>=0?(W=P%4294967296|0,at=P/4294967296|0):(W=~(-P%4294967296),at=~(-P/4294967296),W^4294967295?W=W+1|0:(W=0,at=at+1|0)),P>=18446744073709552e3||P<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");R.realloc(10),bb(W,at,R),wb(at,R)}function bb(P,R,W){W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos++]=P&127|128,P>>>=7,W.buf[W.pos]=P&127}function wb(P,R){var W=(P&7)<<4;R.buf[R.pos++]|=W|((P>>>=3)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127|((P>>>=7)?128:0),P&&(R.buf[R.pos++]=P&127)))))}function yg(P,R,W){var at=R<=16383?1:R<=2097151?2:R<=268435455?3:Math.floor(Math.log(R)/(Math.LN2*7));W.realloc(at);for(var vt=W.pos-1;vt>=P;vt--)W.buf[vt+at]=W.buf[vt]}function Tb(P,R){for(var W=0;W>>8,P[W+2]=R>>>16,P[W+3]=R>>>24}function xg(P,R){return(P[R]|P[R+1]<<8|P[R+2]<<16)+(P[R+3]<<24)}function Rb(P,R,W){for(var at="",vt=R;vt239?4:St>223?3:St>191?2:1;if(vt+te>W)break;var ye,_e,Fe;te===1?St<128&&(Pt=St):te===2?(ye=P[vt+1],(ye&192)===128&&(Pt=(St&31)<<6|ye&63,Pt<=127&&(Pt=null))):te===3?(ye=P[vt+1],_e=P[vt+2],(ye&192)===128&&(_e&192)===128&&(Pt=(St&15)<<12|(ye&63)<<6|_e&63,(Pt<=2047||Pt>=55296&&Pt<=57343)&&(Pt=null))):te===4&&(ye=P[vt+1],_e=P[vt+2],Fe=P[vt+3],(ye&192)===128&&(_e&192)===128&&(Fe&192)===128&&(Pt=(St&15)<<18|(ye&63)<<12|(_e&63)<<6|Fe&63,(Pt<=65535||Pt>=1114112)&&(Pt=null))),Pt===null?(Pt=65533,te=1):Pt>65535&&(Pt-=65536,at+=String.fromCharCode(Pt>>>10&1023|55296),Pt=56320|Pt&1023),at+=String.fromCharCode(Pt),vt+=te}return at}function Db(P,R,W){return mg.decode(P.subarray(R,W))}function Ib(P,R,W){for(var at=0,vt,St;at55295&&vt<57344)if(St)if(vt<56320){P[W++]=239,P[W++]=191,P[W++]=189,St=vt;continue}else vt=St-55296<<10|vt-56320|65536,St=null;else{vt>56319||at+1===R.length?(P[W++]=239,P[W++]=191,P[W++]=189):St=vt;continue}else St&&(P[W++]=239,P[W++]=191,P[W++]=189,St=null);vt<128?P[W++]=vt:(vt<2048?P[W++]=vt>>6|192:(vt<65536?P[W++]=vt>>12|224:(P[W++]=vt>>18|240,P[W++]=vt>>12&63|128),P[W++]=vt>>6&63|128),P[W++]=vt&63|128)}return W}var Bp=3;function Fb(P,R,W){P===1&&W.readMessage(zb,R)}function zb(P,R,W){if(P===3){var at=W.readMessage(kb,{}),vt=at.id,St=at.bitmap,Pt=at.width,te=at.height,ye=at.left,_e=at.top,Fe=at.advance;R.push({id:vt,bitmap:new Hc({width:Pt+2*Bp,height:te+2*Bp},St),metrics:{width:Pt,height:te,left:ye,top:_e,advance:Fe}})}}function kb(P,R,W){P===1?R.id=W.readVarint():P===2?R.bitmap=W.readBytes():P===3?R.width=W.readVarint():P===4?R.height=W.readVarint():P===5?R.left=W.readSVarint():P===6?R.top=W.readSVarint():P===7&&(R.advance=W.readVarint())}function Ob(P){return new dd(P).readFields(Fb,[])}var bg=Bp;function wg(P){for(var R=0,W=0,at=0,vt=P;at=0;tr--){var yr=te[tr];if(!(ar.w>yr.w||ar.h>yr.h)){if(ar.x=yr.x,ar.y=yr.y,_e=Math.max(_e,ar.y+ar.h),ye=Math.max(ye,ar.x+ar.w),ar.w===yr.w&&ar.h===yr.h){var zr=te.pop();tr=0&&vt>=R&&Du[this.text.charCodeAt(vt)];vt--)at--;this.text=this.text.substring(R,at),this.sectionIndex=this.sectionIndex.slice(R,at)},Fo.prototype.substring=function(R,W){var at=new Fo;return at.text=this.text.substring(R,W),at.sectionIndex=this.sectionIndex.slice(R,W),at.sections=this.sections,at},Fo.prototype.toString=function(){return this.text},Fo.prototype.getMaxScale=function(){var R=this;return this.sectionIndex.reduce(function(W,at){return Math.max(W,R.sections[at].scale)},0)},Fo.prototype.addTextSection=function(R,W){this.text+=R.text,this.sections.push(xh.forText(R.scale,R.fontStack||W));for(var at=this.sections.length-1,vt=0;vt=Ag?null:++this.imageSectionID:(this.imageSectionID=Tg,this.imageSectionID)};function Bb(P,R){for(var W=[],at=P.text,vt=0,St=0,Pt=R;St=0,Fe=0,je=0;je0&&oo>bi&&(bi=oo)}else{var sa=W[xi.fontStack],ta=sa&&sa[wi];if(ta&&ta.rect)ki=ta.rect,Vi=ta.metrics;else{var Aa=R[xi.fontStack],Sa=Aa&&Aa[wi];if(!Sa)continue;Vi=Sa.metrics}Si=(zn-xi.scale)*Mo}oa?(P.verticalizable=!0,$n.push({glyph:wi,imageName:aa,x:ar,y:tr+Si,vertical:oa,scale:xi.scale,fontStack:xi.fontStack,sectionIndex:Ni,metrics:Vi,rect:ki}),ar+=xa*xi.scale+_e):($n.push({glyph:wi,imageName:aa,x:ar,y:tr+Si,vertical:oa,scale:xi.scale,fontStack:xi.fontStack,sectionIndex:Ni,metrics:Vi,rect:ki}),ar+=Vi.advance*xi.scale+_e)}if($n.length!==0){var zo=ar-_e;yr=Math.max(zo,yr),Gb($n,0,$n.length-1,ln,bi)}ar=0;var ko=St*zn+bi;ei.lineOffset=Math.max(bi,Wn),tr+=ko,zr=Math.max(ko,zr),++tn}var yo=tr-Dv,Qo=Hp(Pt),$o=Qo.horizontalAlign,co=Qo.verticalAlign;Wb(P.positionedLines,ln,$o,co,yr,zr,St,yo,vt.length),P.top+=-co*yo,P.bottom=P.top+yo,P.left+=-$o*yr,P.right=P.left+yr}function Gb(P,R,W,at,vt){if(!(!at&&!vt))for(var St=P[W],Pt=St.metrics.advance*St.scale,te=(P[W].x+Pt)*at,ye=R;ye<=W;ye++)P[ye].x-=te,P[ye].y+=vt}function Wb(P,R,W,at,vt,St,Pt,te,ye){var _e=(R-W)*vt,Fe=0;St!==Pt?Fe=-te*at-Dv:Fe=(-at*ye+.5)*Pt;for(var je=0,ar=P;je-W/2;){if(Pt--,Pt<0)return!1;te-=P[Pt].dist(St),St=P[Pt]}te+=P[Pt].dist(P[Pt+1]),Pt++;for(var ye=[],_e=0;teat;)_e-=ye.shift().angleDelta;if(_e>vt)return!1;Pt++,te+=je.dist(ar)}return!0}function Dg(P){for(var R=0,W=0;W_e){var yr=(_e-ye)/tr,zr=Ca(je.x,ar.x,yr),ln=Ca(je.y,ar.y,yr),tn=new bh(zr,ln,ar.angleTo(je),Fe);return tn._round(),!Pt||Rg(P,tn,te,Pt,R)?tn:void 0}ye+=tr}}function jb(P,R,W,at,vt,St,Pt,te,ye){var _e=Ig(at,St,Pt),Fe=Fg(at,vt),je=Fe*Pt,ar=P[0].x===0||P[0].x===ye||P[0].y===0||P[0].y===ye;R-je=0&&Mn=0&&zn=0&&ar+_e<=Fe){var Wn=new bh(Mn,zn,Sn,yr);Wn._round(),(!at||Rg(P,Wn,St,at,vt))&&tr.push(Wn)}}je+=tn}return!te&&!tr.length&&!Pt&&(tr=zg(P,je/2,W,at,vt,St,Pt,!0,ye)),tr}function kg(P,R,W,at,vt){for(var St=[],Pt=0;Pt=at&&je.x>=at)&&(Fe.x>=at?Fe=new r(at,Fe.y+(je.y-Fe.y)*((at-Fe.x)/(je.x-Fe.x)))._round():je.x>=at&&(je=new r(at,Fe.y+(je.y-Fe.y)*((at-Fe.x)/(je.x-Fe.x)))._round()),!(Fe.y>=vt&&je.y>=vt)&&(Fe.y>=vt?Fe=new r(Fe.x+(je.x-Fe.x)*((vt-Fe.y)/(je.y-Fe.y)),vt)._round():je.y>=vt&&(je=new r(Fe.x+(je.x-Fe.x)*((vt-Fe.y)/(je.y-Fe.y)),vt)._round()),(!ye||!Fe.equals(ye[ye.length-1]))&&(ye=[Fe],St.push(ye)),ye.push(je)))))}return St}var wh=ws;function Og(P,R,W,at){var vt=[],St=P.image,Pt=St.pixelRatio,te=St.paddedRect.w-2*wh,ye=St.paddedRect.h-2*wh,_e=P.right-P.left,Fe=P.bottom-P.top,je=St.stretchX||[[0,te]],ar=St.stretchY||[[0,ye]],tr=function(sa,ta){return sa+ta[1]-ta[0]},yr=je.reduce(tr,0),zr=ar.reduce(tr,0),ln=te-yr,tn=ye-zr,Sn=0,mn=yr,Mn=0,zn=zr,Wn=0,ei=ln,$n=0,bi=tn;if(St.content&&at){var vi=St.content;Sn=yd(je,0,vi[0]),Mn=yd(ar,0,vi[1]),mn=yd(je,vi[0],vi[2]),zn=yd(ar,vi[1],vi[3]),Wn=vi[0]-Sn,$n=vi[1]-Mn,ei=vi[2]-vi[0]-mn,bi=vi[3]-vi[1]-zn}var xi=function(sa,ta,Aa,Sa){var Ba=xd(sa.stretch-Sn,mn,_e,P.left),Wa=bd(sa.fixed-Wn,ei,sa.stretch,yr),mo=xd(ta.stretch-Mn,zn,Fe,P.top),oo=bd(ta.fixed-$n,bi,ta.stretch,zr),zo=xd(Aa.stretch-Sn,mn,_e,P.left),ko=bd(Aa.fixed-Wn,ei,Aa.stretch,yr),yo=xd(Sa.stretch-Mn,zn,Fe,P.top),Qo=bd(Sa.fixed-$n,bi,Sa.stretch,zr),$o=new r(Ba,mo),co=new r(zo,mo),qo=new r(zo,yo),Hs=new r(Ba,yo),cf=new r(Wa/Pt,oo/Pt),ec=new r(ko/Pt,Qo/Pt),rc=R*Math.PI/180;if(rc){var nc=Math.sin(rc),Lh=Math.cos(rc),Rl=[Lh,-nc,nc,Lh];$o._matMult(Rl),co._matMult(Rl),Hs._matMult(Rl),qo._matMult(Rl)}var Ed=sa.stretch+sa.fixed,Jp=Aa.stretch+Aa.fixed,_d=ta.stretch+ta.fixed,Qp=Sa.stretch+Sa.fixed,il={x:St.paddedRect.x+wh+Ed,y:St.paddedRect.y+wh+_d,w:Jp-Ed,h:Qp-_d},Ph=ei/Pt/_e,Cd=bi/Pt/Fe;return{tl:$o,tr:co,bl:Hs,br:qo,tex:il,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:cf,pixelOffsetBR:ec,minFontScaleX:Ph,minFontScaleY:Cd,isSDF:W}};if(!at||!St.stretchX&&!St.stretchY)vt.push(xi({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:te+1},{fixed:0,stretch:ye+1}));else for(var Ni=Ng(je,ln,yr),wi=Ng(ar,tn,zr),Si=0;Si0&&(yr=Math.max(10,yr),this.circleDiameter=yr)}else{var zr=Pt.top*te-ye,ln=Pt.bottom*te+ye,tn=Pt.left*te-ye,Sn=Pt.right*te+ye,mn=Pt.collisionPadding;if(mn&&(tn-=mn[0]*te,zr-=mn[1]*te,Sn+=mn[2]*te,ln+=mn[3]*te),Fe){var Mn=new r(tn,zr),zn=new r(Sn,zr),Wn=new r(tn,ln),ei=new r(Sn,ln),$n=Fe*Math.PI/180;Mn._rotate($n),zn._rotate($n),Wn._rotate($n),ei._rotate($n),tn=Math.min(Mn.x,zn.x,Wn.x,ei.x),Sn=Math.max(Mn.x,zn.x,Wn.x,ei.x),zr=Math.min(Mn.y,zn.y,Wn.y,ei.y),ln=Math.max(Mn.y,zn.y,Wn.y,ei.y)}R.emplaceBack(W.x,W.y,tn,zr,Sn,ln,at,vt,St)}this.boxEndIndex=R.length},Th=function(R,W){if(R===void 0&&(R=[]),W===void 0&&(W=Jb),this.data=R,this.length=this.data.length,this.compare=W,this.length>0)for(var at=(this.length>>1)-1;at>=0;at--)this._down(at)};Th.prototype.push=function(R){this.data.push(R),this.length++,this._up(this.length-1)},Th.prototype.pop=function(){if(this.length!==0){var R=this.data[0],W=this.data.pop();return this.length--,this.length>0&&(this.data[0]=W,this._down(0)),R}},Th.prototype.peek=function(){return this.data[0]},Th.prototype._up=function(R){for(var W=this,at=W.data,vt=W.compare,St=at[R];R>0;){var Pt=R-1>>1,te=at[Pt];if(vt(St,te)>=0)break;at[R]=te,R=Pt}at[R]=St},Th.prototype._down=function(R){for(var W=this,at=W.data,vt=W.compare,St=this.length>>1,Pt=at[R];R=0)break;at[R]=ye,R=te}at[R]=Pt};function Jb(P,R){return PR?1:0}function Qb(P,R,W){R===void 0&&(R=1),W===void 0&&(W=!1);for(var at=1/0,vt=1/0,St=-1/0,Pt=-1/0,te=P[0],ye=0;yeSt)&&(St=_e.x),(!ye||_e.y>Pt)&&(Pt=_e.y)}var Fe=St-at,je=Pt-vt,ar=Math.min(Fe,je),tr=ar/2,yr=new Th([],$b);if(ar===0)return new r(at,vt);for(var zr=at;zrtn.d||!tn.d)&&(tn=mn,W&&console.log("found best %d after %d probes",Math.round(1e4*mn.d)/1e4,Sn)),!(mn.max-tn.d<=R)&&(tr=mn.h/2,yr.push(new Ah(mn.p.x-tr,mn.p.y-tr,tr,P)),yr.push(new Ah(mn.p.x+tr,mn.p.y-tr,tr,P)),yr.push(new Ah(mn.p.x-tr,mn.p.y+tr,tr,P)),yr.push(new Ah(mn.p.x+tr,mn.p.y+tr,tr,P)),Sn+=4)}return W&&(console.log("num probes: "+Sn),console.log("best distance: "+tn.d)),tn.p}function $b(P,R){return R.max-P.max}function Ah(P,R,W,at){this.p=new r(P,R),this.h=W,this.d=qb(this.p,at),this.max=this.d+this.h*Math.SQRT2}function qb(P,R){for(var W=!1,at=1/0,vt=0;vtP.y!=Fe.y>P.y&&P.x<(Fe.x-_e.x)*(P.y-_e.y)/(Fe.y-_e.y)+_e.x&&(W=!W),at=Math.min(at,sf(P,_e,Fe))}return(W?1:-1)*Math.sqrt(at)}function t3(P){for(var R=0,W=0,at=0,vt=P[0],St=0,Pt=vt.length,te=Pt-1;St=Ai||Rl.y<0||Rl.y>=Ai||n3(P,Rl,Lh,W,at,vt,wi,P.layers[0],P.collisionBoxArray,R.index,R.sourceLayerIndex,P.index,tn,zn,$n,ye,mn,Wn,bi,tr,R,St,_e,Fe,Pt)};if(vi==="line")for(var Vi=0,ki=kg(R.geometry,0,0,Ai,Ai);Vi1){var mo=Zb(Wa,ei,W.vertical||yr,at,zr,Sn);mo&&Si(Wa,mo)}}else if(R.type==="Polygon")for(var oo=0,zo=Fp(R.geometry,0);ooqf&&B(P.layerIds[0]+': Value for "text-size" is >= '+Iv+'. Reduce your "text-size".')):ln.kind==="composite"&&(tn=[au*tr.compositeTextSizes[0].evaluate(Pt,{},yr),au*tr.compositeTextSizes[1].evaluate(Pt,{},yr)],(tn[0]>qf||tn[1]>qf)&&B(P.layerIds[0]+': Value for "text-size" is >= '+Iv+'. Reduce your "text-size".')),P.addSymbols(P.text,zr,tn,te,St,Pt,_e,R,ye.lineStartIndex,ye.lineLength,ar,yr);for(var Sn=0,mn=Fe;Snqf&&B(P.layerIds[0]+': Value for "icon-size" is >= '+Iv+'. Reduce your "icon-size".')):$o.kind==="composite"&&(co=[au*zn.compositeIconSizes[0].evaluate(Mn,{},ei),au*zn.compositeIconSizes[1].evaluate(Mn,{},ei)],(co[0]>qf||co[1]>qf)&&B(P.layerIds[0]+': Value for "icon-size" is >= '+Iv+'. Reduce your "icon-size".')),P.addSymbols(P.icon,yo,co,mn,Sn,Mn,!1,R,vi.lineStartIndex,vi.lineLength,-1,ei),oa=P.icon.placedSymbolArray.length-1,Qo&&(ki=Qo.length*4,P.addSymbols(P.icon,Qo,co,mn,Sn,Mn,Us.vertical,R,vi.lineStartIndex,vi.lineLength,-1,ei),sa=P.icon.placedSymbolArray.length-1)}for(var qo in at.horizontal){var Hs=at.horizontal[qo];if(!xi){Aa=pt(Hs.text);var cf=te.layout.get("text-rotate").evaluate(Mn,{},ei);xi=new wd(ye,R,_e,Fe,je,Hs,ar,tr,yr,cf)}var ec=Hs.positionedLines.length===1;if(aa+=Ug(P,R,Hs,St,te,yr,Mn,zr,vi,at.vertical?Us.horizontal:Us.horizontalOnly,ec?Object.keys(at.horizontal):[qo],ta,oa,zn,ei),ec)break}at.vertical&&(xa+=Ug(P,R,at.vertical,St,te,yr,Mn,zr,vi,Us.vertical,["vertical"],ta,sa,zn,ei));var rc=xi?xi.boxStartIndex:P.collisionBoxArray.length,nc=xi?xi.boxEndIndex:P.collisionBoxArray.length,Lh=wi?wi.boxStartIndex:P.collisionBoxArray.length,Rl=wi?wi.boxEndIndex:P.collisionBoxArray.length,Ed=Ni?Ni.boxStartIndex:P.collisionBoxArray.length,Jp=Ni?Ni.boxEndIndex:P.collisionBoxArray.length,_d=Si?Si.boxStartIndex:P.collisionBoxArray.length,Qp=Si?Si.boxEndIndex:P.collisionBoxArray.length,il=-1,Ph=function(kv,nm){return kv&&kv.circleDiameter?Math.max(kv.circleDiameter,nm):nm};il=Ph(xi,il),il=Ph(wi,il),il=Ph(Ni,il),il=Ph(Si,il);var Cd=il>-1?1:0;Cd&&(il*=$n/Mo),P.glyphOffsetArray.length>=ya.MAX_GLYPHS&&B("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Mn.sortKey!==void 0&&P.addToSortKeyRanges(P.symbolInstances.length,Mn.sortKey),P.symbolInstances.emplaceBack(R.x,R.y,ta.right>=0?ta.right:-1,ta.center>=0?ta.center:-1,ta.left>=0?ta.left:-1,ta.vertical||-1,oa,sa,Aa,rc,nc,Lh,Rl,Ed,Jp,_d,Qp,_e,aa,xa,Vi,ki,Cd,0,ar,Sa,Ba,il)}function i3(P,R,W,at){var vt=P.compareText;if(!(R in vt))vt[R]=[];else for(var St=vt[R],Pt=St.length-1;Pt>=0;Pt--)if(at.dist(St[Pt])0)&&(Pt.value.kind!=="constant"||Pt.value.value.length>0),Fe=ye.value.kind!=="constant"||!!ye.value.value||Object.keys(ye.parameters).length>0,je=St.get("symbol-sort-key");if(this.features=[],!(!_e&&!Fe)){for(var ar=W.iconDependencies,tr=W.glyphDependencies,yr=W.availableImages,zr=new Ti(this.zoom),ln=0,tn=R;ln=0;for(var xa=0,oa=bi.sections;xa=0;ye--)Pt[ye]={x:W[ye].x,y:W[ye].y,tileUnitDistanceFromAnchor:St},ye>0&&(St+=W[ye-1].dist(W[ye]));for(var _e=0;_e0},ya.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ya.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},ya.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},ya.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},ya.prototype.addIndicesForPlacedSymbol=function(R,W){for(var at=R.placedSymbolArray.get(W),vt=at.vertexStartIndex+at.numGlyphs*4,St=at.vertexStartIndex;St1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(R),this.sortedAngle=R,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var at=0,vt=this.symbolInstanceIndexes;at=0&&_e.indexOf(te)===ye&&W.addIndicesForPlacedSymbol(W.text,te)}),Pt.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Pt.verticalPlacedTextSymbolIndex),Pt.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Pt.placedIconSymbolIndex),Pt.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Pt.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Bt("SymbolBucket",ya,{omit:["layers","collisionBoxArray","features","compareText"]}),ya.MAX_GLYPHS=65535,ya.addDynamicAttributes=Yp;function l3(P,R){return R.replace(/{([^{}]+)}/g,function(W,at){return at in P?String(P[at]):""})}var u3=new ca({"symbol-placement":new oi(Ar.layout_symbol["symbol-placement"]),"symbol-spacing":new oi(Ar.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new oi(Ar.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ei(Ar.layout_symbol["symbol-sort-key"]),"symbol-z-order":new oi(Ar.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new oi(Ar.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new oi(Ar.layout_symbol["icon-ignore-placement"]),"icon-optional":new oi(Ar.layout_symbol["icon-optional"]),"icon-rotation-alignment":new oi(Ar.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ei(Ar.layout_symbol["icon-size"]),"icon-text-fit":new oi(Ar.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new oi(Ar.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ei(Ar.layout_symbol["icon-image"]),"icon-rotate":new Ei(Ar.layout_symbol["icon-rotate"]),"icon-padding":new oi(Ar.layout_symbol["icon-padding"]),"icon-keep-upright":new oi(Ar.layout_symbol["icon-keep-upright"]),"icon-offset":new Ei(Ar.layout_symbol["icon-offset"]),"icon-anchor":new Ei(Ar.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new oi(Ar.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new oi(Ar.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new oi(Ar.layout_symbol["text-rotation-alignment"]),"text-field":new Ei(Ar.layout_symbol["text-field"]),"text-font":new Ei(Ar.layout_symbol["text-font"]),"text-size":new Ei(Ar.layout_symbol["text-size"]),"text-max-width":new Ei(Ar.layout_symbol["text-max-width"]),"text-line-height":new oi(Ar.layout_symbol["text-line-height"]),"text-letter-spacing":new Ei(Ar.layout_symbol["text-letter-spacing"]),"text-justify":new Ei(Ar.layout_symbol["text-justify"]),"text-radial-offset":new Ei(Ar.layout_symbol["text-radial-offset"]),"text-variable-anchor":new oi(Ar.layout_symbol["text-variable-anchor"]),"text-anchor":new Ei(Ar.layout_symbol["text-anchor"]),"text-max-angle":new oi(Ar.layout_symbol["text-max-angle"]),"text-writing-mode":new oi(Ar.layout_symbol["text-writing-mode"]),"text-rotate":new Ei(Ar.layout_symbol["text-rotate"]),"text-padding":new oi(Ar.layout_symbol["text-padding"]),"text-keep-upright":new oi(Ar.layout_symbol["text-keep-upright"]),"text-transform":new Ei(Ar.layout_symbol["text-transform"]),"text-offset":new Ei(Ar.layout_symbol["text-offset"]),"text-allow-overlap":new oi(Ar.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new oi(Ar.layout_symbol["text-ignore-placement"]),"text-optional":new oi(Ar.layout_symbol["text-optional"])}),f3=new ca({"icon-opacity":new Ei(Ar.paint_symbol["icon-opacity"]),"icon-color":new Ei(Ar.paint_symbol["icon-color"]),"icon-halo-color":new Ei(Ar.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ei(Ar.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ei(Ar.paint_symbol["icon-halo-blur"]),"icon-translate":new oi(Ar.paint_symbol["icon-translate"]),"icon-translate-anchor":new oi(Ar.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ei(Ar.paint_symbol["text-opacity"]),"text-color":new Ei(Ar.paint_symbol["text-color"],{runtimeType:Pn,getOverride:function(P){return P.textColor},hasOverride:function(P){return!!P.textColor}}),"text-halo-color":new Ei(Ar.paint_symbol["text-halo-color"]),"text-halo-width":new Ei(Ar.paint_symbol["text-halo-width"]),"text-halo-blur":new Ei(Ar.paint_symbol["text-halo-blur"]),"text-translate":new oi(Ar.paint_symbol["text-translate"]),"text-translate-anchor":new oi(Ar.paint_symbol["text-translate-anchor"])}),Xp={paint:f3,layout:u3},Eh=function(R){this.type=R.property.overrides?R.property.overrides.runtimeType:Hr,this.defaultValue=R};Eh.prototype.evaluate=function(R){if(R.formattedSection){var W=this.defaultValue.property.overrides;if(W&&W.hasOverride(R.formattedSection))return W.getOverride(R.formattedSection)}return R.feature&&R.featureState?this.defaultValue.evaluate(R.feature,R.featureState):this.defaultValue.property.specification.default},Eh.prototype.eachChild=function(R){if(!this.defaultValue.isConstant()){var W=this.defaultValue.value;R(W._styleExpression.expression)}},Eh.prototype.outputDefined=function(){return!1},Eh.prototype.serialize=function(){return null},Bt("FormatSectionOverride",Eh,{omit:["defaultValue"]});var c3=function(P){function R(W){P.call(this,W,Xp)}return P&&(R.__proto__=P),R.prototype=Object.create(P&&P.prototype),R.prototype.constructor=R,R.prototype.recalculate=function(at,vt){if(P.prototype.recalculate.call(this,at,vt),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var St=this.layout.get("text-writing-mode");if(St){for(var Pt=[],te=0,ye=St;te",targetMapId:vt,sourceMapId:Pt.mapId})}}},_h.prototype.receive=function(R){var W=R.data,at=W.id;if(at&&!(W.targetMapId&&this.mapId!==W.targetMapId))if(W.type===""){delete this.tasks[at];var vt=this.cancelCallbacks[at];delete this.cancelCallbacks[at],vt&&vt()}else j()||W.mustQueue?(this.tasks[at]=W,this.taskQueue.push(at),this.invoker.trigger()):this.processTask(at,W)},_h.prototype.process=function(){if(this.taskQueue.length){var R=this.taskQueue.shift(),W=this.tasks[R];delete this.tasks[R],this.taskQueue.length&&this.invoker.trigger(),W&&this.processTask(R,W)}},_h.prototype.processTask=function(R,W){var at=this;if(W.type===""){var vt=this.callbacks[R];delete this.callbacks[R],vt&&(W.error?vt(Ee(W.error)):vt(null,Ee(W.data)))}else{var St=!1,Pt=ut(this.globalScope)?void 0:[],te=W.hasCallback?function(ar,tr){St=!0,delete at.cancelCallbacks[R],at.target.postMessage({id:R,type:"",sourceMapId:at.mapId,error:ar?De(ar):null,data:De(tr,Pt)},Pt)}:function(ar){St=!0},ye=null,_e=Ee(W.data);if(this.parent[W.type])ye=this.parent[W.type](W.sourceMapId,_e,te);else if(this.parent.getWorkerSource){var Fe=W.type.split("."),je=this.parent.getWorkerSource(W.sourceMapId,Fe[0],_e.source);ye=je[Fe[1]](_e,te)}else te(new Error("Could not find function "+W.type));!St&&ye&&ye.cancel&&(this.cancelCallbacks[R]=ye.cancel)}},_h.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function T3(P,R,W){R=Math.pow(2,W)-R-1;var at=Xg(P*256,R*256,W),vt=Xg((P+1)*256,(R+1)*256,W);return at[0]+","+at[1]+","+vt[0]+","+vt[1]}function Xg(P,R,W){var at=2*Math.PI*6378137/256/Math.pow(2,W),vt=P*at-2*Math.PI*6378137/2,St=R*at-2*Math.PI*6378137/2;return[vt,St]}var io=function(R,W){R&&(W?this.setSouthWest(R).setNorthEast(W):R.length===4?this.setSouthWest([R[0],R[1]]).setNorthEast([R[2],R[3]]):this.setSouthWest(R[0]).setNorthEast(R[1]))};io.prototype.setNorthEast=function(R){return this._ne=R instanceof La?new La(R.lng,R.lat):La.convert(R),this},io.prototype.setSouthWest=function(R){return this._sw=R instanceof La?new La(R.lng,R.lat):La.convert(R),this},io.prototype.extend=function(R){var W=this._sw,at=this._ne,vt,St;if(R instanceof La)vt=R,St=R;else if(R instanceof io){if(vt=R._sw,St=R._ne,!vt||!St)return this}else{if(Array.isArray(R))if(R.length===4||R.every(Array.isArray)){var Pt=R;return this.extend(io.convert(Pt))}else{var te=R;return this.extend(La.convert(te))}return this}return!W&&!at?(this._sw=new La(vt.lng,vt.lat),this._ne=new La(St.lng,St.lat)):(W.lng=Math.min(vt.lng,W.lng),W.lat=Math.min(vt.lat,W.lat),at.lng=Math.max(St.lng,at.lng),at.lat=Math.max(St.lat,at.lat)),this},io.prototype.getCenter=function(){return new La((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},io.prototype.getSouthWest=function(){return this._sw},io.prototype.getNorthEast=function(){return this._ne},io.prototype.getNorthWest=function(){return new La(this.getWest(),this.getNorth())},io.prototype.getSouthEast=function(){return new La(this.getEast(),this.getSouth())},io.prototype.getWest=function(){return this._sw.lng},io.prototype.getSouth=function(){return this._sw.lat},io.prototype.getEast=function(){return this._ne.lng},io.prototype.getNorth=function(){return this._ne.lat},io.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},io.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},io.prototype.isEmpty=function(){return!(this._sw&&this._ne)},io.prototype.contains=function(R){var W=La.convert(R),at=W.lng,vt=W.lat,St=this._sw.lat<=vt&&vt<=this._ne.lat,Pt=this._sw.lng<=at&&at<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Pt=this._sw.lng>=at&&at>=this._ne.lng),St&&Pt},io.convert=function(R){return!R||R instanceof io?R:new io(R)};var Zg=63710088e-1,La=function(R,W){if(isNaN(R)||isNaN(W))throw new Error("Invalid LngLat object: ("+R+", "+W+")");if(this.lng=+R,this.lat=+W,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};La.prototype.wrap=function(){return new La(b(this.lng,-180,180),this.lat)},La.prototype.toArray=function(){return[this.lng,this.lat]},La.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},La.prototype.distanceTo=function(R){var W=Math.PI/180,at=this.lat*W,vt=R.lat*W,St=Math.sin(at)*Math.sin(vt)+Math.cos(at)*Math.cos(vt)*Math.cos((R.lng-this.lng)*W),Pt=Zg*Math.acos(Math.min(St,1));return Pt},La.prototype.toBounds=function(R){R===void 0&&(R=0);var W=40075017,at=360*R/W,vt=at/Math.cos(Math.PI/180*this.lat);return new io(new La(this.lng-vt,this.lat-at),new La(this.lng+vt,this.lat+at))},La.convert=function(R){if(R instanceof La)return R;if(Array.isArray(R)&&(R.length===2||R.length===3))return new La(Number(R[0]),Number(R[1]));if(!Array.isArray(R)&&typeof R=="object"&&R!==null)return new La(Number("lng"in R?R.lng:R.lon),Number(R.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var jg=2*Math.PI*Zg;function Kg(P){return jg*Math.cos(P*Math.PI/180)}function Jg(P){return(180+P)/360}function Qg(P){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+P*Math.PI/360)))/360}function $g(P,R){return P/Kg(R)}function A3(P){return P*360-180}function jp(P){var R=180-P*360;return 360/Math.PI*Math.atan(Math.exp(R*Math.PI/180))-90}function M3(P,R){return P*Kg(jp(R))}function S3(P){return 1/Math.cos(P*Math.PI/180)}var Gc=function(R,W,at){at===void 0&&(at=0),this.x=+R,this.y=+W,this.z=+at};Gc.fromLngLat=function(R,W){W===void 0&&(W=0);var at=La.convert(R);return new Gc(Jg(at.lng),Qg(at.lat),$g(W,at.lat))},Gc.prototype.toLngLat=function(){return new La(A3(this.x),jp(this.y))},Gc.prototype.toAltitude=function(){return M3(this.z,this.y)},Gc.prototype.meterInMercatorCoordinateUnits=function(){return 1/jg*S3(jp(this.y))};var Wc=function(R,W,at){this.z=R,this.x=W,this.y=at,this.key=zv(0,R,R,W,at)};Wc.prototype.equals=function(R){return this.z===R.z&&this.x===R.x&&this.y===R.y},Wc.prototype.url=function(R,W){var at=T3(this.x,this.y,this.z),vt=E3(this.z,this.x,this.y);return R[(this.x+this.y)%R.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String(W==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",vt).replace("{bbox-epsg-3857}",at)},Wc.prototype.getTilePoint=function(R){var W=Math.pow(2,this.z);return new r((R.x*W-this.x)*Ai,(R.y*W-this.y)*Ai)},Wc.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var qg=function(R,W){this.wrap=R,this.canonical=W,this.key=zv(R,W.z,W.z,W.x,W.y)},ao=function(R,W,at,vt,St){this.overscaledZ=R,this.wrap=W,this.canonical=new Wc(at,+vt,+St),this.key=zv(W,R,at,vt,St)};ao.prototype.equals=function(R){return this.overscaledZ===R.overscaledZ&&this.wrap===R.wrap&&this.canonical.equals(R.canonical)},ao.prototype.scaledTo=function(R){var W=this.canonical.z-R;return R>this.canonical.z?new ao(R,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ao(R,this.wrap,R,this.canonical.x>>W,this.canonical.y>>W)},ao.prototype.calculateScaledKey=function(R,W){var at=this.canonical.z-R;return R>this.canonical.z?zv(this.wrap*+W,R,this.canonical.z,this.canonical.x,this.canonical.y):zv(this.wrap*+W,R,R,this.canonical.x>>at,this.canonical.y>>at)},ao.prototype.isChildOf=function(R){if(R.wrap!==this.wrap)return!1;var W=this.canonical.z-R.canonical.z;return R.overscaledZ===0||R.overscaledZ>W&&R.canonical.y===this.canonical.y>>W},ao.prototype.children=function(R){if(this.overscaledZ>=R)return[new ao(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var W=this.canonical.z+1,at=this.canonical.x*2,vt=this.canonical.y*2;return[new ao(W,this.wrap,W,at,vt),new ao(W,this.wrap,W,at+1,vt),new ao(W,this.wrap,W,at,vt+1),new ao(W,this.wrap,W,at+1,vt+1)]},ao.prototype.isLessThan=function(R){return this.wrapR.wrap?!1:this.overscaledZR.overscaledZ?!1:this.canonical.xR.canonical.x?!1:this.canonical.y0;St--)vt=1<=this.dim+1||W<-1||W>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(W+1)*this.stride+(R+1)},uf.prototype._unpackMapbox=function(R,W,at){return(R*256*256+W*256+at)/10-1e4},uf.prototype._unpackTerrarium=function(R,W,at){return R*256+W+at/256-32768},uf.prototype.getPixels=function(){return new us({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},uf.prototype.backfillBorder=function(R,W,at){if(this.dim!==R.dim)throw new Error("dem dimension mismatch");var vt=W*this.dim,St=W*this.dim+this.dim,Pt=at*this.dim,te=at*this.dim+this.dim;switch(W){case-1:vt=St-1;break;case 1:St=vt+1;break}switch(at){case-1:Pt=te-1;break;case 1:te=Pt+1;break}for(var ye=-W*this.dim,_e=-at*this.dim,Fe=Pt;Fe=0&&je[3]>=0&&ye.insert(te,je[0],je[1],je[2],je[3])}},ff.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new gh.VectorTile(new dd(this.rawTileData)).layers,this.sourceLayerCoder=new Md(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},ff.prototype.query=function(R,W,at,vt){var St=this;this.loadVTLayers();for(var Pt=R.params||{},te=Ai/R.tileSize/R.scale,ye=Os(Pt.filter),_e=R.queryGeometry,Fe=R.queryPadding*te,je=em(_e),ar=this.grid.query(je.minX-Fe,je.minY-Fe,je.maxX+Fe,je.maxY+Fe),tr=em(R.cameraQueryGeometry),yr=this.grid3D.query(tr.minX-Fe,tr.minY-Fe,tr.maxX+Fe,tr.maxY+Fe,function(Wn,ei,$n,bi){return Pl(R.cameraQueryGeometry,Wn-Fe,ei-Fe,$n+Fe,bi+Fe)}),zr=0,ln=yr;zrvt)St=!1;else if(!W)St=!0;else if(this.expirationTime=mr.maxzoom)&&mr.visibility!=="none"){n(dr,this.zoom,Ce);var xr=ur[mr.id]=mr.createBucket({index:Je.bucketLayerIDs.length,layers:dr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ne,sourceID:this.source});xr.populate(Oe,hr,this.tileID.canonical),Je.bucketLayerIDs.push(dr.map(function(Tr){return Tr.id}))}}}}var pr,Gr,Pr,Dr,cn=i.mapObject(hr.glyphDependencies,function(Tr){return Object.keys(Tr).map(Number)});Object.keys(cn).length?Ie.send("getGlyphs",{uid:this.uid,stacks:cn},function(Tr,Cr){pr||(pr=Tr,Gr=Cr,En.call(ke))}):Gr={};var rn=Object.keys(hr.iconDependencies);rn.length?Ie.send("getImages",{icons:rn,source:this.source,tileID:this.tileID,type:"icons"},function(Tr,Cr){pr||(pr=Tr,Pr=Cr,En.call(ke))}):Pr={};var Cn=Object.keys(hr.patternDependencies);Cn.length?Ie.send("getImages",{icons:Cn,source:this.source,tileID:this.tileID,type:"patterns"},function(Tr,Cr){pr||(pr=Tr,Dr=Cr,En.call(ke))}):Dr={},En.call(this);function En(){if(pr)return Pe(pr);if(Gr&&Pr&&Dr){var Tr=new e(Gr),Cr=new i.ImageAtlas(Pr,Dr);for(var Wr in ur){var Ur=ur[Wr];Ur instanceof i.SymbolBucket?(n(Ur.layers,this.zoom,Ce),i.performSymbolLayout(Ur,Gr,Tr.positions,Pr,Cr.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Ur.hasPattern&&(Ur instanceof i.LineBucket||Ur instanceof i.FillBucket||Ur instanceof i.FillExtrusionBucket)&&(n(Ur.layers,this.zoom,Ce),Ur.addFeatures(hr,this.tileID.canonical,Cr.patternPositions))}this.status="done",Pe(null,{buckets:i.values(ur).filter(function(an){return!an.isEmpty()}),featureIndex:Je,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Tr.image,imageAtlas:Cr,glyphMap:this.returnDependencies?Gr:null,iconMap:this.returnDependencies?Pr:null,glyphPositions:this.returnDependencies?Tr.positions:null})}}};function n(ge,se,Ae){for(var Ce=new i.EvaluationParameters(se),Ie=0,Pe=ge;Ie=0!=!!se&&ge.reverse()}var d=i.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=function(se){this._feature=se,this.extent=i.EXTENT,this.type=se.type,this.properties=se.tags,"id"in se&&!isNaN(se.id)&&(this.id=parseInt(se.id,10))};w.prototype.loadGeometry=function(){if(this._feature.type===1){for(var se=[],Ae=0,Ce=this._feature.geometry;Ae"u"&&(Ce.push(Ve),Je=Ce.length-1,Pe[Ve]=Je),se.writeVarint(Je);var ur=Ae.properties[Ve],hr=typeof ur;hr!=="string"&&hr!=="boolean"&&hr!=="number"&&(ur=JSON.stringify(ur));var vr=hr+":"+ur,Yt=ke[vr];typeof Yt>"u"&&(Ie.push(ur),Yt=Ie.length-1,ke[vr]=Yt),se.writeVarint(Yt)}}function H(ge,se){return(se<<3)+(ge&7)}function Y(ge){return ge<<1^ge>>31}function j(ge,se){for(var Ae=ge.loadGeometry(),Ce=ge.type,Ie=0,Pe=0,ke=Ae.length,Ve=0;Ve>1;ut(ge,se,ke,Ce,Ie,Pe%2),it(ge,se,Ae,Ce,ke-1,Pe+1),it(ge,se,Ae,ke+1,Ie,Pe+1)}}function ut(ge,se,Ae,Ce,Ie,Pe){for(;Ie>Ce;){if(Ie-Ce>600){var ke=Ie-Ce+1,Ve=Ae-Ce+1,Je=Math.log(ke),ur=.5*Math.exp(2*Je/3),hr=.5*Math.sqrt(Je*ur*(ke-ur)/ke)*(Ve-ke/2<0?-1:1),vr=Math.max(Ce,Math.floor(Ae-Ve*ur/ke+hr)),Yt=Math.min(Ie,Math.floor(Ae+(ke-Ve)*ur/ke+hr));ut(ge,se,Ae,vr,Yt,Pe)}var Gt=se[2*Ae+Pe],Ne=Ce,Oe=Ie;for(J(ge,se,Ce,Ae),se[2*Ie+Pe]>Gt&&J(ge,se,Ce,Ie);NeGt;)Oe--}se[2*Ce+Pe]===Gt?J(ge,se,Ce,Oe):(Oe++,J(ge,se,Oe,Ie)),Oe<=Ae&&(Ce=Oe+1),Ae<=Oe&&(Ie=Oe-1)}}function J(ge,se,Ae,Ce){X(ge,Ae,Ce),X(se,2*Ae,2*Ce),X(se,2*Ae+1,2*Ce+1)}function X(ge,se,Ae){var Ce=ge[se];ge[se]=ge[Ae],ge[Ae]=Ce}function tt(ge,se,Ae,Ce,Ie,Pe,ke){for(var Ve=[0,ge.length-1,0],Je=[],ur,hr;Ve.length;){var vr=Ve.pop(),Yt=Ve.pop(),Gt=Ve.pop();if(Yt-Gt<=ke){for(var Ne=Gt;Ne<=Yt;Ne++)ur=se[2*Ne],hr=se[2*Ne+1],ur>=Ae&&ur<=Ie&&hr>=Ce&&hr<=Pe&&Je.push(ge[Ne]);continue}var Oe=Math.floor((Gt+Yt)/2);ur=se[2*Oe],hr=se[2*Oe+1],ur>=Ae&&ur<=Ie&&hr>=Ce&&hr<=Pe&&Je.push(ge[Oe]);var Qe=(vr+1)%2;(vr===0?Ae<=ur:Ce<=hr)&&(Ve.push(Gt),Ve.push(Oe-1),Ve.push(Qe)),(vr===0?Ie>=ur:Pe>=hr)&&(Ve.push(Oe+1),Ve.push(Yt),Ve.push(Qe))}return Je}function V(ge,se,Ae,Ce,Ie,Pe){for(var ke=[0,ge.length-1,0],Ve=[],Je=Ie*Ie;ke.length;){var ur=ke.pop(),hr=ke.pop(),vr=ke.pop();if(hr-vr<=Pe){for(var Yt=vr;Yt<=hr;Yt++)Q(se[2*Yt],se[2*Yt+1],Ae,Ce)<=Je&&Ve.push(ge[Yt]);continue}var Gt=Math.floor((vr+hr)/2),Ne=se[2*Gt],Oe=se[2*Gt+1];Q(Ne,Oe,Ae,Ce)<=Je&&Ve.push(ge[Gt]);var Qe=(ur+1)%2;(ur===0?Ae-Ie<=Ne:Ce-Ie<=Oe)&&(ke.push(vr),ke.push(Gt-1),ke.push(Qe)),(ur===0?Ae+Ie>=Ne:Ce+Ie>=Oe)&&(ke.push(Gt+1),ke.push(hr),ke.push(Qe))}return Ve}function Q(ge,se,Ae,Ce){var Ie=ge-Ae,Pe=se-Ce;return Ie*Ie+Pe*Pe}var ot=function(ge){return ge[0]},$=function(ge){return ge[1]},Z=function(se,Ae,Ce,Ie,Pe){Ae===void 0&&(Ae=ot),Ce===void 0&&(Ce=$),Ie===void 0&&(Ie=64),Pe===void 0&&(Pe=Float64Array),this.nodeSize=Ie,this.points=se;for(var ke=se.length<65536?Uint16Array:Uint32Array,Ve=this.ids=new ke(se.length),Je=this.coords=new Pe(se.length*2),ur=0;ur=Ie;hr--){var vr=+Date.now();Je=this._cluster(Je,hr),this.trees[hr]=new Z(Je,Ht,Ut,ke,Float32Array),Ce&&console.log("z%d: %d clusters in %dms",hr,Je.length,+Date.now()-vr)}return Ce&&console.timeEnd("total time"),this},nt.prototype.getClusters=function(se,Ae){var Ce=((se[0]+180)%360+360)%360-180,Ie=Math.max(-90,Math.min(90,se[1])),Pe=se[2]===180?180:((se[2]+180)%360+360)%360-180,ke=Math.max(-90,Math.min(90,se[3]));if(se[2]-se[0]>=360)Ce=-180,Pe=180;else if(Ce>Pe){var Ve=this.getClusters([Ce,Ie,180,ke],Ae),Je=this.getClusters([-180,Ie,Pe,ke],Ae);return Ve.concat(Je)}for(var ur=this.trees[this._limitZoom(Ae)],hr=ur.range(Rt(Ce),bt(ke),Rt(Pe),bt(Ie)),vr=[],Yt=0,Gt=hr;YtAe&&(Oe+=rr.numPoints||1)}if(Oe>=Je){for(var He=vr.x*Ne,dr=vr.y*Ne,mr=Ve&&Ne>1?this._map(vr,!0):null,xr=(hr<<5)+(Ae+1)+this.points.length,pr=0,Gr=Gt;pr1)for(var rn=0,Cn=Gt;rn>5},nt.prototype._getOriginZoom=function(se){return(se-this.points.length)%32},nt.prototype._map=function(se,Ae){if(se.numPoints)return Ae?Lt({},se.properties):se.properties;var Ce=this.points[se.index].properties,Ie=this.options.map(Ce);return Ae&&Ie===Ce?Lt({},Ie):Ie};function ct(ge,se,Ae,Ce,Ie){return{x:ge,y:se,zoom:1/0,id:Ae,parentId:-1,numPoints:Ce,properties:Ie}}function gt(ge,se){var Ae=ge.geometry.coordinates,Ce=Ae[0],Ie=Ae[1];return{x:Rt(Ce),y:bt(Ie),zoom:1/0,index:se,parentId:-1}}function Tt(ge){return{type:"Feature",id:ge.id,properties:wt(ge),geometry:{type:"Point",coordinates:[At(ge.x),mt(ge.y)]}}}function wt(ge){var se=ge.numPoints,Ae=se>=1e4?Math.round(se/1e3)+"k":se>=1e3?Math.round(se/100)/10+"k":se;return Lt(Lt({},ge.properties),{cluster:!0,cluster_id:ge.id,point_count:se,point_count_abbreviated:Ae})}function Rt(ge){return ge/360+.5}function bt(ge){var se=Math.sin(ge*Math.PI/180),Ae=.5-.25*Math.log((1+se)/(1-se))/Math.PI;return Ae<0?0:Ae>1?1:Ae}function At(ge){return(ge-.5)*360}function mt(ge){var se=(180-ge*360)*Math.PI/180;return 360*Math.atan(Math.exp(se))/Math.PI-90}function Lt(ge,se){for(var Ae in se)ge[Ae]=se[Ae];return ge}function Ht(ge){return ge.x}function Ut(ge){return ge.y}function kt(ge,se,Ae,Ce){for(var Ie=Ce,Pe=Ae-se>>1,ke=Ae-se,Ve,Je=ge[se],ur=ge[se+1],hr=ge[Ae],vr=ge[Ae+1],Yt=se+3;YtIe)Ve=Yt,Ie=Gt;else if(Gt===Ie){var Ne=Math.abs(Yt-Pe);NeCe&&(Ve-se>3&&kt(ge,se,Ve,Ce),ge[Ve+2]=Ie,Ae-Ve>3&&kt(ge,Ve,Ae,Ce))}function Vt(ge,se,Ae,Ce,Ie,Pe){var ke=Ie-Ae,Ve=Pe-Ce;if(ke!==0||Ve!==0){var Je=((ge-Ae)*ke+(se-Ce)*Ve)/(ke*ke+Ve*Ve);Je>1?(Ae=Ie,Ce=Pe):Je>0&&(Ae+=ke*Je,Ce+=Ve*Je)}return ke=ge-Ae,Ve=se-Ce,ke*ke+Ve*Ve}function It(ge,se,Ae,Ce){var Ie={id:typeof ge>"u"?null:ge,type:se,geometry:Ae,tags:Ce,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return re(Ie),Ie}function re(ge){var se=ge.geometry,Ae=ge.type;if(Ae==="Point"||Ae==="MultiPoint"||Ae==="LineString")Kt(ge,se);else if(Ae==="Polygon"||Ae==="MultiLineString")for(var Ce=0;Ce0&&(Ce?ke+=(Ie*ur-Je*Pe)/2:ke+=Math.sqrt(Math.pow(Je-Ie,2)+Math.pow(ur-Pe,2))),Ie=Je,Pe=ur}var hr=se.length-3;se[2]=1,kt(se,0,hr,Ae),se[hr+2]=1,se.size=Math.abs(ke),se.start=0,se.end=se.size}function xe(ge,se,Ae,Ce){for(var Ie=0;Ie1?1:Ae}function zt(ge,se,Ae,Ce,Ie,Pe,ke,Ve){if(Ae/=se,Ce/=se,Pe>=Ae&&ke=Ce)return null;for(var Je=[],ur=0;ur=Ae&&Ne=Ce)continue;var Oe=[];if(Yt==="Point"||Yt==="MultiPoint")Xt(vr,Oe,Ae,Ce,Ie);else if(Yt==="LineString")Jt(vr,Oe,Ae,Ce,Ie,!1,Ve.lineMetrics);else if(Yt==="MultiLineString")Ft(vr,Oe,Ae,Ce,Ie,!1);else if(Yt==="Polygon")Ft(vr,Oe,Ae,Ce,Ie,!0);else if(Yt==="MultiPolygon")for(var Qe=0;Qe=Ae&&ke<=Ce&&(se.push(ge[Pe]),se.push(ge[Pe+1]),se.push(ge[Pe+2]))}}function Jt(ge,se,Ae,Ce,Ie,Pe,ke){for(var Ve=Wt(ge),Je=Ie===0?yt:Et,ur=ge.start,hr,vr,Yt=0;YtAe&&(vr=Je(Ve,Gt,Ne,Qe,er,Ae),ke&&(Ve.start=ur+hr*vr)):fr>Ce?rr=Ae&&(vr=Je(Ve,Gt,Ne,Qe,er,Ae),He=!0),rr>Ce&&fr<=Ce&&(vr=Je(Ve,Gt,Ne,Qe,er,Ce),He=!0),!Pe&&He&&(ke&&(Ve.end=ur+hr*vr),se.push(Ve),Ve=Wt(ge)),ke&&(ur+=hr)}var dr=ge.length-3;Gt=ge[dr],Ne=ge[dr+1],Oe=ge[dr+2],fr=Ie===0?Gt:Ne,fr>=Ae&&fr<=Ce&&xt(Ve,Gt,Ne,Oe),dr=Ve.length-3,Pe&&dr>=3&&(Ve[dr]!==Ve[0]||Ve[dr+1]!==Ve[1])&&xt(Ve,Ve[0],Ve[1],Ve[2]),Ve.length&&se.push(Ve)}function Wt(ge){var se=[];return se.size=ge.size,se.start=ge.start,se.end=ge.end,se}function Ft(ge,se,Ae,Ce,Ie,Pe){for(var ke=0;keke.maxX&&(ke.maxX=hr),vr>ke.maxY&&(ke.maxY=vr)}return ke}function ve(ge,se,Ae,Ce){var Ie=se.geometry,Pe=se.type,ke=[];if(Pe==="Point"||Pe==="MultiPoint")for(var Ve=0;Ve0&&se.size<(Ie?ke:Ce)){Ae.numPoints+=se.length/3;return}for(var Ve=[],Je=0;Jeke)&&(Ae.numSimplified++,Ve.push(se[Je]),Ve.push(se[Je+1])),Ae.numPoints++;Ie&&ce(Ve,Pe),ge.push(Ve)}function ce(ge,se){for(var Ae=0,Ce=0,Ie=ge.length,Pe=Ie-2;Ce0===se)for(Ce=0,Ie=ge.length;Ce24)throw new Error("maxZoom should be in the 0-24 range");if(se.promoteId&&se.generateId)throw new Error("promoteId and generateId cannot be used together.");var Ce=$t(ge,se);this.tiles={},this.tileCoords=[],Ae&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",se.indexMaxZoom,se.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ce=Mt(Ce,se),Ce.length&&this.splitTile(Ce,0,0,0),Ae&&(Ce.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}Be.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Be.prototype.splitTile=function(ge,se,Ae,Ce,Ie,Pe,ke){for(var Ve=[ge,se,Ae,Ce],Je=this.options,ur=Je.debug;Ve.length;){Ce=Ve.pop(),Ae=Ve.pop(),se=Ve.pop(),ge=Ve.pop();var hr=1<1&&console.time("creation"),Yt=this.tiles[vr]=be(ge,se,Ae,Ce,Je),this.tileCoords.push({z:se,x:Ae,y:Ce}),ur)){ur>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",se,Ae,Ce,Yt.numFeatures,Yt.numPoints,Yt.numSimplified),console.timeEnd("creation"));var Gt="z"+se;this.stats[Gt]=(this.stats[Gt]||0)+1,this.total++}if(Yt.source=ge,Ie){if(se===Je.maxZoom||se===Ie)continue;var Ne=1<1&&console.time("clipping");var Oe=.5*Je.buffer/Je.extent,Qe=.5-Oe,er=.5+Oe,fr=1+Oe,rr,He,dr,mr,xr,pr;rr=He=dr=mr=null,xr=zt(ge,hr,Ae-Oe,Ae+er,0,Yt.minX,Yt.maxX,Je),pr=zt(ge,hr,Ae+Qe,Ae+fr,0,Yt.minX,Yt.maxX,Je),ge=null,xr&&(rr=zt(xr,hr,Ce-Oe,Ce+er,1,Yt.minY,Yt.maxY,Je),He=zt(xr,hr,Ce+Qe,Ce+fr,1,Yt.minY,Yt.maxY,Je),xr=null),pr&&(dr=zt(pr,hr,Ce-Oe,Ce+er,1,Yt.minY,Yt.maxY,Je),mr=zt(pr,hr,Ce+Qe,Ce+fr,1,Yt.minY,Yt.maxY,Je),pr=null),ur>1&&console.timeEnd("clipping"),Ve.push(rr||[],se+1,Ae*2,Ce*2),Ve.push(He||[],se+1,Ae*2,Ce*2+1),Ve.push(dr||[],se+1,Ae*2+1,Ce*2),Ve.push(mr||[],se+1,Ae*2+1,Ce*2+1)}}},Be.prototype.getTile=function(ge,se,Ae){var Ce=this.options,Ie=Ce.extent,Pe=Ce.debug;if(ge<0||ge>24)return null;var ke=1<1&&console.log("drilling down to z%d-%d-%d",ge,se,Ae);for(var Je=ge,ur=se,hr=Ae,vr;!vr&&Je>0;)Je--,ur=Math.floor(ur/2),hr=Math.floor(hr/2),vr=this.tiles[ir(Je,ur,hr)];return!vr||!vr.source?null:(Pe>1&&console.log("found parent tile z%d-%d-%d",Je,ur,hr),Pe>1&&console.time("drilling down"),this.splitTile(vr.source,Je,ur,hr,ge,se,Ae),Pe>1&&console.timeEnd("drilling down"),this.tiles[Ve]?ie(this.tiles[Ve],Ie):null)};function ir(ge,se,Ae){return((1<=0?0:ht.button},x.remove=function(ht){ht.parentNode&&ht.parentNode.removeChild(ht)};function l(ht,K,dt){var rt,pt,Ot,Qt=i.browser.devicePixelRatio>1?"@2x":"",ue=i.getJSON(K.transformRequest(K.normalizeSpriteURL(ht,Qt,".json"),i.ResourceType.SpriteJSON),function(qe,cr){ue=null,Ot||(Ot=qe,rt=cr,We())}),Re=i.getImage(K.transformRequest(K.normalizeSpriteURL(ht,Qt,".png"),i.ResourceType.SpriteImage),function(qe,cr){Re=null,Ot||(Ot=qe,pt=cr,We())});function We(){if(Ot)dt(Ot);else if(rt&&pt){var qe=i.browser.getImageData(pt),cr={};for(var lr in rt){var Fr=rt[lr],Xr=Fr.width,Yr=Fr.height,Vr=Fr.x,Kr=Fr.y,fn=Fr.sdf,Fn=Fr.pixelRatio,Nn=Fr.stretchX,Yn=Fr.stretchY,Xn=Fr.content,Gn=new i.RGBAImage({width:Xr,height:Yr});i.RGBAImage.copy(qe,Gn,{x:Vr,y:Kr},{x:0,y:0},{width:Xr,height:Yr}),cr[lr]={data:Gn,pixelRatio:Fn,sdf:fn,stretchX:Nn,stretchY:Yn,content:Xn}}dt(null,cr)}}return{cancel:function(){ue&&(ue.cancel(),ue=null),Re&&(Re.cancel(),Re=null)}}}function m(ht){var K=ht.userImage;if(K&&K.render){var dt=K.render();if(dt)return ht.data.replace(new Uint8Array(K.data.buffer)),!0}return!1}var h=1,b=function(ht){function K(){ht.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.RGBAImage({width:1,height:1}),this.dirty=!0}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.isLoaded=function(){return this.loaded},K.prototype.setLoaded=function(rt){if(this.loaded!==rt&&(this.loaded=rt,rt)){for(var pt=0,Ot=this.requestors;pt=0?1.2:1))}A.prototype.draw=function(ht){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ht,this.buffer,this.middle);for(var K=this.ctx.getImageData(0,0,this.size,this.size),dt=new Uint8ClampedArray(this.size*this.size),rt=0;rt65535){qe(new Error("glyphs > 65535 not supported"));return}if(Fr.ranges[Yr]){qe(null,{stack:cr,id:lr,glyph:Xr});return}var Vr=Fr.requests[Yr];Vr||(Vr=Fr.requests[Yr]=[],E.loadGlyphRange(cr,Yr,rt.url,rt.requestManager,function(Kr,fn){if(fn){for(var Fn in fn)rt._doesCharSupportLocalGlyph(+Fn)||(Fr.glyphs[+Fn]=fn[+Fn]);Fr.ranges[Yr]=!0}for(var Nn=0,Yn=Vr;Nn1&&(We=K[++Re]);var cr=Math.abs(qe-We.left),lr=Math.abs(qe-We.right),Fr=Math.min(cr,lr),Xr=void 0,Yr=Ot/rt*(pt+1);if(We.isDash){var Vr=pt-Math.abs(Yr);Xr=Math.sqrt(Fr*Fr+Vr*Vr)}else Xr=pt-Math.sqrt(Fr*Fr+Yr*Yr);this.data[ue+qe]=Math.max(0,Math.min(255,Xr+128))}},z.prototype.addRegularDash=function(K){for(var dt=K.length-1;dt>=0;--dt){var rt=K[dt],pt=K[dt+1];rt.zeroLength?K.splice(dt,1):pt&&pt.isDash===rt.isDash&&(pt.left=rt.left,K.splice(dt,1))}var Ot=K[0],Qt=K[K.length-1];Ot.isDash===Qt.isDash&&(Ot.left=Qt.left-this.width,Qt.right=Ot.right+this.width);for(var ue=this.width*this.nextRow,Re=0,We=K[Re],qe=0;qe1&&(We=K[++Re]);var cr=Math.abs(qe-We.left),lr=Math.abs(qe-We.right),Fr=Math.min(cr,lr),Xr=We.isDash?Fr:-Fr;this.data[ue+qe]=Math.max(0,Math.min(255,Xr+128))}},z.prototype.addDash=function(K,dt){var rt=dt?7:0,pt=2*rt+1;if(this.nextRow+pt>this.height)return i.warnOnce("LineAtlas out of space"),null;for(var Ot=0,Qt=0;Qt=rt.minX&&K.x=rt.minY&&K.y0&&(qe[new i.OverscaledTileID(rt.overscaledZ,ue,pt.z,Qt,pt.y-1).key]={backfilled:!1},qe[new i.OverscaledTileID(rt.overscaledZ,rt.wrap,pt.z,pt.x,pt.y-1).key]={backfilled:!1},qe[new i.OverscaledTileID(rt.overscaledZ,We,pt.z,Re,pt.y-1).key]={backfilled:!1}),pt.y+10&&(Ot.resourceTiming=rt._resourceTiming,rt._resourceTiming=[]),rt.fire(new i.Event("data",Ot))})},K.prototype.onAdd=function(rt){this.map=rt,this.load()},K.prototype.setData=function(rt){var pt=this;return this._data=rt,this.fire(new i.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Ot){if(Ot){pt.fire(new i.ErrorEvent(Ot));return}var Qt={dataType:"source",sourceDataType:"content"};pt._collectResourceTiming&&pt._resourceTiming&&pt._resourceTiming.length>0&&(Qt.resourceTiming=pt._resourceTiming,pt._resourceTiming=[]),pt.fire(new i.Event("data",Qt))}),this},K.prototype.getClusterExpansionZoom=function(rt,pt){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:rt,source:this.id},pt),this},K.prototype.getClusterChildren=function(rt,pt){return this.actor.send("geojson.getClusterChildren",{clusterId:rt,source:this.id},pt),this},K.prototype.getClusterLeaves=function(rt,pt,Ot,Qt){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:rt,limit:pt,offset:Ot},Qt),this},K.prototype._updateWorkerData=function(rt){var pt=this;this._loaded=!1;var Ot=i.extend({},this.workerOptions),Qt=this._data;typeof Qt=="string"?(Ot.request=this.map._requestManager.transformRequest(i.browser.resolveURL(Qt),i.ResourceType.Source),Ot.request.collectResourceTiming=this._collectResourceTiming):Ot.data=JSON.stringify(Qt),this.actor.send(this.type+".loadData",Ot,function(ue,Re){pt._removed||Re&&Re.abandoned||(pt._loaded=!0,Re&&Re.resourceTiming&&Re.resourceTiming[pt.id]&&(pt._resourceTiming=Re.resourceTiming[pt.id].slice(0)),pt.actor.send(pt.type+".coalesce",{source:Ot.source},null),rt(ue))})},K.prototype.loaded=function(){return this._loaded},K.prototype.loadTile=function(rt,pt){var Ot=this,Qt=rt.actor?"reloadTile":"loadTile";rt.actor=this.actor;var ue={type:this.type,uid:rt.uid,tileID:rt.tileID,zoom:rt.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:i.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};rt.request=this.actor.send(Qt,ue,function(Re,We){return delete rt.request,rt.unloadVectorData(),rt.aborted?pt(null):Re?pt(Re):(rt.loadVectorData(We,Ot.map.painter,Qt==="reloadTile"),pt(null))})},K.prototype.abortTile=function(rt){rt.request&&(rt.request.cancel(),delete rt.request),rt.aborted=!0},K.prototype.unloadTile=function(rt){rt.unloadVectorData(),this.actor.send("removeTile",{uid:rt.uid,type:this.type,source:this.id})},K.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},K.prototype.serialize=function(){return i.extend({},this._options,{type:this.type,data:this._data})},K.prototype.hasTransition=function(){return!1},K}(i.Evented),Y=i.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),j=function(ht){function K(dt,rt,pt,Ot){ht.call(this),this.id=dt,this.dispatcher=pt,this.coordinates=rt.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ot),this.options=rt}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.load=function(rt,pt){var Ot=this;this._loaded=!1,this.fire(new i.Event("dataloading",{dataType:"source"})),this.url=this.options.url,i.getImage(this.map._requestManager.transformRequest(this.url,i.ResourceType.Image),function(Qt,ue){Ot._loaded=!0,Qt?Ot.fire(new i.ErrorEvent(Qt)):ue&&(Ot.image=ue,rt&&(Ot.coordinates=rt),pt&&pt(),Ot._finishLoading())})},K.prototype.loaded=function(){return this._loaded},K.prototype.updateImage=function(rt){var pt=this;return!this.image||!rt.url?this:(this.options.url=rt.url,this.load(rt.coordinates,function(){pt.texture=null}),this)},K.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"metadata"})))},K.prototype.onAdd=function(rt){this.map=rt,this.load()},K.prototype.setCoordinates=function(rt){var pt=this;this.coordinates=rt;var Ot=rt.map(i.MercatorCoordinate.fromLngLat);this.tileID=et(Ot),this.minzoom=this.maxzoom=this.tileID.z;var Qt=Ot.map(function(ue){return pt.tileID.getTilePoint(ue)._round()});return this._boundsArray=new i.StructArrayLayout4i8,this._boundsArray.emplaceBack(Qt[0].x,Qt[0].y,0,0),this._boundsArray.emplaceBack(Qt[1].x,Qt[1].y,i.EXTENT,0),this._boundsArray.emplaceBack(Qt[3].x,Qt[3].y,0,i.EXTENT),this._boundsArray.emplaceBack(Qt[2].x,Qt[2].y,i.EXTENT,i.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.Event("data",{dataType:"source",sourceDataType:"content"})),this},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var rt=this.map.painter.context,pt=rt.gl;this.boundsBuffer||(this.boundsBuffer=rt.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new i.Texture(rt,this.image,pt.RGBA),this.texture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE));for(var Ot in this.tiles){var Qt=this.tiles[Ot];Qt.state!=="loaded"&&(Qt.state="loaded",Qt.texture=this.texture)}}},K.prototype.loadTile=function(rt,pt){this.tileID&&this.tileID.equals(rt.tileID.canonical)?(this.tiles[String(rt.tileID.wrap)]=rt,rt.buckets={},pt(null)):(rt.state="errored",pt(null))},K.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return!1},K}(i.Evented);function et(ht){for(var K=1/0,dt=1/0,rt=-1/0,pt=-1/0,Ot=0,Qt=ht;Otpt.end(0)?this.fire(new i.ErrorEvent(new i.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+pt.start(0)+" and "+pt.end(0)+"-second mark."))):this.video.currentTime=rt}},K.prototype.getVideo=function(){return this.video},K.prototype.onAdd=function(rt){this.map||(this.map=rt,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},K.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var rt=this.map.painter.context,pt=rt.gl;this.boundsBuffer||(this.boundsBuffer=rt.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE),pt.texSubImage2D(pt.TEXTURE_2D,0,0,0,pt.RGBA,pt.UNSIGNED_BYTE,this.video)):(this.texture=new i.Texture(rt,this.video,pt.RGBA),this.texture.bind(pt.LINEAR,pt.CLAMP_TO_EDGE));for(var Ot in this.tiles){var Qt=this.tiles[Ot];Qt.state!=="loaded"&&(Qt.state="loaded",Qt.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this.video&&!this.video.paused},K}(j),ut=function(ht){function K(dt,rt,pt,Ot){ht.call(this,dt,rt,pt,Ot),rt.coordinates?(!Array.isArray(rt.coordinates)||rt.coordinates.length!==4||rt.coordinates.some(function(Qt){return!Array.isArray(Qt)||Qt.length!==2||Qt.some(function(ue){return typeof ue!="number"})}))&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'missing required property "coordinates"'))),rt.animate&&typeof rt.animate!="boolean"&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'optional "animate" property must be a boolean value'))),rt.canvas?typeof rt.canvas!="string"&&!(rt.canvas instanceof i.window.HTMLCanvasElement)&&this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new i.ErrorEvent(new i.ValidationError("sources."+dt,null,'missing required property "canvas"'))),this.options=rt,this.animate=rt.animate!==void 0?rt.animate:!0}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof i.window.HTMLCanvasElement?this.options.canvas:i.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new i.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},K.prototype.getCanvas=function(){return this.canvas},K.prototype.onAdd=function(rt){this.map=rt,this.load(),this.canvas&&this.animate&&this.play()},K.prototype.onRemove=function(){this.pause()},K.prototype.prepare=function(){var rt=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,rt=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,rt=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var pt=this.map.painter.context,Ot=pt.gl;this.boundsBuffer||(this.boundsBuffer=pt.createVertexBuffer(this._boundsArray,Y.members)),this.boundsSegments||(this.boundsSegments=i.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(rt||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new i.Texture(pt,this.canvas,Ot.RGBA,{premultiply:!0});for(var Qt in this.tiles){var ue=this.tiles[Qt];ue.state!=="loaded"&&(ue.state="loaded",ue.texture=this.texture)}}},K.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},K.prototype.hasTransition=function(){return this._playing},K.prototype._hasInvalidDimensions=function(){for(var rt=0,pt=[this.canvas.width,this.canvas.height];rtthis.max){var ue=this._getAndRemoveByKey(this.order[0]);ue&&this.onRemove(ue)}return this},gt.prototype.has=function(K){return K.wrapped().key in this.data},gt.prototype.getAndRemove=function(K){return this.has(K)?this._getAndRemoveByKey(K.wrapped().key):null},gt.prototype._getAndRemoveByKey=function(K){var dt=this.data[K].shift();return dt.timeout&&clearTimeout(dt.timeout),this.data[K].length===0&&delete this.data[K],this.order.splice(this.order.indexOf(K),1),dt.value},gt.prototype.getByKey=function(K){var dt=this.data[K];return dt?dt[0].value:null},gt.prototype.get=function(K){if(!this.has(K))return null;var dt=this.data[K.wrapped().key][0];return dt.value},gt.prototype.remove=function(K,dt){if(!this.has(K))return this;var rt=K.wrapped().key,pt=dt===void 0?0:this.data[rt].indexOf(dt),Ot=this.data[rt][pt];return this.data[rt].splice(pt,1),Ot.timeout&&clearTimeout(Ot.timeout),this.data[rt].length===0&&delete this.data[rt],this.onRemove(Ot.value),this.order.splice(this.order.indexOf(rt),1),this},gt.prototype.setMaxSize=function(K){for(this.max=K;this.order.length>this.max;){var dt=this._getAndRemoveByKey(this.order[0]);dt&&this.onRemove(dt)}return this},gt.prototype.filter=function(K){var dt=[];for(var rt in this.data)for(var pt=0,Ot=this.data[rt];pt1||(Math.abs(cr)>1&&(Math.abs(cr+Fr)===1?cr+=Fr:Math.abs(cr-Fr)===1&&(cr-=Fr)),!(!qe.dem||!We.dem)&&(We.dem.backfillBorder(qe.dem,cr,lr),We.neighboringTiles&&We.neighboringTiles[Xr]&&(We.neighboringTiles[Xr].backfilled=!0)))}},K.prototype.getTile=function(rt){return this.getTileByID(rt.key)},K.prototype.getTileByID=function(rt){return this._tiles[rt]},K.prototype._retainLoadedChildren=function(rt,pt,Ot,Qt){for(var ue in this._tiles){var Re=this._tiles[ue];if(!(Qt[ue]||!Re.hasData()||Re.tileID.overscaledZ<=pt||Re.tileID.overscaledZ>Ot)){for(var We=Re.tileID;Re&&Re.tileID.overscaledZ>pt+1;){var qe=Re.tileID.scaledTo(Re.tileID.overscaledZ-1);Re=this._tiles[qe.key],Re&&Re.hasData()&&(We=qe)}for(var cr=We;cr.overscaledZ>pt;)if(cr=cr.scaledTo(cr.overscaledZ-1),rt[cr.key]){Qt[We.key]=We;break}}}},K.prototype.findLoadedParent=function(rt,pt){if(rt.key in this._loadedParentTiles){var Ot=this._loadedParentTiles[rt.key];return Ot&&Ot.tileID.overscaledZ>=pt?Ot:null}for(var Qt=rt.overscaledZ-1;Qt>=pt;Qt--){var ue=rt.scaledTo(Qt),Re=this._getLoadedTile(ue);if(Re)return Re}},K.prototype._getLoadedTile=function(rt){var pt=this._tiles[rt.key];if(pt&&pt.hasData())return pt;var Ot=this._cache.getByKey(rt.wrapped().key);return Ot},K.prototype.updateCacheSize=function(rt){var pt=Math.ceil(rt.width/this._source.tileSize)+1,Ot=Math.ceil(rt.height/this._source.tileSize)+1,Qt=pt*Ot,ue=5,Re=Math.floor(Qt*ue),We=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Re):Re;this._cache.setMaxSize(We)},K.prototype.handleWrapJump=function(rt){var pt=this._prevLng===void 0?rt:this._prevLng,Ot=rt-pt,Qt=Ot/360,ue=Math.round(Qt);if(this._prevLng=rt,ue){var Re={};for(var We in this._tiles){var qe=this._tiles[We];qe.tileID=qe.tileID.unwrapTo(qe.tileID.wrap+ue),Re[qe.tileID.key]=qe}this._tiles=Re;for(var cr in this._timers)clearTimeout(this._timers[cr]),delete this._timers[cr];for(var lr in this._tiles){var Fr=this._tiles[lr];this._setTileReloadTimer(lr,Fr)}}},K.prototype.update=function(rt){var pt=this;if(this.transform=rt,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(rt),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Ot;this.used?this._source.tileID?Ot=rt.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(si){return new i.OverscaledTileID(si.canonical.z,si.wrap,si.canonical.z,si.canonical.x,si.canonical.y)}):(Ot=rt.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Ot=Ot.filter(function(si){return pt._source.hasTile(si)}))):Ot=[];var Qt=rt.coveringZoomLevel(this._source),ue=Math.max(Qt-K.maxOverzooming,this._source.minzoom),Re=Math.max(Qt+K.maxUnderzooming,this._source.minzoom),We=this._updateRetainedTiles(Ot,Qt);if(Je(this._source.type)){for(var qe={},cr={},lr=Object.keys(We),Fr=0,Xr=lr;Frthis._source.maxzoom){var fn=Vr.children(this._source.maxzoom)[0],Fn=this.getTile(fn);if(Fn&&Fn.hasData()){Ot[fn.key]=fn;continue}}else{var Nn=Vr.children(this._source.maxzoom);if(Ot[Nn[0].key]&&Ot[Nn[1].key]&&Ot[Nn[2].key]&&Ot[Nn[3].key])continue}for(var Yn=Kr.wasRequested(),Xn=Vr.overscaledZ-1;Xn>=ue;--Xn){var Gn=Vr.scaledTo(Xn);if(Qt[Gn.key]||(Qt[Gn.key]=!0,Kr=this.getTile(Gn),!Kr&&Yn&&(Kr=this._addTile(Gn)),Kr&&(Ot[Gn.key]=Gn,Yn=Kr.wasRequested(),Kr.hasData())))break}}}return Ot},K.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var rt in this._tiles){for(var pt=[],Ot=void 0,Qt=this._tiles[rt].tileID;Qt.overscaledZ>0;){if(Qt.key in this._loadedParentTiles){Ot=this._loadedParentTiles[Qt.key];break}pt.push(Qt.key);var ue=Qt.scaledTo(Qt.overscaledZ-1);if(Ot=this._getLoadedTile(ue),Ot)break;Qt=ue}for(var Re=0,We=pt;Re0)&&(pt.hasData()&&pt.state!=="reloading"?this._cache.add(pt.tileID,pt,pt.getExpiryTimeout()):(pt.aborted=!0,this._abortTile(pt),this._unloadTile(pt))))},K.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var rt in this._tiles)this._removeTile(rt);this._cache.reset()},K.prototype.tilesIn=function(rt,pt,Ot){var Qt=this,ue=[],Re=this.transform;if(!Re)return ue;for(var We=Ot?Re.getCameraQueryGeometry(rt):rt,qe=rt.map(function(Xn){return Re.pointCoordinate(Xn)}),cr=We.map(function(Xn){return Re.pointCoordinate(Xn)}),lr=this.getIds(),Fr=1/0,Xr=1/0,Yr=-1/0,Vr=-1/0,Kr=0,fn=cr;Kr=0&&yi[1].y+si>=0){var hi=qe.map(function(Ji){return jn.getTilePoint(Ji)}),Fi=cr.map(function(Ji){return jn.getTilePoint(Ji)});ue.push({tile:Gn,tileID:jn,queryGeometry:hi,cameraQueryGeometry:Fi,scale:ti})}}},Yn=0;Yn=i.browser.now())return!0}return!1},K.prototype.setFeatureState=function(rt,pt,Ot){rt=rt||"_geojsonTileLayer",this._state.updateState(rt,pt,Ot)},K.prototype.removeFeatureState=function(rt,pt,Ot){rt=rt||"_geojsonTileLayer",this._state.removeFeatureState(rt,pt,Ot)},K.prototype.getFeatureState=function(rt,pt){return rt=rt||"_geojsonTileLayer",this._state.getState(rt,pt)},K.prototype.setDependencies=function(rt,pt,Ot){var Qt=this._tiles[rt];Qt&&Qt.setDependencies(pt,Ot)},K.prototype.reloadTilesForDependencies=function(rt,pt){for(var Ot in this._tiles){var Qt=this._tiles[Ot];Qt.hasDependency(rt,pt)&&this._reloadTile(Ot,"reloading")}this._cache.filter(function(ue){return!ue.hasDependency(rt,pt)})},K}(i.Evented);ke.maxOverzooming=10,ke.maxUnderzooming=3;function Ve(ht,K){var dt=Math.abs(ht.wrap*2)-+(ht.wrap<0),rt=Math.abs(K.wrap*2)-+(K.wrap<0);return ht.overscaledZ-K.overscaledZ||rt-dt||K.canonical.y-ht.canonical.y||K.canonical.x-ht.canonical.x}function Je(ht){return ht==="raster"||ht==="image"||ht==="video"}function ur(){return new i.window.Worker(ro.workerUrl)}var hr="mapboxgl_preloaded_worker_pool",vr=function(){this.active={}};vr.prototype.acquire=function(K){if(!this.workers)for(this.workers=[];this.workers.length0?(pt-Qt)/ue:0;return this.points[Ot].mult(1-Re).add(this.points[dt].mult(Re))};var Tr=function(K,dt,rt){var pt=this.boxCells=[],Ot=this.circleCells=[];this.xCellCount=Math.ceil(K/rt),this.yCellCount=Math.ceil(dt/rt);for(var Qt=0;Qtthis.width||pt<0||dt>this.height)return Ot?!1:[];var ue=[];if(K<=0&&dt<=0&&this.width<=rt&&this.height<=pt){if(Ot)return!0;for(var Re=0;Re0:ue}},Tr.prototype._queryCircle=function(K,dt,rt,pt,Ot){var Qt=K-rt,ue=K+rt,Re=dt-rt,We=dt+rt;if(ue<0||Qt>this.width||We<0||Re>this.height)return pt?!1:[];var qe=[],cr={hitTest:pt,circle:{x:K,y:dt,radius:rt},seenUids:{box:{},circle:{}}};return this._forEachCell(Qt,Re,ue,We,this._queryCellCircle,qe,cr,Ot),pt?qe.length>0:qe},Tr.prototype.query=function(K,dt,rt,pt,Ot){return this._query(K,dt,rt,pt,!1,Ot)},Tr.prototype.hitTest=function(K,dt,rt,pt,Ot){return this._query(K,dt,rt,pt,!0,Ot)},Tr.prototype.hitTestCircle=function(K,dt,rt,pt){return this._queryCircle(K,dt,rt,!0,pt)},Tr.prototype._queryCell=function(K,dt,rt,pt,Ot,Qt,ue,Re){var We=ue.seenUids,qe=this.boxCells[Ot];if(qe!==null)for(var cr=this.bboxes,lr=0,Fr=qe;lr=cr[Yr+0]&&pt>=cr[Yr+1]&&(!Re||Re(this.boxKeys[Xr]))){if(ue.hitTest)return Qt.push(!0),!0;Qt.push({key:this.boxKeys[Xr],x1:cr[Yr],y1:cr[Yr+1],x2:cr[Yr+2],y2:cr[Yr+3]})}}}var Vr=this.circleCells[Ot];if(Vr!==null)for(var Kr=this.circles,fn=0,Fn=Vr;fnue*ue+Re*Re},Tr.prototype._circleAndRectCollide=function(K,dt,rt,pt,Ot,Qt,ue){var Re=(Qt-pt)/2,We=Math.abs(K-(pt+Re));if(We>Re+rt)return!1;var qe=(ue-Ot)/2,cr=Math.abs(dt-(Ot+qe));if(cr>qe+rt)return!1;if(We<=Re||cr<=qe)return!0;var lr=We-Re,Fr=cr-qe;return lr*lr+Fr*Fr<=rt*rt};function Cr(ht,K,dt,rt,pt){var Ot=i.create();return K?(i.scale(Ot,Ot,[1/pt,1/pt,1]),dt||i.rotateZ(Ot,Ot,rt.angle)):i.multiply(Ot,rt.labelPlaneMatrix,ht),Ot}function Wr(ht,K,dt,rt,pt){if(K){var Ot=i.clone(ht);return i.scale(Ot,Ot,[pt,pt,1]),dt||i.rotateZ(Ot,Ot,-rt.angle),Ot}else return rt.glCoordMatrix}function Ur(ht,K){var dt=[ht.x,ht.y,0,1];wr(dt,dt,K);var rt=dt[3];return{point:new i.Point(dt[0]/rt,dt[1]/rt),signedDistanceFromCamera:rt}}function an(ht,K){return .5+.5*(ht/K)}function pn(ht,K){var dt=ht[0]/ht[3],rt=ht[1]/ht[3],pt=dt>=-K[0]&&dt<=K[0]&&rt>=-K[1]&&rt<=K[1];return pt}function gn(ht,K,dt,rt,pt,Ot,Qt,ue){var Re=rt?ht.textSizeData:ht.iconSizeData,We=i.evaluateSizeForZoom(Re,dt.transform.zoom),qe=[256/dt.width*2+1,256/dt.height*2+1],cr=rt?ht.text.dynamicLayoutVertexArray:ht.icon.dynamicLayoutVertexArray;cr.clear();for(var lr=ht.lineVertexArray,Fr=rt?ht.text.placedSymbolArray:ht.icon.placedSymbolArray,Xr=dt.transform.width/dt.transform.height,Yr=!1,Vr=0;VrOt)return{useVertical:!0}}return(ht===i.WritingMode.vertical?K.ydt.x)?{needsFlipping:!0}:null}function ni(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We,qe,cr,lr,Fr){var Xr=K/24,Yr=ht.lineOffsetX*Xr,Vr=ht.lineOffsetY*Xr,Kr;if(ht.numGlyphs>1){var fn=ht.glyphStartIndex+ht.numGlyphs,Fn=ht.lineStartIndex,Nn=ht.lineStartIndex+ht.lineLength,Yn=_n(Xr,ue,Yr,Vr,dt,qe,cr,ht,Re,Ot,lr);if(!Yn)return{notEnoughRoom:!0};var Xn=Ur(Yn.first.point,Qt).point,Gn=Ur(Yn.last.point,Qt).point;if(rt&&!dt){var jn=kn(ht.writingMode,Xn,Gn,Fr);if(jn)return jn}Kr=[Yn.first];for(var ti=ht.glyphStartIndex+1;ti0?Fi.point:ci(cr,hi,si,1,pt),Gi=kn(ht.writingMode,si,Ji,Fr);if(Gi)return Gi}var Ai=di(Xr*ue.getoffsetX(ht.glyphStartIndex),Yr,Vr,dt,qe,cr,ht.segment,ht.lineStartIndex,ht.lineStartIndex+ht.lineLength,Re,Ot,lr);if(!Ai)return{notEnoughRoom:!0};Kr=[Ai]}for(var Yi=0,Ui=Kr;Yi0?1:-1,Xr=0;rt&&(Fr*=-1,Xr=Math.PI),Fr<0&&(Xr+=Math.PI);for(var Yr=Fr>0?ue+Qt:ue+Qt+1,Vr=pt,Kr=pt,fn=0,Fn=0,Nn=Math.abs(lr),Yn=[];fn+Fn<=Nn;){if(Yr+=Fr,Yr=Re)return null;if(Kr=Vr,Yn.push(Vr),Vr=cr[Yr],Vr===void 0){var Xn=new i.Point(We.getx(Yr),We.gety(Yr)),Gn=Ur(Xn,qe);if(Gn.signedDistanceFromCamera>0)Vr=cr[Yr]=Gn.point;else{var jn=Yr-Fr,ti=fn===0?Ot:new i.Point(We.getx(jn),We.gety(jn));Vr=ci(ti,Xn,Kr,Nn-fn+1,qe)}}fn+=Fn,Fn=Kr.dist(Vr)}var si=(Nn-fn)/Fn,yi=Vr.sub(Kr),hi=yi.mult(si)._add(Kr);hi._add(yi._unit()._perp()._mult(dt*Fr));var Fi=Xr+Math.atan2(Vr.y-Kr.y,Vr.x-Kr.x);return Yn.push(hi),{point:hi,angle:Fi,path:Yn}}var li=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ri(ht,K){for(var dt=0;dt=1;ia--)Ui.push(Ai.path[ia]);for(var qi=1;qi0){for(var Hi=Ui[0].clone(),Qi=Ui[0].clone(),Na=1;Na=Fi.x&&Qi.x<=Ji.x&&Hi.y>=Fi.y&&Qi.y<=Ji.y?ma=[Ui]:Qi.xJi.x||Qi.yJi.y?ma=[]:ma=i.clipLine([Ui],Fi.x,Fi.y,Ji.x,Ji.y)}for(var fo=0,Ns=ma;fo=this.screenRightBoundary||ptthis.screenBottomBoundary},$r.prototype.isInsideGrid=function(K,dt,rt,pt){return rt>=0&&K=0&&dt0){var Nn;return this.prevPlacement&&this.prevPlacement.variableOffsets[lr.crossTileID]&&this.prevPlacement.placements[lr.crossTileID]&&this.prevPlacement.placements[lr.crossTileID].text&&(Nn=this.prevPlacement.variableOffsets[lr.crossTileID].anchor),this.variableOffsets[lr.crossTileID]={textOffset:Vr,width:rt,height:pt,anchor:K,textBoxScale:Ot,prevAnchor:Nn},this.markUsedJustification(Fr,K,lr,Xr),Fr.allowVerticalPlacement&&(this.markUsedOrientation(Fr,Xr,lr),this.placedOrientations[lr.crossTileID]=Xr),{shift:Kr,placedGlyphBoxes:fn}}},kr.prototype.placeLayerBucketPart=function(K,dt,rt){var pt=this,Ot=K.parameters,Qt=Ot.bucket,ue=Ot.layout,Re=Ot.posMatrix,We=Ot.textLabelPlaneMatrix,qe=Ot.labelToScreenMatrix,cr=Ot.textPixelRatio,lr=Ot.holdingForFade,Fr=Ot.collisionBoxArray,Xr=Ot.partiallyEvaluatedTextSize,Yr=Ot.collisionGroup,Vr=ue.get("text-optional"),Kr=ue.get("icon-optional"),fn=ue.get("text-allow-overlap"),Fn=ue.get("icon-allow-overlap"),Nn=ue.get("text-rotation-alignment")==="map",Yn=ue.get("text-pitch-alignment")==="map",Xn=ue.get("icon-text-fit")!=="none",Gn=ue.get("symbol-z-order")==="viewport-y",jn=fn&&(Fn||!Qt.hasIconData()||Kr),ti=Fn&&(fn||!Qt.hasTextData()||Vr);!Qt.collisionArrays&&Fr&&Qt.deserializeCollisionBoxes(Fr);var si=function(Ai,Yi){if(!dt[Ai.crossTileID]){if(lr){pt.placements[Ai.crossTileID]=new An(!1,!1,!1);return}var Ui=!1,ia=!1,qi=!0,Ta=null,Ki={box:null,offscreen:null},ma={box:null,offscreen:null},Hi=null,Qi=null,Na=null,fo=0,Ns=0,Bs=0;Yi.textFeatureIndex?fo=Yi.textFeatureIndex:Ai.useRuntimeCollisionCircles&&(fo=Ai.featureIndex),Yi.verticalTextFeatureIndex&&(Ns=Yi.verticalTextFeatureIndex);var el=Yi.textBox;if(el){var Cl=function(Ga){var ss=i.WritingMode.horizontal;if(Qt.allowVerticalPlacement&&!Ga&&pt.prevPlacement){var ls=pt.prevPlacement.placedOrientations[Ai.crossTileID];ls&&(pt.placedOrientations[Ai.crossTileID]=ls,ss=ls,pt.markUsedOrientation(Qt,ss,Ai))}return ss},sf=function(Ga,ss){if(Qt.allowVerticalPlacement&&Ai.numVerticalGlyphVertices>0&&Yi.verticalTextBox)for(var ls=0,hh=Qt.writingModes;ls0&&(os=os.filter(function(Ga){return Ga!==Ko.anchor}),os.unshift(Ko.anchor))}var rl=function(Ga,ss,ls){for(var hh=Ga.x2-Ga.x1,wv=Ga.y2-Ga.y1,Ap=Ai.textBoxScale,Mp=Xn&&!Fn?ss:null,Uc={box:[],offscreen:!1},Sp=fn?os.length*2:os.length,vh=0;vh=os.length,Tv=pt.attemptAnchorPlacement(Ep,Ga,hh,wv,Ap,Nn,Yn,cr,Re,Yr,_p,Ai,Qt,ls,Mp);if(Tv&&(Uc=Tv.placedGlyphBoxes,Uc&&Uc.box&&Uc.box.length)){Ui=!0,Ta=Tv.shift;break}}return Uc},ru=function(){return rl(el,Yi.iconBox,i.WritingMode.horizontal)},nl=function(){var Ga=Yi.verticalTextBox,ss=Ki&&Ki.box&&Ki.box.length;return Qt.allowVerticalPlacement&&!ss&&Ai.numVerticalGlyphVertices>0&&Ga?rl(Ga,Yi.verticalIconBox,i.WritingMode.vertical):{box:null,offscreen:null}};sf(ru,nl),Ki&&(Ui=Ki.box,qi=Ki.offscreen);var sh=Cl(Ki&&Ki.box);if(!Ui&&pt.prevPlacement){var jf=pt.prevPlacement.variableOffsets[Ai.crossTileID];jf&&(pt.variableOffsets[Ai.crossTileID]=jf,pt.markUsedJustification(Qt,jf.anchor,Ai,sh))}}else{var Ll=function(Ga,ss){var ls=pt.collisionIndex.placeCollisionBox(Ga,fn,cr,Re,Yr.predicate);return ls&&ls.box&&ls.box.length&&(pt.markUsedOrientation(Qt,ss,Ai),pt.placedOrientations[Ai.crossTileID]=ss),ls},jo=function(){return Ll(el,i.WritingMode.horizontal)},Pl=function(){var Ga=Yi.verticalTextBox;return Qt.allowVerticalPlacement&&Ai.numVerticalGlyphVertices>0&&Ga?Ll(Ga,i.WritingMode.vertical):{box:null,offscreen:null}};sf(jo,Pl),Cl(Ki&&Ki.box&&Ki.box.length)}}if(Hi=Ki,Ui=Hi&&Hi.box&&Hi.box.length>0,qi=Hi&&Hi.offscreen,Ai.useRuntimeCollisionCircles){var po=Qt.text.placedSymbolArray.get(Ai.centerJustifiedTextSymbolIndex),lh=i.evaluateSizeForFeature(Qt.textSizeData,Xr,po),Bc=ue.get("text-padding"),Io=Ai.collisionCircleDiameter;Qi=pt.collisionIndex.placeCollisionCircles(fn,po,Qt.lineVertexArray,Qt.glyphOffsetArray,lh,Re,We,qe,rt,Yn,Yr.predicate,Io,Bc),Ui=fn||Qi.circles.length>0&&!Qi.collisionDetected,qi=qi&&Qi.offscreen}if(Yi.iconFeatureIndex&&(Bs=Yi.iconFeatureIndex),Yi.iconBox){var Kf=function(Ga){var ss=Xn&&Ta?Sr(Ga,Ta.x,Ta.y,Nn,Yn,pt.transform.angle):Ga;return pt.collisionIndex.placeCollisionBox(ss,Fn,cr,Re,Yr.predicate)};ma&&ma.box&&ma.box.length&&Yi.verticalIconBox?(Na=Kf(Yi.verticalIconBox),ia=Na.box.length>0):(Na=Kf(Yi.iconBox),ia=Na.box.length>0),qi=qi&&Na.offscreen}var uh=Vr||Ai.numHorizontalGlyphVertices===0&&Ai.numVerticalGlyphVertices===0,fh=Kr||Ai.numIconVertices===0;if(!uh&&!fh?ia=Ui=ia&&Ui:fh?uh||(ia=ia&&Ui):Ui=ia&&Ui,Ui&&Hi&&Hi.box&&(ma&&ma.box&&Ns?pt.collisionIndex.insertCollisionBox(Hi.box,ue.get("text-ignore-placement"),Qt.bucketInstanceId,Ns,Yr.ID):pt.collisionIndex.insertCollisionBox(Hi.box,ue.get("text-ignore-placement"),Qt.bucketInstanceId,fo,Yr.ID)),ia&&Na&&pt.collisionIndex.insertCollisionBox(Na.box,ue.get("icon-ignore-placement"),Qt.bucketInstanceId,Bs,Yr.ID),Qi&&(Ui&&pt.collisionIndex.insertCollisionCircles(Qi.circles,ue.get("text-ignore-placement"),Qt.bucketInstanceId,fo,Yr.ID),rt)){var ch=Qt.bucketInstanceId,Jf=pt.collisionCircleArrays[ch];Jf===void 0&&(Jf=pt.collisionCircleArrays[ch]=new Bn);for(var Qf=0;Qf=0;--hi){var Fi=yi[hi];si(Qt.symbolInstances.get(Fi),Qt.collisionArrays[Fi])}else for(var Ji=K.symbolInstanceStart;Ji=0&&(Qt>=0&&qe!==Qt?K.text.placedSymbolArray.get(qe).crossTileID=0:K.text.placedSymbolArray.get(qe).crossTileID=rt.crossTileID)}},kr.prototype.markUsedOrientation=function(K,dt,rt){for(var pt=dt===i.WritingMode.horizontal||dt===i.WritingMode.horizontalOnly?dt:0,Ot=dt===i.WritingMode.vertical?dt:0,Qt=[rt.leftJustifiedTextSymbolIndex,rt.centerJustifiedTextSymbolIndex,rt.rightJustifiedTextSymbolIndex],ue=0,Re=Qt;ue0||Yn>0,si=Fn.numIconVertices>0,yi=pt.placedOrientations[Fn.crossTileID],hi=yi===i.WritingMode.vertical,Fi=yi===i.WritingMode.horizontal||yi===i.WritingMode.horizontalOnly;if(ti){var Ji=Hr(jn.text),Gi=hi?Qr:Ji;Xr(K.text,Nn,Gi);var Ai=Fi?Qr:Ji;Xr(K.text,Yn,Ai);var Yi=jn.text.isHidden();[Fn.rightJustifiedTextSymbolIndex,Fn.centerJustifiedTextSymbolIndex,Fn.leftJustifiedTextSymbolIndex].forEach(function(Bs){Bs>=0&&(K.text.placedSymbolArray.get(Bs).hidden=Yi||hi?1:0)}),Fn.verticalPlacedTextSymbolIndex>=0&&(K.text.placedSymbolArray.get(Fn.verticalPlacedTextSymbolIndex).hidden=Yi||Fi?1:0);var Ui=pt.variableOffsets[Fn.crossTileID];Ui&&pt.markUsedJustification(K,Ui.anchor,Fn,yi);var ia=pt.placedOrientations[Fn.crossTileID];ia&&(pt.markUsedJustification(K,"left",Fn,ia),pt.markUsedOrientation(K,ia,Fn))}if(si){var qi=Hr(jn.icon),Ta=!(lr&&Fn.verticalPlacedIconSymbolIndex&&hi);if(Fn.placedIconSymbolIndex>=0){var Ki=Ta?qi:Qr;Xr(K.icon,Fn.numIconVertices,Ki),K.icon.placedSymbolArray.get(Fn.placedIconSymbolIndex).hidden=jn.icon.isHidden()}if(Fn.verticalPlacedIconSymbolIndex>=0){var ma=Ta?Qr:qi;Xr(K.icon,Fn.numVerticalIconVertices,ma),K.icon.placedSymbolArray.get(Fn.verticalPlacedIconSymbolIndex).hidden=jn.icon.isHidden()}}if(K.hasIconCollisionBoxData()||K.hasTextCollisionBoxData()){var Hi=K.collisionArrays[fn];if(Hi){var Qi=new i.Point(0,0);if(Hi.textBox||Hi.verticalTextBox){var Na=!0;if(We){var fo=pt.variableOffsets[Xn];fo?(Qi=Di(fo.anchor,fo.width,fo.height,fo.textOffset,fo.textBoxScale),qe&&Qi._rotate(cr?pt.transform.angle:-pt.transform.angle)):Na=!1}Hi.textBox&&Ar(K.textCollisionBox.collisionVertexArray,jn.text.placed,!Na||hi,Qi.x,Qi.y),Hi.verticalTextBox&&Ar(K.textCollisionBox.collisionVertexArray,jn.text.placed,!Na||Fi,Qi.x,Qi.y)}var Ns=!!(!Fi&&Hi.verticalIconBox);Hi.iconBox&&Ar(K.iconCollisionBox.collisionVertexArray,jn.icon.placed,Ns,lr?Qi.x:0,lr?Qi.y:0),Hi.verticalIconBox&&Ar(K.iconCollisionBox.collisionVertexArray,jn.icon.placed,!Ns,lr?Qi.x:0,lr?Qi.y:0)}}},Vr=0;VrK},kr.prototype.setStale=function(){this.stale=!0};function Ar(ht,K,dt,rt,pt){ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0),ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0),ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0),ht.emplaceBack(K?1:0,dt?1:0,rt||0,pt||0)}var Or=Math.pow(2,25),xn=Math.pow(2,24),In=Math.pow(2,17),hn=Math.pow(2,16),sn=Math.pow(2,9),Er=Math.pow(2,8),Zr=Math.pow(2,1);function Hr(ht){if(ht.opacity===0&&!ht.placed)return 0;if(ht.opacity===1&&ht.placed)return 4294967295;var K=ht.placed?1:0,dt=Math.floor(ht.opacity*127);return dt*Or+K*xn+dt*In+K*hn+dt*sn+K*Er+dt*Zr+K}var Qr=0,wn=function(K){this._sortAcrossTiles=K.layout.get("symbol-z-order")!=="viewport-y"&&K.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};wn.prototype.continuePlacement=function(K,dt,rt,pt,Ot){for(var Qt=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var ue=K[this._currentPlacementIndex],Re=dt[ue],We=this.placement.collisionIndex.transform.zoom;if(Re.type==="symbol"&&(!Re.minzoom||Re.minzoom<=We)&&(!Re.maxzoom||Re.maxzoom>We)){this._inProgressLayer||(this._inProgressLayer=new wn(Re));var qe=this._inProgressLayer.continuePlacement(rt[Re.source],this.placement,this._showCollisionBoxes,Re,Qt);if(qe)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ln.prototype.commit=function(K){return this.placement.commit(K),this.placement};var Pn=512/i.EXTENT/2,Un=function(K,dt,rt){this.tileID=K,this.indexedSymbolInstances={},this.bucketInstanceId=rt;for(var pt=0;ptK.overscaledZ)for(var We in Re){var qe=Re[We];qe.tileID.isChildOf(K)&&qe.findMatches(dt.symbolInstances,K,Qt)}else{var cr=K.scaledTo(Number(ue)),lr=Re[cr.key];lr&&lr.findMatches(dt.symbolInstances,K,Qt)}}for(var Fr=0;Fr0)throw new Error("Unimplemented: "+Qt.map(function(ue){return ue.command}).join(", ")+".");return Ot.forEach(function(ue){ue.command!=="setTransition"&&pt[ue.command].apply(pt,ue.args)}),this.stylesheet=rt,!0},K.prototype.addImage=function(rt,pt){if(this.getImage(rt))return this.fire(new i.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(rt,pt),this._afterImageUpdated(rt)},K.prototype.updateImage=function(rt,pt){this.imageManager.updateImage(rt,pt)},K.prototype.getImage=function(rt){return this.imageManager.getImage(rt)},K.prototype.removeImage=function(rt){if(!this.getImage(rt))return this.fire(new i.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(rt),this._afterImageUpdated(rt)},K.prototype._afterImageUpdated=function(rt){this._availableImages=this.imageManager.listImages(),this._changedImages[rt]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new i.Event("data",{dataType:"style"}))},K.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},K.prototype.addSource=function(rt,pt,Ot){var Qt=this;if(Ot===void 0&&(Ot={}),this._checkLoaded(),this.sourceCaches[rt]!==void 0)throw new Error("There is already a source with this ID");if(!pt.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(pt).join(", ")+".");var ue=["vector","raster","geojson","video","image"],Re=ue.indexOf(pt.type)>=0;if(!(Re&&this._validate(i.validateStyle.source,"sources."+rt,pt,null,Ot))){this.map&&this.map._collectResourceTiming&&(pt.collectResourceTiming=!0);var We=this.sourceCaches[rt]=new ke(rt,pt,this.dispatcher);We.style=this,We.setEventedParent(this,function(){return{isSourceLoaded:Qt.loaded(),source:We.serialize(),sourceId:rt}}),We.onAdd(this.map),this._changed=!0}},K.prototype.removeSource=function(rt){if(this._checkLoaded(),this.sourceCaches[rt]===void 0)throw new Error("There is no source with this ID");for(var pt in this._layers)if(this._layers[pt].source===rt)return this.fire(new i.ErrorEvent(new Error('Source "'+rt+'" cannot be removed while layer "'+pt+'" is using it.')));var Ot=this.sourceCaches[rt];delete this.sourceCaches[rt],delete this._updatedSources[rt],Ot.fire(new i.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:rt})),Ot.setEventedParent(null),Ot.clearTiles(),Ot.onRemove&&Ot.onRemove(this.map),this._changed=!0},K.prototype.setGeoJSONSourceData=function(rt,pt){this._checkLoaded();var Ot=this.sourceCaches[rt].getSource();Ot.setData(pt),this._changed=!0},K.prototype.getSource=function(rt){return this.sourceCaches[rt]&&this.sourceCaches[rt].getSource()},K.prototype.addLayer=function(rt,pt,Ot){Ot===void 0&&(Ot={}),this._checkLoaded();var Qt=rt.id;if(this.getLayer(Qt)){this.fire(new i.ErrorEvent(new Error('Layer with id "'+Qt+'" already exists on this map')));return}var ue;if(rt.type==="custom"){if(pi(this,i.validateCustomStyleLayer(rt)))return;ue=i.createStyleLayer(rt)}else{if(typeof rt.source=="object"&&(this.addSource(Qt,rt.source),rt=i.clone$1(rt),rt=i.extend(rt,{source:Qt})),this._validate(i.validateStyle.layer,"layers."+Qt,rt,{arrayIndex:-1},Ot))return;ue=i.createStyleLayer(rt),this._validateLayer(ue),ue.setEventedParent(this,{layer:{id:Qt}}),this._serializedLayers[ue.id]=ue.serialize()}var Re=pt?this._order.indexOf(pt):this._order.length;if(pt&&Re===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+pt+'" does not exist on this map.')));return}if(this._order.splice(Re,0,Qt),this._layerOrderChanged=!0,this._layers[Qt]=ue,this._removedLayers[Qt]&&ue.source&&ue.type!=="custom"){var We=this._removedLayers[Qt];delete this._removedLayers[Qt],We.type!==ue.type?this._updatedSources[ue.source]="clear":(this._updatedSources[ue.source]="reload",this.sourceCaches[ue.source].pause())}this._updateLayer(ue),ue.onAdd&&ue.onAdd(this.map)},K.prototype.moveLayer=function(rt,pt){this._checkLoaded(),this._changed=!0;var Ot=this._layers[rt];if(!Ot){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be moved.")));return}if(rt!==pt){var Qt=this._order.indexOf(rt);this._order.splice(Qt,1);var ue=pt?this._order.indexOf(pt):this._order.length;if(pt&&ue===-1){this.fire(new i.ErrorEvent(new Error('Layer with id "'+pt+'" does not exist on this map.')));return}this._order.splice(ue,0,rt),this._layerOrderChanged=!0}},K.prototype.removeLayer=function(rt){this._checkLoaded();var pt=this._layers[rt];if(!pt){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be removed.")));return}pt.setEventedParent(null);var Ot=this._order.indexOf(rt);this._order.splice(Ot,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[rt]=pt,delete this._layers[rt],delete this._serializedLayers[rt],delete this._updatedLayers[rt],delete this._updatedPaintProps[rt],pt.onRemove&&pt.onRemove(this.map)},K.prototype.getLayer=function(rt){return this._layers[rt]},K.prototype.hasLayer=function(rt){return rt in this._layers},K.prototype.setLayerZoomRange=function(rt,pt,Ot){this._checkLoaded();var Qt=this.getLayer(rt);if(!Qt){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot have zoom extent.")));return}Qt.minzoom===pt&&Qt.maxzoom===Ot||(pt!=null&&(Qt.minzoom=pt),Ot!=null&&(Qt.maxzoom=Ot),this._updateLayer(Qt))},K.prototype.setFilter=function(rt,pt,Ot){Ot===void 0&&(Ot={}),this._checkLoaded();var Qt=this.getLayer(rt);if(!Qt){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be filtered.")));return}if(!i.deepEqual(Qt.filter,pt)){if(pt==null){Qt.filter=void 0,this._updateLayer(Qt);return}this._validate(i.validateStyle.filter,"layers."+Qt.id+".filter",pt,null,Ot)||(Qt.filter=i.clone$1(pt),this._updateLayer(Qt))}},K.prototype.getFilter=function(rt){return i.clone$1(this.getLayer(rt).filter)},K.prototype.setLayoutProperty=function(rt,pt,Ot,Qt){Qt===void 0&&(Qt={}),this._checkLoaded();var ue=this.getLayer(rt);if(!ue){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be styled.")));return}i.deepEqual(ue.getLayoutProperty(pt),Ot)||(ue.setLayoutProperty(pt,Ot,Qt),this._updateLayer(ue))},K.prototype.getLayoutProperty=function(rt,pt){var Ot=this.getLayer(rt);if(!Ot){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style.")));return}return Ot.getLayoutProperty(pt)},K.prototype.setPaintProperty=function(rt,pt,Ot,Qt){Qt===void 0&&(Qt={}),this._checkLoaded();var ue=this.getLayer(rt);if(!ue){this.fire(new i.ErrorEvent(new Error("The layer '"+rt+"' does not exist in the map's style and cannot be styled.")));return}if(!i.deepEqual(ue.getPaintProperty(pt),Ot)){var Re=ue.setPaintProperty(pt,Ot,Qt);Re&&this._updateLayer(ue),this._changed=!0,this._updatedPaintProps[rt]=!0}},K.prototype.getPaintProperty=function(rt,pt){return this.getLayer(rt).getPaintProperty(pt)},K.prototype.setFeatureState=function(rt,pt){this._checkLoaded();var Ot=rt.source,Qt=rt.sourceLayer,ue=this.sourceCaches[Ot];if(ue===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+Ot+"' does not exist in the map's style.")));return}var Re=ue.getSource().type;if(Re==="geojson"&&Qt){this.fire(new i.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(Re==="vector"&&!Qt){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}rt.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),ue.setFeatureState(Qt,rt.id,pt)},K.prototype.removeFeatureState=function(rt,pt){this._checkLoaded();var Ot=rt.source,Qt=this.sourceCaches[Ot];if(Qt===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+Ot+"' does not exist in the map's style.")));return}var ue=Qt.getSource().type,Re=ue==="vector"?rt.sourceLayer:void 0;if(ue==="vector"&&!Re){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(pt&&typeof rt.id!="string"&&typeof rt.id!="number"){this.fire(new i.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}Qt.removeFeatureState(Re,rt.id,pt)},K.prototype.getFeatureState=function(rt){this._checkLoaded();var pt=rt.source,Ot=rt.sourceLayer,Qt=this.sourceCaches[pt];if(Qt===void 0){this.fire(new i.ErrorEvent(new Error("The source '"+pt+"' does not exist in the map's style.")));return}var ue=Qt.getSource().type;if(ue==="vector"&&!Ot){this.fire(new i.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return rt.id===void 0&&this.fire(new i.ErrorEvent(new Error("The feature id parameter must be provided."))),Qt.getFeatureState(Ot,rt.id)},K.prototype.getTransition=function(){return i.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},K.prototype.serialize=function(){return i.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:i.mapObject(this.sourceCaches,function(rt){return rt.serialize()}),layers:this._serializeLayers(this._order)},function(rt){return rt!==void 0})},K.prototype._updateLayer=function(rt){this._updatedLayers[rt.id]=!0,rt.source&&!this._updatedSources[rt.source]&&this.sourceCaches[rt.source].getSource().type!=="raster"&&(this._updatedSources[rt.source]="reload",this.sourceCaches[rt.source].pause()),this._changed=!0},K.prototype._flattenAndSortRenderedFeatures=function(rt){for(var pt=this,Ot=function(Fi){return pt._layers[Fi].type==="fill-extrusion"},Qt={},ue=[],Re=this._order.length-1;Re>=0;Re--){var We=this._order[Re];if(Ot(We)){Qt[We]=Re;for(var qe=0,cr=rt;qe=0;fn--){var Fn=this._order[fn];if(Ot(Fn))for(var Nn=ue.length-1;Nn>=0;Nn--){var Yn=ue[Nn].feature;if(Qt[Yn.layer.id] 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos -: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,Tc=`#ifdef GL_ES +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,wc=`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Ac="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Hu=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +}`,Tc="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Gu=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; #define PI 3.141592653589793 void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Mc="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",Sc=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +}`,Ac="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",Mc=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -6673,7 +6673,7 @@ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_rati #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Af=` +}`,Mf=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; #pragma mapbox: define highp vec4 color @@ -6689,7 +6689,7 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Mf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,Sf=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { @@ -6699,7 +6699,7 @@ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_rati #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Ys=` +}`,Xs=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur @@ -6713,7 +6713,7 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,fl=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,cl=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from @@ -6772,7 +6772,7 @@ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_rati #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Sf=` +}`,Ef=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; @@ -6795,7 +6795,7 @@ float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;f #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Ec="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",pu=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +}`,Sc="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",pu=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity @@ -6803,13 +6803,13 @@ lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)* #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,Ef=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +}`,_f=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,_f=`#define SDF_PX 8.0 +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,Cf=`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color @@ -6863,7 +6863,7 @@ return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float ga #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif -}`,cl=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +}`,hl=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -6877,115 +6877,115 @@ void main() { #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,Xs=ga(Qa,ol),Ol=ga(Nu,bf),Ls=ga($i,Fl),rs=ga(Bu,Xa),Gu=ga(ho,sl),hl=ga(vu,Ra),Vo=ga(ll,za),Ca=ga(Ua,ul),Wu=ga($a,qa),_c=ga(_o,wf),mu=ga(bo,xc),vl=ga(es,Za),dl=ga(Uu,Cs),wo=ga(ts,Vu),yu=ga(Tf,bc),pl=ga(du,wc),xu=ga(Tc,Ac),Cc=ga(Hu,Mc),Cf=ga(Sc,Af),Yu=ga(Mf,Ys),Xu=ga(fl,zl),Zu=ga(kl,Sf),ml=ga(vs,Ec),bu=ga(pu,Ef),Nl=ga(_f,gu),wu=ga(Uo,cl);function ga(he,K){var de=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,re=K.match(/attribute ([\w]+) ([\w]+)/g),pe=he.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Oe=K.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Qe=Oe?Oe.concat(pe):pe,ut={};return he=he.replace(de,function(Rt,Wt,qt,cr,lr){return ut[lr]=!0,Wt==="define"?` +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,Zs=ga(Qa,sl),Ol=ga(Bu,wf),Ls=ga($i,Fl),rs=ga(Uu,Xa),Wu=ga(ho,ll),vl=ga(vu,Ra),Ho=ga(ul,za),Ca=ga(Ua,fl),Yu=ga($a,qa),Ec=ga(_o,Tf),mu=ga(bo,yc),dl=ga(ts,Za),pl=ga(Hu,Cs),wo=ga(es,Vu),yu=ga(Af,xc),ml=ga(du,bc),xu=ga(wc,Tc),_c=ga(Gu,Ac),Lf=ga(Mc,Mf),Xu=ga(Sf,Xs),Zu=ga(cl,zl),ju=ga(kl,Ef),yl=ga(vs,Sc),bu=ga(pu,_f),Nl=ga(Cf,gu),wu=ga(Uo,hl);function ga(ht,K){var dt=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,rt=K.match(/attribute ([\w]+) ([\w]+)/g),pt=ht.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ot=K.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Qt=Ot?Ot.concat(pt):pt,ue={};return ht=ht.replace(dt,function(Re,We,qe,cr,lr){return ue[lr]=!0,We==="define"?` #ifndef HAS_UNIFORM_u_`+lr+` -varying `+qt+" "+cr+" "+lr+`; +varying `+qe+" "+cr+" "+lr+`; #else -uniform `+qt+" "+cr+" u_"+lr+`; +uniform `+qe+" "+cr+" u_"+lr+`; #endif `:` #ifdef HAS_UNIFORM_u_`+lr+` - `+qt+" "+cr+" "+lr+" = u_"+lr+`; + `+qe+" "+cr+" "+lr+" = u_"+lr+`; #endif -`}),K=K.replace(de,function(Rt,Wt,qt,cr,lr){var Fr=cr==="float"?"vec2":"vec4",Xr=lr.match(/color/)?"color":Fr;return ut[lr]?Wt==="define"?` +`}),K=K.replace(dt,function(Re,We,qe,cr,lr){var Fr=cr==="float"?"vec2":"vec4",Xr=lr.match(/color/)?"color":Fr;return ue[lr]?We==="define"?` #ifndef HAS_UNIFORM_u_`+lr+` uniform lowp float u_`+lr+`_t; -attribute `+qt+" "+Fr+" a_"+lr+`; -varying `+qt+" "+cr+" "+lr+`; +attribute `+qe+" "+Fr+" a_"+lr+`; +varying `+qe+" "+cr+" "+lr+`; #else -uniform `+qt+" "+cr+" u_"+lr+`; +uniform `+qe+" "+cr+" u_"+lr+`; #endif `:Xr==="vec4"?` #ifndef HAS_UNIFORM_u_`+lr+` `+lr+" = a_"+lr+`; #else - `+qt+" "+cr+" "+lr+" = u_"+lr+`; + `+qe+" "+cr+" "+lr+" = u_"+lr+`; #endif `:` #ifndef HAS_UNIFORM_u_`+lr+` `+lr+" = unpack_mix_"+Xr+"(a_"+lr+", u_"+lr+`_t); #else - `+qt+" "+cr+" "+lr+" = u_"+lr+`; + `+qe+" "+cr+" "+lr+" = u_"+lr+`; #endif -`:Wt==="define"?` +`:We==="define"?` #ifndef HAS_UNIFORM_u_`+lr+` uniform lowp float u_`+lr+`_t; -attribute `+qt+" "+Fr+" a_"+lr+`; +attribute `+qe+" "+Fr+" a_"+lr+`; #else -uniform `+qt+" "+cr+" u_"+lr+`; +uniform `+qe+" "+cr+" u_"+lr+`; #endif `:Xr==="vec4"?` #ifndef HAS_UNIFORM_u_`+lr+` - `+qt+" "+cr+" "+lr+" = a_"+lr+`; + `+qe+" "+cr+" "+lr+" = a_"+lr+`; #else - `+qt+" "+cr+" "+lr+" = u_"+lr+`; + `+qe+" "+cr+" "+lr+" = u_"+lr+`; #endif `:` #ifndef HAS_UNIFORM_u_`+lr+` - `+qt+" "+cr+" "+lr+" = unpack_mix_"+Xr+"(a_"+lr+", u_"+lr+`_t); + `+qe+" "+cr+" "+lr+" = unpack_mix_"+Xr+"(a_"+lr+", u_"+lr+`_t); #else - `+qt+" "+cr+" "+lr+" = u_"+lr+`; -#endif -`}),{fragmentSource:he,vertexSource:K,staticAttributes:re,staticUniforms:Qe}}var Lf=Object.freeze({__proto__:null,prelude:Xs,background:Ol,backgroundPattern:Ls,circle:rs,clippingMask:Gu,heatmap:hl,heatmapTexture:Vo,collisionBox:Ca,collisionCircle:Wu,debug:_c,fill:mu,fillOutline:vl,fillOutlinePattern:dl,fillPattern:wo,fillExtrusion:yu,fillExtrusionPattern:pl,hillshadePrepare:xu,hillshade:Cc,line:Cf,lineGradient:Yu,linePattern:Xu,lineSDF:Zu,raster:ml,symbolIcon:bu,symbolSDF:Nl,symbolTextAndIcon:wu}),Ho=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Ho.prototype.bind=function(K,de,re,pe,Oe,Qe,ut,Rt){this.context=K;for(var Wt=this.boundPaintVertexBuffers.length!==pe.length,qt=0;!Wt&&qt>16,ut>>16],u_pixel_coord_lower:[Qe&65535,ut&65535]}}function Ps(he,K,de,re){var pe=de.imageManager.getPattern(he.from.toString()),Oe=de.imageManager.getPattern(he.to.toString()),Qe=de.imageManager.getPixelSize(),ut=Qe.width,Rt=Qe.height,Wt=Math.pow(2,re.tileID.overscaledZ),qt=re.tileSize*Math.pow(2,de.transform.tileZoom)/Wt,cr=qt*(re.tileID.canonical.x+re.tileID.wrap*Wt),lr=qt*re.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:pe.tl,u_pattern_br_a:pe.br,u_pattern_tl_b:Oe.tl,u_pattern_br_b:Oe.br,u_texsize:[ut,Rt],u_mix:K.t,u_pattern_size_a:pe.displaySize,u_pattern_size_b:Oe.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/dn(re,1,de.transform.tileZoom),u_pixel_coord_upper:[cr>>16,lr>>16],u_pixel_coord_lower:[cr&65535,lr&65535]}}var Tu=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_lightpos:new i.Uniform3f(he,K.u_lightpos),u_lightintensity:new i.Uniform1f(he,K.u_lightintensity),u_lightcolor:new i.Uniform3f(he,K.u_lightcolor),u_vertical_gradient:new i.Uniform1f(he,K.u_vertical_gradient),u_opacity:new i.Uniform1f(he,K.u_opacity)}},Da=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_lightpos:new i.Uniform3f(he,K.u_lightpos),u_lightintensity:new i.Uniform1f(he,K.u_lightintensity),u_lightcolor:new i.Uniform3f(he,K.u_lightcolor),u_vertical_gradient:new i.Uniform1f(he,K.u_vertical_gradient),u_height_factor:new i.Uniform1f(he,K.u_height_factor),u_image:new i.Uniform1i(he,K.u_image),u_texsize:new i.Uniform2f(he,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(he,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(he,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(he,K.u_scale),u_fade:new i.Uniform1f(he,K.u_fade),u_opacity:new i.Uniform1f(he,K.u_opacity)}},Bl=function(he,K,de,re){var pe=K.style.light,Oe=pe.properties.get("position"),Qe=[Oe.x,Oe.y,Oe.z],ut=i.create$1();pe.properties.get("anchor")==="viewport"&&i.fromRotation(ut,-K.transform.angle),i.transformMat3(Qe,Qe,ut);var Rt=pe.properties.get("color");return{u_matrix:he,u_lightpos:Qe,u_lightintensity:pe.properties.get("intensity"),u_lightcolor:[Rt.r,Rt.g,Rt.b],u_vertical_gradient:+de,u_opacity:re}},Go=function(he,K,de,re,pe,Oe,Qe){return i.extend(Bl(he,K,de,re),Zs(Oe,K,Qe),{u_height_factor:-Math.pow(2,pe.overscaledZ)/Qe.tileSize/8})},ds=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix)}},js=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_image:new i.Uniform1i(he,K.u_image),u_texsize:new i.Uniform2f(he,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(he,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(he,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(he,K.u_scale),u_fade:new i.Uniform1f(he,K.u_fade)}},Rs=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_world:new i.Uniform2f(he,K.u_world)}},Wo=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_world:new i.Uniform2f(he,K.u_world),u_image:new i.Uniform1i(he,K.u_image),u_texsize:new i.Uniform2f(he,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(he,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(he,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(he,K.u_scale),u_fade:new i.Uniform1f(he,K.u_fade)}},ps=function(he){return{u_matrix:he}},Yo=function(he,K,de,re){return i.extend(ps(he),Zs(de,K,re))},Do=function(he,K){return{u_matrix:he,u_world:K}},Ul=function(he,K,de,re,pe){return i.extend(Yo(he,K,de,re),{u_world:pe})},Lc=function(he,K){return{u_camera_to_center_distance:new i.Uniform1f(he,K.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(he,K.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(he,K.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(he,K.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(he,K.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(he,K.u_matrix)}},Pc=function(he,K,de,re){var pe=he.transform,Oe,Qe;if(re.paint.get("circle-pitch-alignment")==="map"){var ut=dn(de,1,pe.zoom);Oe=!0,Qe=[ut,ut]}else Oe=!1,Qe=pe.pixelsToGLUnits;return{u_camera_to_center_distance:pe.cameraToCenterDistance,u_scale_with_map:+(re.paint.get("circle-pitch-scale")==="map"),u_matrix:he.translatePosMatrix(K.posMatrix,de,re.paint.get("circle-translate"),re.paint.get("circle-translate-anchor")),u_pitch_with_map:+Oe,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:Qe}},Rc=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_camera_to_center_distance:new i.Uniform1f(he,K.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(he,K.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(he,K.u_extrude_scale),u_overscale_factor:new i.Uniform1f(he,K.u_overscale_factor)}},Dc=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_inv_matrix:new i.UniformMatrix4f(he,K.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(he,K.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(he,K.u_viewport_size)}},Ku=function(he,K,de){var re=dn(de,1,K.zoom),pe=Math.pow(2,K.zoom-de.tileID.overscaledZ),Oe=de.tileID.overscaleFactor();return{u_matrix:he,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:re,u_extrude_scale:[K.pixelsToGLUnits[0]/(re*pe),K.pixelsToGLUnits[1]/(re*pe)],u_overscale_factor:Oe}},Rf=function(he,K,de){return{u_matrix:he,u_inv_matrix:K,u_camera_to_center_distance:de.cameraToCenterDistance,u_viewport_size:[de.width,de.height]}},yl=function(he,K){return{u_color:new i.UniformColor(he,K.u_color),u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_overlay:new i.Uniform1i(he,K.u_overlay),u_overlay_scale:new i.Uniform1f(he,K.u_overlay_scale)}},ja=function(he,K,de){return de===void 0&&(de=1),{u_matrix:he,u_color:K,u_overlay:0,u_overlay_scale:de}},Co=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix)}},xl=function(he){return{u_matrix:he}},Df=function(he,K){return{u_extrude_scale:new i.Uniform1f(he,K.u_extrude_scale),u_intensity:new i.Uniform1f(he,K.u_intensity),u_matrix:new i.UniformMatrix4f(he,K.u_matrix)}},Vl=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_world:new i.Uniform2f(he,K.u_world),u_image:new i.Uniform1i(he,K.u_image),u_color_ramp:new i.Uniform1i(he,K.u_color_ramp),u_opacity:new i.Uniform1f(he,K.u_opacity)}},gs=function(he,K,de,re){return{u_matrix:he,u_extrude_scale:dn(K,1,de),u_intensity:re}},Ic=function(he,K,de,re){var pe=i.create();i.ortho(pe,0,he.width,he.height,0,0,1);var Oe=he.context.gl;return{u_matrix:pe,u_world:[Oe.drawingBufferWidth,Oe.drawingBufferHeight],u_image:de,u_color_ramp:re,u_opacity:K.paint.get("heatmap-opacity")}},If=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_image:new i.Uniform1i(he,K.u_image),u_latrange:new i.Uniform2f(he,K.u_latrange),u_light:new i.Uniform2f(he,K.u_light),u_shadow:new i.UniformColor(he,K.u_shadow),u_highlight:new i.UniformColor(he,K.u_highlight),u_accent:new i.UniformColor(he,K.u_accent)}},Ff=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_image:new i.Uniform1i(he,K.u_image),u_dimension:new i.Uniform2f(he,K.u_dimension),u_zoom:new i.Uniform1f(he,K.u_zoom),u_unpack:new i.Uniform4f(he,K.u_unpack)}},Ju=function(he,K,de){var re=de.paint.get("hillshade-shadow-color"),pe=de.paint.get("hillshade-highlight-color"),Oe=de.paint.get("hillshade-accent-color"),Qe=de.paint.get("hillshade-illumination-direction")*(Math.PI/180);de.paint.get("hillshade-illumination-anchor")==="viewport"&&(Qe-=he.transform.angle);var ut=!he.options.moving;return{u_matrix:he.transform.calculatePosMatrix(K.tileID.toUnwrapped(),ut),u_image:0,u_latrange:vo(he,K.tileID),u_light:[de.paint.get("hillshade-exaggeration"),Qe],u_shadow:re,u_highlight:pe,u_accent:Oe}},zf=function(he,K){var de=K.stride,re=i.create();return i.ortho(re,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(re,re,[0,-i.EXTENT,0]),{u_matrix:re,u_image:1,u_dimension:[de,de],u_zoom:he.overscaledZ,u_unpack:K.getUnpackVector()}};function vo(he,K){var de=Math.pow(2,K.canonical.z),re=K.canonical.y;return[new i.MercatorCoordinate(0,re/de).toLngLat().lat,new i.MercatorCoordinate(0,(re+1)/de).toLngLat().lat]}var Xo=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_ratio:new i.Uniform1f(he,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(he,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(he,K.u_units_to_pixels)}},Ds=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_ratio:new i.Uniform1f(he,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(he,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(he,K.u_units_to_pixels),u_image:new i.Uniform1i(he,K.u_image),u_image_height:new i.Uniform1f(he,K.u_image_height)}},bl=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_texsize:new i.Uniform2f(he,K.u_texsize),u_ratio:new i.Uniform1f(he,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(he,K.u_device_pixel_ratio),u_image:new i.Uniform1i(he,K.u_image),u_units_to_pixels:new i.Uniform2f(he,K.u_units_to_pixels),u_scale:new i.Uniform3f(he,K.u_scale),u_fade:new i.Uniform1f(he,K.u_fade)}},Au=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_ratio:new i.Uniform1f(he,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(he,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(he,K.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(he,K.u_patternscale_a),u_patternscale_b:new i.Uniform2f(he,K.u_patternscale_b),u_sdfgamma:new i.Uniform1f(he,K.u_sdfgamma),u_image:new i.Uniform1i(he,K.u_image),u_tex_y_a:new i.Uniform1f(he,K.u_tex_y_a),u_tex_y_b:new i.Uniform1f(he,K.u_tex_y_b),u_mix:new i.Uniform1f(he,K.u_mix)}},Ks=function(he,K,de){var re=he.transform;return{u_matrix:Is(he,K,de),u_ratio:1/dn(K,1,re.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/re.pixelsToGLUnits[0],1/re.pixelsToGLUnits[1]]}},Js=function(he,K,de,re){return i.extend(Ks(he,K,de),{u_image:0,u_image_height:re})},kf=function(he,K,de,re){var pe=he.transform,Oe=wl(K,pe);return{u_matrix:Is(he,K,de),u_texsize:K.imageAtlasTexture.size,u_ratio:1/dn(K,1,pe.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[Oe,re.fromScale,re.toScale],u_fade:re.t,u_units_to_pixels:[1/pe.pixelsToGLUnits[0],1/pe.pixelsToGLUnits[1]]}},ms=function(he,K,de,re,pe){var Oe=he.transform,Qe=he.lineAtlas,ut=wl(K,Oe),Rt=de.layout.get("line-cap")==="round",Wt=Qe.getDash(re.from,Rt),qt=Qe.getDash(re.to,Rt),cr=Wt.width*pe.fromScale,lr=qt.width*pe.toScale;return i.extend(Ks(he,K,de),{u_patternscale_a:[ut/cr,-Wt.height/2],u_patternscale_b:[ut/lr,-qt.height/2],u_sdfgamma:Qe.width/(Math.min(cr,lr)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:Wt.y,u_tex_y_b:qt.y,u_mix:pe.t})};function wl(he,K){return 1/dn(he,1,K.tileZoom)}function Is(he,K,de){return he.translatePosMatrix(K.tileID.posMatrix,K,de.paint.get("line-translate"),de.paint.get("line-translate-anchor"))}var ys=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_tl_parent:new i.Uniform2f(he,K.u_tl_parent),u_scale_parent:new i.Uniform1f(he,K.u_scale_parent),u_buffer_scale:new i.Uniform1f(he,K.u_buffer_scale),u_fade_t:new i.Uniform1f(he,K.u_fade_t),u_opacity:new i.Uniform1f(he,K.u_opacity),u_image0:new i.Uniform1i(he,K.u_image0),u_image1:new i.Uniform1i(he,K.u_image1),u_brightness_low:new i.Uniform1f(he,K.u_brightness_low),u_brightness_high:new i.Uniform1f(he,K.u_brightness_high),u_saturation_factor:new i.Uniform1f(he,K.u_saturation_factor),u_contrast_factor:new i.Uniform1f(he,K.u_contrast_factor),u_spin_weights:new i.Uniform3f(he,K.u_spin_weights)}},Hl=function(he,K,de,re,pe){return{u_matrix:he,u_tl_parent:K,u_scale_parent:de,u_buffer_scale:1,u_fade_t:re.mix,u_opacity:re.opacity*pe.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:pe.paint.get("raster-brightness-min"),u_brightness_high:pe.paint.get("raster-brightness-max"),u_saturation_factor:Al(pe.paint.get("raster-saturation")),u_contrast_factor:ha(pe.paint.get("raster-contrast")),u_spin_weights:Tl(pe.paint.get("raster-hue-rotate"))}};function Tl(he){he*=Math.PI/180;var K=Math.sin(he),de=Math.cos(he);return[(2*de+1)/3,(-Math.sqrt(3)*K-de+1)/3,(Math.sqrt(3)*K-de+1)/3]}function ha(he){return he>0?1/(1-he):1+he}function Al(he){return he>0?1-1/(1.001-he):-he}var Mu=function(he,K){return{u_is_size_zoom_constant:new i.Uniform1i(he,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(he,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(he,K.u_size_t),u_size:new i.Uniform1f(he,K.u_size),u_camera_to_center_distance:new i.Uniform1f(he,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(he,K.u_pitch),u_rotate_symbol:new i.Uniform1i(he,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(he,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(he,K.u_fade_change),u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(he,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(he,K.u_coord_matrix),u_is_text:new i.Uniform1i(he,K.u_is_text),u_pitch_with_map:new i.Uniform1i(he,K.u_pitch_with_map),u_texsize:new i.Uniform2f(he,K.u_texsize),u_texture:new i.Uniform1i(he,K.u_texture)}},Of=function(he,K){return{u_is_size_zoom_constant:new i.Uniform1i(he,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(he,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(he,K.u_size_t),u_size:new i.Uniform1f(he,K.u_size),u_camera_to_center_distance:new i.Uniform1f(he,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(he,K.u_pitch),u_rotate_symbol:new i.Uniform1i(he,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(he,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(he,K.u_fade_change),u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(he,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(he,K.u_coord_matrix),u_is_text:new i.Uniform1i(he,K.u_is_text),u_pitch_with_map:new i.Uniform1i(he,K.u_pitch_with_map),u_texsize:new i.Uniform2f(he,K.u_texsize),u_texture:new i.Uniform1i(he,K.u_texture),u_gamma_scale:new i.Uniform1f(he,K.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(he,K.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(he,K.u_is_halo)}},Ml=function(he,K){return{u_is_size_zoom_constant:new i.Uniform1i(he,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(he,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(he,K.u_size_t),u_size:new i.Uniform1f(he,K.u_size),u_camera_to_center_distance:new i.Uniform1f(he,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(he,K.u_pitch),u_rotate_symbol:new i.Uniform1i(he,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(he,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(he,K.u_fade_change),u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(he,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(he,K.u_coord_matrix),u_is_text:new i.Uniform1i(he,K.u_is_text),u_pitch_with_map:new i.Uniform1i(he,K.u_pitch_with_map),u_texsize:new i.Uniform2f(he,K.u_texsize),u_texsize_icon:new i.Uniform2f(he,K.u_texsize_icon),u_texture:new i.Uniform1i(he,K.u_texture),u_texture_icon:new i.Uniform1i(he,K.u_texture_icon),u_gamma_scale:new i.Uniform1f(he,K.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(he,K.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(he,K.u_is_halo)}},Gl=function(he,K,de,re,pe,Oe,Qe,ut,Rt,Wt){var qt=pe.transform;return{u_is_size_zoom_constant:+(he==="constant"||he==="source"),u_is_size_feature_constant:+(he==="constant"||he==="camera"),u_size_t:K?K.uSizeT:0,u_size:K?K.uSize:0,u_camera_to_center_distance:qt.cameraToCenterDistance,u_pitch:qt.pitch/360*2*Math.PI,u_rotate_symbol:+de,u_aspect_ratio:qt.width/qt.height,u_fade_change:pe.options.fadeDuration?pe.symbolFadeChange:1,u_matrix:Oe,u_label_plane_matrix:Qe,u_coord_matrix:ut,u_is_text:+Rt,u_pitch_with_map:+re,u_texsize:Wt,u_texture:0}},Su=function(he,K,de,re,pe,Oe,Qe,ut,Rt,Wt,qt){var cr=pe.transform;return i.extend(Gl(he,K,de,re,pe,Oe,Qe,ut,Rt,Wt),{u_gamma_scale:re?Math.cos(cr._pitch)*cr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+qt})},Qu=function(he,K,de,re,pe,Oe,Qe,ut,Rt,Wt){return i.extend(Su(he,K,de,re,pe,Oe,Qe,ut,!0,Rt,!0),{u_texsize_icon:Wt,u_texture_icon:1})},Wl=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_opacity:new i.Uniform1f(he,K.u_opacity),u_color:new i.UniformColor(he,K.u_color)}},Yl=function(he,K){return{u_matrix:new i.UniformMatrix4f(he,K.u_matrix),u_opacity:new i.Uniform1f(he,K.u_opacity),u_image:new i.Uniform1i(he,K.u_image),u_pattern_tl_a:new i.Uniform2f(he,K.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(he,K.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(he,K.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(he,K.u_pattern_br_b),u_texsize:new i.Uniform2f(he,K.u_texsize),u_mix:new i.Uniform1f(he,K.u_mix),u_pattern_size_a:new i.Uniform2f(he,K.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(he,K.u_pattern_size_b),u_scale_a:new i.Uniform1f(he,K.u_scale_a),u_scale_b:new i.Uniform1f(he,K.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(he,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(he,K.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(he,K.u_tile_units_to_pixels)}},Fs=function(he,K,de){return{u_matrix:he,u_opacity:K,u_color:de}},Xl=function(he,K,de,re,pe,Oe){return i.extend(Ps(re,Oe,de,pe),{u_matrix:he,u_opacity:K})},zs={fillExtrusion:Tu,fillExtrusionPattern:Da,fill:ds,fillPattern:js,fillOutline:Rs,fillOutlinePattern:Wo,circle:Lc,collisionBox:Rc,collisionCircle:Dc,debug:yl,clippingMask:Co,heatmap:Df,heatmapTexture:Vl,hillshade:If,hillshadePrepare:Ff,line:Xo,lineGradient:Ds,linePattern:bl,lineSDF:Au,raster:ys,symbolIcon:Mu,symbolSDF:Of,symbolTextAndIcon:Ml,background:Wl,backgroundPattern:Yl},Va;function ns(he,K,de,re,pe,Oe,Qe){for(var ut=he.context,Rt=ut.gl,Wt=he.useProgram("collisionBox"),qt=[],cr=0,lr=0,Fr=0;Fr0){var Nn=i.create(),Yn=Kr;i.mul(Nn,Hr.placementInvProjMatrix,he.transform.glCoordMatrix),i.mul(Nn,Nn,Hr.placementViewportMatrix),qt.push({circleArray:Fn,circleOffset:lr,transform:Yn,invTransform:Nn}),cr+=Fn.length/4,lr=cr}fn&&Wt.draw(ut,Rt.LINES,ir.disabled,Kt.disabled,he.colorModeForRenderPass(),It.disabled,Ku(Kr,he.transform,Yr),de.id,fn.layoutVertexBuffer,fn.indexBuffer,fn.segments,null,he.transform.zoom,null,null,fn.collisionVertexBuffer)}}if(!(!Qe||!qt.length)){var Xn=he.useProgram("collisionCircle"),Gn=new i.StructArrayLayout2f1f2i16;Gn.resize(cr*4),Gn._trim();for(var jn=0,ei=0,si=qt;ei=0&&(Xr[Hr.associatedIconIndex]={shiftedAnchor:Fi,angle:Ji})}}if(qt){Fr.clear();for(var Ai=he.icon.placedSymbolArray,Yi=0;Yi0){var Qe=i.browser.now(),ut=(Qe-he.timeAdded)/Oe,Rt=K?(Qe-K.timeAdded)/Oe:-1,Wt=de.getSource(),qt=pe.coveringZoomLevel({tileSize:Wt.tileSize,roundZoom:Wt.roundZoom}),cr=!K||Math.abs(K.tileID.overscaledZ-qt)>Math.abs(he.tileID.overscaledZ-qt),lr=cr&&he.refreshedUponExpiration?1:i.clamp(cr?ut:1-Rt,0,1);return he.refreshedUponExpiration&&ut>=1&&(he.refreshedUponExpiration=!1),K?{opacity:1,mix:1-lr}:{opacity:lr,mix:0}}else return{opacity:1,mix:0}}function $s(he,K,de){var re=de.paint.get("background-color"),pe=de.paint.get("background-opacity");if(pe!==0){var Oe=he.context,Qe=Oe.gl,ut=he.transform,Rt=ut.tileSize,Wt=de.paint.get("background-pattern");if(!he.isPatternMissing(Wt)){var qt=!Wt&&re.a===1&&pe===1&&he.opaquePassEnabledForLayer()?"opaque":"translucent";if(he.renderPass===qt){var cr=Kt.disabled,lr=he.depthModeForSublayer(0,qt==="opaque"?ir.ReadWrite:ir.ReadOnly),Fr=he.colorModeForRenderPass(),Xr=he.useProgram(Wt?"backgroundPattern":"background"),Yr=ut.coveringTiles({tileSize:Rt});Wt&&(Oe.activeTexture.set(Qe.TEXTURE0),he.imageManager.bind(he.context));for(var Hr=de.getCrossfadeParameters(),Kr=0,fn=Yr;Kr "+de.overscaledZ);var Kr=Hr+" "+Fr+"kb";sr(he,Kr),Qe.draw(re,pe.TRIANGLES,ut,Rt,st.alphaBlended,It.disabled,ja(Oe,i.Color.transparent,Yr),qt,he.debugBuffer,he.quadTriangleIndexBuffer,he.debugSegments)}function sr(he,K){he.initDebugOverlayCanvas();var de=he.debugOverlayCanvas,re=he.context.gl,pe=he.debugOverlayCanvas.getContext("2d");pe.clearRect(0,0,de.width,de.height),pe.shadowColor="white",pe.shadowBlur=2,pe.lineWidth=1.5,pe.strokeStyle="white",pe.textBaseline="top",pe.font="bold 36px Open Sans, sans-serif",pe.fillText(K,5,5),pe.strokeText(K,5,5),he.debugOverlayTexture.update(de),he.debugOverlayTexture.bind(re.LINEAR,re.CLAMP_TO_EDGE)}function Mr(he,K,de){var re=he.context,pe=de.implementation;if(he.renderPass==="offscreen"){var Oe=pe.prerender;Oe&&(he.setCustomLayerDefaults(),re.setColorMode(he.colorModeForRenderPass()),Oe.call(pe,re.gl,he.transform.customLayerMatrix()),re.setDirty(),he.setBaseState())}else if(he.renderPass==="translucent"){he.setCustomLayerDefaults(),re.setColorMode(he.colorModeForRenderPass()),re.setStencilMode(Kt.disabled);var Qe=pe.renderingMode==="3d"?new ir(he.context.gl.LEQUAL,ir.ReadWrite,he.depthRangeFor3D):he.depthModeForSublayer(0,ir.ReadOnly);re.setDepthMode(Qe),pe.render(re.gl,he.transform.customLayerMatrix()),re.setDirty(),he.setBaseState(),re.bindFramebuffer.set(null)}}var Ir={symbol:Eu,circle:Bf,heatmap:ks,line:_u,fill:xs,"fill-extrusion":qu,hillshade:Ql,raster:$l,background:$s,debug:gr,custom:Mr},Nr=function(K,de){this.context=new Pt(K),this.transform=de,this._tileTextures={},this.setup(),this.numSublayers=kt.maxUnderzooming+kt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ai,this.gpuTimers={}};Nr.prototype.resize=function(K,de){if(this.width=K*i.browser.devicePixelRatio,this.height=de*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var re=0,pe=this.style._order;re256&&this.clearStencil(),re.setColorMode(st.disabled),re.setDepthMode(ir.disabled);var Oe=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Qe=0,ut=de;Qe256&&this.clearStencil();var K=this.nextStencilID++,de=this.context.gl;return new Kt({func:de.NOTEQUAL,mask:255},K,255,de.KEEP,de.KEEP,de.REPLACE)},Nr.prototype.stencilModeForClipping=function(K){var de=this.context.gl;return new Kt({func:de.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,de.KEEP,de.KEEP,de.REPLACE)},Nr.prototype.stencilConfigForOverlap=function(K){var de,re=this.context.gl,pe=K.sort(function(Wt,qt){return qt.overscaledZ-Wt.overscaledZ}),Oe=pe[pe.length-1].overscaledZ,Qe=pe[0].overscaledZ-Oe+1;if(Qe>1){this.currentStencilSource=void 0,this.nextStencilID+Qe>256&&this.clearStencil();for(var ut={},Rt=0;Rt=0;this.currentLayer--){var Nn=this.style._layers[pe[this.currentLayer]],Yn=Oe[Nn.source],Xn=Rt[Nn.source];this._renderTileClippingMasks(Nn,Xn),this.renderLayer(this,Yn,Nn,Xn)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?de.pop():null},Nr.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var de=this.imageManager.getPattern(K.from.toString()),re=this.imageManager.getPattern(K.to.toString());return!de||!re},Nr.prototype.useProgram=function(K,de){this.cache=this.cache||{};var re=""+K+(de?de.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[re]||(this.cache[re]=new ju(this.context,K,Lf[K],de,zs[K],this._showOverdrawInspector)),this.cache[re]},Nr.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Nr.prototype.setBaseState=function(){var K=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(K.FUNC_ADD)},Nr.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var K=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,K.RGBA)}},Nr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var tn=function(K,de){this.points=K,this.planes=de};tn.fromInvProjectionMatrix=function(K,de,re){var pe=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],Oe=Math.pow(2,re),Qe=pe.map(function(Wt){return i.transformMat4([],Wt,K)}).map(function(Wt){return i.scale$1([],Wt,1/Wt[3]/de*Oe)}),ut=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Rt=ut.map(function(Wt){var qt=i.sub([],Qe[Wt[0]],Qe[Wt[1]]),cr=i.sub([],Qe[Wt[2]],Qe[Wt[1]]),lr=i.normalize([],i.cross([],qt,cr)),Fr=-i.dot(lr,Qe[Wt[1]]);return lr.concat(Fr)});return new tn(Qe,Rt)};var yn=function(K,de){this.min=K,this.max=de,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};yn.prototype.quadrant=function(K){for(var de=[K%2===0,K<2],re=i.clone$2(this.min),pe=i.clone$2(this.max),Oe=0;Oe=0;if(Qe===0)return 0;Qe!==de.length&&(re=!1)}if(re)return 2;for(var Rt=0;Rt<3;Rt++){for(var Wt=Number.MAX_VALUE,qt=-Number.MAX_VALUE,cr=0;crthis.max[Rt]-this.min[Rt])return 0}return 1};var Rn=function(K,de,re,pe){if(K===void 0&&(K=0),de===void 0&&(de=0),re===void 0&&(re=0),pe===void 0&&(pe=0),isNaN(K)||K<0||isNaN(de)||de<0||isNaN(re)||re<0||isNaN(pe)||pe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=K,this.bottom=de,this.left=re,this.right=pe};Rn.prototype.interpolate=function(K,de,re){return de.top!=null&&K.top!=null&&(this.top=i.number(K.top,de.top,re)),de.bottom!=null&&K.bottom!=null&&(this.bottom=i.number(K.bottom,de.bottom,re)),de.left!=null&&K.left!=null&&(this.left=i.number(K.left,de.left,re)),de.right!=null&&K.right!=null&&(this.right=i.number(K.right,de.right,re)),this},Rn.prototype.getCenter=function(K,de){var re=i.clamp((this.left+K-this.right)/2,0,K),pe=i.clamp((this.top+de-this.bottom)/2,0,de);return new i.Point(re,pe)},Rn.prototype.equals=function(K){return this.top===K.top&&this.bottom===K.bottom&&this.left===K.left&&this.right===K.right},Rn.prototype.clone=function(){return new Rn(this.top,this.bottom,this.left,this.right)},Rn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Dn=function(K,de,re,pe,Oe){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Oe===void 0?!0:Oe,this._minZoom=K||0,this._maxZoom=de||22,this._minPitch=re??0,this._maxPitch=pe??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Rn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Zn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Dn.prototype.clone=function(){var K=new Dn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return K.tileSize=this.tileSize,K.latRange=this.latRange,K.width=this.width,K.height=this.height,K._center=this._center,K.zoom=this.zoom,K.angle=this.angle,K._fov=this._fov,K._pitch=this._pitch,K._unmodified=this._unmodified,K._edgeInsets=this._edgeInsets.clone(),K._calcMatrices(),K},Zn.minZoom.get=function(){return this._minZoom},Zn.minZoom.set=function(he){this._minZoom!==he&&(this._minZoom=he,this.zoom=Math.max(this.zoom,he))},Zn.maxZoom.get=function(){return this._maxZoom},Zn.maxZoom.set=function(he){this._maxZoom!==he&&(this._maxZoom=he,this.zoom=Math.min(this.zoom,he))},Zn.minPitch.get=function(){return this._minPitch},Zn.minPitch.set=function(he){this._minPitch!==he&&(this._minPitch=he,this.pitch=Math.max(this.pitch,he))},Zn.maxPitch.get=function(){return this._maxPitch},Zn.maxPitch.set=function(he){this._maxPitch!==he&&(this._maxPitch=he,this.pitch=Math.min(this.pitch,he))},Zn.renderWorldCopies.get=function(){return this._renderWorldCopies},Zn.renderWorldCopies.set=function(he){he===void 0?he=!0:he===null&&(he=!1),this._renderWorldCopies=he},Zn.worldSize.get=function(){return this.tileSize*this.scale},Zn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Zn.size.get=function(){return new i.Point(this.width,this.height)},Zn.bearing.get=function(){return-this.angle/Math.PI*180},Zn.bearing.set=function(he){var K=-i.wrap(he,-180,180)*Math.PI/180;this.angle!==K&&(this._unmodified=!1,this.angle=K,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Zn.pitch.get=function(){return this._pitch/Math.PI*180},Zn.pitch.set=function(he){var K=i.clamp(he,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==K&&(this._unmodified=!1,this._pitch=K,this._calcMatrices())},Zn.fov.get=function(){return this._fov/Math.PI*180},Zn.fov.set=function(he){he=Math.max(.01,Math.min(60,he)),this._fov!==he&&(this._unmodified=!1,this._fov=he/180*Math.PI,this._calcMatrices())},Zn.zoom.get=function(){return this._zoom},Zn.zoom.set=function(he){var K=Math.min(Math.max(he,this.minZoom),this.maxZoom);this._zoom!==K&&(this._unmodified=!1,this._zoom=K,this.scale=this.zoomScale(K),this.tileZoom=Math.floor(K),this.zoomFraction=K-this.tileZoom,this._constrain(),this._calcMatrices())},Zn.center.get=function(){return this._center},Zn.center.set=function(he){he.lat===this._center.lat&&he.lng===this._center.lng||(this._unmodified=!1,this._center=he,this._constrain(),this._calcMatrices())},Zn.padding.get=function(){return this._edgeInsets.toJSON()},Zn.padding.set=function(he){this._edgeInsets.equals(he)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,he,1),this._calcMatrices())},Zn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Dn.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},Dn.prototype.interpolatePadding=function(K,de,re){this._unmodified=!1,this._edgeInsets.interpolate(K,de,re),this._constrain(),this._calcMatrices()},Dn.prototype.coveringZoomLevel=function(K){var de=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,de)},Dn.prototype.getVisibleUnwrappedCoordinates=function(K){var de=[new i.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var re=this.pointCoordinate(new i.Point(0,0)),pe=this.pointCoordinate(new i.Point(this.width,0)),Oe=this.pointCoordinate(new i.Point(this.width,this.height)),Qe=this.pointCoordinate(new i.Point(0,this.height)),ut=Math.floor(Math.min(re.x,pe.x,Oe.x,Qe.x)),Rt=Math.floor(Math.max(re.x,pe.x,Oe.x,Qe.x)),Wt=1,qt=ut-Wt;qt<=Rt+Wt;qt++)qt!==0&&de.push(new i.UnwrappedTileID(qt,K));return de},Dn.prototype.coveringTiles=function(K){var de=this.coveringZoomLevel(K),re=de;if(K.minzoom!==void 0&&deK.maxzoom&&(de=K.maxzoom);var pe=i.MercatorCoordinate.fromLngLat(this.center),Oe=Math.pow(2,de),Qe=[Oe*pe.x,Oe*pe.y,0],ut=tn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,de),Rt=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Rt=de);var Wt=3,qt=function(hi){return{aabb:new yn([hi*Oe,0,0],[(hi+1)*Oe,Oe,0]),zoom:0,x:0,y:0,wrap:hi,fullyVisible:!1}},cr=[],lr=[],Fr=de,Xr=K.reparseOverscaled?re:de;if(this._renderWorldCopies)for(var Yr=1;Yr<=3;Yr++)cr.push(qt(-Yr)),cr.push(qt(Yr));for(cr.push(qt(0));cr.length>0;){var Hr=cr.pop(),Kr=Hr.x,fn=Hr.y,Fn=Hr.fullyVisible;if(!Fn){var Nn=Hr.aabb.intersects(ut);if(Nn===0)continue;Fn=Nn===2}var Yn=Hr.aabb.distanceX(Qe),Xn=Hr.aabb.distanceY(Qe),Gn=Math.max(Math.abs(Yn),Math.abs(Xn)),jn=Wt+(1<jn&&Hr.zoom>=Rt){lr.push({tileID:new i.OverscaledTileID(Hr.zoom===Fr?Xr:Hr.zoom,Hr.wrap,Hr.zoom,Kr,fn),distanceSq:i.sqrLen([Qe[0]-.5-Kr,Qe[1]-.5-fn])});continue}for(var ei=0;ei<4;ei++){var si=(Kr<<1)+ei%2,yi=(fn<<1)+(ei>>1);cr.push({aabb:Hr.aabb.quadrant(ei),zoom:Hr.zoom+1,x:si,y:yi,wrap:Hr.wrap,fullyVisible:Fn})}}return lr.sort(function(hi,Fi){return hi.distanceSq-Fi.distanceSq}).map(function(hi){return hi.tileID})},Dn.prototype.resize=function(K,de){this.width=K,this.height=de,this.pixelsToGLUnits=[2/K,-2/de],this._constrain(),this._calcMatrices()},Zn.unmodified.get=function(){return this._unmodified},Dn.prototype.zoomScale=function(K){return Math.pow(2,K)},Dn.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},Dn.prototype.project=function(K){var de=i.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(K.lng)*this.worldSize,i.mercatorYfromLat(de)*this.worldSize)},Dn.prototype.unproject=function(K){return new i.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},Zn.point.get=function(){return this.project(this.center)},Dn.prototype.setLocationAtPoint=function(K,de){var re=this.pointCoordinate(de),pe=this.pointCoordinate(this.centerPoint),Oe=this.locationCoordinate(K),Qe=new i.MercatorCoordinate(Oe.x-(re.x-pe.x),Oe.y-(re.y-pe.y));this.center=this.coordinateLocation(Qe),this._renderWorldCopies&&(this.center=this.center.wrap())},Dn.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},Dn.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},Dn.prototype.locationCoordinate=function(K){return i.MercatorCoordinate.fromLngLat(K)},Dn.prototype.coordinateLocation=function(K){return K.toLngLat()},Dn.prototype.pointCoordinate=function(K){var de=0,re=[K.x,K.y,0,1],pe=[K.x,K.y,1,1];i.transformMat4(re,re,this.pixelMatrixInverse),i.transformMat4(pe,pe,this.pixelMatrixInverse);var Oe=re[3],Qe=pe[3],ut=re[0]/Oe,Rt=pe[0]/Qe,Wt=re[1]/Oe,qt=pe[1]/Qe,cr=re[2]/Oe,lr=pe[2]/Qe,Fr=cr===lr?0:(de-cr)/(lr-cr);return new i.MercatorCoordinate(i.number(ut,Rt,Fr)/this.worldSize,i.number(Wt,qt,Fr)/this.worldSize)},Dn.prototype.coordinatePoint=function(K){var de=[K.x*this.worldSize,K.y*this.worldSize,0,1];return i.transformMat4(de,de,this.pixelMatrix),new i.Point(de[0]/de[3],de[1]/de[3])},Dn.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},Dn.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Dn.prototype.setMaxBounds=function(K){K?(this.lngRange=[K.getWest(),K.getEast()],this.latRange=[K.getSouth(),K.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Dn.prototype.calculatePosMatrix=function(K,de){de===void 0&&(de=!1);var re=K.key,pe=de?this._alignedPosMatrixCache:this._posMatrixCache;if(pe[re])return pe[re];var Oe=K.canonical,Qe=this.worldSize/this.zoomScale(Oe.z),ut=Oe.x+Math.pow(2,Oe.z)*K.wrap,Rt=i.identity(new Float64Array(16));return i.translate(Rt,Rt,[ut*Qe,Oe.y*Qe,0]),i.scale(Rt,Rt,[Qe/i.EXTENT,Qe/i.EXTENT,1]),i.multiply(Rt,de?this.alignedProjMatrix:this.projMatrix,Rt),pe[re]=new Float32Array(Rt),pe[re]},Dn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Dn.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var K=-90,de=90,re=-180,pe=180,Oe,Qe,ut,Rt,Wt=this.size,qt=this._unmodified;if(this.latRange){var cr=this.latRange;K=i.mercatorYfromLat(cr[1])*this.worldSize,de=i.mercatorYfromLat(cr[0])*this.worldSize,Oe=de-Kde&&(Rt=de-Hr)}if(this.lngRange){var Kr=Fr.x,fn=Wt.x/2;Kr-fnpe&&(ut=pe-fn)}(ut!==void 0||Rt!==void 0)&&(this.center=this.unproject(new i.Point(ut!==void 0?ut:Fr.x,Rt!==void 0?Rt:Fr.y))),this._unmodified=qt,this._constraining=!1}},Dn.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,de=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var re=Math.PI/2+this._pitch,pe=this._fov*(.5+de.y/this.height),Oe=Math.sin(pe)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-re-pe,.01,Math.PI-.01)),Qe=this.point,ut=Qe.x,Rt=Qe.y,Wt=Math.cos(Math.PI/2-this._pitch)*Oe+this.cameraToCenterDistance,qt=Wt*1.01,cr=this.height/50,lr=new Float64Array(16);i.perspective(lr,this._fov,this.width/this.height,cr,qt),lr[8]=-de.x*2/this.width,lr[9]=de.y*2/this.height,i.scale(lr,lr,[1,-1,1]),i.translate(lr,lr,[0,0,-this.cameraToCenterDistance]),i.rotateX(lr,lr,this._pitch),i.rotateZ(lr,lr,this.angle),i.translate(lr,lr,[-ut,-Rt,0]),this.mercatorMatrix=i.scale([],lr,[this.worldSize,this.worldSize,this.worldSize]),i.scale(lr,lr,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=lr,this.invProjMatrix=i.invert([],this.projMatrix);var Fr=this.width%2/2,Xr=this.height%2/2,Yr=Math.cos(this.angle),Hr=Math.sin(this.angle),Kr=ut-Math.round(ut)+Yr*Fr+Hr*Xr,fn=Rt-Math.round(Rt)+Yr*Xr+Hr*Fr,Fn=new Float64Array(lr);if(i.translate(Fn,Fn,[Kr>.5?Kr-1:Kr,fn>.5?fn-1:fn,0]),this.alignedProjMatrix=Fn,lr=i.create(),i.scale(lr,lr,[this.width/2,-this.height/2,1]),i.translate(lr,lr,[1,-1,0]),this.labelPlaneMatrix=lr,lr=i.create(),i.scale(lr,lr,[1,-1,1]),i.translate(lr,lr,[-1,-1,0]),i.scale(lr,lr,[2/this.width,2/this.height,1]),this.glCoordMatrix=lr,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),lr=i.invert(new Float64Array(16),this.pixelMatrix),!lr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=lr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Dn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var K=this.pointCoordinate(new i.Point(0,0)),de=[K.x*this.worldSize,K.y*this.worldSize,0,1],re=i.transformMat4(de,de,this.pixelMatrix);return re[3]/this.cameraToCenterDistance},Dn.prototype.getCameraPoint=function(){var K=this._pitch,de=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,de))},Dn.prototype.getCameraQueryGeometry=function(K){var de=this.getCameraPoint();if(K.length===1)return[K[0],de];for(var re=de.x,pe=de.y,Oe=de.x,Qe=de.y,ut=0,Rt=K;ut=3&&!K.some(function(re){return isNaN(re)})){var de=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(K[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+K[2],+K[1]],zoom:+K[0],bearing:de,pitch:+(K[4]||0)}),!0}return!1},Pi.prototype._updateHashUnthrottled=function(){var K=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,K)}catch{}};var Ri={linearity:.3,easing:i.bezier(0,0,.3,1)},zi=i.extend({deceleration:2500,maxSpeed:1400},Ri),Xi=i.extend({deceleration:20,maxSpeed:1400},Ri),va=i.extend({deceleration:1e3,maxSpeed:360},Ri),Ia=i.extend({deceleration:1e3,maxSpeed:90},Ri),fe=function(K){this._map=K,this.clear()};fe.prototype.clear=function(){this._inertiaBuffer=[]},fe.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:K})},fe.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,de=i.browser.now(),re=160;K.length>0&&de-K[0].time>re;)K.shift()},fe.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var de={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},re=0,pe=this._inertiaBuffer;re=this._clickTolerance||this._map.fire(new tt(K.type,this._map,K))},Dt.prototype.dblclick=function(K){return this._firePreventable(new tt(K.type,this._map,K))},Dt.prototype.mouseover=function(K){this._map.fire(new tt(K.type,this._map,K))},Dt.prototype.mouseout=function(K){this._map.fire(new tt(K.type,this._map,K))},Dt.prototype.touchstart=function(K){return this._firePreventable(new at(K.type,this._map,K))},Dt.prototype.touchmove=function(K){this._map.fire(new at(K.type,this._map,K))},Dt.prototype.touchend=function(K){this._map.fire(new at(K.type,this._map,K))},Dt.prototype.touchcancel=function(K){this._map.fire(new at(K.type,this._map,K))},Dt.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},Dt.prototype.isEnabled=function(){return!0},Dt.prototype.isActive=function(){return!1},Dt.prototype.enable=function(){},Dt.prototype.disable=function(){};var Et=function(K){this._map=K};Et.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Et.prototype.mousemove=function(K){this._map.fire(new tt(K.type,this._map,K))},Et.prototype.mousedown=function(){this._delayContextMenu=!0},Et.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new tt("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Et.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new tt(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},Et.prototype.isEnabled=function(){return!0},Et.prototype.isActive=function(){return!1},Et.prototype.enable=function(){},Et.prototype.disable=function(){};var Yt=function(K,de){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=de.clickTolerance||1};Yt.prototype.isEnabled=function(){return!!this._enabled},Yt.prototype.isActive=function(){return!!this._active},Yt.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Yt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Yt.prototype.mousedown=function(K,de){this.isEnabled()&&K.shiftKey&&K.button===0&&(x.disableDrag(),this._startPos=this._lastPos=de,this._active=!0)},Yt.prototype.mousemoveWindow=function(K,de){if(this._active){var re=de;if(!(this._lastPos.equals(re)||!this._box&&re.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),re.length===this.numTouches&&(this.centroid=nr(de),this.touches=Zt(re,de)))},on.prototype.touchmove=function(K,de,re){if(!(this.aborted||!this.centroid)){var pe=Zt(re,de);for(var Oe in this.touches){var Qe=this.touches[Oe],ut=pe[Oe];(!ut||ut.dist(Qe)>Jr)&&(this.aborted=!0)}}},on.prototype.touchend=function(K,de,re){if((!this.centroid||K.timeStamp-this.startTime>Lr)&&(this.aborted=!0),re.length===0){var pe=!this.aborted&&this.centroid;if(this.reset(),pe)return pe}};var Rr=function(K){this.singleTap=new on(K),this.numTaps=K.numTaps,this.reset()};Rr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Rr.prototype.touchstart=function(K,de,re){this.singleTap.touchstart(K,de,re)},Rr.prototype.touchmove=function(K,de,re){this.singleTap.touchmove(K,de,re)},Rr.prototype.touchend=function(K,de,re){var pe=this.singleTap.touchend(K,de,re);if(pe){var Oe=K.timeStamp-this.lastTime<_r,Qe=!this.lastTap||this.lastTap.dist(pe)0&&(this._active=!0);var pe=Zt(re,de),Oe=new i.Point(0,0),Qe=new i.Point(0,0),ut=0;for(var Rt in pe){var Wt=pe[Rt],qt=this._touches[Rt];qt&&(Oe._add(Wt),Qe._add(Wt.sub(qt)),ut++,pe[Rt]=Wt)}if(this._touches=pe,!(utMath.abs(he.x)}var Ti=100,Zi=function(he){function K(){he.apply(this,arguments)}return he&&(K.__proto__=he),K.prototype=Object.create(he&&he.prototype),K.prototype.constructor=K,K.prototype.reset=function(){he.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},K.prototype._start=function(re){this._lastPoints=re,Bi(re[0].sub(re[1]))&&(this._valid=!1)},K.prototype._move=function(re,pe,Oe){var Qe=re[0].sub(this._lastPoints[0]),ut=re[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Qe,ut,Oe.timeStamp),!!this._valid){this._lastPoints=re,this._active=!0;var Rt=(Qe.y+ut.y)/2,Wt=-.5;return{pitchDelta:Rt*Wt}}},K.prototype.gestureBeginsVertically=function(re,pe,Oe){if(this._valid!==void 0)return this._valid;var Qe=2,ut=re.mag()>=Qe,Rt=pe.mag()>=Qe;if(!(!ut&&!Rt)){if(!ut||!Rt)return this._firstMove===void 0&&(this._firstMove=Oe),Oe-this._firstMove0==pe.y>0;return Bi(re)&&Bi(pe)&&Wt}},K}(fi),ba={panStep:100,bearingStep:15,pitchStep:10},na=function(){var K=ba;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};na.prototype.reset=function(){this._active=!1},na.prototype.keydown=function(K){var de=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var re=0,pe=0,Oe=0,Qe=0,ut=0;switch(K.keyCode){case 61:case 107:case 171:case 187:re=1;break;case 189:case 109:case 173:re=-1;break;case 37:K.shiftKey?pe=-1:(K.preventDefault(),Qe=-1);break;case 39:K.shiftKey?pe=1:(K.preventDefault(),Qe=1);break;case 38:K.shiftKey?Oe=1:(K.preventDefault(),ut=-1);break;case 40:K.shiftKey?Oe=-1:(K.preventDefault(),ut=1);break;default:return}return this._rotationDisabled&&(pe=0,Oe=0),{cameraAnimation:function(Rt){var Wt=Rt.getZoom();Rt.easeTo({duration:300,easeId:"keyboardHandler",easing:Ka,zoom:re?Math.round(Wt)+re*(K.shiftKey?2:1):Wt,bearing:Rt.getBearing()+pe*de._bearingStep,pitch:Rt.getPitch()+Oe*de._pitchStep,offset:[-Qe*de._panStep,-ut*de._panStep],center:Rt.getCenter()},{originalEvent:K})}}}},na.prototype.enable=function(){this._enabled=!0},na.prototype.disable=function(){this._enabled=!1,this.reset()},na.prototype.isEnabled=function(){return this._enabled},na.prototype.isActive=function(){return this._active},na.prototype.disableRotation=function(){this._rotationDisabled=!0},na.prototype.enableRotation=function(){this._rotationDisabled=!1};function Ka(he){return he*(2-he)}var Ja=4.000244140625,eo=1/100,wa=1/450,uo=2,oi=function(K,de){this._map=K,this._el=K.getCanvasContainer(),this._handler=de,this._delta=0,this._defaultZoomRate=eo,this._wheelZoomRate=wa,i.bindAll(["_onTimeout"],this)};oi.prototype.setZoomRate=function(K){this._defaultZoomRate=K},oi.prototype.setWheelZoomRate=function(K){this._wheelZoomRate=K},oi.prototype.isEnabled=function(){return!!this._enabled},oi.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},oi.prototype.isZooming=function(){return!!this._zooming},oi.prototype.enable=function(K){this.isEnabled()||(this._enabled=!0,this._aroundCenter=K&&K.around==="center")},oi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},oi.prototype.wheel=function(K){if(this.isEnabled()){var de=K.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,re=i.browser.now(),pe=re-(this._lastWheelEventTime||0);this._lastWheelEventTime=re,de!==0&&de%Ja===0?this._type="wheel":de!==0&&Math.abs(de)<4?this._type="trackpad":pe>400?(this._type=null,this._lastValue=de,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(pe*de)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,de+=this._lastValue)),K.shiftKey&&de&&(de=de/4),this._type&&(this._lastWheelEvent=K,this._delta-=de,this._active||this._start(K)),K.preventDefault()}},oi.prototype._onTimeout=function(K){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(K)},oi.prototype._start=function(K){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var de=x.mousePos(this._el,K);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(de)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},oi.prototype.renderFrame=function(){var K=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var de=this._map.transform;if(this._delta!==0){var re=this._type==="wheel"&&Math.abs(this._delta)>Ja?this._wheelZoomRate:this._defaultZoomRate,pe=uo/(1+Math.exp(-Math.abs(this._delta*re)));this._delta<0&&pe!==0&&(pe=1/pe);var Oe=typeof this._targetZoom=="number"?de.zoomScale(this._targetZoom):de.scale;this._targetZoom=Math.min(de.maxZoom,Math.max(de.minZoom,de.scaleZoom(Oe*pe))),this._type==="wheel"&&(this._startZoom=de.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Qe=typeof this._targetZoom=="number"?this._targetZoom:de.zoom,ut=this._startZoom,Rt=this._easing,Wt=!1,qt;if(this._type==="wheel"&&ut&&Rt){var cr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),lr=Rt(cr);qt=i.number(ut,Qe,lr),cr<1?this._frameId||(this._frameId=!0):Wt=!0}else qt=Qe,Wt=!0;return this._active=!0,Wt&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Wt,zoomDelta:qt-de.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},oi.prototype._smoothOutEasing=function(K){var de=i.ease;if(this._prevEase){var re=this._prevEase,pe=(i.browser.now()-re.start)/re.duration,Oe=re.easing(pe+.01)-re.easing(pe),Qe=.27/Math.sqrt(Oe*Oe+1e-4)*.01,ut=Math.sqrt(.27*.27-Qe*Qe);de=i.bezier(Qe,ut,.25,1)}return this._prevEase={start:i.browser.now(),duration:K,easing:de},de},oi.prototype.reset=function(){this._active=!1};var Ei=function(K,de){this._clickZoom=K,this._tapZoom=de};Ei.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Ei.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Ei.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Ei.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ao=function(){this.reset()};Ao.prototype.reset=function(){this._active=!1},Ao.prototype.dblclick=function(K,de){return K.preventDefault(),{cameraAnimation:function(re){re.easeTo({duration:300,zoom:re.getZoom()+(K.shiftKey?-1:1),around:re.unproject(de)},{originalEvent:K})}}},Ao.prototype.enable=function(){this._enabled=!0},Ao.prototype.disable=function(){this._enabled=!1,this.reset()},Ao.prototype.isEnabled=function(){return this._enabled},Ao.prototype.isActive=function(){return this._active};var Lo=function(){this._tap=new Rr({numTouches:1,numTaps:1}),this.reset()};Lo.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Lo.prototype.touchstart=function(K,de,re){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>_r&&this.reset(),this._tapTime?re.length>0&&(this._swipePoint=de[0],this._swipeTouch=re[0].identifier):this._tap.touchstart(K,de,re))},Lo.prototype.touchmove=function(K,de,re){if(!this._tapTime)this._tap.touchmove(K,de,re);else if(this._swipePoint){if(re[0].identifier!==this._swipeTouch)return;var pe=de[0],Oe=pe.y-this._swipePoint.y;return this._swipePoint=pe,K.preventDefault(),this._active=!0,{zoomDelta:Oe/128}}},Lo.prototype.touchend=function(K,de,re){if(this._tapTime)this._swipePoint&&re.length===0&&this.reset();else{var pe=this._tap.touchend(K,de,re);pe&&(this._tapTime=K.timeStamp)}},Lo.prototype.touchcancel=function(){this.reset()},Lo.prototype.enable=function(){this._enabled=!0},Lo.prototype.disable=function(){this._enabled=!1,this.reset()},Lo.prototype.isEnabled=function(){return this._enabled},Lo.prototype.isActive=function(){return this._active};var to=function(K,de,re){this._el=K,this._mousePan=de,this._touchPan=re};to.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},to.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},to.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},to.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ca=function(K,de,re){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=de,this._mousePitch=re};ca.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ca.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ca.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ca.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Ha=function(K,de,re,pe){this._el=K,this._touchZoom=de,this._touchRotate=re,this._tapDragZoom=pe,this._rotationDisabled=!1,this._enabled=!0};Ha.prototype.enable=function(K){this._touchZoom.enable(K),this._rotationDisabled||this._touchRotate.enable(K),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Ha.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Ha.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Ha.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Ha.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Ha.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Oa=function(he){return he.zoom||he.drag||he.pitch||he.rotate},is=function(he){function K(){he.apply(this,arguments)}return he&&(K.__proto__=he),K.prototype=Object.create(he&&he.prototype),K.prototype.constructor=K,K}(i.Event);function bs(he){return he.panDelta&&he.panDelta.mag()||he.zoomDelta||he.bearingDelta||he.pitchDelta}var Ea=function(K,de){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new fe(K),this._bearingSnap=de.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(de),i.bindAll(["handleEvent","handleWindowEvent"],this);var re=this._el;this._listeners=[[re,"touchstart",{passive:!0}],[re,"touchmove",{passive:!1}],[re,"touchend",void 0],[re,"touchcancel",void 0],[re,"mousedown",void 0],[re,"mousemove",void 0],[re,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[re,"mouseover",void 0],[re,"mouseout",void 0],[re,"dblclick",void 0],[re,"click",void 0],[re,"keydown",{capture:!1}],[re,"keyup",void 0],[re,"wheel",{passive:!1}],[re,"contextmenu",void 0],[i.window,"blur",void 0]];for(var pe=0,Oe=this._listeners;peut?Math.min(2,Yn):Math.max(.5,Yn),hi=Math.pow(yi,1-ei),Fi=Qe.unproject(Fn.add(Nn.mult(ei*hi)).mult(si));Qe.setLocationAtPoint(Qe.renderWorldCopies?Fi.wrap():Fi,Hr)}Oe._fireMoveEvents(pe)},function(ei){Oe._afterEase(pe,ei)},re),this},K.prototype._prepareEase=function(re,pe,Oe){Oe===void 0&&(Oe={}),this._moving=!0,!pe&&!Oe.moving&&this.fire(new i.Event("movestart",re)),this._zooming&&!Oe.zooming&&this.fire(new i.Event("zoomstart",re)),this._rotating&&!Oe.rotating&&this.fire(new i.Event("rotatestart",re)),this._pitching&&!Oe.pitching&&this.fire(new i.Event("pitchstart",re))},K.prototype._fireMoveEvents=function(re){this.fire(new i.Event("move",re)),this._zooming&&this.fire(new i.Event("zoom",re)),this._rotating&&this.fire(new i.Event("rotate",re)),this._pitching&&this.fire(new i.Event("pitch",re))},K.prototype._afterEase=function(re,pe){if(!(this._easeId&&pe&&this._easeId===pe)){delete this._easeId;var Oe=this._zooming,Qe=this._rotating,ut=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Oe&&this.fire(new i.Event("zoomend",re)),Qe&&this.fire(new i.Event("rotateend",re)),ut&&this.fire(new i.Event("pitchend",re)),this.fire(new i.Event("moveend",re))}},K.prototype.flyTo=function(re,pe){var Oe=this;if(!re.essential&&i.browser.prefersReducedMotion){var Qe=i.pick(re,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Qe,pe)}this.stop(),re=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},re);var ut=this.transform,Rt=this.getZoom(),Wt=this.getBearing(),qt=this.getPitch(),cr=this.getPadding(),lr="zoom"in re?i.clamp(+re.zoom,ut.minZoom,ut.maxZoom):Rt,Fr="bearing"in re?this._normalizeBearing(re.bearing,Wt):Wt,Xr="pitch"in re?+re.pitch:qt,Yr="padding"in re?re.padding:ut.padding,Hr=ut.zoomScale(lr-Rt),Kr=i.Point.convert(re.offset),fn=ut.centerPoint.add(Kr),Fn=ut.pointLocation(fn),Nn=i.LngLat.convert(re.center||Fn);this._normalizeCenter(Nn);var Yn=ut.project(Fn),Xn=ut.project(Nn).sub(Yn),Gn=re.curve,jn=Math.max(ut.width,ut.height),ei=jn/Hr,si=Xn.mag();if("minZoom"in re){var yi=i.clamp(Math.min(re.minZoom,Rt,lr),ut.minZoom,ut.maxZoom),hi=jn/ut.zoomScale(yi-Rt);Gn=Math.sqrt(hi/si*2)}var Fi=Gn*Gn;function Ji(Vi){var Qi=(ei*ei-jn*jn+(Vi?-1:1)*Fi*Fi*si*si)/(2*(Vi?ei:jn)*Fi*si);return Math.log(Math.sqrt(Qi*Qi+1)-Qi)}function Gi(Vi){return(Math.exp(Vi)-Math.exp(-Vi))/2}function Ai(Vi){return(Math.exp(Vi)+Math.exp(-Vi))/2}function Yi(Vi){return Gi(Vi)/Ai(Vi)}var Ui=Ji(0),ia=function(Vi){return Ai(Ui)/Ai(Ui+Gn*Vi)},qi=function(Vi){return jn*((Ai(Ui)*Yi(Ui+Gn*Vi)-Gi(Ui))/Fi)/si},Ta=(Ji(1)-Ui)/Gn;if(Math.abs(si)<1e-6||!isFinite(Ta)){if(Math.abs(jn-ei)<1e-6)return this.easeTo(re,pe);var Ki=eire.maxDuration&&(re.duration=0),this._zooming=!0,this._rotating=Wt!==Fr,this._pitching=Xr!==qt,this._padding=!ut.isPaddingEqual(Yr),this._prepareEase(pe,!1),this._ease(function(Vi){var Qi=Vi*Ta,Na=1/ia(Qi);ut.zoom=Vi===1?lr:Rt+ut.scaleZoom(Na),Oe._rotating&&(ut.bearing=i.number(Wt,Fr,Vi)),Oe._pitching&&(ut.pitch=i.number(qt,Xr,Vi)),Oe._padding&&(ut.interpolatePadding(cr,Yr,Vi),fn=ut.centerPoint.add(Kr));var fo=Vi===1?Nn:ut.unproject(Yn.add(Xn.mult(qi(Qi))).mult(Na));ut.setLocationAtPoint(ut.renderWorldCopies?fo.wrap():fo,fn),Oe._fireMoveEvents(pe)},function(){return Oe._afterEase(pe)},re),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(re,pe){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Oe=this._onEaseEnd;delete this._onEaseEnd,Oe.call(this,pe)}if(!re){var Qe=this.handlers;Qe&&Qe.stop(!1)}return this},K.prototype._ease=function(re,pe,Oe){Oe.animate===!1||Oe.duration===0?(re(1),pe()):(this._easeStart=i.browser.now(),this._easeOptions=Oe,this._onEaseFrame=re,this._onEaseEnd=pe,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var re=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(re)),re<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(re,pe){re=i.wrap(re,-180,180);var Oe=Math.abs(re-pe);return Math.abs(re-360-pe)180?-360:Oe<-180?360:0}},K}(i.Evented),ji=function(K){K===void 0&&(K={}),this.options=K,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};ji.prototype.getDefaultPosition=function(){return"bottom-right"},ji.prototype.onAdd=function(K){var de=this.options&&this.options.compact;return this._map=K,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=x.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=x.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),de&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),de===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},ji.prototype.onRemove=function(){x.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},ji.prototype._setElementTitle=function(K,de){var re=this._map._getUIString("AttributionControl."+de);K.title=re,K.setAttribute("aria-label",re)},ji.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},ji.prototype._updateEditLink=function(){var K=this._editLink;K||(K=this._editLink=this._container.querySelector(".mapbox-improve-map"));var de=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(K){var re=de.reduce(function(pe,Oe,Qe){return Oe.value&&(pe+=Oe.key+"="+Oe.value+(Qe=0)return!1;return!0});var ut=K.join(" | ");ut!==this._attribHTML&&(this._attribHTML=ut,K.length?(this._innerContainer.innerHTML=ut,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},ji.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var _a=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};_a.prototype.onAdd=function(K){this._map=K,this._container=x.create("div","mapboxgl-ctrl");var de=x.create("a","mapboxgl-ctrl-logo");return de.target="_blank",de.rel="noopener nofollow",de.href="https://www.mapbox.com/",de.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),de.setAttribute("rel","noopener nofollow"),this._container.appendChild(de),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},_a.prototype.onRemove=function(){x.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},_a.prototype.getDefaultPosition=function(){return"bottom-left"},_a.prototype._updateLogo=function(K){(!K||K.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},_a.prototype._logoRequired=function(){if(this._map.style){var K=this._map.style.sourceCaches;for(var de in K){var re=K[de].getSource();if(re.mapbox_logo)return!0}return!1}},_a.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var de=K[0];this._map.getCanvasContainer().offsetWidth<250?de.classList.add("mapboxgl-compact"):de.classList.remove("mapboxgl-compact")}};var kc=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};kc.prototype.add=function(K){var de=++this._id,re=this._queue;return re.push({callback:K,id:de,cancelled:!1}),de},kc.prototype.remove=function(K){for(var de=this._currentlyRunning,re=de?this._queue.concat(de):this._queue,pe=0,Oe=re;pere.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(re.minPitch!=null&&re.maxPitch!=null&&re.minPitch>re.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(re.minPitch!=null&&re.minPitchPu)throw new Error("maxPitch must be less than or equal to "+Pu);var Oe=new Dn(re.minZoom,re.maxZoom,re.minPitch,re.maxPitch,re.renderWorldCopies);if(he.call(this,Oe,re),this._interactive=re.interactive,this._maxTileCacheSize=re.maxTileCacheSize,this._failIfMajorPerformanceCaveat=re.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=re.preserveDrawingBuffer,this._antialias=re.antialias,this._trackResize=re.trackResize,this._bearingSnap=re.bearingSnap,this._refreshExpiredTiles=re.refreshExpiredTiles,this._fadeDuration=re.fadeDuration,this._crossSourceCollisions=re.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=re.collectResourceTiming,this._renderTaskQueue=new kc,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},qv,re.locale),this._clickTolerance=re.clickTolerance,this._requestManager=new i.RequestManager(re.transformRequest,re.accessToken),typeof re.container=="string"){if(this._container=i.window.document.getElementById(re.container),!this._container)throw new Error("Container '"+re.container+"' not found.")}else if(re.container instanceof dv)this._container=re.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(re.maxBounds&&this.setMaxBounds(re.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return pe._update(!1)}),this.on("moveend",function(){return pe._update(!1)}),this.on("zoom",function(){return pe._update(!0)}),typeof i.window<"u"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1),i.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ea(this,re);var Qe=typeof re.hash=="string"&&re.hash||void 0;this._hash=re.hash&&new Pi(Qe).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:re.center,zoom:re.zoom,bearing:re.bearing,pitch:re.pitch}),re.bounds&&(this.resize(),this.fitBounds(re.bounds,i.extend({},re.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=re.localIdeographFontFamily,re.style&&this.setStyle(re.style,{localIdeographFontFamily:re.localIdeographFontFamily}),re.attributionControl&&this.addControl(new ji({customAttribution:re.customAttribution})),this.addControl(new _a,re.logoPosition),this.on("style.load",function(){pe.transform.unmodified&&pe.jumpTo(pe.style.stylesheet)}),this.on("data",function(ut){pe._update(ut.dataType==="style"),pe.fire(new i.Event(ut.dataType+"data",ut))}),this.on("dataloading",function(ut){pe.fire(new i.Event(ut.dataType+"dataloading",ut))})}he&&(K.__proto__=he),K.prototype=Object.create(he&&he.prototype),K.prototype.constructor=K;var de={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return K.prototype._getMapId=function(){return this._mapId},K.prototype.addControl=function(pe,Oe){if(Oe===void 0&&(pe.getDefaultPosition?Oe=pe.getDefaultPosition():Oe="top-right"),!pe||!pe.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Qe=pe.onAdd(this);this._controls.push(pe);var ut=this._controlPositions[Oe];return Oe.indexOf("bottom")!==-1?ut.insertBefore(Qe,ut.firstChild):ut.appendChild(Qe),this},K.prototype.removeControl=function(pe){if(!pe||!pe.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Oe=this._controls.indexOf(pe);return Oe>-1&&this._controls.splice(Oe,1),pe.onRemove(this),this},K.prototype.hasControl=function(pe){return this._controls.indexOf(pe)>-1},K.prototype.resize=function(pe){var Oe=this._containerDimensions(),Qe=Oe[0],ut=Oe[1];this._resizeCanvas(Qe,ut),this.transform.resize(Qe,ut),this.painter.resize(Qe,ut);var Rt=!this._moving;return Rt&&(this.stop(),this.fire(new i.Event("movestart",pe)).fire(new i.Event("move",pe))),this.fire(new i.Event("resize",pe)),Rt&&this.fire(new i.Event("moveend",pe)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(pe){return this.transform.setMaxBounds(i.LngLatBounds.convert(pe)),this._update()},K.prototype.setMinZoom=function(pe){if(pe=pe??Hf,pe>=Hf&&pe<=this.transform.maxZoom)return this.transform.minZoom=pe,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=pe,this._update(),this.getZoom()>pe&&this.setZoom(pe),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(pe){if(pe=pe??Zo,pe=Zo&&pe<=this.transform.maxPitch)return this.transform.minPitch=pe,this._update(),this.getPitch()Pu)throw new Error("maxPitch must be less than or equal to "+Pu);if(pe>=this.transform.minPitch)return this.transform.maxPitch=pe,this._update(),this.getPitch()>pe&&this.setPitch(pe),this;throw new Error("maxPitch must be greater than the current minPitch")},K.prototype.getMaxPitch=function(){return this.transform.maxPitch},K.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},K.prototype.setRenderWorldCopies=function(pe){return this.transform.renderWorldCopies=pe,this._update()},K.prototype.project=function(pe){return this.transform.locationPoint(i.LngLat.convert(pe))},K.prototype.unproject=function(pe){return this.transform.pointLocation(i.Point.convert(pe))},K.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},K.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},K.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},K.prototype._createDelegatedListener=function(pe,Oe,Qe){var ut=this,Rt;if(pe==="mouseenter"||pe==="mouseover"){var Wt=!1,qt=function(Hr){var Kr=ut.getLayer(Oe)?ut.queryRenderedFeatures(Hr.point,{layers:[Oe]}):[];Kr.length?Wt||(Wt=!0,Qe.call(ut,new tt(pe,ut,Hr.originalEvent,{features:Kr}))):Wt=!1},cr=function(){Wt=!1};return{layer:Oe,listener:Qe,delegates:{mousemove:qt,mouseout:cr}}}else if(pe==="mouseleave"||pe==="mouseout"){var lr=!1,Fr=function(Hr){var Kr=ut.getLayer(Oe)?ut.queryRenderedFeatures(Hr.point,{layers:[Oe]}):[];Kr.length?lr=!0:lr&&(lr=!1,Qe.call(ut,new tt(pe,ut,Hr.originalEvent)))},Xr=function(Hr){lr&&(lr=!1,Qe.call(ut,new tt(pe,ut,Hr.originalEvent)))};return{layer:Oe,listener:Qe,delegates:{mousemove:Fr,mouseout:Xr}}}else{var Yr=function(Hr){var Kr=ut.getLayer(Oe)?ut.queryRenderedFeatures(Hr.point,{layers:[Oe]}):[];Kr.length&&(Hr.features=Kr,Qe.call(ut,Hr),delete Hr.features)};return{layer:Oe,listener:Qe,delegates:(Rt={},Rt[pe]=Yr,Rt)}}},K.prototype.on=function(pe,Oe,Qe){if(Qe===void 0)return he.prototype.on.call(this,pe,Oe);var ut=this._createDelegatedListener(pe,Oe,Qe);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[pe]=this._delegatedListeners[pe]||[],this._delegatedListeners[pe].push(ut);for(var Rt in ut.delegates)this.on(Rt,ut.delegates[Rt]);return this},K.prototype.once=function(pe,Oe,Qe){if(Qe===void 0)return he.prototype.once.call(this,pe,Oe);var ut=this._createDelegatedListener(pe,Oe,Qe);for(var Rt in ut.delegates)this.once(Rt,ut.delegates[Rt]);return this},K.prototype.off=function(pe,Oe,Qe){var ut=this;if(Qe===void 0)return he.prototype.off.call(this,pe,Oe);var Rt=function(Wt){for(var qt=Wt[pe],cr=0;cr180;){var Qe=de.locationPoint(he);if(Qe.x>=0&&Qe.y>=0&&Qe.x<=de.width&&Qe.y<=de.height)break;he.lng>de.center.lng?he.lng-=360:he.lng+=360}return he}var Nc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function sh(he,K,de){var re=he.classList;for(var pe in Nc)re.remove("mapboxgl-"+de+"-anchor-"+pe);re.add("mapboxgl-"+de+"-anchor-"+K)}var Wf=function(he){function K(de,re){if(he.call(this),(de instanceof i.window.HTMLElement||re)&&(de=i.extend({element:de},re)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=de&&de.anchor||"center",this._color=de&&de.color||"#3FB1CE",this._scale=de&&de.scale||1,this._draggable=de&&de.draggable||!1,this._clickTolerance=de&&de.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=de&&de.rotation||0,this._rotationAlignment=de&&de.rotationAlignment||"auto",this._pitchAlignment=de&&de.pitchAlignment&&de.pitchAlignment!=="auto"?de.pitchAlignment:this._rotationAlignment,!de||!de.element){this._defaultMarker=!0,this._element=x.create("div"),this._element.setAttribute("aria-label","Map marker");var pe=x.createNS("http://www.w3.org/2000/svg","svg"),Oe=41,Qe=27;pe.setAttributeNS(null,"display","block"),pe.setAttributeNS(null,"height",Oe+"px"),pe.setAttributeNS(null,"width",Qe+"px"),pe.setAttributeNS(null,"viewBox","0 0 "+Qe+" "+Oe);var ut=x.createNS("http://www.w3.org/2000/svg","g");ut.setAttributeNS(null,"stroke","none"),ut.setAttributeNS(null,"stroke-width","1"),ut.setAttributeNS(null,"fill","none"),ut.setAttributeNS(null,"fill-rule","evenodd");var Rt=x.createNS("http://www.w3.org/2000/svg","g");Rt.setAttributeNS(null,"fill-rule","nonzero");var Wt=x.createNS("http://www.w3.org/2000/svg","g");Wt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Wt.setAttributeNS(null,"fill","#000000");for(var qt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],cr=0,lr=qt;cr=pe}this._isDragging&&(this._pos=re.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},K.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.Event("dragend")),this._state="inactive"},K.prototype._addDragHandler=function(re){this._element.contains(re.originalEvent.target)&&(re.preventDefault(),this._positionDelta=re.point.sub(this._pos).add(this._offset),this._pointerdownPos=re.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},K.prototype.setDraggable=function(re){return this._draggable=!!re,this._map&&(re?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},K.prototype.isDraggable=function(){return this._draggable},K.prototype.setRotation=function(re){return this._rotation=re||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(re){return this._rotationAlignment=re||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(re){return this._pitchAlignment=re&&re!=="auto"?re:this._rotationAlignment,this._update(),this},K.prototype.getPitchAlignment=function(){return this._pitchAlignment},K}(i.Evented),mv={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ru;function Bc(he){Ru!==void 0?he(Ru):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(K){Ru=K.state!=="denied",he(Ru)}):(Ru=!!i.window.navigator.geolocation,he(Ru))}var Yf=0,nf=!1,ed=function(he){function K(de){he.call(this),this.options=i.extend({},mv,de),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return he&&(K.__proto__=he),K.prototype=Object.create(he&&he.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(re){return this._map=re,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Bc(this._setupUI),this._container},K.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),x.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Yf=0,nf=!1},K.prototype._isOutOfMapMaxBounds=function(re){var pe=this._map.getMaxBounds(),Oe=re.coords;return pe&&(Oe.longitudepe.getEast()||Oe.latitudepe.getNorth())},K.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},K.prototype._onSuccess=function(re){if(this._map){if(this._isOutOfMapMaxBounds(re)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",re)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=re,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(re),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(re),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",re)),this._finish()}},K.prototype._updateCamera=function(re){var pe=new i.LngLat(re.coords.longitude,re.coords.latitude),Oe=re.coords.accuracy,Qe=this._map.getBearing(),ut=i.extend({bearing:Qe},this.options.fitBoundsOptions);this._map.fitBounds(pe.toBounds(Oe),ut,{geolocateSource:!0})},K.prototype._updateMarker=function(re){if(re){var pe=new i.LngLat(re.coords.longitude,re.coords.latitude);this._accuracyCircleMarker.setLngLat(pe).addTo(this._map),this._userLocationDotMarker.setLngLat(pe).addTo(this._map),this._accuracy=re.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var re=this._map._container.clientHeight/2,pe=this._map.unproject([0,re]),Oe=this._map.unproject([1,re]),Qe=pe.distanceTo(Oe),ut=Math.ceil(2*this._accuracy/Qe);this._circleElement.style.width=ut+"px",this._circleElement.style.height=ut+"px"},K.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},K.prototype._onError=function(re){if(this._map){if(this.options.trackUserLocation)if(re.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var pe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=pe,this._geolocateButton.setAttribute("aria-label",pe),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(re.code===3&&nf)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",re)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(re){var pe=this;if(this._container.addEventListener("contextmenu",function(ut){return ut.preventDefault()}),this._geolocateButton=x.create("button","mapboxgl-ctrl-geolocate",this._container),x.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",re===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Oe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Oe,this._geolocateButton.setAttribute("aria-label",Oe)}else{var Qe=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Qe,this._geolocateButton.setAttribute("aria-label",Qe)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Wf(this._dotElement),this._circleElement=x.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Wf({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ut){var Rt=ut.originalEvent&&ut.originalEvent.type==="resize";!ut.geolocateSource&&pe._watchState==="ACTIVE_LOCK"&&!Rt&&(pe._watchState="BACKGROUND",pe._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),pe._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),pe.fire(new i.Event("trackuserlocationend")))})},K.prototype.trigger=function(){if(!this._setup)return i.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Yf--,nf=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Yf++;var re;Yf>1?(re={maximumAge:6e5,timeout:0},nf=!0):(re=this.options.positionOptions,nf=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,re)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},K.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},K}(i.Evented),yv={maxWidth:100,unit:"metric"},af=function(K){this.options=i.extend({},yv,K),i.bindAll(["_onMove","setUnit"],this)};af.prototype.getDefaultPosition=function(){return"bottom-left"},af.prototype._onMove=function(){xv(this._map,this._container,this.options)},af.prototype.onAdd=function(K){return this._map=K,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},af.prototype.onRemove=function(){x.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},af.prototype.setUnit=function(K){this.options.unit=K,xv(this._map,this._container,this.options)};function xv(he,K,de){var re=de&&de.maxWidth||100,pe=he._container.clientHeight/2,Oe=he.unproject([0,pe]),Qe=he.unproject([re,pe]),ut=Oe.distanceTo(Qe);if(de&&de.unit==="imperial"){var Rt=3.2808*ut;if(Rt>5280){var Wt=Rt/5280;Xf(K,re,Wt,he._getUIString("ScaleControl.Miles"))}else Xf(K,re,Rt,he._getUIString("ScaleControl.Feet"))}else if(de&&de.unit==="nautical"){var qt=ut/1852;Xf(K,re,qt,he._getUIString("ScaleControl.NauticalMiles"))}else ut>=1e3?Xf(K,re,ut/1e3,he._getUIString("ScaleControl.Kilometers")):Xf(K,re,ut,he._getUIString("ScaleControl.Meters"))}function Xf(he,K,de,re){var pe=rd(de),Oe=pe/de;he.style.width=K*Oe+"px",he.innerHTML=pe+" "+re}function td(he){var K=Math.pow(10,Math.ceil(-Math.log(he)/Math.LN10));return Math.round(he*K)/K}function rd(he){var K=Math.pow(10,(""+Math.floor(he)).length-1),de=he/K;return de=de>=10?10:de>=5?5:de>=3?3:de>=2?2:de>=1?1:td(de),K*de}var qs=function(K){this._fullscreen=!1,K&&K.container&&(K.container instanceof i.window.HTMLElement?this._container=K.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};qs.prototype.onAdd=function(K){return this._map=K,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},qs.prototype.onRemove=function(){x.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},qs.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},qs.prototype._setupUI=function(){var K=this._fullscreenButton=x.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);x.create("span","mapboxgl-ctrl-icon",K).setAttribute("aria-hidden",!0),K.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},qs.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},qs.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},qs.prototype._isFullscreen=function(){return this._fullscreen},qs.prototype._changeIcon=function(){var K=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;K===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},qs.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var nd={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},id=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),bp=function(he){function K(de){he.call(this),this.options=i.extend(Object.create(nd),de),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return he&&(K.__proto__=he),K.prototype=Object.create(he&&he.prototype),K.prototype.constructor=K,K.prototype.addTo=function(re){return this._map&&this.remove(),this._map=re,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},K.prototype.isOpen=function(){return!!this._map},K.prototype.remove=function(){return this._content&&x.remove(this._content),this._container&&(x.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new i.Event("close")),this},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(re){return this._lngLat=i.LngLat.convert(re),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},K.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},K.prototype.getElement=function(){return this._container},K.prototype.setText=function(re){return this.setDOMContent(i.window.document.createTextNode(re))},K.prototype.setHTML=function(re){var pe=i.window.document.createDocumentFragment(),Oe=i.window.document.createElement("body"),Qe;for(Oe.innerHTML=re;Qe=Oe.firstChild,!!Qe;)pe.appendChild(Qe);return this.setDOMContent(pe)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(re){return this.options.maxWidth=re,this._update(),this},K.prototype.setDOMContent=function(re){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=x.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(re),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(re){this._container&&this._container.classList.add(re)},K.prototype.removeClassName=function(re){this._container&&this._container.classList.remove(re)},K.prototype.setOffset=function(re){return this.options.offset=re,this._update(),this},K.prototype.toggleClassName=function(re){if(this._container)return this._container.classList.toggle(re)},K.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=x.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},K.prototype._onMouseUp=function(re){this._update(re.point)},K.prototype._onMouseMove=function(re){this._update(re.point)},K.prototype._onDrag=function(re){this._update(re.point)},K.prototype._update=function(re){var pe=this,Oe=this._lngLat||this._trackPointer;if(!(!this._map||!Oe||!this._content)&&(this._container||(this._container=x.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=x.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Fr){return pe._container.classList.add(Fr)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=tu(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!re))){var Qe=this._pos=this._trackPointer&&re?re:this._map.project(this._lngLat),ut=this.options.anchor,Rt=ad(this.options.offset);if(!ut){var Wt=this._container.offsetWidth,qt=this._container.offsetHeight,cr;Qe.y+Rt.bottom.ythis._map.transform.height-qt?cr=["bottom"]:cr=[],Qe.xthis._map.transform.width-Wt/2&&cr.push("right"),cr.length===0?ut="bottom":ut=cr.join("-")}var lr=Qe.add(Rt[ut]).round();x.setTransform(this._container,Nc[ut]+" translate("+lr.x+"px,"+lr.y+"px)"),sh(this._container,ut,"popup")}},K.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var re=this._container.querySelector(id);re&&re.focus()}},K.prototype._onClose=function(){this.remove()},K}(i.Evented);function ad(he){if(he)if(typeof he=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(he,2)));return{center:new i.Point(0,0),top:new i.Point(0,he),"top-left":new i.Point(K,K),"top-right":new i.Point(-K,K),bottom:new i.Point(0,-he),"bottom-left":new i.Point(K,-K),"bottom-right":new i.Point(-K,-K),left:new i.Point(he,0),right:new i.Point(-he,0)}}else if(he instanceof i.Point||Array.isArray(he)){var de=i.Point.convert(he);return{center:de,top:de,"top-left":de,"top-right":de,bottom:de,"bottom-left":de,"bottom-right":de,left:de,right:de}}else return{center:i.Point.convert(he.center||[0,0]),top:i.Point.convert(he.top||[0,0]),"top-left":i.Point.convert(he["top-left"]||[0,0]),"top-right":i.Point.convert(he["top-right"]||[0,0]),bottom:i.Point.convert(he.bottom||[0,0]),"bottom-left":i.Point.convert(he["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(he["bottom-right"]||[0,0]),left:i.Point.convert(he.left||[0,0]),right:i.Point.convert(he.right||[0,0])};else return ad(new i.Point(0,0))}var ro={version:i.version,supported:S,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:gv,NavigationControl:eu,GeolocateControl:ed,AttributionControl:ji,ScaleControl:af,FullscreenControl:qs,Popup:bp,Marker:Wf,Style:Eo,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:Ot,clearPrewarmedResources:Qt,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(he){i.config.ACCESS_TOKEN=he},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(he){i.config.API_URL=he},get workerCount(){return vr.workerCount},set workerCount(he){vr.workerCount=he},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(he){i.config.MAX_PARALLEL_IMAGE_REQUESTS=he},clearStorage:function(K){i.clearTileCache(K)},workerUrl:""};return ro}),g})},3108:function(H,U,e){H.exports=e(26099)},26099:function(H,U,e){var g=e(64928),C=e(32420),i=e(51160),S=e(76752),x=e(55616),v=e(31264),p=e(47520),r=e(18400),t=e(72512),a=e(76244),n=1073741824;H.exports=function(l,m){m||(m={}),l=p(l,"float64"),m=x(m,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var h=v(m.maxDepth,255),b=v(m.bounds,S(l,2));b[0]===b[2]&&b[2]++,b[1]===b[3]&&b[3]++;var u=f(l,b),o=l.length>>>1,d;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?d=new(t(m.dtype))(o):m.dtype&&(d=m.dtype,Array.isArray(d)&&(d.length=o));for(var w=0;wh||ie>n){for(var G=0;GVe||oe>Ue||$=se)&&me!==Le){var ke=A[Ae];Le===void 0&&(Le=ke.length);for(var He=me;He=ue&&rt<=X&&Ke>=J&&Ke<=ee&&ce.push(Ie)}var $e=_[Ae],lt=$e[me*4+0],ht=$e[me*4+1],dt=$e[me*4+2],xt=$e[me*4+3],St=Te($e,me+1),nt=be*.5,ze=Ae+1;ge(we,Re,nt,ze,lt,ht||dt||xt||St),ge(we,Re+nt,nt,ze,ht,dt||xt||St),ge(we+nt,Re,nt,ze,dt,xt||St),ge(we+nt,Re+nt,nt,ze,xt,St)}}}function Te(we,Re){for(var be=null,Ae=0;be===null;)if(be=we[Re*4+Ae],Ae++,Ae>we.length)return null;return be}return ce}function k(O,V,Y,j,te){for(var ie=[],ue=0;ue0){t+=Math.abs(v(r[0]));for(var a=1;a2){for(m=0;m=0))throw new Error("precision must be a positive number");var L=Math.pow(10,s||0);return Math.round(T*L)/L}U.round=c;function l(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T*L}U.radiansToLength=l;function m(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T/L}U.lengthToRadians=m;function h(T,s){return u(m(T,s))}U.lengthToDegrees=h;function b(T){var s=T%360;return s<0&&(s+=360),s}U.bearingToAzimuth=b;function u(T){var s=T%(2*Math.PI);return s*180/Math.PI}U.radiansToDegrees=u;function o(T){var s=T%360;return s*Math.PI/180}U.degreesToRadians=o;function d(T,s,L){if(s===void 0&&(s="kilometers"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("length must be a positive number");return l(m(T,s),L)}U.convertLength=d;function w(T,s,L){if(s===void 0&&(s="meters"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("area must be a positive number");var M=U.areaFactors[s];if(!M)throw new Error("invalid original units");var z=U.areaFactors[L];if(!z)throw new Error("invalid final units");return T/M*z}U.convertArea=w;function A(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}U.isNumber=A;function _(T){return!!T&&T.constructor===Object}U.isObject=_;function y(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(s){if(!A(s))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}U.validateId=E},3256:function(H,U,e){Object.defineProperty(U,"__esModule",{value:!0});var g=e(46284);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;Tx[0]&&(S[0]=x[0]),S[1]>x[1]&&(S[1]=x[1]),S[2]=0))throw new Error("precision must be a positive number");var L=Math.pow(10,s||0);return Math.round(T*L)/L}U.round=c;function l(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T*L}U.radiansToLength=l;function m(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T/L}U.lengthToRadians=m;function h(T,s){return u(m(T,s))}U.lengthToDegrees=h;function b(T){var s=T%360;return s<0&&(s+=360),s}U.bearingToAzimuth=b;function u(T){var s=T%(2*Math.PI);return s*180/Math.PI}U.radiansToDegrees=u;function o(T){var s=T%360;return s*Math.PI/180}U.degreesToRadians=o;function d(T,s,L){if(s===void 0&&(s="kilometers"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("length must be a positive number");return l(m(T,s),L)}U.convertLength=d;function w(T,s,L){if(s===void 0&&(s="meters"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("area must be a positive number");var M=U.areaFactors[s];if(!M)throw new Error("invalid original units");var z=U.areaFactors[L];if(!z)throw new Error("invalid final units");return T/M*z}U.convertArea=w;function A(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}U.isNumber=A;function _(T){return!!T&&T.constructor===Object}U.isObject=_;function y(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(s){if(!A(s))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}U.validateId=E},84880:function(H,U,e){Object.defineProperty(U,"__esModule",{value:!0});var g=e(76796);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;T=0))throw new Error("precision must be a positive number");var B=Math.pow(10,k||0);return Math.round(I*B)/B}U.round=c;function l(I,k){k===void 0&&(k="kilometers");var B=U.factors[k];if(!B)throw new Error(k+" units is invalid");return I*B}U.radiansToLength=l;function m(I,k){k===void 0&&(k="kilometers");var B=U.factors[k];if(!B)throw new Error(k+" units is invalid");return I/B}U.lengthToRadians=m;function h(I,k){return u(m(I,k))}U.lengthToDegrees=h;function b(I){var k=I%360;return k<0&&(k+=360),k}U.bearingToAzimuth=b;function u(I){var k=I%(2*Math.PI);return k*180/Math.PI}U.radiansToDegrees=u;function o(I){var k=I%360;return k*Math.PI/180}U.degreesToRadians=o;function d(I,k,B){if(k===void 0&&(k="kilometers"),B===void 0&&(B="kilometers"),!(I>=0))throw new Error("length must be a positive number");return l(m(I,k),B)}U.convertLength=d;function w(I,k,B){if(k===void 0&&(k="meters"),B===void 0&&(B="kilometers"),!(I>=0))throw new Error("area must be a positive number");var O=U.areaFactors[k];if(!O)throw new Error("invalid original units");var V=U.areaFactors[B];if(!V)throw new Error("invalid final units");return I/O*V}U.convertArea=w;function A(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)&&!/^\s*$/.test(I)}U.isNumber=A;function _(I){return!!I&&I.constructor===Object}U.isObject=_;function y(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(function(k){if(!A(k))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}U.validateId=E;function T(){throw new Error("method has been renamed to `radiansToDegrees`")}U.radians2degrees=T;function s(){throw new Error("method has been renamed to `degreesToRadians`")}U.degrees2radians=s;function L(){throw new Error("method has been renamed to `lengthToDegrees`")}U.distanceToDegrees=L;function M(){throw new Error("method has been renamed to `lengthToRadians`")}U.distanceToRadians=M;function z(){throw new Error("method has been renamed to `radiansToLength`")}U.radiansToDistance=z;function D(){throw new Error("method has been renamed to `bearingToAzimuth`")}U.bearingToAngle=D;function N(){throw new Error("method has been renamed to `convertLength`")}U.convertDistance=N},43752:function(H,U,e){Object.defineProperty(U,"__esModule",{value:!0});var g=e(49840);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;TS&&(S=e[v]),e[v]1?ie-1:0),J=1;J1?ie-1:0),J=1;J1?ie-1:0),J=1;J1?ie-1:0),J=1;J>16,ue>>16],u_pixel_coord_lower:[Qt&65535,ue&65535]}}function Ps(ht,K,dt,rt){var pt=dt.imageManager.getPattern(ht.from.toString()),Ot=dt.imageManager.getPattern(ht.to.toString()),Qt=dt.imageManager.getPixelSize(),ue=Qt.width,Re=Qt.height,We=Math.pow(2,rt.tileID.overscaledZ),qe=rt.tileSize*Math.pow(2,dt.transform.tileZoom)/We,cr=qe*(rt.tileID.canonical.x+rt.tileID.wrap*We),lr=qe*rt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:pt.tl,u_pattern_br_a:pt.br,u_pattern_tl_b:Ot.tl,u_pattern_br_b:Ot.br,u_texsize:[ue,Re],u_mix:K.t,u_pattern_size_a:pt.displaySize,u_pattern_size_b:Ot.displaySize,u_scale_a:K.fromScale,u_scale_b:K.toScale,u_tile_units_to_pixels:1/dn(rt,1,dt.transform.tileZoom),u_pixel_coord_upper:[cr>>16,lr>>16],u_pixel_coord_lower:[cr&65535,lr&65535]}}var Tu=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_lightpos:new i.Uniform3f(ht,K.u_lightpos),u_lightintensity:new i.Uniform1f(ht,K.u_lightintensity),u_lightcolor:new i.Uniform3f(ht,K.u_lightcolor),u_vertical_gradient:new i.Uniform1f(ht,K.u_vertical_gradient),u_opacity:new i.Uniform1f(ht,K.u_opacity)}},Da=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_lightpos:new i.Uniform3f(ht,K.u_lightpos),u_lightintensity:new i.Uniform1f(ht,K.u_lightintensity),u_lightcolor:new i.Uniform3f(ht,K.u_lightcolor),u_vertical_gradient:new i.Uniform1f(ht,K.u_vertical_gradient),u_height_factor:new i.Uniform1f(ht,K.u_height_factor),u_image:new i.Uniform1i(ht,K.u_image),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade),u_opacity:new i.Uniform1f(ht,K.u_opacity)}},Bl=function(ht,K,dt,rt){var pt=K.style.light,Ot=pt.properties.get("position"),Qt=[Ot.x,Ot.y,Ot.z],ue=i.create$1();pt.properties.get("anchor")==="viewport"&&i.fromRotation(ue,-K.transform.angle),i.transformMat3(Qt,Qt,ue);var Re=pt.properties.get("color");return{u_matrix:ht,u_lightpos:Qt,u_lightintensity:pt.properties.get("intensity"),u_lightcolor:[Re.r,Re.g,Re.b],u_vertical_gradient:+dt,u_opacity:rt}},Go=function(ht,K,dt,rt,pt,Ot,Qt){return i.extend(Bl(ht,K,dt,rt),js(Ot,K,Qt),{u_height_factor:-Math.pow(2,pt.overscaledZ)/Qt.tileSize/8})},ds=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},Ks=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_image:new i.Uniform1i(ht,K.u_image),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade)}},Rs=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_world:new i.Uniform2f(ht,K.u_world)}},Wo=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_world:new i.Uniform2f(ht,K.u_world),u_image:new i.Uniform1i(ht,K.u_image),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade)}},ps=function(ht){return{u_matrix:ht}},Yo=function(ht,K,dt,rt){return i.extend(ps(ht),js(dt,K,rt))},Do=function(ht,K){return{u_matrix:ht,u_world:K}},Ul=function(ht,K,dt,rt,pt){return i.extend(Yo(ht,K,dt,rt),{u_world:pt})},Cc=function(ht,K){return{u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_scale_with_map:new i.Uniform1i(ht,K.u_scale_with_map),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_extrude_scale:new i.Uniform2f(ht,K.u_extrude_scale),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},Lc=function(ht,K,dt,rt){var pt=ht.transform,Ot,Qt;if(rt.paint.get("circle-pitch-alignment")==="map"){var ue=dn(dt,1,pt.zoom);Ot=!0,Qt=[ue,ue]}else Ot=!1,Qt=pt.pixelsToGLUnits;return{u_camera_to_center_distance:pt.cameraToCenterDistance,u_scale_with_map:+(rt.paint.get("circle-pitch-scale")==="map"),u_matrix:ht.translatePosMatrix(K.posMatrix,dt,rt.paint.get("circle-translate"),rt.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ot,u_device_pixel_ratio:i.browser.devicePixelRatio,u_extrude_scale:Qt}},Pc=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pixels_to_tile_units:new i.Uniform1f(ht,K.u_pixels_to_tile_units),u_extrude_scale:new i.Uniform2f(ht,K.u_extrude_scale),u_overscale_factor:new i.Uniform1f(ht,K.u_overscale_factor)}},Rc=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_inv_matrix:new i.UniformMatrix4f(ht,K.u_inv_matrix),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_viewport_size:new i.Uniform2f(ht,K.u_viewport_size)}},Ju=function(ht,K,dt){var rt=dn(dt,1,K.zoom),pt=Math.pow(2,K.zoom-dt.tileID.overscaledZ),Ot=dt.tileID.overscaleFactor();return{u_matrix:ht,u_camera_to_center_distance:K.cameraToCenterDistance,u_pixels_to_tile_units:rt,u_extrude_scale:[K.pixelsToGLUnits[0]/(rt*pt),K.pixelsToGLUnits[1]/(rt*pt)],u_overscale_factor:Ot}},Df=function(ht,K,dt){return{u_matrix:ht,u_inv_matrix:K,u_camera_to_center_distance:dt.cameraToCenterDistance,u_viewport_size:[dt.width,dt.height]}},xl=function(ht,K){return{u_color:new i.UniformColor(ht,K.u_color),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_overlay:new i.Uniform1i(ht,K.u_overlay),u_overlay_scale:new i.Uniform1f(ht,K.u_overlay_scale)}},ja=function(ht,K,dt){return dt===void 0&&(dt=1),{u_matrix:ht,u_color:K,u_overlay:0,u_overlay_scale:dt}},Co=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},bl=function(ht){return{u_matrix:ht}},If=function(ht,K){return{u_extrude_scale:new i.Uniform1f(ht,K.u_extrude_scale),u_intensity:new i.Uniform1f(ht,K.u_intensity),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix)}},Hl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_world:new i.Uniform2f(ht,K.u_world),u_image:new i.Uniform1i(ht,K.u_image),u_color_ramp:new i.Uniform1i(ht,K.u_color_ramp),u_opacity:new i.Uniform1f(ht,K.u_opacity)}},gs=function(ht,K,dt,rt){return{u_matrix:ht,u_extrude_scale:dn(K,1,dt),u_intensity:rt}},Dc=function(ht,K,dt,rt){var pt=i.create();i.ortho(pt,0,ht.width,ht.height,0,0,1);var Ot=ht.context.gl;return{u_matrix:pt,u_world:[Ot.drawingBufferWidth,Ot.drawingBufferHeight],u_image:dt,u_color_ramp:rt,u_opacity:K.paint.get("heatmap-opacity")}},Ff=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_image:new i.Uniform1i(ht,K.u_image),u_latrange:new i.Uniform2f(ht,K.u_latrange),u_light:new i.Uniform2f(ht,K.u_light),u_shadow:new i.UniformColor(ht,K.u_shadow),u_highlight:new i.UniformColor(ht,K.u_highlight),u_accent:new i.UniformColor(ht,K.u_accent)}},zf=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_image:new i.Uniform1i(ht,K.u_image),u_dimension:new i.Uniform2f(ht,K.u_dimension),u_zoom:new i.Uniform1f(ht,K.u_zoom),u_unpack:new i.Uniform4f(ht,K.u_unpack)}},Qu=function(ht,K,dt){var rt=dt.paint.get("hillshade-shadow-color"),pt=dt.paint.get("hillshade-highlight-color"),Ot=dt.paint.get("hillshade-accent-color"),Qt=dt.paint.get("hillshade-illumination-direction")*(Math.PI/180);dt.paint.get("hillshade-illumination-anchor")==="viewport"&&(Qt-=ht.transform.angle);var ue=!ht.options.moving;return{u_matrix:ht.transform.calculatePosMatrix(K.tileID.toUnwrapped(),ue),u_image:0,u_latrange:vo(ht,K.tileID),u_light:[dt.paint.get("hillshade-exaggeration"),Qt],u_shadow:rt,u_highlight:pt,u_accent:Ot}},kf=function(ht,K){var dt=K.stride,rt=i.create();return i.ortho(rt,0,i.EXTENT,-i.EXTENT,0,0,1),i.translate(rt,rt,[0,-i.EXTENT,0]),{u_matrix:rt,u_image:1,u_dimension:[dt,dt],u_zoom:ht.overscaledZ,u_unpack:K.getUnpackVector()}};function vo(ht,K){var dt=Math.pow(2,K.canonical.z),rt=K.canonical.y;return[new i.MercatorCoordinate(0,rt/dt).toLngLat().lat,new i.MercatorCoordinate(0,(rt+1)/dt).toLngLat().lat]}var Xo=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels)}},Ds=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels),u_image:new i.Uniform1i(ht,K.u_image),u_image_height:new i.Uniform1f(ht,K.u_image_height)}},wl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_image:new i.Uniform1i(ht,K.u_image),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels),u_scale:new i.Uniform3f(ht,K.u_scale),u_fade:new i.Uniform1f(ht,K.u_fade)}},Au=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_ratio:new i.Uniform1f(ht,K.u_ratio),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_units_to_pixels:new i.Uniform2f(ht,K.u_units_to_pixels),u_patternscale_a:new i.Uniform2f(ht,K.u_patternscale_a),u_patternscale_b:new i.Uniform2f(ht,K.u_patternscale_b),u_sdfgamma:new i.Uniform1f(ht,K.u_sdfgamma),u_image:new i.Uniform1i(ht,K.u_image),u_tex_y_a:new i.Uniform1f(ht,K.u_tex_y_a),u_tex_y_b:new i.Uniform1f(ht,K.u_tex_y_b),u_mix:new i.Uniform1f(ht,K.u_mix)}},Js=function(ht,K,dt){var rt=ht.transform;return{u_matrix:Is(ht,K,dt),u_ratio:1/dn(K,1,rt.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_units_to_pixels:[1/rt.pixelsToGLUnits[0],1/rt.pixelsToGLUnits[1]]}},Qs=function(ht,K,dt,rt){return i.extend(Js(ht,K,dt),{u_image:0,u_image_height:rt})},Of=function(ht,K,dt,rt){var pt=ht.transform,Ot=Tl(K,pt);return{u_matrix:Is(ht,K,dt),u_texsize:K.imageAtlasTexture.size,u_ratio:1/dn(K,1,pt.zoom),u_device_pixel_ratio:i.browser.devicePixelRatio,u_image:0,u_scale:[Ot,rt.fromScale,rt.toScale],u_fade:rt.t,u_units_to_pixels:[1/pt.pixelsToGLUnits[0],1/pt.pixelsToGLUnits[1]]}},ms=function(ht,K,dt,rt,pt){var Ot=ht.transform,Qt=ht.lineAtlas,ue=Tl(K,Ot),Re=dt.layout.get("line-cap")==="round",We=Qt.getDash(rt.from,Re),qe=Qt.getDash(rt.to,Re),cr=We.width*pt.fromScale,lr=qe.width*pt.toScale;return i.extend(Js(ht,K,dt),{u_patternscale_a:[ue/cr,-We.height/2],u_patternscale_b:[ue/lr,-qe.height/2],u_sdfgamma:Qt.width/(Math.min(cr,lr)*256*i.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:We.y,u_tex_y_b:qe.y,u_mix:pt.t})};function Tl(ht,K){return 1/dn(ht,1,K.tileZoom)}function Is(ht,K,dt){return ht.translatePosMatrix(K.tileID.posMatrix,K,dt.paint.get("line-translate"),dt.paint.get("line-translate-anchor"))}var ys=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_tl_parent:new i.Uniform2f(ht,K.u_tl_parent),u_scale_parent:new i.Uniform1f(ht,K.u_scale_parent),u_buffer_scale:new i.Uniform1f(ht,K.u_buffer_scale),u_fade_t:new i.Uniform1f(ht,K.u_fade_t),u_opacity:new i.Uniform1f(ht,K.u_opacity),u_image0:new i.Uniform1i(ht,K.u_image0),u_image1:new i.Uniform1i(ht,K.u_image1),u_brightness_low:new i.Uniform1f(ht,K.u_brightness_low),u_brightness_high:new i.Uniform1f(ht,K.u_brightness_high),u_saturation_factor:new i.Uniform1f(ht,K.u_saturation_factor),u_contrast_factor:new i.Uniform1f(ht,K.u_contrast_factor),u_spin_weights:new i.Uniform3f(ht,K.u_spin_weights)}},Vl=function(ht,K,dt,rt,pt){return{u_matrix:ht,u_tl_parent:K,u_scale_parent:dt,u_buffer_scale:1,u_fade_t:rt.mix,u_opacity:rt.opacity*pt.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:pt.paint.get("raster-brightness-min"),u_brightness_high:pt.paint.get("raster-brightness-max"),u_saturation_factor:Ml(pt.paint.get("raster-saturation")),u_contrast_factor:va(pt.paint.get("raster-contrast")),u_spin_weights:Al(pt.paint.get("raster-hue-rotate"))}};function Al(ht){ht*=Math.PI/180;var K=Math.sin(ht),dt=Math.cos(ht);return[(2*dt+1)/3,(-Math.sqrt(3)*K-dt+1)/3,(Math.sqrt(3)*K-dt+1)/3]}function va(ht){return ht>0?1/(1-ht):1+ht}function Ml(ht){return ht>0?1-1/(1.001-ht):-ht}var Mu=function(ht,K){return{u_is_size_zoom_constant:new i.Uniform1i(ht,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ht,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ht,K.u_size_t),u_size:new i.Uniform1f(ht,K.u_size),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ht,K.u_pitch),u_rotate_symbol:new i.Uniform1i(ht,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ht,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(ht,K.u_fade_change),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ht,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ht,K.u_coord_matrix),u_is_text:new i.Uniform1i(ht,K.u_is_text),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_texture:new i.Uniform1i(ht,K.u_texture)}},Nf=function(ht,K){return{u_is_size_zoom_constant:new i.Uniform1i(ht,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ht,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ht,K.u_size_t),u_size:new i.Uniform1f(ht,K.u_size),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ht,K.u_pitch),u_rotate_symbol:new i.Uniform1i(ht,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ht,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(ht,K.u_fade_change),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ht,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ht,K.u_coord_matrix),u_is_text:new i.Uniform1i(ht,K.u_is_text),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_texture:new i.Uniform1i(ht,K.u_texture),u_gamma_scale:new i.Uniform1f(ht,K.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(ht,K.u_is_halo)}},Sl=function(ht,K){return{u_is_size_zoom_constant:new i.Uniform1i(ht,K.u_is_size_zoom_constant),u_is_size_feature_constant:new i.Uniform1i(ht,K.u_is_size_feature_constant),u_size_t:new i.Uniform1f(ht,K.u_size_t),u_size:new i.Uniform1f(ht,K.u_size),u_camera_to_center_distance:new i.Uniform1f(ht,K.u_camera_to_center_distance),u_pitch:new i.Uniform1f(ht,K.u_pitch),u_rotate_symbol:new i.Uniform1i(ht,K.u_rotate_symbol),u_aspect_ratio:new i.Uniform1f(ht,K.u_aspect_ratio),u_fade_change:new i.Uniform1f(ht,K.u_fade_change),u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_label_plane_matrix:new i.UniformMatrix4f(ht,K.u_label_plane_matrix),u_coord_matrix:new i.UniformMatrix4f(ht,K.u_coord_matrix),u_is_text:new i.Uniform1i(ht,K.u_is_text),u_pitch_with_map:new i.Uniform1i(ht,K.u_pitch_with_map),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_texsize_icon:new i.Uniform2f(ht,K.u_texsize_icon),u_texture:new i.Uniform1i(ht,K.u_texture),u_texture_icon:new i.Uniform1i(ht,K.u_texture_icon),u_gamma_scale:new i.Uniform1f(ht,K.u_gamma_scale),u_device_pixel_ratio:new i.Uniform1f(ht,K.u_device_pixel_ratio),u_is_halo:new i.Uniform1i(ht,K.u_is_halo)}},Gl=function(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We){var qe=pt.transform;return{u_is_size_zoom_constant:+(ht==="constant"||ht==="source"),u_is_size_feature_constant:+(ht==="constant"||ht==="camera"),u_size_t:K?K.uSizeT:0,u_size:K?K.uSize:0,u_camera_to_center_distance:qe.cameraToCenterDistance,u_pitch:qe.pitch/360*2*Math.PI,u_rotate_symbol:+dt,u_aspect_ratio:qe.width/qe.height,u_fade_change:pt.options.fadeDuration?pt.symbolFadeChange:1,u_matrix:Ot,u_label_plane_matrix:Qt,u_coord_matrix:ue,u_is_text:+Re,u_pitch_with_map:+rt,u_texsize:We,u_texture:0}},Su=function(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We,qe){var cr=pt.transform;return i.extend(Gl(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We),{u_gamma_scale:rt?Math.cos(cr._pitch)*cr.cameraToCenterDistance:1,u_device_pixel_ratio:i.browser.devicePixelRatio,u_is_halo:+qe})},$u=function(ht,K,dt,rt,pt,Ot,Qt,ue,Re,We){return i.extend(Su(ht,K,dt,rt,pt,Ot,Qt,ue,!0,Re,!0),{u_texsize_icon:We,u_texture_icon:1})},Wl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_opacity:new i.Uniform1f(ht,K.u_opacity),u_color:new i.UniformColor(ht,K.u_color)}},Yl=function(ht,K){return{u_matrix:new i.UniformMatrix4f(ht,K.u_matrix),u_opacity:new i.Uniform1f(ht,K.u_opacity),u_image:new i.Uniform1i(ht,K.u_image),u_pattern_tl_a:new i.Uniform2f(ht,K.u_pattern_tl_a),u_pattern_br_a:new i.Uniform2f(ht,K.u_pattern_br_a),u_pattern_tl_b:new i.Uniform2f(ht,K.u_pattern_tl_b),u_pattern_br_b:new i.Uniform2f(ht,K.u_pattern_br_b),u_texsize:new i.Uniform2f(ht,K.u_texsize),u_mix:new i.Uniform1f(ht,K.u_mix),u_pattern_size_a:new i.Uniform2f(ht,K.u_pattern_size_a),u_pattern_size_b:new i.Uniform2f(ht,K.u_pattern_size_b),u_scale_a:new i.Uniform1f(ht,K.u_scale_a),u_scale_b:new i.Uniform1f(ht,K.u_scale_b),u_pixel_coord_upper:new i.Uniform2f(ht,K.u_pixel_coord_upper),u_pixel_coord_lower:new i.Uniform2f(ht,K.u_pixel_coord_lower),u_tile_units_to_pixels:new i.Uniform1f(ht,K.u_tile_units_to_pixels)}},Fs=function(ht,K,dt){return{u_matrix:ht,u_opacity:K,u_color:dt}},Xl=function(ht,K,dt,rt,pt,Ot){return i.extend(Ps(rt,Ot,dt,pt),{u_matrix:ht,u_opacity:K})},zs={fillExtrusion:Tu,fillExtrusionPattern:Da,fill:ds,fillPattern:Ks,fillOutline:Rs,fillOutlinePattern:Wo,circle:Cc,collisionBox:Pc,collisionCircle:Rc,debug:xl,clippingMask:Co,heatmap:If,heatmapTexture:Hl,hillshade:Ff,hillshadePrepare:zf,line:Xo,lineGradient:Ds,linePattern:wl,lineSDF:Au,raster:ys,symbolIcon:Mu,symbolSDF:Nf,symbolTextAndIcon:Sl,background:Wl,backgroundPattern:Yl},Ha;function ns(ht,K,dt,rt,pt,Ot,Qt){for(var ue=ht.context,Re=ue.gl,We=ht.useProgram("collisionBox"),qe=[],cr=0,lr=0,Fr=0;Fr0){var Nn=i.create(),Yn=Kr;i.mul(Nn,Vr.placementInvProjMatrix,ht.transform.glCoordMatrix),i.mul(Nn,Nn,Vr.placementViewportMatrix),qe.push({circleArray:Fn,circleOffset:lr,transform:Yn,invTransform:Nn}),cr+=Fn.length/4,lr=cr}fn&&We.draw(ue,Re.LINES,ir.disabled,Ke.disabled,ht.colorModeForRenderPass(),Ie.disabled,Ju(Kr,ht.transform,Yr),dt.id,fn.layoutVertexBuffer,fn.indexBuffer,fn.segments,null,ht.transform.zoom,null,null,fn.collisionVertexBuffer)}}if(!(!Qt||!qe.length)){var Xn=ht.useProgram("collisionCircle"),Gn=new i.StructArrayLayout2f1f2i16;Gn.resize(cr*4),Gn._trim();for(var jn=0,ti=0,si=qe;ti=0&&(Xr[Vr.associatedIconIndex]={shiftedAnchor:Fi,angle:Ji})}}if(qe){Fr.clear();for(var Ai=ht.icon.placedSymbolArray,Yi=0;Yi0){var Qt=i.browser.now(),ue=(Qt-ht.timeAdded)/Ot,Re=K?(Qt-K.timeAdded)/Ot:-1,We=dt.getSource(),qe=pt.coveringZoomLevel({tileSize:We.tileSize,roundZoom:We.roundZoom}),cr=!K||Math.abs(K.tileID.overscaledZ-qe)>Math.abs(ht.tileID.overscaledZ-qe),lr=cr&&ht.refreshedUponExpiration?1:i.clamp(cr?ue:1-Re,0,1);return ht.refreshedUponExpiration&&ue>=1&&(ht.refreshedUponExpiration=!1),K?{opacity:1,mix:1-lr}:{opacity:lr,mix:0}}else return{opacity:1,mix:0}}function qs(ht,K,dt){var rt=dt.paint.get("background-color"),pt=dt.paint.get("background-opacity");if(pt!==0){var Ot=ht.context,Qt=Ot.gl,ue=ht.transform,Re=ue.tileSize,We=dt.paint.get("background-pattern");if(!ht.isPatternMissing(We)){var qe=!We&&rt.a===1&&pt===1&&ht.opaquePassEnabledForLayer()?"opaque":"translucent";if(ht.renderPass===qe){var cr=Ke.disabled,lr=ht.depthModeForSublayer(0,qe==="opaque"?ir.ReadWrite:ir.ReadOnly),Fr=ht.colorModeForRenderPass(),Xr=ht.useProgram(We?"backgroundPattern":"background"),Yr=ue.coveringTiles({tileSize:Re});We&&(Ot.activeTexture.set(Qt.TEXTURE0),ht.imageManager.bind(ht.context));for(var Vr=dt.getCrossfadeParameters(),Kr=0,fn=Yr;Kr "+dt.overscaledZ);var Kr=Vr+" "+Fr+"kb";sr(ht,Kr),Qt.draw(rt,pt.TRIANGLES,ue,Re,se.alphaBlended,Ie.disabled,ja(Ot,i.Color.transparent,Yr),qe,ht.debugBuffer,ht.quadTriangleIndexBuffer,ht.debugSegments)}function sr(ht,K){ht.initDebugOverlayCanvas();var dt=ht.debugOverlayCanvas,rt=ht.context.gl,pt=ht.debugOverlayCanvas.getContext("2d");pt.clearRect(0,0,dt.width,dt.height),pt.shadowColor="white",pt.shadowBlur=2,pt.lineWidth=1.5,pt.strokeStyle="white",pt.textBaseline="top",pt.font="bold 36px Open Sans, sans-serif",pt.fillText(K,5,5),pt.strokeText(K,5,5),ht.debugOverlayTexture.update(dt),ht.debugOverlayTexture.bind(rt.LINEAR,rt.CLAMP_TO_EDGE)}function Mr(ht,K,dt){var rt=ht.context,pt=dt.implementation;if(ht.renderPass==="offscreen"){var Ot=pt.prerender;Ot&&(ht.setCustomLayerDefaults(),rt.setColorMode(ht.colorModeForRenderPass()),Ot.call(pt,rt.gl,ht.transform.customLayerMatrix()),rt.setDirty(),ht.setBaseState())}else if(ht.renderPass==="translucent"){ht.setCustomLayerDefaults(),rt.setColorMode(ht.colorModeForRenderPass()),rt.setStencilMode(Ke.disabled);var Qt=pt.renderingMode==="3d"?new ir(ht.context.gl.LEQUAL,ir.ReadWrite,ht.depthRangeFor3D):ht.depthModeForSublayer(0,ir.ReadOnly);rt.setDepthMode(Qt),pt.render(rt.gl,ht.transform.customLayerMatrix()),rt.setDirty(),ht.setBaseState(),rt.bindFramebuffer.set(null)}}var Ir={symbol:Eu,circle:Uf,heatmap:ks,line:_u,fill:xs,"fill-extrusion":tf,hillshade:Ql,raster:$l,background:qs,debug:gr,custom:Mr},Nr=function(K,dt){this.context=new Pe(K),this.transform=dt,this._tileTextures={},this.setup(),this.numSublayers=ke.maxUnderzooming+ke.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ai,this.gpuTimers={}};Nr.prototype.resize=function(K,dt){if(this.width=K*i.browser.devicePixelRatio,this.height=dt*i.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var rt=0,pt=this.style._order;rt256&&this.clearStencil(),rt.setColorMode(se.disabled),rt.setDepthMode(ir.disabled);var Ot=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Qt=0,ue=dt;Qt256&&this.clearStencil();var K=this.nextStencilID++,dt=this.context.gl;return new Ke({func:dt.NOTEQUAL,mask:255},K,255,dt.KEEP,dt.KEEP,dt.REPLACE)},Nr.prototype.stencilModeForClipping=function(K){var dt=this.context.gl;return new Ke({func:dt.EQUAL,mask:255},this._tileClippingMaskIDs[K.key],0,dt.KEEP,dt.KEEP,dt.REPLACE)},Nr.prototype.stencilConfigForOverlap=function(K){var dt,rt=this.context.gl,pt=K.sort(function(We,qe){return qe.overscaledZ-We.overscaledZ}),Ot=pt[pt.length-1].overscaledZ,Qt=pt[0].overscaledZ-Ot+1;if(Qt>1){this.currentStencilSource=void 0,this.nextStencilID+Qt>256&&this.clearStencil();for(var ue={},Re=0;Re=0;this.currentLayer--){var Nn=this.style._layers[pt[this.currentLayer]],Yn=Ot[Nn.source],Xn=Re[Nn.source];this._renderTileClippingMasks(Nn,Xn),this.renderLayer(this,Yn,Nn,Xn)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?dt.pop():null},Nr.prototype.isPatternMissing=function(K){if(!K)return!1;if(!K.from||!K.to)return!0;var dt=this.imageManager.getPattern(K.from.toString()),rt=this.imageManager.getPattern(K.to.toString());return!dt||!rt},Nr.prototype.useProgram=function(K,dt){this.cache=this.cache||{};var rt=""+K+(dt?dt.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[rt]||(this.cache[rt]=new Ku(this.context,K,Pf[K],dt,zs[K],this._showOverdrawInspector)),this.cache[rt]},Nr.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Nr.prototype.setBaseState=function(){var K=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(K.FUNC_ADD)},Nr.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=i.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var K=this.context.gl;this.debugOverlayTexture=new i.Texture(this.context,this.debugOverlayCanvas,K.RGBA)}},Nr.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var en=function(K,dt){this.points=K,this.planes=dt};en.fromInvProjectionMatrix=function(K,dt,rt){var pt=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]],Ot=Math.pow(2,rt),Qt=pt.map(function(We){return i.transformMat4([],We,K)}).map(function(We){return i.scale$1([],We,1/We[3]/dt*Ot)}),ue=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Re=ue.map(function(We){var qe=i.sub([],Qt[We[0]],Qt[We[1]]),cr=i.sub([],Qt[We[2]],Qt[We[1]]),lr=i.normalize([],i.cross([],qe,cr)),Fr=-i.dot(lr,Qt[We[1]]);return lr.concat(Fr)});return new en(Qt,Re)};var yn=function(K,dt){this.min=K,this.max=dt,this.center=i.scale$2([],i.add([],this.min,this.max),.5)};yn.prototype.quadrant=function(K){for(var dt=[K%2===0,K<2],rt=i.clone$2(this.min),pt=i.clone$2(this.max),Ot=0;Ot=0;if(Qt===0)return 0;Qt!==dt.length&&(rt=!1)}if(rt)return 2;for(var Re=0;Re<3;Re++){for(var We=Number.MAX_VALUE,qe=-Number.MAX_VALUE,cr=0;crthis.max[Re]-this.min[Re])return 0}return 1};var Rn=function(K,dt,rt,pt){if(K===void 0&&(K=0),dt===void 0&&(dt=0),rt===void 0&&(rt=0),pt===void 0&&(pt=0),isNaN(K)||K<0||isNaN(dt)||dt<0||isNaN(rt)||rt<0||isNaN(pt)||pt<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=K,this.bottom=dt,this.left=rt,this.right=pt};Rn.prototype.interpolate=function(K,dt,rt){return dt.top!=null&&K.top!=null&&(this.top=i.number(K.top,dt.top,rt)),dt.bottom!=null&&K.bottom!=null&&(this.bottom=i.number(K.bottom,dt.bottom,rt)),dt.left!=null&&K.left!=null&&(this.left=i.number(K.left,dt.left,rt)),dt.right!=null&&K.right!=null&&(this.right=i.number(K.right,dt.right,rt)),this},Rn.prototype.getCenter=function(K,dt){var rt=i.clamp((this.left+K-this.right)/2,0,K),pt=i.clamp((this.top+dt-this.bottom)/2,0,dt);return new i.Point(rt,pt)},Rn.prototype.equals=function(K){return this.top===K.top&&this.bottom===K.bottom&&this.left===K.left&&this.right===K.right},Rn.prototype.clone=function(){return new Rn(this.top,this.bottom,this.left,this.right)},Rn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Dn=function(K,dt,rt,pt,Ot){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Ot===void 0?!0:Ot,this._minZoom=K||0,this._maxZoom=dt||22,this._minPitch=rt??0,this._maxPitch=pt??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Rn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Zn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Dn.prototype.clone=function(){var K=new Dn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return K.tileSize=this.tileSize,K.latRange=this.latRange,K.width=this.width,K.height=this.height,K._center=this._center,K.zoom=this.zoom,K.angle=this.angle,K._fov=this._fov,K._pitch=this._pitch,K._unmodified=this._unmodified,K._edgeInsets=this._edgeInsets.clone(),K._calcMatrices(),K},Zn.minZoom.get=function(){return this._minZoom},Zn.minZoom.set=function(ht){this._minZoom!==ht&&(this._minZoom=ht,this.zoom=Math.max(this.zoom,ht))},Zn.maxZoom.get=function(){return this._maxZoom},Zn.maxZoom.set=function(ht){this._maxZoom!==ht&&(this._maxZoom=ht,this.zoom=Math.min(this.zoom,ht))},Zn.minPitch.get=function(){return this._minPitch},Zn.minPitch.set=function(ht){this._minPitch!==ht&&(this._minPitch=ht,this.pitch=Math.max(this.pitch,ht))},Zn.maxPitch.get=function(){return this._maxPitch},Zn.maxPitch.set=function(ht){this._maxPitch!==ht&&(this._maxPitch=ht,this.pitch=Math.min(this.pitch,ht))},Zn.renderWorldCopies.get=function(){return this._renderWorldCopies},Zn.renderWorldCopies.set=function(ht){ht===void 0?ht=!0:ht===null&&(ht=!1),this._renderWorldCopies=ht},Zn.worldSize.get=function(){return this.tileSize*this.scale},Zn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Zn.size.get=function(){return new i.Point(this.width,this.height)},Zn.bearing.get=function(){return-this.angle/Math.PI*180},Zn.bearing.set=function(ht){var K=-i.wrap(ht,-180,180)*Math.PI/180;this.angle!==K&&(this._unmodified=!1,this.angle=K,this._calcMatrices(),this.rotationMatrix=i.create$2(),i.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Zn.pitch.get=function(){return this._pitch/Math.PI*180},Zn.pitch.set=function(ht){var K=i.clamp(ht,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==K&&(this._unmodified=!1,this._pitch=K,this._calcMatrices())},Zn.fov.get=function(){return this._fov/Math.PI*180},Zn.fov.set=function(ht){ht=Math.max(.01,Math.min(60,ht)),this._fov!==ht&&(this._unmodified=!1,this._fov=ht/180*Math.PI,this._calcMatrices())},Zn.zoom.get=function(){return this._zoom},Zn.zoom.set=function(ht){var K=Math.min(Math.max(ht,this.minZoom),this.maxZoom);this._zoom!==K&&(this._unmodified=!1,this._zoom=K,this.scale=this.zoomScale(K),this.tileZoom=Math.floor(K),this.zoomFraction=K-this.tileZoom,this._constrain(),this._calcMatrices())},Zn.center.get=function(){return this._center},Zn.center.set=function(ht){ht.lat===this._center.lat&&ht.lng===this._center.lng||(this._unmodified=!1,this._center=ht,this._constrain(),this._calcMatrices())},Zn.padding.get=function(){return this._edgeInsets.toJSON()},Zn.padding.set=function(ht){this._edgeInsets.equals(ht)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ht,1),this._calcMatrices())},Zn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Dn.prototype.isPaddingEqual=function(K){return this._edgeInsets.equals(K)},Dn.prototype.interpolatePadding=function(K,dt,rt){this._unmodified=!1,this._edgeInsets.interpolate(K,dt,rt),this._constrain(),this._calcMatrices()},Dn.prototype.coveringZoomLevel=function(K){var dt=(K.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/K.tileSize));return Math.max(0,dt)},Dn.prototype.getVisibleUnwrappedCoordinates=function(K){var dt=[new i.UnwrappedTileID(0,K)];if(this._renderWorldCopies)for(var rt=this.pointCoordinate(new i.Point(0,0)),pt=this.pointCoordinate(new i.Point(this.width,0)),Ot=this.pointCoordinate(new i.Point(this.width,this.height)),Qt=this.pointCoordinate(new i.Point(0,this.height)),ue=Math.floor(Math.min(rt.x,pt.x,Ot.x,Qt.x)),Re=Math.floor(Math.max(rt.x,pt.x,Ot.x,Qt.x)),We=1,qe=ue-We;qe<=Re+We;qe++)qe!==0&&dt.push(new i.UnwrappedTileID(qe,K));return dt},Dn.prototype.coveringTiles=function(K){var dt=this.coveringZoomLevel(K),rt=dt;if(K.minzoom!==void 0&&dtK.maxzoom&&(dt=K.maxzoom);var pt=i.MercatorCoordinate.fromLngLat(this.center),Ot=Math.pow(2,dt),Qt=[Ot*pt.x,Ot*pt.y,0],ue=en.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,dt),Re=K.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(Re=dt);var We=3,qe=function(hi){return{aabb:new yn([hi*Ot,0,0],[(hi+1)*Ot,Ot,0]),zoom:0,x:0,y:0,wrap:hi,fullyVisible:!1}},cr=[],lr=[],Fr=dt,Xr=K.reparseOverscaled?rt:dt;if(this._renderWorldCopies)for(var Yr=1;Yr<=3;Yr++)cr.push(qe(-Yr)),cr.push(qe(Yr));for(cr.push(qe(0));cr.length>0;){var Vr=cr.pop(),Kr=Vr.x,fn=Vr.y,Fn=Vr.fullyVisible;if(!Fn){var Nn=Vr.aabb.intersects(ue);if(Nn===0)continue;Fn=Nn===2}var Yn=Vr.aabb.distanceX(Qt),Xn=Vr.aabb.distanceY(Qt),Gn=Math.max(Math.abs(Yn),Math.abs(Xn)),jn=We+(1<jn&&Vr.zoom>=Re){lr.push({tileID:new i.OverscaledTileID(Vr.zoom===Fr?Xr:Vr.zoom,Vr.wrap,Vr.zoom,Kr,fn),distanceSq:i.sqrLen([Qt[0]-.5-Kr,Qt[1]-.5-fn])});continue}for(var ti=0;ti<4;ti++){var si=(Kr<<1)+ti%2,yi=(fn<<1)+(ti>>1);cr.push({aabb:Vr.aabb.quadrant(ti),zoom:Vr.zoom+1,x:si,y:yi,wrap:Vr.wrap,fullyVisible:Fn})}}return lr.sort(function(hi,Fi){return hi.distanceSq-Fi.distanceSq}).map(function(hi){return hi.tileID})},Dn.prototype.resize=function(K,dt){this.width=K,this.height=dt,this.pixelsToGLUnits=[2/K,-2/dt],this._constrain(),this._calcMatrices()},Zn.unmodified.get=function(){return this._unmodified},Dn.prototype.zoomScale=function(K){return Math.pow(2,K)},Dn.prototype.scaleZoom=function(K){return Math.log(K)/Math.LN2},Dn.prototype.project=function(K){var dt=i.clamp(K.lat,-this.maxValidLatitude,this.maxValidLatitude);return new i.Point(i.mercatorXfromLng(K.lng)*this.worldSize,i.mercatorYfromLat(dt)*this.worldSize)},Dn.prototype.unproject=function(K){return new i.MercatorCoordinate(K.x/this.worldSize,K.y/this.worldSize).toLngLat()},Zn.point.get=function(){return this.project(this.center)},Dn.prototype.setLocationAtPoint=function(K,dt){var rt=this.pointCoordinate(dt),pt=this.pointCoordinate(this.centerPoint),Ot=this.locationCoordinate(K),Qt=new i.MercatorCoordinate(Ot.x-(rt.x-pt.x),Ot.y-(rt.y-pt.y));this.center=this.coordinateLocation(Qt),this._renderWorldCopies&&(this.center=this.center.wrap())},Dn.prototype.locationPoint=function(K){return this.coordinatePoint(this.locationCoordinate(K))},Dn.prototype.pointLocation=function(K){return this.coordinateLocation(this.pointCoordinate(K))},Dn.prototype.locationCoordinate=function(K){return i.MercatorCoordinate.fromLngLat(K)},Dn.prototype.coordinateLocation=function(K){return K.toLngLat()},Dn.prototype.pointCoordinate=function(K){var dt=0,rt=[K.x,K.y,0,1],pt=[K.x,K.y,1,1];i.transformMat4(rt,rt,this.pixelMatrixInverse),i.transformMat4(pt,pt,this.pixelMatrixInverse);var Ot=rt[3],Qt=pt[3],ue=rt[0]/Ot,Re=pt[0]/Qt,We=rt[1]/Ot,qe=pt[1]/Qt,cr=rt[2]/Ot,lr=pt[2]/Qt,Fr=cr===lr?0:(dt-cr)/(lr-cr);return new i.MercatorCoordinate(i.number(ue,Re,Fr)/this.worldSize,i.number(We,qe,Fr)/this.worldSize)},Dn.prototype.coordinatePoint=function(K){var dt=[K.x*this.worldSize,K.y*this.worldSize,0,1];return i.transformMat4(dt,dt,this.pixelMatrix),new i.Point(dt[0]/dt[3],dt[1]/dt[3])},Dn.prototype.getBounds=function(){return new i.LngLatBounds().extend(this.pointLocation(new i.Point(0,0))).extend(this.pointLocation(new i.Point(this.width,0))).extend(this.pointLocation(new i.Point(this.width,this.height))).extend(this.pointLocation(new i.Point(0,this.height)))},Dn.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new i.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Dn.prototype.setMaxBounds=function(K){K?(this.lngRange=[K.getWest(),K.getEast()],this.latRange=[K.getSouth(),K.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Dn.prototype.calculatePosMatrix=function(K,dt){dt===void 0&&(dt=!1);var rt=K.key,pt=dt?this._alignedPosMatrixCache:this._posMatrixCache;if(pt[rt])return pt[rt];var Ot=K.canonical,Qt=this.worldSize/this.zoomScale(Ot.z),ue=Ot.x+Math.pow(2,Ot.z)*K.wrap,Re=i.identity(new Float64Array(16));return i.translate(Re,Re,[ue*Qt,Ot.y*Qt,0]),i.scale(Re,Re,[Qt/i.EXTENT,Qt/i.EXTENT,1]),i.multiply(Re,dt?this.alignedProjMatrix:this.projMatrix,Re),pt[rt]=new Float32Array(Re),pt[rt]},Dn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Dn.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var K=-90,dt=90,rt=-180,pt=180,Ot,Qt,ue,Re,We=this.size,qe=this._unmodified;if(this.latRange){var cr=this.latRange;K=i.mercatorYfromLat(cr[1])*this.worldSize,dt=i.mercatorYfromLat(cr[0])*this.worldSize,Ot=dt-Kdt&&(Re=dt-Vr)}if(this.lngRange){var Kr=Fr.x,fn=We.x/2;Kr-fnpt&&(ue=pt-fn)}(ue!==void 0||Re!==void 0)&&(this.center=this.unproject(new i.Point(ue!==void 0?ue:Fr.x,Re!==void 0?Re:Fr.y))),this._unmodified=qe,this._constraining=!1}},Dn.prototype._calcMatrices=function(){if(this.height){var K=this._fov/2,dt=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(K)*this.height;var rt=Math.PI/2+this._pitch,pt=this._fov*(.5+dt.y/this.height),Ot=Math.sin(pt)*this.cameraToCenterDistance/Math.sin(i.clamp(Math.PI-rt-pt,.01,Math.PI-.01)),Qt=this.point,ue=Qt.x,Re=Qt.y,We=Math.cos(Math.PI/2-this._pitch)*Ot+this.cameraToCenterDistance,qe=We*1.01,cr=this.height/50,lr=new Float64Array(16);i.perspective(lr,this._fov,this.width/this.height,cr,qe),lr[8]=-dt.x*2/this.width,lr[9]=dt.y*2/this.height,i.scale(lr,lr,[1,-1,1]),i.translate(lr,lr,[0,0,-this.cameraToCenterDistance]),i.rotateX(lr,lr,this._pitch),i.rotateZ(lr,lr,this.angle),i.translate(lr,lr,[-ue,-Re,0]),this.mercatorMatrix=i.scale([],lr,[this.worldSize,this.worldSize,this.worldSize]),i.scale(lr,lr,[1,1,i.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=lr,this.invProjMatrix=i.invert([],this.projMatrix);var Fr=this.width%2/2,Xr=this.height%2/2,Yr=Math.cos(this.angle),Vr=Math.sin(this.angle),Kr=ue-Math.round(ue)+Yr*Fr+Vr*Xr,fn=Re-Math.round(Re)+Yr*Xr+Vr*Fr,Fn=new Float64Array(lr);if(i.translate(Fn,Fn,[Kr>.5?Kr-1:Kr,fn>.5?fn-1:fn,0]),this.alignedProjMatrix=Fn,lr=i.create(),i.scale(lr,lr,[this.width/2,-this.height/2,1]),i.translate(lr,lr,[1,-1,0]),this.labelPlaneMatrix=lr,lr=i.create(),i.scale(lr,lr,[1,-1,1]),i.translate(lr,lr,[-1,-1,0]),i.scale(lr,lr,[2/this.width,2/this.height,1]),this.glCoordMatrix=lr,this.pixelMatrix=i.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),lr=i.invert(new Float64Array(16),this.pixelMatrix),!lr)throw new Error("failed to invert matrix");this.pixelMatrixInverse=lr,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Dn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var K=this.pointCoordinate(new i.Point(0,0)),dt=[K.x*this.worldSize,K.y*this.worldSize,0,1],rt=i.transformMat4(dt,dt,this.pixelMatrix);return rt[3]/this.cameraToCenterDistance},Dn.prototype.getCameraPoint=function(){var K=this._pitch,dt=Math.tan(K)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.Point(0,dt))},Dn.prototype.getCameraQueryGeometry=function(K){var dt=this.getCameraPoint();if(K.length===1)return[K[0],dt];for(var rt=dt.x,pt=dt.y,Ot=dt.x,Qt=dt.y,ue=0,Re=K;ue=3&&!K.some(function(rt){return isNaN(rt)})){var dt=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(K[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+K[2],+K[1]],zoom:+K[0],bearing:dt,pitch:+(K[4]||0)}),!0}return!1},Pi.prototype._updateHashUnthrottled=function(){var K=i.window.location.href.replace(/(#.+)?$/,this.getHashString());try{i.window.history.replaceState(i.window.history.state,null,K)}catch{}};var Ri={linearity:.3,easing:i.bezier(0,0,.3,1)},zi=i.extend({deceleration:2500,maxSpeed:1400},Ri),Xi=i.extend({deceleration:20,maxSpeed:1400},Ri),da=i.extend({deceleration:1e3,maxSpeed:360},Ri),Ia=i.extend({deceleration:1e3,maxSpeed:90},Ri),ft=function(K){this._map=K,this.clear()};ft.prototype.clear=function(){this._inertiaBuffer=[]},ft.prototype.record=function(K){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:i.browser.now(),settings:K})},ft.prototype._drainInertiaBuffer=function(){for(var K=this._inertiaBuffer,dt=i.browser.now(),rt=160;K.length>0&&dt-K[0].time>rt;)K.shift()},ft.prototype._onMoveEnd=function(K){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var dt={zoom:0,bearing:0,pitch:0,pan:new i.Point(0,0),pinchAround:void 0,around:void 0},rt=0,pt=this._inertiaBuffer;rt=this._clickTolerance||this._map.fire(new ee(K.type,this._map,K))},De.prototype.dblclick=function(K){return this._firePreventable(new ee(K.type,this._map,K))},De.prototype.mouseover=function(K){this._map.fire(new ee(K.type,this._map,K))},De.prototype.mouseout=function(K){this._map.fire(new ee(K.type,this._map,K))},De.prototype.touchstart=function(K){return this._firePreventable(new ae(K.type,this._map,K))},De.prototype.touchmove=function(K){this._map.fire(new ae(K.type,this._map,K))},De.prototype.touchend=function(K){this._map.fire(new ae(K.type,this._map,K))},De.prototype.touchcancel=function(K){this._map.fire(new ae(K.type,this._map,K))},De.prototype._firePreventable=function(K){if(this._map.fire(K),K.defaultPrevented)return{}},De.prototype.isEnabled=function(){return!0},De.prototype.isActive=function(){return!1},De.prototype.enable=function(){},De.prototype.disable=function(){};var Ee=function(K){this._map=K};Ee.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ee.prototype.mousemove=function(K){this._map.fire(new ee(K.type,this._map,K))},Ee.prototype.mousedown=function(){this._delayContextMenu=!0},Ee.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ee("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ee.prototype.contextmenu=function(K){this._delayContextMenu?this._contextMenuEvent=K:this._map.fire(new ee(K.type,this._map,K)),this._map.listens("contextmenu")&&K.preventDefault()},Ee.prototype.isEnabled=function(){return!0},Ee.prototype.isActive=function(){return!1},Ee.prototype.enable=function(){},Ee.prototype.disable=function(){};var Ye=function(K,dt){this._map=K,this._el=K.getCanvasContainer(),this._container=K.getContainer(),this._clickTolerance=dt.clickTolerance||1};Ye.prototype.isEnabled=function(){return!!this._enabled},Ye.prototype.isActive=function(){return!!this._active},Ye.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ye.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ye.prototype.mousedown=function(K,dt){this.isEnabled()&&K.shiftKey&&K.button===0&&(x.disableDrag(),this._startPos=this._lastPos=dt,this._active=!0)},Ye.prototype.mousemoveWindow=function(K,dt){if(this._active){var rt=dt;if(!(this._lastPos.equals(rt)||!this._box&&rt.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=K.timeStamp),rt.length===this.numTouches&&(this.centroid=nr(dt),this.touches=Ze(rt,dt)))},on.prototype.touchmove=function(K,dt,rt){if(!(this.aborted||!this.centroid)){var pt=Ze(rt,dt);for(var Ot in this.touches){var Qt=this.touches[Ot],ue=pt[Ot];(!ue||ue.dist(Qt)>Jr)&&(this.aborted=!0)}}},on.prototype.touchend=function(K,dt,rt){if((!this.centroid||K.timeStamp-this.startTime>Lr)&&(this.aborted=!0),rt.length===0){var pt=!this.aborted&&this.centroid;if(this.reset(),pt)return pt}};var Rr=function(K){this.singleTap=new on(K),this.numTaps=K.numTaps,this.reset()};Rr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Rr.prototype.touchstart=function(K,dt,rt){this.singleTap.touchstart(K,dt,rt)},Rr.prototype.touchmove=function(K,dt,rt){this.singleTap.touchmove(K,dt,rt)},Rr.prototype.touchend=function(K,dt,rt){var pt=this.singleTap.touchend(K,dt,rt);if(pt){var Ot=K.timeStamp-this.lastTime<_r,Qt=!this.lastTap||this.lastTap.dist(pt)0&&(this._active=!0);var pt=Ze(rt,dt),Ot=new i.Point(0,0),Qt=new i.Point(0,0),ue=0;for(var Re in pt){var We=pt[Re],qe=this._touches[Re];qe&&(Ot._add(We),Qt._add(We.sub(qe)),ue++,pt[Re]=We)}if(this._touches=pt,!(ueMath.abs(ht.x)}var Ti=100,Zi=function(ht){function K(){ht.apply(this,arguments)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.reset=function(){ht.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},K.prototype._start=function(rt){this._lastPoints=rt,Bi(rt[0].sub(rt[1]))&&(this._valid=!1)},K.prototype._move=function(rt,pt,Ot){var Qt=rt[0].sub(this._lastPoints[0]),ue=rt[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Qt,ue,Ot.timeStamp),!!this._valid){this._lastPoints=rt,this._active=!0;var Re=(Qt.y+ue.y)/2,We=-.5;return{pitchDelta:Re*We}}},K.prototype.gestureBeginsVertically=function(rt,pt,Ot){if(this._valid!==void 0)return this._valid;var Qt=2,ue=rt.mag()>=Qt,Re=pt.mag()>=Qt;if(!(!ue&&!Re)){if(!ue||!Re)return this._firstMove===void 0&&(this._firstMove=Ot),Ot-this._firstMove0==pt.y>0;return Bi(rt)&&Bi(pt)&&We}},K}(fi),ba={panStep:100,bearingStep:15,pitchStep:10},na=function(){var K=ba;this._panStep=K.panStep,this._bearingStep=K.bearingStep,this._pitchStep=K.pitchStep,this._rotationDisabled=!1};na.prototype.reset=function(){this._active=!1},na.prototype.keydown=function(K){var dt=this;if(!(K.altKey||K.ctrlKey||K.metaKey)){var rt=0,pt=0,Ot=0,Qt=0,ue=0;switch(K.keyCode){case 61:case 107:case 171:case 187:rt=1;break;case 189:case 109:case 173:rt=-1;break;case 37:K.shiftKey?pt=-1:(K.preventDefault(),Qt=-1);break;case 39:K.shiftKey?pt=1:(K.preventDefault(),Qt=1);break;case 38:K.shiftKey?Ot=1:(K.preventDefault(),ue=-1);break;case 40:K.shiftKey?Ot=-1:(K.preventDefault(),ue=1);break;default:return}return this._rotationDisabled&&(pt=0,Ot=0),{cameraAnimation:function(Re){var We=Re.getZoom();Re.easeTo({duration:300,easeId:"keyboardHandler",easing:Ka,zoom:rt?Math.round(We)+rt*(K.shiftKey?2:1):We,bearing:Re.getBearing()+pt*dt._bearingStep,pitch:Re.getPitch()+Ot*dt._pitchStep,offset:[-Qt*dt._panStep,-ue*dt._panStep],center:Re.getCenter()},{originalEvent:K})}}}},na.prototype.enable=function(){this._enabled=!0},na.prototype.disable=function(){this._enabled=!1,this.reset()},na.prototype.isEnabled=function(){return this._enabled},na.prototype.isActive=function(){return this._active},na.prototype.disableRotation=function(){this._rotationDisabled=!0},na.prototype.enableRotation=function(){this._rotationDisabled=!1};function Ka(ht){return ht*(2-ht)}var Ja=4.000244140625,to=1/100,wa=1/450,uo=2,oi=function(K,dt){this._map=K,this._el=K.getCanvasContainer(),this._handler=dt,this._delta=0,this._defaultZoomRate=to,this._wheelZoomRate=wa,i.bindAll(["_onTimeout"],this)};oi.prototype.setZoomRate=function(K){this._defaultZoomRate=K},oi.prototype.setWheelZoomRate=function(K){this._wheelZoomRate=K},oi.prototype.isEnabled=function(){return!!this._enabled},oi.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},oi.prototype.isZooming=function(){return!!this._zooming},oi.prototype.enable=function(K){this.isEnabled()||(this._enabled=!0,this._aroundCenter=K&&K.around==="center")},oi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},oi.prototype.wheel=function(K){if(this.isEnabled()){var dt=K.deltaMode===i.window.WheelEvent.DOM_DELTA_LINE?K.deltaY*40:K.deltaY,rt=i.browser.now(),pt=rt-(this._lastWheelEventTime||0);this._lastWheelEventTime=rt,dt!==0&&dt%Ja===0?this._type="wheel":dt!==0&&Math.abs(dt)<4?this._type="trackpad":pt>400?(this._type=null,this._lastValue=dt,this._timeout=setTimeout(this._onTimeout,40,K)):this._type||(this._type=Math.abs(pt*dt)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,dt+=this._lastValue)),K.shiftKey&&dt&&(dt=dt/4),this._type&&(this._lastWheelEvent=K,this._delta-=dt,this._active||this._start(K)),K.preventDefault()}},oi.prototype._onTimeout=function(K){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(K)},oi.prototype._start=function(K){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var dt=x.mousePos(this._el,K);this._around=i.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(dt)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},oi.prototype.renderFrame=function(){var K=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var dt=this._map.transform;if(this._delta!==0){var rt=this._type==="wheel"&&Math.abs(this._delta)>Ja?this._wheelZoomRate:this._defaultZoomRate,pt=uo/(1+Math.exp(-Math.abs(this._delta*rt)));this._delta<0&&pt!==0&&(pt=1/pt);var Ot=typeof this._targetZoom=="number"?dt.zoomScale(this._targetZoom):dt.scale;this._targetZoom=Math.min(dt.maxZoom,Math.max(dt.minZoom,dt.scaleZoom(Ot*pt))),this._type==="wheel"&&(this._startZoom=dt.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Qt=typeof this._targetZoom=="number"?this._targetZoom:dt.zoom,ue=this._startZoom,Re=this._easing,We=!1,qe;if(this._type==="wheel"&&ue&&Re){var cr=Math.min((i.browser.now()-this._lastWheelEventTime)/200,1),lr=Re(cr);qe=i.number(ue,Qt,lr),cr<1?this._frameId||(this._frameId=!0):We=!0}else qe=Qt,We=!0;return this._active=!0,We&&(this._active=!1,this._finishTimeout=setTimeout(function(){K._zooming=!1,K._handler._triggerRenderFrame(),delete K._targetZoom,delete K._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!We,zoomDelta:qe-dt.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},oi.prototype._smoothOutEasing=function(K){var dt=i.ease;if(this._prevEase){var rt=this._prevEase,pt=(i.browser.now()-rt.start)/rt.duration,Ot=rt.easing(pt+.01)-rt.easing(pt),Qt=.27/Math.sqrt(Ot*Ot+1e-4)*.01,ue=Math.sqrt(.27*.27-Qt*Qt);dt=i.bezier(Qt,ue,.25,1)}return this._prevEase={start:i.browser.now(),duration:K,easing:dt},dt},oi.prototype.reset=function(){this._active=!1};var Ei=function(K,dt){this._clickZoom=K,this._tapZoom=dt};Ei.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Ei.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Ei.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Ei.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Ao=function(){this.reset()};Ao.prototype.reset=function(){this._active=!1},Ao.prototype.dblclick=function(K,dt){return K.preventDefault(),{cameraAnimation:function(rt){rt.easeTo({duration:300,zoom:rt.getZoom()+(K.shiftKey?-1:1),around:rt.unproject(dt)},{originalEvent:K})}}},Ao.prototype.enable=function(){this._enabled=!0},Ao.prototype.disable=function(){this._enabled=!1,this.reset()},Ao.prototype.isEnabled=function(){return this._enabled},Ao.prototype.isActive=function(){return this._active};var Lo=function(){this._tap=new Rr({numTouches:1,numTaps:1}),this.reset()};Lo.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Lo.prototype.touchstart=function(K,dt,rt){this._swipePoint||(this._tapTime&&K.timeStamp-this._tapTime>_r&&this.reset(),this._tapTime?rt.length>0&&(this._swipePoint=dt[0],this._swipeTouch=rt[0].identifier):this._tap.touchstart(K,dt,rt))},Lo.prototype.touchmove=function(K,dt,rt){if(!this._tapTime)this._tap.touchmove(K,dt,rt);else if(this._swipePoint){if(rt[0].identifier!==this._swipeTouch)return;var pt=dt[0],Ot=pt.y-this._swipePoint.y;return this._swipePoint=pt,K.preventDefault(),this._active=!0,{zoomDelta:Ot/128}}},Lo.prototype.touchend=function(K,dt,rt){if(this._tapTime)this._swipePoint&&rt.length===0&&this.reset();else{var pt=this._tap.touchend(K,dt,rt);pt&&(this._tapTime=K.timeStamp)}},Lo.prototype.touchcancel=function(){this.reset()},Lo.prototype.enable=function(){this._enabled=!0},Lo.prototype.disable=function(){this._enabled=!1,this.reset()},Lo.prototype.isEnabled=function(){return this._enabled},Lo.prototype.isActive=function(){return this._active};var eo=function(K,dt,rt){this._el=K,this._mousePan=dt,this._touchPan=rt};eo.prototype.enable=function(K){this._inertiaOptions=K||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},eo.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},eo.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},eo.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ca=function(K,dt,rt){this._pitchWithRotate=K.pitchWithRotate,this._mouseRotate=dt,this._mousePitch=rt};ca.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ca.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ca.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ca.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Va=function(K,dt,rt,pt){this._el=K,this._touchZoom=dt,this._touchRotate=rt,this._tapDragZoom=pt,this._rotationDisabled=!1,this._enabled=!0};Va.prototype.enable=function(K){this._touchZoom.enable(K),this._rotationDisabled||this._touchRotate.enable(K),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Va.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Va.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Va.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Va.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Va.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Oa=function(ht){return ht.zoom||ht.drag||ht.pitch||ht.rotate},is=function(ht){function K(){ht.apply(this,arguments)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K}(i.Event);function bs(ht){return ht.panDelta&&ht.panDelta.mag()||ht.zoomDelta||ht.bearingDelta||ht.pitchDelta}var Ea=function(K,dt){this._map=K,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ft(K),this._bearingSnap=dt.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(dt),i.bindAll(["handleEvent","handleWindowEvent"],this);var rt=this._el;this._listeners=[[rt,"touchstart",{passive:!0}],[rt,"touchmove",{passive:!1}],[rt,"touchend",void 0],[rt,"touchcancel",void 0],[rt,"mousedown",void 0],[rt,"mousemove",void 0],[rt,"mouseup",void 0],[i.window.document,"mousemove",{capture:!0}],[i.window.document,"mouseup",void 0],[rt,"mouseover",void 0],[rt,"mouseout",void 0],[rt,"dblclick",void 0],[rt,"click",void 0],[rt,"keydown",{capture:!1}],[rt,"keyup",void 0],[rt,"wheel",{passive:!1}],[rt,"contextmenu",void 0],[i.window,"blur",void 0]];for(var pt=0,Ot=this._listeners;ptue?Math.min(2,Yn):Math.max(.5,Yn),hi=Math.pow(yi,1-ti),Fi=Qt.unproject(Fn.add(Nn.mult(ti*hi)).mult(si));Qt.setLocationAtPoint(Qt.renderWorldCopies?Fi.wrap():Fi,Vr)}Ot._fireMoveEvents(pt)},function(ti){Ot._afterEase(pt,ti)},rt),this},K.prototype._prepareEase=function(rt,pt,Ot){Ot===void 0&&(Ot={}),this._moving=!0,!pt&&!Ot.moving&&this.fire(new i.Event("movestart",rt)),this._zooming&&!Ot.zooming&&this.fire(new i.Event("zoomstart",rt)),this._rotating&&!Ot.rotating&&this.fire(new i.Event("rotatestart",rt)),this._pitching&&!Ot.pitching&&this.fire(new i.Event("pitchstart",rt))},K.prototype._fireMoveEvents=function(rt){this.fire(new i.Event("move",rt)),this._zooming&&this.fire(new i.Event("zoom",rt)),this._rotating&&this.fire(new i.Event("rotate",rt)),this._pitching&&this.fire(new i.Event("pitch",rt))},K.prototype._afterEase=function(rt,pt){if(!(this._easeId&&pt&&this._easeId===pt)){delete this._easeId;var Ot=this._zooming,Qt=this._rotating,ue=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ot&&this.fire(new i.Event("zoomend",rt)),Qt&&this.fire(new i.Event("rotateend",rt)),ue&&this.fire(new i.Event("pitchend",rt)),this.fire(new i.Event("moveend",rt))}},K.prototype.flyTo=function(rt,pt){var Ot=this;if(!rt.essential&&i.browser.prefersReducedMotion){var Qt=i.pick(rt,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Qt,pt)}this.stop(),rt=i.extend({offset:[0,0],speed:1.2,curve:1.42,easing:i.ease},rt);var ue=this.transform,Re=this.getZoom(),We=this.getBearing(),qe=this.getPitch(),cr=this.getPadding(),lr="zoom"in rt?i.clamp(+rt.zoom,ue.minZoom,ue.maxZoom):Re,Fr="bearing"in rt?this._normalizeBearing(rt.bearing,We):We,Xr="pitch"in rt?+rt.pitch:qe,Yr="padding"in rt?rt.padding:ue.padding,Vr=ue.zoomScale(lr-Re),Kr=i.Point.convert(rt.offset),fn=ue.centerPoint.add(Kr),Fn=ue.pointLocation(fn),Nn=i.LngLat.convert(rt.center||Fn);this._normalizeCenter(Nn);var Yn=ue.project(Fn),Xn=ue.project(Nn).sub(Yn),Gn=rt.curve,jn=Math.max(ue.width,ue.height),ti=jn/Vr,si=Xn.mag();if("minZoom"in rt){var yi=i.clamp(Math.min(rt.minZoom,Re,lr),ue.minZoom,ue.maxZoom),hi=jn/ue.zoomScale(yi-Re);Gn=Math.sqrt(hi/si*2)}var Fi=Gn*Gn;function Ji(Hi){var Qi=(ti*ti-jn*jn+(Hi?-1:1)*Fi*Fi*si*si)/(2*(Hi?ti:jn)*Fi*si);return Math.log(Math.sqrt(Qi*Qi+1)-Qi)}function Gi(Hi){return(Math.exp(Hi)-Math.exp(-Hi))/2}function Ai(Hi){return(Math.exp(Hi)+Math.exp(-Hi))/2}function Yi(Hi){return Gi(Hi)/Ai(Hi)}var Ui=Ji(0),ia=function(Hi){return Ai(Ui)/Ai(Ui+Gn*Hi)},qi=function(Hi){return jn*((Ai(Ui)*Yi(Ui+Gn*Hi)-Gi(Ui))/Fi)/si},Ta=(Ji(1)-Ui)/Gn;if(Math.abs(si)<1e-6||!isFinite(Ta)){if(Math.abs(jn-ti)<1e-6)return this.easeTo(rt,pt);var Ki=tirt.maxDuration&&(rt.duration=0),this._zooming=!0,this._rotating=We!==Fr,this._pitching=Xr!==qe,this._padding=!ue.isPaddingEqual(Yr),this._prepareEase(pt,!1),this._ease(function(Hi){var Qi=Hi*Ta,Na=1/ia(Qi);ue.zoom=Hi===1?lr:Re+ue.scaleZoom(Na),Ot._rotating&&(ue.bearing=i.number(We,Fr,Hi)),Ot._pitching&&(ue.pitch=i.number(qe,Xr,Hi)),Ot._padding&&(ue.interpolatePadding(cr,Yr,Hi),fn=ue.centerPoint.add(Kr));var fo=Hi===1?Nn:ue.unproject(Yn.add(Xn.mult(qi(Qi))).mult(Na));ue.setLocationAtPoint(ue.renderWorldCopies?fo.wrap():fo,fn),Ot._fireMoveEvents(pt)},function(){return Ot._afterEase(pt)},rt),this},K.prototype.isEasing=function(){return!!this._easeFrameId},K.prototype.stop=function(){return this._stop()},K.prototype._stop=function(rt,pt){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Ot=this._onEaseEnd;delete this._onEaseEnd,Ot.call(this,pt)}if(!rt){var Qt=this.handlers;Qt&&Qt.stop(!1)}return this},K.prototype._ease=function(rt,pt,Ot){Ot.animate===!1||Ot.duration===0?(rt(1),pt()):(this._easeStart=i.browser.now(),this._easeOptions=Ot,this._onEaseFrame=rt,this._onEaseEnd=pt,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},K.prototype._renderFrameCallback=function(){var rt=Math.min((i.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(rt)),rt<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},K.prototype._normalizeBearing=function(rt,pt){rt=i.wrap(rt,-180,180);var Ot=Math.abs(rt-pt);return Math.abs(rt-360-pt)180?-360:Ot<-180?360:0}},K}(i.Evented),ji=function(K){K===void 0&&(K={}),this.options=K,i.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};ji.prototype.getDefaultPosition=function(){return"bottom-right"},ji.prototype.onAdd=function(K){var dt=this.options&&this.options.compact;return this._map=K,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=x.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=x.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),dt&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),dt===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},ji.prototype.onRemove=function(){x.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},ji.prototype._setElementTitle=function(K,dt){var rt=this._map._getUIString("AttributionControl."+dt);K.title=rt,K.setAttribute("aria-label",rt)},ji.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},ji.prototype._updateEditLink=function(){var K=this._editLink;K||(K=this._editLink=this._container.querySelector(".mapbox-improve-map"));var dt=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||i.config.ACCESS_TOKEN}];if(K){var rt=dt.reduce(function(pt,Ot,Qt){return Ot.value&&(pt+=Ot.key+"="+Ot.value+(Qt=0)return!1;return!0});var ue=K.join(" | ");ue!==this._attribHTML&&(this._attribHTML=ue,K.length?(this._innerContainer.innerHTML=ue,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},ji.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var _a=function(){i.bindAll(["_updateLogo"],this),i.bindAll(["_updateCompact"],this)};_a.prototype.onAdd=function(K){this._map=K,this._container=x.create("div","mapboxgl-ctrl");var dt=x.create("a","mapboxgl-ctrl-logo");return dt.target="_blank",dt.rel="noopener nofollow",dt.href="https://www.mapbox.com/",dt.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),dt.setAttribute("rel","noopener nofollow"),this._container.appendChild(dt),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},_a.prototype.onRemove=function(){x.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},_a.prototype.getDefaultPosition=function(){return"bottom-left"},_a.prototype._updateLogo=function(K){(!K||K.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},_a.prototype._logoRequired=function(){if(this._map.style){var K=this._map.style.sourceCaches;for(var dt in K){var rt=K[dt].getSource();if(rt.mapbox_logo)return!0}return!1}},_a.prototype._updateCompact=function(){var K=this._container.children;if(K.length){var dt=K[0];this._map.getCanvasContainer().offsetWidth<250?dt.classList.add("mapboxgl-compact"):dt.classList.remove("mapboxgl-compact")}};var zc=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};zc.prototype.add=function(K){var dt=++this._id,rt=this._queue;return rt.push({callback:K,id:dt,cancelled:!1}),dt},zc.prototype.remove=function(K){for(var dt=this._currentlyRunning,rt=dt?this._queue.concat(dt):this._queue,pt=0,Ot=rt;ptrt.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(rt.minPitch!=null&&rt.maxPitch!=null&&rt.minPitch>rt.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(rt.minPitch!=null&&rt.minPitchPu)throw new Error("maxPitch must be less than or equal to "+Pu);var Ot=new Dn(rt.minZoom,rt.maxZoom,rt.minPitch,rt.maxPitch,rt.renderWorldCopies);if(ht.call(this,Ot,rt),this._interactive=rt.interactive,this._maxTileCacheSize=rt.maxTileCacheSize,this._failIfMajorPerformanceCaveat=rt.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=rt.preserveDrawingBuffer,this._antialias=rt.antialias,this._trackResize=rt.trackResize,this._bearingSnap=rt.bearingSnap,this._refreshExpiredTiles=rt.refreshExpiredTiles,this._fadeDuration=rt.fadeDuration,this._crossSourceCollisions=rt.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=rt.collectResourceTiming,this._renderTaskQueue=new zc,this._controls=[],this._mapId=i.uniqueId(),this._locale=i.extend({},ed,rt.locale),this._clickTolerance=rt.clickTolerance,this._requestManager=new i.RequestManager(rt.transformRequest,rt.accessToken),typeof rt.container=="string"){if(this._container=i.window.document.getElementById(rt.container),!this._container)throw new Error("Container '"+rt.container+"' not found.")}else if(rt.container instanceof pv)this._container=rt.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(rt.maxBounds&&this.setMaxBounds(rt.maxBounds),i.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return pt._update(!1)}),this.on("moveend",function(){return pt._update(!1)}),this.on("zoom",function(){return pt._update(!0)}),typeof i.window<"u"&&(i.window.addEventListener("online",this._onWindowOnline,!1),i.window.addEventListener("resize",this._onWindowResize,!1),i.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Ea(this,rt);var Qt=typeof rt.hash=="string"&&rt.hash||void 0;this._hash=rt.hash&&new Pi(Qt).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:rt.center,zoom:rt.zoom,bearing:rt.bearing,pitch:rt.pitch}),rt.bounds&&(this.resize(),this.fitBounds(rt.bounds,i.extend({},rt.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=rt.localIdeographFontFamily,rt.style&&this.setStyle(rt.style,{localIdeographFontFamily:rt.localIdeographFontFamily}),rt.attributionControl&&this.addControl(new ji({customAttribution:rt.customAttribution})),this.addControl(new _a,rt.logoPosition),this.on("style.load",function(){pt.transform.unmodified&&pt.jumpTo(pt.style.stylesheet)}),this.on("data",function(ue){pt._update(ue.dataType==="style"),pt.fire(new i.Event(ue.dataType+"data",ue))}),this.on("dataloading",function(ue){pt.fire(new i.Event(ue.dataType+"dataloading",ue))})}ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K;var dt={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return K.prototype._getMapId=function(){return this._mapId},K.prototype.addControl=function(pt,Ot){if(Ot===void 0&&(pt.getDefaultPosition?Ot=pt.getDefaultPosition():Ot="top-right"),!pt||!pt.onAdd)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Qt=pt.onAdd(this);this._controls.push(pt);var ue=this._controlPositions[Ot];return Ot.indexOf("bottom")!==-1?ue.insertBefore(Qt,ue.firstChild):ue.appendChild(Qt),this},K.prototype.removeControl=function(pt){if(!pt||!pt.onRemove)return this.fire(new i.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Ot=this._controls.indexOf(pt);return Ot>-1&&this._controls.splice(Ot,1),pt.onRemove(this),this},K.prototype.hasControl=function(pt){return this._controls.indexOf(pt)>-1},K.prototype.resize=function(pt){var Ot=this._containerDimensions(),Qt=Ot[0],ue=Ot[1];this._resizeCanvas(Qt,ue),this.transform.resize(Qt,ue),this.painter.resize(Qt,ue);var Re=!this._moving;return Re&&(this.stop(),this.fire(new i.Event("movestart",pt)).fire(new i.Event("move",pt))),this.fire(new i.Event("resize",pt)),Re&&this.fire(new i.Event("moveend",pt)),this},K.prototype.getBounds=function(){return this.transform.getBounds()},K.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},K.prototype.setMaxBounds=function(pt){return this.transform.setMaxBounds(i.LngLatBounds.convert(pt)),this._update()},K.prototype.setMinZoom=function(pt){if(pt=pt??Gf,pt>=Gf&&pt<=this.transform.maxZoom)return this.transform.minZoom=pt,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=pt,this._update(),this.getZoom()>pt&&this.setZoom(pt),this;throw new Error("maxZoom must be greater than the current minZoom")},K.prototype.getMaxZoom=function(){return this.transform.maxZoom},K.prototype.setMinPitch=function(pt){if(pt=pt??Zo,pt=Zo&&pt<=this.transform.maxPitch)return this.transform.minPitch=pt,this._update(),this.getPitch()Pu)throw new Error("maxPitch must be less than or equal to "+Pu);if(pt>=this.transform.minPitch)return this.transform.maxPitch=pt,this._update(),this.getPitch()>pt&&this.setPitch(pt),this;throw new Error("maxPitch must be greater than the current minPitch")},K.prototype.getMaxPitch=function(){return this.transform.maxPitch},K.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},K.prototype.setRenderWorldCopies=function(pt){return this.transform.renderWorldCopies=pt,this._update()},K.prototype.project=function(pt){return this.transform.locationPoint(i.LngLat.convert(pt))},K.prototype.unproject=function(pt){return this.transform.pointLocation(i.Point.convert(pt))},K.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},K.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},K.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},K.prototype._createDelegatedListener=function(pt,Ot,Qt){var ue=this,Re;if(pt==="mouseenter"||pt==="mouseover"){var We=!1,qe=function(Vr){var Kr=ue.getLayer(Ot)?ue.queryRenderedFeatures(Vr.point,{layers:[Ot]}):[];Kr.length?We||(We=!0,Qt.call(ue,new ee(pt,ue,Vr.originalEvent,{features:Kr}))):We=!1},cr=function(){We=!1};return{layer:Ot,listener:Qt,delegates:{mousemove:qe,mouseout:cr}}}else if(pt==="mouseleave"||pt==="mouseout"){var lr=!1,Fr=function(Vr){var Kr=ue.getLayer(Ot)?ue.queryRenderedFeatures(Vr.point,{layers:[Ot]}):[];Kr.length?lr=!0:lr&&(lr=!1,Qt.call(ue,new ee(pt,ue,Vr.originalEvent)))},Xr=function(Vr){lr&&(lr=!1,Qt.call(ue,new ee(pt,ue,Vr.originalEvent)))};return{layer:Ot,listener:Qt,delegates:{mousemove:Fr,mouseout:Xr}}}else{var Yr=function(Vr){var Kr=ue.getLayer(Ot)?ue.queryRenderedFeatures(Vr.point,{layers:[Ot]}):[];Kr.length&&(Vr.features=Kr,Qt.call(ue,Vr),delete Vr.features)};return{layer:Ot,listener:Qt,delegates:(Re={},Re[pt]=Yr,Re)}}},K.prototype.on=function(pt,Ot,Qt){if(Qt===void 0)return ht.prototype.on.call(this,pt,Ot);var ue=this._createDelegatedListener(pt,Ot,Qt);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[pt]=this._delegatedListeners[pt]||[],this._delegatedListeners[pt].push(ue);for(var Re in ue.delegates)this.on(Re,ue.delegates[Re]);return this},K.prototype.once=function(pt,Ot,Qt){if(Qt===void 0)return ht.prototype.once.call(this,pt,Ot);var ue=this._createDelegatedListener(pt,Ot,Qt);for(var Re in ue.delegates)this.once(Re,ue.delegates[Re]);return this},K.prototype.off=function(pt,Ot,Qt){var ue=this;if(Qt===void 0)return ht.prototype.off.call(this,pt,Ot);var Re=function(We){for(var qe=We[pt],cr=0;cr180;){var Qt=dt.locationPoint(ht);if(Qt.x>=0&&Qt.y>=0&&Qt.x<=dt.width&&Qt.y<=dt.height)break;ht.lng>dt.center.lng?ht.lng-=360:ht.lng+=360}return ht}var Oc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function oh(ht,K,dt){var rt=ht.classList;for(var pt in Oc)rt.remove("mapboxgl-"+dt+"-anchor-"+pt);rt.add("mapboxgl-"+dt+"-anchor-"+K)}var Yf=function(ht){function K(dt,rt){if(ht.call(this),(dt instanceof i.window.HTMLElement||rt)&&(dt=i.extend({element:dt},rt)),i.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=dt&&dt.anchor||"center",this._color=dt&&dt.color||"#3FB1CE",this._scale=dt&&dt.scale||1,this._draggable=dt&&dt.draggable||!1,this._clickTolerance=dt&&dt.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=dt&&dt.rotation||0,this._rotationAlignment=dt&&dt.rotationAlignment||"auto",this._pitchAlignment=dt&&dt.pitchAlignment&&dt.pitchAlignment!=="auto"?dt.pitchAlignment:this._rotationAlignment,!dt||!dt.element){this._defaultMarker=!0,this._element=x.create("div"),this._element.setAttribute("aria-label","Map marker");var pt=x.createNS("http://www.w3.org/2000/svg","svg"),Ot=41,Qt=27;pt.setAttributeNS(null,"display","block"),pt.setAttributeNS(null,"height",Ot+"px"),pt.setAttributeNS(null,"width",Qt+"px"),pt.setAttributeNS(null,"viewBox","0 0 "+Qt+" "+Ot);var ue=x.createNS("http://www.w3.org/2000/svg","g");ue.setAttributeNS(null,"stroke","none"),ue.setAttributeNS(null,"stroke-width","1"),ue.setAttributeNS(null,"fill","none"),ue.setAttributeNS(null,"fill-rule","evenodd");var Re=x.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"fill-rule","nonzero");var We=x.createNS("http://www.w3.org/2000/svg","g");We.setAttributeNS(null,"transform","translate(3.0, 29.0)"),We.setAttributeNS(null,"fill","#000000");for(var qe=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],cr=0,lr=qe;cr=pt}this._isDragging&&(this._pos=rt.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.Event("dragstart"))),this.fire(new i.Event("drag")))},K.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.Event("dragend")),this._state="inactive"},K.prototype._addDragHandler=function(rt){this._element.contains(rt.originalEvent.target)&&(rt.preventDefault(),this._positionDelta=rt.point.sub(this._pos).add(this._offset),this._pointerdownPos=rt.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},K.prototype.setDraggable=function(rt){return this._draggable=!!rt,this._map&&(rt?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},K.prototype.isDraggable=function(){return this._draggable},K.prototype.setRotation=function(rt){return this._rotation=rt||0,this._update(),this},K.prototype.getRotation=function(){return this._rotation},K.prototype.setRotationAlignment=function(rt){return this._rotationAlignment=rt||"auto",this._update(),this},K.prototype.getRotationAlignment=function(){return this._rotationAlignment},K.prototype.setPitchAlignment=function(rt){return this._pitchAlignment=rt&&rt!=="auto"?rt:this._rotationAlignment,this._update(),this},K.prototype.getPitchAlignment=function(){return this._pitchAlignment},K}(i.Evented),yv={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ru;function Nc(ht){Ru!==void 0?ht(Ru):i.window.navigator.permissions!==void 0?i.window.navigator.permissions.query({name:"geolocation"}).then(function(K){Ru=K.state!=="denied",ht(Ru)}):(Ru=!!i.window.navigator.geolocation,ht(Ru))}var Xf=0,af=!1,rd=function(ht){function K(dt){ht.call(this),this.options=i.extend({},yv,dt),i.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.onAdd=function(rt){return this._map=rt,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Nc(this._setupUI),this._container},K.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),x.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xf=0,af=!1},K.prototype._isOutOfMapMaxBounds=function(rt){var pt=this._map.getMaxBounds(),Ot=rt.coords;return pt&&(Ot.longitudept.getEast()||Ot.latitudept.getNorth())},K.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},K.prototype._onSuccess=function(rt){if(this._map){if(this._isOutOfMapMaxBounds(rt)){this._setErrorState(),this.fire(new i.Event("outofmaxbounds",rt)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=rt,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(rt),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(rt),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("geolocate",rt)),this._finish()}},K.prototype._updateCamera=function(rt){var pt=new i.LngLat(rt.coords.longitude,rt.coords.latitude),Ot=rt.coords.accuracy,Qt=this._map.getBearing(),ue=i.extend({bearing:Qt},this.options.fitBoundsOptions);this._map.fitBounds(pt.toBounds(Ot),ue,{geolocateSource:!0})},K.prototype._updateMarker=function(rt){if(rt){var pt=new i.LngLat(rt.coords.longitude,rt.coords.latitude);this._accuracyCircleMarker.setLngLat(pt).addTo(this._map),this._userLocationDotMarker.setLngLat(pt).addTo(this._map),this._accuracy=rt.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},K.prototype._updateCircleRadius=function(){var rt=this._map._container.clientHeight/2,pt=this._map.unproject([0,rt]),Ot=this._map.unproject([1,rt]),Qt=pt.distanceTo(Ot),ue=Math.ceil(2*this._accuracy/Qt);this._circleElement.style.width=ue+"px",this._circleElement.style.height=ue+"px"},K.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},K.prototype._onError=function(rt){if(this._map){if(this.options.trackUserLocation)if(rt.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var pt=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=pt,this._geolocateButton.setAttribute("aria-label",pt),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(rt.code===3&&af)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new i.Event("error",rt)),this._finish()}},K.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},K.prototype._setupUI=function(rt){var pt=this;if(this._container.addEventListener("contextmenu",function(ue){return ue.preventDefault()}),this._geolocateButton=x.create("button","mapboxgl-ctrl-geolocate",this._container),x.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",rt===!1){i.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Ot=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Ot,this._geolocateButton.setAttribute("aria-label",Ot)}else{var Qt=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Qt,this._geolocateButton.setAttribute("aria-label",Qt)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Yf(this._dotElement),this._circleElement=x.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Yf({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(ue){var Re=ue.originalEvent&&ue.originalEvent.type==="resize";!ue.geolocateSource&&pt._watchState==="ACTIVE_LOCK"&&!Re&&(pt._watchState="BACKGROUND",pt._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),pt._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),pt.fire(new i.Event("trackuserlocationend")))})},K.prototype.trigger=function(){if(!this._setup)return i.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xf--,af=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xf++;var rt;Xf>1?(rt={maximumAge:6e5,timeout:0},af=!0):(rt=this.options.positionOptions,af=!1),this._geolocationWatchID=i.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,rt)}}else i.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},K.prototype._clearWatch=function(){i.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},K}(i.Evented),xv={maxWidth:100,unit:"metric"},of=function(K){this.options=i.extend({},xv,K),i.bindAll(["_onMove","setUnit"],this)};of.prototype.getDefaultPosition=function(){return"bottom-left"},of.prototype._onMove=function(){bv(this._map,this._container,this.options)},of.prototype.onAdd=function(K){return this._map=K,this._container=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},of.prototype.onRemove=function(){x.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},of.prototype.setUnit=function(K){this.options.unit=K,bv(this._map,this._container,this.options)};function bv(ht,K,dt){var rt=dt&&dt.maxWidth||100,pt=ht._container.clientHeight/2,Ot=ht.unproject([0,pt]),Qt=ht.unproject([rt,pt]),ue=Ot.distanceTo(Qt);if(dt&&dt.unit==="imperial"){var Re=3.2808*ue;if(Re>5280){var We=Re/5280;Zf(K,rt,We,ht._getUIString("ScaleControl.Miles"))}else Zf(K,rt,Re,ht._getUIString("ScaleControl.Feet"))}else if(dt&&dt.unit==="nautical"){var qe=ue/1852;Zf(K,rt,qe,ht._getUIString("ScaleControl.NauticalMiles"))}else ue>=1e3?Zf(K,rt,ue/1e3,ht._getUIString("ScaleControl.Kilometers")):Zf(K,rt,ue,ht._getUIString("ScaleControl.Meters"))}function Zf(ht,K,dt,rt){var pt=id(dt),Ot=pt/dt;ht.style.width=K*Ot+"px",ht.innerHTML=pt+" "+rt}function nd(ht){var K=Math.pow(10,Math.ceil(-Math.log(ht)/Math.LN10));return Math.round(ht*K)/K}function id(ht){var K=Math.pow(10,(""+Math.floor(ht)).length-1),dt=ht/K;return dt=dt>=10?10:dt>=5?5:dt>=3?3:dt>=2?2:dt>=1?1:nd(dt),K*dt}var tl=function(K){this._fullscreen=!1,K&&K.container&&(K.container instanceof i.window.HTMLElement?this._container=K.container:i.warnOnce("Full screen control 'container' must be a DOM element.")),i.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in i.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in i.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in i.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in i.window.document&&(this._fullscreenchange="MSFullscreenChange")};tl.prototype.onAdd=function(K){return this._map=K,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},tl.prototype.onRemove=function(){x.remove(this._controlContainer),this._map=null,i.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},tl.prototype._checkFullscreenSupport=function(){return!!(i.window.document.fullscreenEnabled||i.window.document.mozFullScreenEnabled||i.window.document.msFullscreenEnabled||i.window.document.webkitFullscreenEnabled)},tl.prototype._setupUI=function(){var K=this._fullscreenButton=x.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);x.create("span","mapboxgl-ctrl-icon",K).setAttribute("aria-hidden",!0),K.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),i.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},tl.prototype._updateTitle=function(){var K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K},tl.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},tl.prototype._isFullscreen=function(){return this._fullscreen},tl.prototype._changeIcon=function(){var K=i.window.document.fullscreenElement||i.window.document.mozFullScreenElement||i.window.document.webkitFullscreenElement||i.window.document.msFullscreenElement;K===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},tl.prototype._onClickFullscreen=function(){this._isFullscreen()?i.window.document.exitFullscreen?i.window.document.exitFullscreen():i.window.document.mozCancelFullScreen?i.window.document.mozCancelFullScreen():i.window.document.msExitFullscreen?i.window.document.msExitFullscreen():i.window.document.webkitCancelFullScreen&&i.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var ad={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},od=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Tp=function(ht){function K(dt){ht.call(this),this.options=i.extend(Object.create(ad),dt),i.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ht&&(K.__proto__=ht),K.prototype=Object.create(ht&&ht.prototype),K.prototype.constructor=K,K.prototype.addTo=function(rt){return this._map&&this.remove(),this._map=rt,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new i.Event("open")),this},K.prototype.isOpen=function(){return!!this._map},K.prototype.remove=function(){return this._content&&x.remove(this._content),this._container&&(x.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new i.Event("close")),this},K.prototype.getLngLat=function(){return this._lngLat},K.prototype.setLngLat=function(rt){return this._lngLat=i.LngLat.convert(rt),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},K.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},K.prototype.getElement=function(){return this._container},K.prototype.setText=function(rt){return this.setDOMContent(i.window.document.createTextNode(rt))},K.prototype.setHTML=function(rt){var pt=i.window.document.createDocumentFragment(),Ot=i.window.document.createElement("body"),Qt;for(Ot.innerHTML=rt;Qt=Ot.firstChild,!!Qt;)pt.appendChild(Qt);return this.setDOMContent(pt)},K.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},K.prototype.setMaxWidth=function(rt){return this.options.maxWidth=rt,this._update(),this},K.prototype.setDOMContent=function(rt){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=x.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(rt),this._createCloseButton(),this._update(),this._focusFirstElement(),this},K.prototype.addClassName=function(rt){this._container&&this._container.classList.add(rt)},K.prototype.removeClassName=function(rt){this._container&&this._container.classList.remove(rt)},K.prototype.setOffset=function(rt){return this.options.offset=rt,this._update(),this},K.prototype.toggleClassName=function(rt){if(this._container)return this._container.classList.toggle(rt)},K.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=x.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},K.prototype._onMouseUp=function(rt){this._update(rt.point)},K.prototype._onMouseMove=function(rt){this._update(rt.point)},K.prototype._onDrag=function(rt){this._update(rt.point)},K.prototype._update=function(rt){var pt=this,Ot=this._lngLat||this._trackPointer;if(!(!this._map||!Ot||!this._content)&&(this._container||(this._container=x.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=x.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Fr){return pt._container.classList.add(Fr)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=eu(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!rt))){var Qt=this._pos=this._trackPointer&&rt?rt:this._map.project(this._lngLat),ue=this.options.anchor,Re=sd(this.options.offset);if(!ue){var We=this._container.offsetWidth,qe=this._container.offsetHeight,cr;Qt.y+Re.bottom.ythis._map.transform.height-qe?cr=["bottom"]:cr=[],Qt.xthis._map.transform.width-We/2&&cr.push("right"),cr.length===0?ue="bottom":ue=cr.join("-")}var lr=Qt.add(Re[ue]).round();x.setTransform(this._container,Oc[ue]+" translate("+lr.x+"px,"+lr.y+"px)"),oh(this._container,ue,"popup")}},K.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var rt=this._container.querySelector(od);rt&&rt.focus()}},K.prototype._onClose=function(){this.remove()},K}(i.Evented);function sd(ht){if(ht)if(typeof ht=="number"){var K=Math.round(Math.sqrt(.5*Math.pow(ht,2)));return{center:new i.Point(0,0),top:new i.Point(0,ht),"top-left":new i.Point(K,K),"top-right":new i.Point(-K,K),bottom:new i.Point(0,-ht),"bottom-left":new i.Point(K,-K),"bottom-right":new i.Point(-K,-K),left:new i.Point(ht,0),right:new i.Point(-ht,0)}}else if(ht instanceof i.Point||Array.isArray(ht)){var dt=i.Point.convert(ht);return{center:dt,top:dt,"top-left":dt,"top-right":dt,bottom:dt,"bottom-left":dt,"bottom-right":dt,left:dt,right:dt}}else return{center:i.Point.convert(ht.center||[0,0]),top:i.Point.convert(ht.top||[0,0]),"top-left":i.Point.convert(ht["top-left"]||[0,0]),"top-right":i.Point.convert(ht["top-right"]||[0,0]),bottom:i.Point.convert(ht.bottom||[0,0]),"bottom-left":i.Point.convert(ht["bottom-left"]||[0,0]),"bottom-right":i.Point.convert(ht["bottom-right"]||[0,0]),left:i.Point.convert(ht.left||[0,0]),right:i.Point.convert(ht.right||[0,0])};else return sd(new i.Point(0,0))}var ro={version:i.version,supported:S,setRTLTextPlugin:i.setRTLTextPlugin,getRTLTextPluginStatus:i.getRTLTextPluginStatus,Map:mv,NavigationControl:tu,GeolocateControl:rd,AttributionControl:ji,ScaleControl:of,FullscreenControl:tl,Popup:Tp,Marker:Yf,Style:Eo,LngLat:i.LngLat,LngLatBounds:i.LngLatBounds,Point:i.Point,MercatorCoordinate:i.MercatorCoordinate,Evented:i.Evented,config:i.config,prewarm:Oe,clearPrewarmedResources:Qe,get accessToken(){return i.config.ACCESS_TOKEN},set accessToken(ht){i.config.ACCESS_TOKEN=ht},get baseApiUrl(){return i.config.API_URL},set baseApiUrl(ht){i.config.API_URL=ht},get workerCount(){return vr.workerCount},set workerCount(ht){vr.workerCount=ht},get maxParallelImageRequests(){return i.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ht){i.config.MAX_PARALLEL_IMAGE_REQUESTS=ht},clearStorage:function(K){i.clearTileCache(K)},workerUrl:""};return ro}),g})},3108:function(G,U,t){G.exports=t(26099)},26099:function(G,U,t){var g=t(64928),C=t(32420),i=t(51160),S=t(76752),x=t(55616),v=t(31264),p=t(47520),r=t(18400),e=t(72512),a=t(76244),n=1073741824;G.exports=function(l,m){m||(m={}),l=p(l,"float64"),m=x(m,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var h=v(m.maxDepth,255),b=v(m.bounds,S(l,2));b[0]===b[2]&&b[2]++,b[1]===b[3]&&b[3]++;var u=f(l,b),o=l.length>>>1,d;m.dtype||(m.dtype="array"),typeof m.dtype=="string"?d=new(e(m.dtype))(o):m.dtype&&(d=m.dtype,Array.isArray(d)&&(d.length=o));for(var w=0;wh||it>n){for(var V=0;VHt||ot>Ut||$=st)&&mt!==Lt){var kt=A[At];Lt===void 0&&(Lt=kt.length);for(var Vt=mt;Vt=ut&&re<=X&&Kt>=J&&Kt<=tt&&ct.push(It)}var $t=_[At],le=$t[mt*4+0],he=$t[mt*4+1],de=$t[mt*4+2],xe=$t[mt*4+3],Se=Tt($t,mt+1),ne=bt*.5,zt=At+1;gt(wt,Rt,ne,zt,le,he||de||xe||Se),gt(wt,Rt+ne,ne,zt,he,de||xe||Se),gt(wt+ne,Rt,ne,zt,de,xe||Se),gt(wt+ne,Rt+ne,ne,zt,xe,Se)}}}function Tt(wt,Rt){for(var bt=null,At=0;bt===null;)if(bt=wt[Rt*4+At],At++,At>wt.length)return null;return bt}return ct}function k(O,H,Y,j,et){for(var it=[],ut=0;ut0){e+=Math.abs(v(r[0]));for(var a=1;a2){for(m=0;m=0))throw new Error("precision must be a positive number");var L=Math.pow(10,s||0);return Math.round(T*L)/L}U.round=c;function l(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T*L}U.radiansToLength=l;function m(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T/L}U.lengthToRadians=m;function h(T,s){return u(m(T,s))}U.lengthToDegrees=h;function b(T){var s=T%360;return s<0&&(s+=360),s}U.bearingToAzimuth=b;function u(T){var s=T%(2*Math.PI);return s*180/Math.PI}U.radiansToDegrees=u;function o(T){var s=T%360;return s*Math.PI/180}U.degreesToRadians=o;function d(T,s,L){if(s===void 0&&(s="kilometers"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("length must be a positive number");return l(m(T,s),L)}U.convertLength=d;function w(T,s,L){if(s===void 0&&(s="meters"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("area must be a positive number");var M=U.areaFactors[s];if(!M)throw new Error("invalid original units");var z=U.areaFactors[L];if(!z)throw new Error("invalid final units");return T/M*z}U.convertArea=w;function A(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}U.isNumber=A;function _(T){return!!T&&T.constructor===Object}U.isObject=_;function y(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(s){if(!A(s))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}U.validateId=E},3256:function(G,U,t){Object.defineProperty(U,"__esModule",{value:!0});var g=t(46284);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;Tx[0]&&(S[0]=x[0]),S[1]>x[1]&&(S[1]=x[1]),S[2]=0))throw new Error("precision must be a positive number");var L=Math.pow(10,s||0);return Math.round(T*L)/L}U.round=c;function l(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T*L}U.radiansToLength=l;function m(T,s){s===void 0&&(s="kilometers");var L=U.factors[s];if(!L)throw new Error(s+" units is invalid");return T/L}U.lengthToRadians=m;function h(T,s){return u(m(T,s))}U.lengthToDegrees=h;function b(T){var s=T%360;return s<0&&(s+=360),s}U.bearingToAzimuth=b;function u(T){var s=T%(2*Math.PI);return s*180/Math.PI}U.radiansToDegrees=u;function o(T){var s=T%360;return s*Math.PI/180}U.degreesToRadians=o;function d(T,s,L){if(s===void 0&&(s="kilometers"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("length must be a positive number");return l(m(T,s),L)}U.convertLength=d;function w(T,s,L){if(s===void 0&&(s="meters"),L===void 0&&(L="kilometers"),!(T>=0))throw new Error("area must be a positive number");var M=U.areaFactors[s];if(!M)throw new Error("invalid original units");var z=U.areaFactors[L];if(!z)throw new Error("invalid final units");return T/M*z}U.convertArea=w;function A(T){return!isNaN(T)&&T!==null&&!Array.isArray(T)}U.isNumber=A;function _(T){return!!T&&T.constructor===Object}U.isObject=_;function y(T){if(!T)throw new Error("bbox is required");if(!Array.isArray(T))throw new Error("bbox must be an Array");if(T.length!==4&&T.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");T.forEach(function(s){if(!A(s))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(T){if(!T)throw new Error("id is required");if(["string","number"].indexOf(typeof T)===-1)throw new Error("id must be a number or a string")}U.validateId=E},84880:function(G,U,t){Object.defineProperty(U,"__esModule",{value:!0});var g=t(76796);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;T=0))throw new Error("precision must be a positive number");var B=Math.pow(10,k||0);return Math.round(I*B)/B}U.round=c;function l(I,k){k===void 0&&(k="kilometers");var B=U.factors[k];if(!B)throw new Error(k+" units is invalid");return I*B}U.radiansToLength=l;function m(I,k){k===void 0&&(k="kilometers");var B=U.factors[k];if(!B)throw new Error(k+" units is invalid");return I/B}U.lengthToRadians=m;function h(I,k){return u(m(I,k))}U.lengthToDegrees=h;function b(I){var k=I%360;return k<0&&(k+=360),k}U.bearingToAzimuth=b;function u(I){var k=I%(2*Math.PI);return k*180/Math.PI}U.radiansToDegrees=u;function o(I){var k=I%360;return k*Math.PI/180}U.degreesToRadians=o;function d(I,k,B){if(k===void 0&&(k="kilometers"),B===void 0&&(B="kilometers"),!(I>=0))throw new Error("length must be a positive number");return l(m(I,k),B)}U.convertLength=d;function w(I,k,B){if(k===void 0&&(k="meters"),B===void 0&&(B="kilometers"),!(I>=0))throw new Error("area must be a positive number");var O=U.areaFactors[k];if(!O)throw new Error("invalid original units");var H=U.areaFactors[B];if(!H)throw new Error("invalid final units");return I/O*H}U.convertArea=w;function A(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)&&!/^\s*$/.test(I)}U.isNumber=A;function _(I){return!!I&&I.constructor===Object}U.isObject=_;function y(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(function(k){if(!A(k))throw new Error("bbox must only contain numbers")})}U.validateBBox=y;function E(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}U.validateId=E;function T(){throw new Error("method has been renamed to `radiansToDegrees`")}U.radians2degrees=T;function s(){throw new Error("method has been renamed to `degreesToRadians`")}U.degrees2radians=s;function L(){throw new Error("method has been renamed to `lengthToDegrees`")}U.distanceToDegrees=L;function M(){throw new Error("method has been renamed to `lengthToRadians`")}U.distanceToRadians=M;function z(){throw new Error("method has been renamed to `radiansToLength`")}U.radiansToDistance=z;function D(){throw new Error("method has been renamed to `bearingToAzimuth`")}U.bearingToAngle=D;function N(){throw new Error("method has been renamed to `convertLength`")}U.convertDistance=N},43752:function(G,U,t){Object.defineProperty(U,"__esModule",{value:!0});var g=t(49840);function C(o,d,w){if(o!==null)for(var A,_,y,E,T,s,L,M=0,z=0,D,N=o.type,I=N==="FeatureCollection",k=N==="Feature",B=I?o.features.length:1,O=0;Os||I>L||k>M){T=z,s=A,L=I,M=k,y=0;return}var B=g.lineString([T,z],w.properties);if(d(B,A,_,k,y)===!1)return!1;y++,T=z})===!1)return!1}}})}function l(o,d,w){var A=w,_=!1;return c(o,function(y,E,T,s,L){_===!1&&w===void 0?A=y:A=d(A,y,E,T,s,L),_=!0}),A}function m(o,d){if(!o)throw new Error("geojson is required");n(o,function(w,A,_){if(w.geometry!==null){var y=w.geometry.type,E=w.geometry.coordinates;switch(y){case"LineString":if(d(w,A,_,0,0)===!1)return!1;break;case"Polygon":for(var T=0;TS&&(S=t[v]),t[v]1?it-1:0),J=1;J1?it-1:0),J=1;J1?it-1:0),J=1;J1?it-1:0),J=1;J"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function f(I,k,B){return n()?f=Reflect.construct:f=function(V,Y,j){var te=[null];te.push.apply(te,Y);var ie=Function.bind.apply(V,te),ue=new ie;return j&&l(ue,j.prototype),ue},f.apply(null,arguments)}function c(I){return Function.toString.call(I).indexOf("[native code]")!==-1}function l(I,k){return l=Object.setPrototypeOf||function(O,V){return O.__proto__=V,O},l(I,k)}function m(I){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(B){return B.__proto__||Object.getPrototypeOf(B)},m(I)}function h(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function(B){return typeof B}:h=function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},h(I)}var b=e(35840),u=b.inspect,o=e(86832),d=o.codes.ERR_INVALID_ARG_TYPE;function w(I,k,B){return(B===void 0||B>I.length)&&(B=I.length),I.substring(B-k.length,B)===k}function A(I,k){if(k=Math.floor(k),I.length==0||k==0)return"";var B=I.length*k;for(k=Math.floor(Math.log(k)/Math.log(2));k;)I+=I,k--;return I+=I.substring(0,B-I.length),I}var _="",y="",E="",T="",s={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},L=10;function M(I){var k=Object.keys(I),B=Object.create(Object.getPrototypeOf(I));return k.forEach(function(O){B[O]=I[O]}),Object.defineProperty(B,"message",{value:I.message}),B}function z(I){return u(I,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function D(I,k,B){var O="",V="",Y=0,j="",te=!1,ie=z(I),ue=ie.split(` +`))}throw ut}};function Y(){for(var j=arguments.length,et=new Array(j),it=0;it"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function f(I,k,B){return n()?f=Reflect.construct:f=function(H,Y,j){var et=[null];et.push.apply(et,Y);var it=Function.bind.apply(H,et),ut=new it;return j&&l(ut,j.prototype),ut},f.apply(null,arguments)}function c(I){return Function.toString.call(I).indexOf("[native code]")!==-1}function l(I,k){return l=Object.setPrototypeOf||function(O,H){return O.__proto__=H,O},l(I,k)}function m(I){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(B){return B.__proto__||Object.getPrototypeOf(B)},m(I)}function h(I){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function(B){return typeof B}:h=function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},h(I)}var b=t(35840),u=b.inspect,o=t(86832),d=o.codes.ERR_INVALID_ARG_TYPE;function w(I,k,B){return(B===void 0||B>I.length)&&(B=I.length),I.substring(B-k.length,B)===k}function A(I,k){if(k=Math.floor(k),I.length==0||k==0)return"";var B=I.length*k;for(k=Math.floor(Math.log(k)/Math.log(2));k;)I+=I,k--;return I+=I.substring(0,B-I.length),I}var _="",y="",E="",T="",s={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},L=10;function M(I){var k=Object.keys(I),B=Object.create(Object.getPrototypeOf(I));return k.forEach(function(O){B[O]=I[O]}),Object.defineProperty(B,"message",{value:I.message}),B}function z(I){return u(I,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function D(I,k,B){var O="",H="",Y=0,j="",et=!1,it=z(I),ut=it.split(` `),J=z(k).split(` -`),X=0,ee="";if(B==="strictEqual"&&h(I)==="object"&&h(k)==="object"&&I!==null&&k!==null&&(B="strictEqualObject"),ue.length===1&&J.length===1&&ue[0]!==J[0]){var G=ue[0].length+J[0].length;if(G<=L){if((h(I)!=="object"||I===null)&&(h(k)!=="object"||k===null)&&(I!==0||k!==0))return"".concat(s[B],` +`),X=0,tt="";if(B==="strictEqual"&&h(I)==="object"&&h(k)==="object"&&I!==null&&k!==null&&(B="strictEqualObject"),ut.length===1&&J.length===1&&ut[0]!==J[0]){var V=ut[0].length+J[0].length;if(V<=L){if((h(I)!=="object"||I===null)&&(h(k)!=="object"||k===null)&&(I!==0||k!==0))return"".concat(s[B],` -`)+"".concat(ue[0]," !== ").concat(J[0],` -`)}else if(B!=="strictEqualObject"){var Q=g.stderr&&g.stderr.isTTY?g.stderr.columns:80;if(G2&&(ee=` - `.concat(A(" ",X),"^"),X=0)}}}for(var oe=ue[ue.length-1],$=J[J.length-1];oe===$&&(X++<2?j=` - `.concat(oe).concat(j):O=oe,ue.pop(),J.pop(),!(ue.length===0||J.length===0));)oe=ue[ue.length-1],$=J[J.length-1];var Z=Math.max(ue.length,J.length);if(Z===0){var se=ie.split(` -`);if(se.length>30)for(se[26]="".concat(_,"...").concat(T);se.length>27;)se.pop();return"".concat(s.notIdentical,` +`)+"".concat(ut[0]," !== ").concat(J[0],` +`)}else if(B!=="strictEqualObject"){var Q=g.stderr&&g.stderr.isTTY?g.stderr.columns:80;if(V2&&(tt=` + `.concat(A(" ",X),"^"),X=0)}}}for(var ot=ut[ut.length-1],$=J[J.length-1];ot===$&&(X++<2?j=` + `.concat(ot).concat(j):O=ot,ut.pop(),J.pop(),!(ut.length===0||J.length===0));)ot=ut[ut.length-1],$=J[J.length-1];var Z=Math.max(ut.length,J.length);if(Z===0){var st=it.split(` +`);if(st.length>30)for(st[26]="".concat(_,"...").concat(T);st.length>27;)st.pop();return"".concat(s.notIdentical,` -`).concat(se.join(` +`).concat(st.join(` `),` `)}X>3&&(j=` -`.concat(_,"...").concat(T).concat(j),te=!0),O!==""&&(j=` - `.concat(O).concat(j),O="");var ne=0,ce=s[B]+` -`.concat(y,"+ actual").concat(T," ").concat(E,"- expected").concat(T),ge=" ".concat(_,"...").concat(T," Lines skipped");for(X=0;X1&&X>2&&(Te>4?(V+=` -`.concat(_,"...").concat(T),te=!0):Te>3&&(V+=` - `.concat(J[X-2]),ne++),V+=` - `.concat(J[X-1]),ne++),Y=X,O+=` -`.concat(E,"-").concat(T," ").concat(J[X]),ne++;else if(J.length1&&X>2&&(Te>4?(V+=` -`.concat(_,"...").concat(T),te=!0):Te>3&&(V+=` - `.concat(ue[X-2]),ne++),V+=` - `.concat(ue[X-1]),ne++),Y=X,V+=` -`.concat(y,"+").concat(T," ").concat(ue[X]),ne++;else{var we=J[X],Re=ue[X],be=Re!==we&&(!w(Re,",")||Re.slice(0,-1)!==we);be&&w(we,",")&&we.slice(0,-1)===Re&&(be=!1,Re+=","),be?(Te>1&&X>2&&(Te>4?(V+=` -`.concat(_,"...").concat(T),te=!0):Te>3&&(V+=` - `.concat(ue[X-2]),ne++),V+=` - `.concat(ue[X-1]),ne++),Y=X,V+=` -`.concat(y,"+").concat(T," ").concat(Re),O+=` -`.concat(E,"-").concat(T," ").concat(we),ne+=2):(V+=O,O="",(Te===1||X===0)&&(V+=` - `.concat(Re),ne++))}if(ne>20&&X1&&X>2&&(Tt>4?(H+=` +`.concat(_,"...").concat(T),et=!0):Tt>3&&(H+=` + `.concat(J[X-2]),nt++),H+=` + `.concat(J[X-1]),nt++),Y=X,O+=` +`.concat(E,"-").concat(T," ").concat(J[X]),nt++;else if(J.length1&&X>2&&(Tt>4?(H+=` +`.concat(_,"...").concat(T),et=!0):Tt>3&&(H+=` + `.concat(ut[X-2]),nt++),H+=` + `.concat(ut[X-1]),nt++),Y=X,H+=` +`.concat(y,"+").concat(T," ").concat(ut[X]),nt++;else{var wt=J[X],Rt=ut[X],bt=Rt!==wt&&(!w(Rt,",")||Rt.slice(0,-1)!==wt);bt&&w(wt,",")&&wt.slice(0,-1)===Rt&&(bt=!1,Rt+=","),bt?(Tt>1&&X>2&&(Tt>4?(H+=` +`.concat(_,"...").concat(T),et=!0):Tt>3&&(H+=` + `.concat(ut[X-2]),nt++),H+=` + `.concat(ut[X-1]),nt++),Y=X,H+=` +`.concat(y,"+").concat(T," ").concat(Rt),O+=` +`.concat(E,"-").concat(T," ").concat(wt),nt+=2):(H+=O,O="",(Tt===1||X===0)&&(H+=` + `.concat(Rt),nt++))}if(nt>20&&X30)for(X[26]="".concat(_,"...").concat(T);X.length>27;)X.pop();X.length===1?O=p(this,m(k).call(this,"".concat(J," ").concat(X[0]))):O=p(this,m(k).call(this,"".concat(J,` +`)+"".concat(_,"...").concat(T)}return"".concat(ct).concat(et?gt:"",` +`).concat(H).concat(O).concat(j).concat(tt)}var N=function(I){e(k,I);function k(B){var O;if(S(this,k),h(B)!=="object"||B===null)throw new d("options","Object",B);var H=B.message,Y=B.operator,j=B.stackStartFn,et=B.actual,it=B.expected,ut=Error.stackTraceLimit;if(Error.stackTraceLimit=0,H!=null)O=p(this,m(k).call(this,String(H)));else if(g.stderr&&g.stderr.isTTY&&(g.stderr&&g.stderr.getColorDepth&&g.stderr.getColorDepth()!==1?(_="\x1B[34m",y="\x1B[32m",T="\x1B[39m",E="\x1B[31m"):(_="",y="",T="",E="")),h(et)==="object"&&et!==null&&h(it)==="object"&&it!==null&&"stack"in et&&et instanceof Error&&"stack"in it&&it instanceof Error&&(et=M(et),it=M(it)),Y==="deepStrictEqual"||Y==="strictEqual")O=p(this,m(k).call(this,D(et,it,Y)));else if(Y==="notDeepStrictEqual"||Y==="notStrictEqual"){var J=s[Y],X=z(et).split(` +`);if(Y==="notStrictEqual"&&h(et)==="object"&&et!==null&&(J=s.notStrictEqualObject),X.length>30)for(X[26]="".concat(_,"...").concat(T);X.length>27;)X.pop();X.length===1?O=p(this,m(k).call(this,"".concat(J," ").concat(X[0]))):O=p(this,m(k).call(this,"".concat(J,` `).concat(X.join(` `),` -`)))}else{var ee=z(te),G="",Q=s[Y];Y==="notDeepEqual"||Y==="notEqual"?(ee="".concat(s[Y],` +`)))}else{var tt=z(et),V="",Q=s[Y];Y==="notDeepEqual"||Y==="notEqual"?(tt="".concat(s[Y],` -`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(G="".concat(z(ie)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),G.length>512&&(G="".concat(G.slice(0,509),"...")),Y==="deepEqual"||Y==="equal"?ee="".concat(Q,` +`).concat(tt),tt.length>1024&&(tt="".concat(tt.slice(0,1021),"..."))):(V="".concat(z(it)),tt.length>512&&(tt="".concat(tt.slice(0,509),"...")),V.length>512&&(V="".concat(V.slice(0,509),"...")),Y==="deepEqual"||Y==="equal"?tt="".concat(Q,` -`).concat(ee,` +`).concat(tt,` should equal -`):G=" ".concat(Y," ").concat(G)),O=p(this,m(k).call(this,"".concat(ee).concat(G)))}return Error.stackTraceLimit=ue,O.generatedMessage=!V,Object.defineProperty(r(O),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),O.code="ERR_ASSERTION",O.actual=te,O.expected=ie,O.operator=Y,Error.captureStackTrace&&Error.captureStackTrace(r(O),j),O.stack,O.name="AssertionError",p(O)}return v(k,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:u.custom,value:function(O,V){return u(this,C({},V,{customInspect:!1,depth:0}))}}]),k}(a(Error));H.exports=N},86832:function(H,U,e){function g(h){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?g=function(u){return typeof u}:g=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},g(h)}function C(h,b){if(!(h instanceof b))throw new TypeError("Cannot call a class as a function")}function i(h,b){return b&&(g(b)==="object"||typeof b=="function")?b:S(h)}function S(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function x(h){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},x(h)}function v(h,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(b&&b.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),b&&p(h,b)}function p(h,b){return p=Object.setPrototypeOf||function(o,d){return o.__proto__=d,o},p(h,b)}var r={},t,a;function n(h,b,u){u||(u=Error);function o(w,A,_){return typeof b=="string"?b:b(w,A,_)}var d=function(w){v(A,w);function A(_,y,E){var T;return C(this,A),T=i(this,x(A).call(this,o(_,y,E))),T.code=h,T}return A}(u);r[h]=d}function f(h,b){if(Array.isArray(h)){var u=h.length;return h=h.map(function(o){return String(o)}),u>2?"one of ".concat(b," ").concat(h.slice(0,u-1).join(", "),", or ")+h[u-1]:u===2?"one of ".concat(b," ").concat(h[0]," or ").concat(h[1]):"of ".concat(b," ").concat(h[0])}else return"of ".concat(b," ").concat(String(h))}function c(h,b,u){return h.substr(!u||u<0?0:+u,b.length)===b}function l(h,b,u){return(u===void 0||u>h.length)&&(u=h.length),h.substring(u-b.length,u)===b}function m(h,b,u){return typeof u!="number"&&(u=0),u+b.length>h.length?!1:h.indexOf(b,u)!==-1}n("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),n("ERR_INVALID_ARG_TYPE",function(h,b,u){t===void 0&&(t=e(45408)),t(typeof h=="string","'name' must be a string");var o;typeof b=="string"&&c(b,"not ")?(o="must not be",b=b.replace(/^not /,"")):o="must be";var d;if(l(h," argument"))d="The ".concat(h," ").concat(o," ").concat(f(b,"type"));else{var w=m(h,".")?"property":"argument";d='The "'.concat(h,'" ').concat(w," ").concat(o," ").concat(f(b,"type"))}return d+=". Received type ".concat(g(u)),d},TypeError),n("ERR_INVALID_ARG_VALUE",function(h,b){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";a===void 0&&(a=e(35840));var o=a.inspect(b);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(h,"' ").concat(u,". Received ").concat(o)},TypeError),n("ERR_INVALID_RETURN_VALUE",function(h,b,u){var o;return u&&u.constructor&&u.constructor.name?o="instance of ".concat(u.constructor.name):o="type ".concat(g(u)),"Expected ".concat(h,' to be returned from the "').concat(b,'"')+" function but got ".concat(o,".")},TypeError),n("ERR_MISSING_ARGS",function(){for(var h=arguments.length,b=new Array(h),u=0;u0,"At least one arg needs to be specified");var o="The ",d=b.length;switch(b=b.map(function(w){return'"'.concat(w,'"')}),d){case 1:o+="".concat(b[0]," argument");break;case 2:o+="".concat(b[0]," and ").concat(b[1]," arguments");break;default:o+=b.slice(0,d-1).join(", "),o+=", and ".concat(b[d-1]," arguments");break}return"".concat(o," must be specified")},TypeError),H.exports.codes=r},25116:function(H,U,e){function g(Ae,me){return S(Ae)||i(Ae,me)||C()}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function i(Ae,me){var Le=[],Ve=!0,Ue=!1,ke=void 0;try{for(var He=Ae[Symbol.iterator](),Ie;!(Ve=(Ie=He.next()).done)&&(Le.push(Ie.value),!(me&&Le.length===me));Ve=!0);}catch(rt){Ue=!0,ke=rt}finally{try{!Ve&&He.return!=null&&He.return()}finally{if(Ue)throw ke}}return Le}function S(Ae){if(Array.isArray(Ae))return Ae}function x(Ae){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x=function(Le){return typeof Le}:x=function(Le){return Le&&typeof Symbol=="function"&&Le.constructor===Symbol&&Le!==Symbol.prototype?"symbol":typeof Le},x(Ae)}var v=/a/g.flags!==void 0,p=function(me){var Le=[];return me.forEach(function(Ve){return Le.push(Ve)}),Le},r=function(me){var Le=[];return me.forEach(function(Ve,Ue){return Le.push([Ue,Ve])}),Le},t=Object.is?Object.is:e(39896),a=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},n=Number.isNaN?Number.isNaN:e(1560);function f(Ae){return Ae.call.bind(Ae)}var c=f(Object.prototype.hasOwnProperty),l=f(Object.prototype.propertyIsEnumerable),m=f(Object.prototype.toString),h=e(35840).types,b=h.isAnyArrayBuffer,u=h.isArrayBufferView,o=h.isDate,d=h.isMap,w=h.isRegExp,A=h.isSet,_=h.isNativeError,y=h.isBoxedPrimitive,E=h.isNumberObject,T=h.isStringObject,s=h.isBooleanObject,L=h.isBigIntObject,M=h.isSymbolObject,z=h.isFloat32Array,D=h.isFloat64Array;function N(Ae){if(Ae.length===0||Ae.length>10)return!0;for(var me=0;me57)return!0}return Ae.length===10&&Ae>=Math.pow(2,32)}function I(Ae){return Object.keys(Ae).filter(N).concat(a(Ae).filter(Object.prototype.propertyIsEnumerable.bind(Ae)))}/*! +`):V=" ".concat(Y," ").concat(V)),O=p(this,m(k).call(this,"".concat(tt).concat(V)))}return Error.stackTraceLimit=ut,O.generatedMessage=!H,Object.defineProperty(r(O),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),O.code="ERR_ASSERTION",O.actual=et,O.expected=it,O.operator=Y,Error.captureStackTrace&&Error.captureStackTrace(r(O),j),O.stack,O.name="AssertionError",p(O)}return v(k,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:u.custom,value:function(O,H){return u(this,C({},H,{customInspect:!1,depth:0}))}}]),k}(a(Error));G.exports=N},86832:function(G,U,t){function g(h){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?g=function(u){return typeof u}:g=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},g(h)}function C(h,b){if(!(h instanceof b))throw new TypeError("Cannot call a class as a function")}function i(h,b){return b&&(g(b)==="object"||typeof b=="function")?b:S(h)}function S(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function x(h){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)},x(h)}function v(h,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(b&&b.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),b&&p(h,b)}function p(h,b){return p=Object.setPrototypeOf||function(o,d){return o.__proto__=d,o},p(h,b)}var r={},e,a;function n(h,b,u){u||(u=Error);function o(w,A,_){return typeof b=="string"?b:b(w,A,_)}var d=function(w){v(A,w);function A(_,y,E){var T;return C(this,A),T=i(this,x(A).call(this,o(_,y,E))),T.code=h,T}return A}(u);r[h]=d}function f(h,b){if(Array.isArray(h)){var u=h.length;return h=h.map(function(o){return String(o)}),u>2?"one of ".concat(b," ").concat(h.slice(0,u-1).join(", "),", or ")+h[u-1]:u===2?"one of ".concat(b," ").concat(h[0]," or ").concat(h[1]):"of ".concat(b," ").concat(h[0])}else return"of ".concat(b," ").concat(String(h))}function c(h,b,u){return h.substr(!u||u<0?0:+u,b.length)===b}function l(h,b,u){return(u===void 0||u>h.length)&&(u=h.length),h.substring(u-b.length,u)===b}function m(h,b,u){return typeof u!="number"&&(u=0),u+b.length>h.length?!1:h.indexOf(b,u)!==-1}n("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),n("ERR_INVALID_ARG_TYPE",function(h,b,u){e===void 0&&(e=t(45408)),e(typeof h=="string","'name' must be a string");var o;typeof b=="string"&&c(b,"not ")?(o="must not be",b=b.replace(/^not /,"")):o="must be";var d;if(l(h," argument"))d="The ".concat(h," ").concat(o," ").concat(f(b,"type"));else{var w=m(h,".")?"property":"argument";d='The "'.concat(h,'" ').concat(w," ").concat(o," ").concat(f(b,"type"))}return d+=". Received type ".concat(g(u)),d},TypeError),n("ERR_INVALID_ARG_VALUE",function(h,b){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";a===void 0&&(a=t(35840));var o=a.inspect(b);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(h,"' ").concat(u,". Received ").concat(o)},TypeError),n("ERR_INVALID_RETURN_VALUE",function(h,b,u){var o;return u&&u.constructor&&u.constructor.name?o="instance of ".concat(u.constructor.name):o="type ".concat(g(u)),"Expected ".concat(h,' to be returned from the "').concat(b,'"')+" function but got ".concat(o,".")},TypeError),n("ERR_MISSING_ARGS",function(){for(var h=arguments.length,b=new Array(h),u=0;u0,"At least one arg needs to be specified");var o="The ",d=b.length;switch(b=b.map(function(w){return'"'.concat(w,'"')}),d){case 1:o+="".concat(b[0]," argument");break;case 2:o+="".concat(b[0]," and ").concat(b[1]," arguments");break;default:o+=b.slice(0,d-1).join(", "),o+=", and ".concat(b[d-1]," arguments");break}return"".concat(o," must be specified")},TypeError),G.exports.codes=r},25116:function(G,U,t){function g(At,mt){return S(At)||i(At,mt)||C()}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function i(At,mt){var Lt=[],Ht=!0,Ut=!1,kt=void 0;try{for(var Vt=At[Symbol.iterator](),It;!(Ht=(It=Vt.next()).done)&&(Lt.push(It.value),!(mt&&Lt.length===mt));Ht=!0);}catch(re){Ut=!0,kt=re}finally{try{!Ht&&Vt.return!=null&&Vt.return()}finally{if(Ut)throw kt}}return Lt}function S(At){if(Array.isArray(At))return At}function x(At){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x=function(Lt){return typeof Lt}:x=function(Lt){return Lt&&typeof Symbol=="function"&&Lt.constructor===Symbol&&Lt!==Symbol.prototype?"symbol":typeof Lt},x(At)}var v=/a/g.flags!==void 0,p=function(mt){var Lt=[];return mt.forEach(function(Ht){return Lt.push(Ht)}),Lt},r=function(mt){var Lt=[];return mt.forEach(function(Ht,Ut){return Lt.push([Ut,Ht])}),Lt},e=Object.is?Object.is:t(39896),a=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},n=Number.isNaN?Number.isNaN:t(1560);function f(At){return At.call.bind(At)}var c=f(Object.prototype.hasOwnProperty),l=f(Object.prototype.propertyIsEnumerable),m=f(Object.prototype.toString),h=t(35840).types,b=h.isAnyArrayBuffer,u=h.isArrayBufferView,o=h.isDate,d=h.isMap,w=h.isRegExp,A=h.isSet,_=h.isNativeError,y=h.isBoxedPrimitive,E=h.isNumberObject,T=h.isStringObject,s=h.isBooleanObject,L=h.isBigIntObject,M=h.isSymbolObject,z=h.isFloat32Array,D=h.isFloat64Array;function N(At){if(At.length===0||At.length>10)return!0;for(var mt=0;mt57)return!0}return At.length===10&&At>=Math.pow(2,32)}function I(At){return Object.keys(At).filter(N).concat(a(At).filter(Object.prototype.propertyIsEnumerable.bind(At)))}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */function k(Ae,me){if(Ae===me)return 0;for(var Le=Ae.length,Ve=me.length,Ue=0,ke=Math.min(Le,Ve);Ue"u"?[]:new Uint8Array(256),i=0;i>2],a+=g[(p[r]&3)<<4|p[r+1]>>4],a+=g[(p[r+1]&15)<<2|p[r+2]>>6],a+=g[p[r+2]&63];return t%3===2?a=a.substring(0,a.length-1)+"=":t%3===1&&(a=a.substring(0,a.length-2)+"=="),a},x=function(v){var p=v.length*.75,r=v.length,t,a=0,n,f,c,l;v[v.length-1]==="="&&(p--,v[v.length-2]==="="&&p--);var m=new ArrayBuffer(p),h=new Uint8Array(m);for(t=0;t>4,h[a++]=(f&15)<<4|c>>2,h[a++]=(c&3)<<6|l&63;return m}},59968:function(H,U){U.byteLength=p,U.toByteArray=t,U.fromByteArray=f;for(var e=[],g=[],C=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=0,x=i.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var m=c.indexOf("=");m===-1&&(m=l);var h=m===l?0:4-m%4;return[m,h]}function p(c){var l=v(c),m=l[0],h=l[1];return(m+h)*3/4-h}function r(c,l,m){return(l+m)*3/4-m}function t(c){var l,m=v(c),h=m[0],b=m[1],u=new C(r(c,h,b)),o=0,d=b>0?h-4:h,w;for(w=0;w>16&255,u[o++]=l>>8&255,u[o++]=l&255;return b===2&&(l=g[c.charCodeAt(w)]<<2|g[c.charCodeAt(w+1)]>>4,u[o++]=l&255),b===1&&(l=g[c.charCodeAt(w)]<<10|g[c.charCodeAt(w+1)]<<4|g[c.charCodeAt(w+2)]>>2,u[o++]=l>>8&255,u[o++]=l&255),u}function a(c){return e[c>>18&63]+e[c>>12&63]+e[c>>6&63]+e[c&63]}function n(c,l,m){for(var h,b=[],u=l;ud?d:o+u));return h===1?(l=c[m-1],b.push(e[l>>2]+e[l<<4&63]+"==")):h===2&&(l=(c[m-2]<<8)+c[m-1],b.push(e[l>>10]+e[l>>4&63]+e[l<<2&63]+"=")),b.join("")}},64928:function(H){function U(x,v,p,r,t){for(var a=t+1;r<=t;){var n=r+t>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c>=0?(a=n,t=n-1):r=n+1}return a}function e(x,v,p,r,t){for(var a=t+1;r<=t;){var n=r+t>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c>0?(a=n,t=n-1):r=n+1}return a}function g(x,v,p,r,t){for(var a=r-1;r<=t;){var n=r+t>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c<0?(a=n,r=n+1):t=n-1}return a}function C(x,v,p,r,t){for(var a=r-1;r<=t;){var n=r+t>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c<=0?(a=n,r=n+1):t=n-1}return a}function i(x,v,p,r,t){for(;r<=t;){var a=r+t>>>1,n=x[a],f=p!==void 0?p(n,v):n-v;if(f===0)return a;f<=0?r=a+1:t=a-1}return-1}function S(x,v,p,r,t,a){return typeof p=="function"?a(x,v,p,r===void 0?0:r|0,t===void 0?x.length-1:t|0):a(x,v,void 0,p===void 0?0:p|0,r===void 0?x.length-1:r|0)}H.exports={ge:function(x,v,p,r,t){return S(x,v,p,r,t,U)},gt:function(x,v,p,r,t){return S(x,v,p,r,t,e)},lt:function(x,v,p,r,t){return S(x,v,p,r,t,g)},le:function(x,v,p,r,t){return S(x,v,p,r,t,C)},eq:function(x,v,p,r,t){return S(x,v,p,r,t,i)}}},308:function(H,U){"use restrict";var e=32;U.INT_BITS=e,U.INT_MAX=2147483647,U.INT_MIN=-1<0)-(i<0)},U.abs=function(i){var S=i>>e-1;return(i^S)-S},U.min=function(i,S){return S^(i^S)&-(i65535)<<4,i>>>=S,x=(i>255)<<3,i>>>=x,S|=x,x=(i>15)<<2,i>>>=x,S|=x,x=(i>3)<<1,i>>>=x,S|=x,S|i>>1},U.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},U.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function g(i){var S=32;return i&=-i,i&&S--,i&65535&&(S-=16),i&16711935&&(S-=8),i&252645135&&(S-=4),i&858993459&&(S-=2),i&1431655765&&(S-=1),S}U.countTrailingZeros=g,U.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},U.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},U.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var C=new Array(256);(function(i){for(var S=0;S<256;++S){var x=S,v=S,p=7;for(x>>>=1;x;x>>>=1)v<<=1,v|=x&1,--p;i[S]=v<>>8&255]<<16|C[i>>>16&255]<<8|C[i>>>24&255]},U.interleave2=function(i,S){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,i|S<<1},U.deinterleave2=function(i,S){return i=i>>>S&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},U.interleave3=function(i,S,x){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,i|=S<<1,x&=1023,x=(x|x<<16)&4278190335,x=(x|x<<8)&251719695,x=(x|x<<4)&3272356035,x=(x|x<<2)&1227133513,i|x<<2},U.deinterleave3=function(i,S){return i=i>>>S&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},U.nextCombination=function(i){var S=i|i-1;return S+1|(~S&-~S)-1>>>g(i)+1}},29620:function(H,U,e){var g=e(32420);H.exports=i;var C=1e20;function i(v,p){p||(p={});var r=p.cutoff==null?.25:p.cutoff,t=p.radius==null?8:p.radius,a=p.channel||0,n,f,c,l,m,h,b,u,o,d,w;if(ArrayBuffer.isView(v)||Array.isArray(v)){if(!p.width||!p.height)throw Error("For raw data width and height should be provided by options");n=p.width,f=p.height,l=v,p.stride?h=p.stride:h=Math.floor(v.length/n/f)}else window.HTMLCanvasElement&&v instanceof window.HTMLCanvasElement?(u=v,b=u.getContext("2d"),n=u.width,f=u.height,o=b.getImageData(0,0,n,f),l=o.data,h=4):window.CanvasRenderingContext2D&&v instanceof window.CanvasRenderingContext2D?(u=v.canvas,b=v,n=u.width,f=u.height,o=b.getImageData(0,0,n,f),l=o.data,h=4):window.ImageData&&v instanceof window.ImageData&&(o=v,n=v.width,f=v.height,l=o.data,h=4);if(c=Math.max(n,f),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(m=l,l=Array(n*f),d=0,w=m.length;d-1?C(p):p}},57916:function(H,U,e){var g=e(8844),C=e(53664),i=e(14500),S=C("%TypeError%"),x=C("%Function.prototype.apply%"),v=C("%Function.prototype.call%"),p=C("%Reflect.apply%",!0)||g.call(v,x),r=C("%Object.defineProperty%",!0),t=C("%Math.max%");if(r)try{r({},"a",{value:1})}catch{r=null}H.exports=function(f){if(typeof f!="function")throw new S("a function is required");var c=p(g,v,arguments);return i(c,1+t(0,f.length-(arguments.length-1)),!0)};var a=function(){return p(g,x,arguments)};r?r(H.exports,"apply",{value:a}):H.exports.apply=a},32420:function(H){H.exports=U;function U(e,g,C){return gC?C:e:eg?g:e}},3808:function(H,U,e){var g=e(32420);H.exports=C,H.exports.to=C,H.exports.from=i;function C(S,x){x==null&&(x=!0);var v=S[0],p=S[1],r=S[2],t=S[3];t==null&&(t=x?1:255),x&&(v*=255,p*=255,r*=255,t*=255),v=g(v,0,255)&255,p=g(p,0,255)&255,r=g(r,0,255)&255,t=g(t,0,255)&255;var a=v*16777216+(p<<16)+(r<<8)+t;return a}function i(S,x){S=+S;var v=S>>>24,p=(S&16711680)>>>16,r=(S&65280)>>>8,t=S&255;return x===!1?[v,p,r,t]:[v/255,p/255,r/255,t/255]}},17592:function(H){H.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},72160:function(H,U,e){var g=e(96824),C=e(32420),i=e(72512);H.exports=function(v,p){(p==="float"||!p)&&(p="array"),p==="uint"&&(p="uint8"),p==="uint_clamped"&&(p="uint8_clamped");var r=i(p),t=new r(4),a=p!=="uint8"&&p!=="uint8_clamped";return(!v.length||typeof v=="string")&&(v=g(v),v[0]/=255,v[1]/=255,v[2]/=255),S(v)?(t[0]=v[0],t[1]=v[1],t[2]=v[2],t[3]=v[3]!=null?v[3]:255,a&&(t[0]/=255,t[1]/=255,t[2]/=255,t[3]/=255),t):(a?(t[0]=v[0],t[1]=v[1],t[2]=v[2],t[3]=v[3]!=null?v[3]:1):(t[0]=C(Math.floor(v[0]*255),0,255),t[1]=C(Math.floor(v[1]*255),0,255),t[2]=C(Math.floor(v[2]*255),0,255),t[3]=v[3]==null?255:C(Math.floor(v[3]*255),0,255)),t)};function S(x){return!!(x instanceof Uint8Array||x instanceof Uint8ClampedArray||Array.isArray(x)&&(x[0]>1||x[0]===0)&&(x[1]>1||x[1]===0)&&(x[2]>1||x[2]===0)&&(!x[3]||x[3]>1))}},96824:function(H,U,e){var g=e(95532),C=e(53576),i=e(32420);H.exports=function(x){var v,p=g(x);return p.space?(v=Array(3),v[0]=i(p.values[0],0,255),v[1]=i(p.values[1],0,255),v[2]=i(p.values[2],0,255),p.space[0]==="h"&&(v=C.rgb(v)),v.push(i(p.alpha,0,1)),v):[]}},95532:function(H,U,e){var g=e(17592);H.exports=i;var C={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function i(S){var x,v=[],p=1,r;if(typeof S=="string")if(S=S.toLowerCase(),g[S])v=g[S].slice(),r="rgb";else if(S==="transparent")p=0,r="rgb",v=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var t=S.slice(1),a=t.length,n=a<=4;p=1,n?(v=[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16)],a===4&&(p=parseInt(t[3]+t[3],16)/255)):(v=[parseInt(t[0]+t[1],16),parseInt(t[2]+t[3],16),parseInt(t[4]+t[5],16)],a===8&&(p=parseInt(t[6]+t[7],16)/255)),v[0]||(v[0]=0),v[1]||(v[1]=0),v[2]||(v[2]=0),r="rgb"}else if(x=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var f=x[1],c=f==="rgb",t=f.replace(/a$/,"");r=t;var a=t==="cmyk"?4:t==="gray"?1:3;v=x[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,b){if(/%$/.test(h))return b===a?parseFloat(h)/100:t==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(t[b]==="h"){if(/deg$/.test(h))return parseFloat(h);if(C[h]!==void 0)return C[h]}return parseFloat(h)}),f===t&&v.push(1),p=c||v[a]===void 0?1:v[a],v=v.slice(0,a)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(v=S.match(/([0-9]+)/g).map(function(l){return parseFloat(l)}),r=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(v=[S[0],S[1],S[2]],r="rgb",p=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(r="rgb",v=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(r="hsl",v=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),p=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(p/=100)):(r="rgb",v=[S>>>16,(S&65280)>>>8,S&255]);return{space:r,values:v,alpha:p}}},53576:function(H,U,e){var g=e(19336);H.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(C){var i=C[0]/360,S=C[1]/100,x=C[2]/100,v,p,r,t,a;if(S===0)return a=x*255,[a,a,a];x<.5?p=x*(1+S):p=x+S-x*S,v=2*x-p,t=[0,0,0];for(var n=0;n<3;n++)r=i+.3333333333333333*-(n-1),r<0?r++:r>1&&r--,6*r<1?a=v+(p-v)*6*r:2*r<1?a=p:3*r<2?a=v+(p-v)*(.6666666666666666-r)*6:a=v,t[n]=a*255;return t}},g.hsl=function(C){var i=C[0]/255,S=C[1]/255,x=C[2]/255,v=Math.min(i,S,x),p=Math.max(i,S,x),r=p-v,t,a,n;return p===v?t=0:i===p?t=(S-x)/r:S===p?t=2+(x-i)/r:x===p&&(t=4+(i-S)/r),t=Math.min(t*60,360),t<0&&(t+=360),n=(v+p)/2,p===v?a=0:n<=.5?a=r/(p+v):a=r/(2-p-v),[t,a*100,n*100]}},19336:function(H){H.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},36116:function(H){H.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},42771:function(H,U,e){H.exports={parse:e(46416),stringify:e(49395)}},8744:function(H,U,e){var g=e(30584);H.exports={isSize:function(i){return/^[\d\.]/.test(i)||i.indexOf("/")!==-1||g.indexOf(i)!==-1}}},46416:function(H,U,e){var g=e(92384),C=e(68194),i=e(3748),S=e(2904),x=e(47916),v=e(7294),p=e(39956),r=e(8744).isSize;H.exports=a;var t=a.cache={};function a(f){if(typeof f!="string")throw new Error("Font argument must be a string.");if(t[f])return t[f];if(f==="")throw new Error("Cannot parse an empty string.");if(i.indexOf(f)!==-1)return t[f]={system:f};for(var c={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},l=p(f,/\s+/),m;m=l.shift();){if(C.indexOf(m)!==-1)return["style","variant","weight","stretch"].forEach(function(b){c[b]=m}),t[f]=c;if(x.indexOf(m)!==-1){c.style=m;continue}if(m==="normal"||m==="small-caps"){c.variant=m;continue}if(v.indexOf(m)!==-1){c.stretch=m;continue}if(S.indexOf(m)!==-1){c.weight=m;continue}if(r(m)){var h=p(m,"/");if(c.size=h[0],h[1]!=null?c.lineHeight=n(h[1]):l[0]==="/"&&(l.shift(),c.lineHeight=n(l.shift())),!l.length)throw new Error("Missing required font-family.");return c.family=p(l.join(" "),/\s*,\s*/).map(g),t[f]=c}throw new Error("Unknown or unsupported font token: "+m)}throw new Error("Missing required font-size.")}function n(f){var c=parseFloat(f);return c.toString()===f?c:f}},49395:function(H,U,e){var g=e(55616),C=e(8744).isSize,i=f(e(68194)),S=f(e(3748)),x=f(e(2904)),v=f(e(47916)),p=f(e(7294)),r={normal:1,"small-caps":1},t={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},a={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};H.exports=function(l){if(l=g(l,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),l.system)return l.system&&n(l.system,S),l.system;if(n(l.style,v),n(l.variant,r),n(l.weight,x),n(l.stretch,p),l.size==null&&(l.size=a.size),typeof l.size=="number"&&(l.size+="px"),!C)throw Error("Bad size value `"+l.size+"`");l.family||(l.family=a.family),Array.isArray(l.family)&&(l.family.length||(l.family=[a.family]),l.family=l.family.map(function(h){return t[h]?h:'"'+h+'"'}).join(", "));var m=[];return m.push(l.style),l.variant!==l.style&&m.push(l.variant),l.weight!==l.variant&&l.weight!==l.style&&m.push(l.weight),l.stretch!==l.weight&&l.stretch!==l.variant&&l.stretch!==l.style&&m.push(l.stretch),m.push(l.size+(l.lineHeight==null||l.lineHeight==="normal"||l.lineHeight+""=="1"?"":"/"+l.lineHeight)),m.push(l.family),m.filter(Boolean).join(" ")};function n(c,l){if(c&&!l[c]&&!i[c])throw Error("Unknown keyword `"+c+"`");return c}function f(c){for(var l={},m=0;mf?1:n>=f?0:NaN}function C(n){return n.length===1&&(n=i(n)),{left:function(f,c,l,m){for(l==null&&(l=0),m==null&&(m=f.length);l>>1;n(f[h],c)<0?l=h+1:m=h}return l},right:function(f,c,l,m){for(l==null&&(l=0),m==null&&(m=f.length);l>>1;n(f[h],c)>0?m=h:l=h+1}return l}}}function i(n){return function(f,c){return g(n(f),c)}}C(g);function S(n,f){var c=n.length,l=-1,m,h;if(f==null){for(;++l=m)for(h=m;++lh&&(h=m)}else for(;++l=m)for(h=m;++lh&&(h=m);return h}function x(n){return n===null?NaN:+n}function v(n,f){var c=n.length,l=c,m=-1,h,b=0;if(f==null)for(;++m=0;)for(b=n[f],c=b.length;--c>=0;)h[--m]=b[c];return h}function r(n,f){var c=n.length,l=-1,m,h;if(f==null){for(;++l=m)for(h=m;++lm&&(h=m)}else for(;++l=m)for(h=m;++lm&&(h=m);return h}function t(n,f,c){n=+n,f=+f,c=(m=arguments.length)<2?(f=n,n=0,1):m<3?1:+c;for(var l=-1,m=Math.max(0,Math.ceil((f-n)/c))|0,h=new Array(m);++l=f.length)return l!=null&&o.sort(l),m!=null?m(o):o;for(var _=-1,y=o.length,E=f[d++],T,s,L=S(),M,z=w();++_f.length)return o;var w,A=c[d-1];return m!=null&&d>=f.length?w=o.entries():(w=[],o.each(function(_,y){w.push({key:y,values:u(_,d)})})),A!=null?w.sort(function(_,y){return A(_.key,y.key)}):w}return h={object:function(o){return b(o,0,v,p)},map:function(o){return b(o,0,r,t)},entries:function(o){return u(b(o,0,r,t),0)},key:function(o){return f.push(o),h},sortKeys:function(o){return c[f.length-1]=o,h},sortValues:function(o){return l=o,h},rollup:function(o){return m=o,h}}}function v(){return{}}function p(f,c,l){f[c]=l}function r(){return S()}function t(f,c,l){f.set(c,l)}function a(){}var n=S.prototype;a.prototype={constructor:a,has:n.has,add:function(f){return f+="",this[g+f]=f,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each}},49812:function(H,U,e){e.r(U),e.d(U,{forceCenter:function(){return g},forceCollide:function(){return L},forceLink:function(){return N},forceManyBody:function(){return He},forceRadial:function(){return Ie},forceSimulation:function(){return ke},forceX:function(){return rt},forceY:function(){return Ke}});function g($e,lt){var ht;$e==null&&($e=0),lt==null&&(lt=0);function dt(){var xt,St=ht.length,nt,ze=0,Ze=0;for(xt=0;xt=(Fe=(ze+Je)/2))?ze=Fe:Je=Fe,(Ne=ht>=(xe=(Ze+We)/2))?Ze=xe:We=xe,xt=St,!(St=St[je=Ne<<1|Me]))return xt[je]=nt,$e;if(ye=+$e._x.call(null,St.data),Ee=+$e._y.call(null,St.data),lt===ye&&ht===Ee)return nt.next=St,xt?xt[je]=nt:$e._root=nt,$e;do xt=xt?xt[je]=new Array(4):$e._root=new Array(4),(Me=lt>=(Fe=(ze+Je)/2))?ze=Fe:Je=Fe,(Ne=ht>=(xe=(Ze+We)/2))?Ze=xe:We=xe;while((je=Ne<<1|Me)===(it=(Ee>=xe)<<1|ye>=Fe));return xt[it]=St,xt[je]=nt,$e}function v($e){var lt,ht,dt=$e.length,xt,St,nt=new Array(dt),ze=new Array(dt),Ze=1/0,Je=1/0,We=-1/0,Fe=-1/0;for(ht=0;htWe&&(We=xt),StFe&&(Fe=St));if(Ze>We||Je>Fe)return this;for(this.cover(Ze,Je).cover(We,Fe),ht=0;ht$e||$e>=xt||dt>lt||lt>=St;)switch(Je=(ltWe||(ze=Ee.y0)>Fe||(Ze=Ee.x1)=je)<<1|$e>=Ne)&&(Ee=xe[xe.length-1],xe[xe.length-1]=xe[xe.length-1-Me],xe[xe.length-1-Me]=Ee)}else{var it=$e-+this._x.call(null,ye.data),mt=lt-+this._y.call(null,ye.data),bt=it*it+mt*mt;if(bt=(xe=(nt+Ze)/2))?nt=xe:Ze=xe,(Me=Fe>=(ye=(ze+Je)/2))?ze=ye:Je=ye,lt=ht,!(ht=ht[Ne=Me<<1|Ee]))return this;if(!ht.length)break;(lt[Ne+1&3]||lt[Ne+2&3]||lt[Ne+3&3])&&(dt=lt,je=Ne)}for(;ht.data!==$e;)if(xt=ht,!(ht=ht.next))return this;return(St=ht.next)&&delete ht.next,xt?(St?xt.next=St:delete xt.next,this):lt?(St?lt[Ne]=St:delete lt[Ne],(ht=lt[0]||lt[1]||lt[2]||lt[3])&&ht===(lt[3]||lt[2]||lt[1]||lt[0])&&!ht.length&&(dt?dt[je]=ht:this._root=ht),this):(this._root=St,this)}function c($e){for(var lt=0,ht=$e.length;ltFe.index){var ir=xe-ct.x-ct.vx,pt=ye-ct.y-ct.vy,Xt=ir*ir+pt*pt;Xtxe+Bt||vtye+Bt||LtZe.r&&(Ze.r=Ze[Je].r)}function ze(){if(lt){var Ze,Je=lt.length,We;for(ht=new Array(Je),Ze=0;Ze=0&&(dt=ht.slice(xt+1),ht=ht.slice(0,xt)),ht&&!lt.hasOwnProperty(ht))throw new Error("unknown type: "+ht);return{type:ht,name:dt}})}B.prototype=k.prototype={constructor:B,on:function($e,lt){var ht=this._,dt=O($e+"",ht),xt,St=-1,nt=dt.length;if(arguments.length<2){for(;++St0)for(var ht=new Array(xt),dt=0,xt,St;dt=0&&$e._call.call(null,lt),$e=$e._next;--te}function we(){Q=(G=$.now())+oe,te=ie=0;try{Te()}finally{te=0,be(),Q=0}}function Re(){var $e=$.now(),lt=$e-G;lt>J&&(oe-=lt,G=$e)}function be(){for(var $e,lt=X,ht,dt=1/0;lt;)lt._call?(dt>lt._time&&(dt=lt._time),$e=lt,lt=lt._next):(ht=lt._next,lt._next=null,lt=$e?$e._next=ht:X=ht);ee=$e,Ae(dt)}function Ae($e){if(!te){ie&&(ie=clearTimeout(ie));var lt=$e-Q;lt>24?($e<1/0&&(ie=setTimeout(we,$e-$.now()-oe)),ue&&(ue=clearInterval(ue))):(ue||(G=$.now(),ue=setInterval(Re,J)),te=1,Z(we))}}function me($e){return $e.x}function Le($e){return $e.y}var Ve=10,Ue=Math.PI*(3-Math.sqrt(5));function ke($e){var lt,ht=1,dt=.001,xt=1-Math.pow(dt,1/300),St=0,nt=.6,ze=(0,M.kH)(),Ze=ge(We),Je=j("tick","end");$e==null&&($e=[]);function We(){Fe(),Je.call("tick",lt),ht1?(Me==null?ze.remove(Ee):ze.set(Ee,ye(Me)),lt):ze.get(Ee)},find:function(Ee,Me,Ne){var je=0,it=$e.length,mt,bt,vt,Lt,ct;for(Ne==null?Ne=1/0:Ne*=Ne,je=0;je1?(Je.on(Ee,Me),lt):Je.on(Ee)}}}function He(){var $e,lt,ht,dt=C(-30),xt,St=1,nt=1/0,ze=.81;function Ze(xe){var ye,Ee=$e.length,Me=A($e,me,Le).visitAfter(We);for(ht=xe,ye=0;ye=nt)return;(xe.data!==lt||xe.next)&&(Ne===0&&(Ne=i(),mt+=Ne*Ne),je===0&&(je=i(),mt+=je*je),mt=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)}function C(w,A){if((_=(w=A?w.toExponential(A-1):w.toExponential()).indexOf("e"))<0)return null;var _,y=w.slice(0,_);return[y.length>1?y[0]+y.slice(2):y,+w.slice(_+1)]}function i(w){return w=C(Math.abs(w)),w?w[1]:NaN}function S(w,A){return function(_,y){for(var E=_.length,T=[],s=0,L=w[0],M=0;E>0&&L>0&&(M+L+1>y&&(L=Math.max(1,y-M)),T.push(_.substring(E-=L,E+L)),!((M+=L+1)>y));)L=w[s=(s+1)%w.length];return T.reverse().join(A)}}function x(w){return function(A){return A.replace(/[0-9]/g,function(_){return w[+_]})}}var v=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function p(w){if(!(A=v.exec(w)))throw new Error("invalid format: "+w);var A;return new r({fill:A[1],align:A[2],sign:A[3],symbol:A[4],zero:A[5],width:A[6],comma:A[7],precision:A[8]&&A[8].slice(1),trim:A[9],type:A[10]})}p.prototype=r.prototype;function r(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function t(w){e:for(var A=w.length,_=1,y=-1,E;_0&&(y=0);break}return y>0?w.slice(0,y)+w.slice(E+1):w}var a;function n(w,A){var _=C(w,A);if(!_)return w+"";var y=_[0],E=_[1],T=E-(a=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,s=y.length;return T===s?y:T>s?y+new Array(T-s+1).join("0"):T>0?y.slice(0,T)+"."+y.slice(T):"0."+new Array(1-T).join("0")+C(w,Math.max(0,A+T-1))[0]}function f(w,A){var _=C(w,A);if(!_)return w+"";var y=_[0],E=_[1];return E<0?"0."+new Array(-E).join("0")+y:y.length>E+1?y.slice(0,E+1)+"."+y.slice(E+1):y+new Array(E-y.length+2).join("0")}var c={"%":function(w,A){return(w*100).toFixed(A)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:g,e:function(w,A){return w.toExponential(A)},f:function(w,A){return w.toFixed(A)},g:function(w,A){return w.toPrecision(A)},o:function(w){return Math.round(w).toString(8)},p:function(w,A){return f(w*100,A)},r:f,s:n,X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function l(w){return w}var m=Array.prototype.map,h=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function b(w){var A=w.grouping===void 0||w.thousands===void 0?l:S(m.call(w.grouping,Number),w.thousands+""),_=w.currency===void 0?"":w.currency[0]+"",y=w.currency===void 0?"":w.currency[1]+"",E=w.decimal===void 0?".":w.decimal+"",T=w.numerals===void 0?l:x(m.call(w.numerals,String)),s=w.percent===void 0?"%":w.percent+"",L=w.minus===void 0?"-":w.minus+"",M=w.nan===void 0?"NaN":w.nan+"";function z(N){N=p(N);var I=N.fill,k=N.align,B=N.sign,O=N.symbol,V=N.zero,Y=N.width,j=N.comma,te=N.precision,ie=N.trim,ue=N.type;ue==="n"?(j=!0,ue="g"):c[ue]||(te===void 0&&(te=12),ie=!0,ue="g"),(V||I==="0"&&k==="=")&&(V=!0,I="0",k="=");var J=O==="$"?_:O==="#"&&/[boxX]/.test(ue)?"0"+ue.toLowerCase():"",X=O==="$"?y:/[%p]/.test(ue)?s:"",ee=c[ue],G=/[defgprs%]/.test(ue);te=te===void 0?6:/[gprs]/.test(ue)?Math.max(1,Math.min(21,te)):Math.max(0,Math.min(20,te));function Q(oe){var $=J,Z=X,se,ne,ce;if(ue==="c")Z=ee(oe)+Z,oe="";else{oe=+oe;var ge=oe<0||1/oe<0;if(oe=isNaN(oe)?M:ee(Math.abs(oe),te),ie&&(oe=t(oe)),ge&&+oe==0&&B!=="+"&&(ge=!1),$=(ge?B==="("?B:L:B==="-"||B==="("?"":B)+$,Z=(ue==="s"?h[8+a/3]:"")+Z+(ge&&B==="("?")":""),G){for(se=-1,ne=oe.length;++sece||ce>57){Z=(ce===46?E+oe.slice(se+1):oe.slice(se))+Z,oe=oe.slice(0,se);break}}}j&&!V&&(oe=A(oe,1/0));var Te=$.length+oe.length+Z.length,we=Te>1)+$+oe+Z+we.slice(Te);break;default:oe=we+$+oe+Z;break}return T(oe)}return Q.toString=function(){return N+""},Q}function D(N,I){var k=z((N=p(N),N.type="f",N)),B=Math.max(-8,Math.min(8,Math.floor(i(I)/3)))*3,O=Math.pow(10,-B),V=h[8+B/3];return function(Y){return k(O*Y)+V}}return{format:z,formatPrefix:D}}var u,o;d({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function d(w){return u=b(w),o=u.format,u.formatPrefix,u}},87108:function(H,U,e){e.r(U),e.d(U,{geoAiry:function(){return V},geoAiryRaw:function(){return O},geoAitoff:function(){return j},geoAitoffRaw:function(){return Y},geoArmadillo:function(){return ie},geoArmadilloRaw:function(){return te},geoAugust:function(){return J},geoAugustRaw:function(){return ue},geoBaker:function(){return Q},geoBakerRaw:function(){return G},geoBerghaus:function(){return Z},geoBerghausRaw:function(){return $},geoBertin1953:function(){return be},geoBertin1953Raw:function(){return Re},geoBoggs:function(){return Ie},geoBoggsRaw:function(){return He},geoBonne:function(){return ht},geoBonneRaw:function(){return lt},geoBottomley:function(){return xt},geoBottomleyRaw:function(){return dt},geoBromley:function(){return nt},geoBromleyRaw:function(){return St},geoChamberlin:function(){return Me},geoChamberlinAfrica:function(){return Ee},geoChamberlinRaw:function(){return xe},geoCollignon:function(){return je},geoCollignonRaw:function(){return Ne},geoCraig:function(){return mt},geoCraigRaw:function(){return it},geoCraster:function(){return Lt},geoCrasterRaw:function(){return vt},geoCylindricalEqualArea:function(){return Tt},geoCylindricalEqualAreaRaw:function(){return ct},geoCylindricalStereographic:function(){return ir},geoCylindricalStereographicRaw:function(){return Bt},geoEckert1:function(){return Xt},geoEckert1Raw:function(){return pt},geoEckert2:function(){return or},geoEckert2Raw:function(){return Kt},geoEckert3:function(){return gt},geoEckert3Raw:function(){return $t},geoEckert4:function(){return At},geoEckert4Raw:function(){return st},geoEckert5:function(){return It},geoEckert5Raw:function(){return Ct},geoEckert6:function(){return kt},geoEckert6Raw:function(){return Pt},geoEisenlohr:function(){return ur},geoEisenlohrRaw:function(){return Jt},geoFahey:function(){return Ye},geoFaheyRaw:function(){return vr},geoFoucaut:function(){return Nt},geoFoucautRaw:function(){return Ge},geoFoucautSinusoidal:function(){return Qt},geoFoucautSinusoidalRaw:function(){return Ot},geoGilbert:function(){return dr},geoGingery:function(){return Gr},geoGingeryRaw:function(){return mr},geoGinzburg4:function(){return cn},geoGinzburg4Raw:function(){return Dr},geoGinzburg5:function(){return Cn},geoGinzburg5Raw:function(){return rn},geoGinzburg6:function(){return Tr},geoGinzburg6Raw:function(){return En},geoGinzburg8:function(){return Wr},geoGinzburg8Raw:function(){return Cr},geoGinzburg9:function(){return an},geoGinzburg9Raw:function(){return Ur},geoGringorten:function(){return ni},geoGringortenQuincuncial:function(){return Ic},geoGringortenRaw:function(){return gn},geoGuyou:function(){return dn},geoGuyouRaw:function(){return wr},geoHammer:function(){return ge},geoHammerRaw:function(){return ne},geoHammerRetroazimuthal:function(){return Bn},geoHammerRetroazimuthalRaw:function(){return Tn},geoHealpix:function(){return sn},geoHealpixRaw:function(){return Ar},geoHill:function(){return Zr},geoHillRaw:function(){return Er},geoHomolosine:function(){return Un},geoHomolosineRaw:function(){return Pn},geoHufnagel:function(){return mi},geoHufnagelRaw:function(){return On},geoHyperelliptical:function(){return pa},geoHyperellipticalRaw:function(){return Ci},geoInterrupt:function(){return Qa},geoInterruptedBoggs:function(){return Nu},geoInterruptedHomolosine:function(){return $i},geoInterruptedMollweide:function(){return Bu},geoInterruptedMollweideHemispheres:function(){return ho},geoInterruptedQuarticAuthalic:function(){return Ls},geoInterruptedSinuMollweide:function(){return vu},geoInterruptedSinusoidal:function(){return ll},geoKavrayskiy7:function(){return Ua},geoKavrayskiy7Raw:function(){return za},geoLagrange:function(){return $a},geoLagrangeRaw:function(){return ul},geoLarrivee:function(){return wf},geoLarriveeRaw:function(){return _o},geoLaskowski:function(){return xc},geoLaskowskiRaw:function(){return bo},geoLittrow:function(){return Za},geoLittrowRaw:function(){return es},geoLoximuthal:function(){return Cs},geoLoximuthalRaw:function(){return Uu},geoMiller:function(){return Vu},geoMillerRaw:function(){return ts},geoModifiedStereographic:function(){return Ys},geoModifiedStereographicAlaska:function(){return Hu},geoModifiedStereographicGs48:function(){return Mc},geoModifiedStereographicGs50:function(){return Sc},geoModifiedStereographicLee:function(){return Mf},geoModifiedStereographicMiller:function(){return Af},geoModifiedStereographicRaw:function(){return Tf},geoMollweide:function(){return Ve},geoMollweideRaw:function(){return Le},geoMtFlatPolarParabolic:function(){return Sf},geoMtFlatPolarParabolicRaw:function(){return kl},geoMtFlatPolarQuartic:function(){return Ec},geoMtFlatPolarQuarticRaw:function(){return vs},geoMtFlatPolarSinusoidal:function(){return Ef},geoMtFlatPolarSinusoidalRaw:function(){return pu},geoNaturalEarth:function(){return _f.c},geoNaturalEarth2:function(){return Uo},geoNaturalEarth2Raw:function(){return gu},geoNaturalEarthRaw:function(){return _f.g},geoNellHammer:function(){return Xs},geoNellHammerRaw:function(){return cl},geoNicolosi:function(){return Gu},geoNicolosiRaw:function(){return rs},geoPatterson:function(){return pl},geoPattersonRaw:function(){return yu},geoPeirceQuincuncial:function(){return If},geoPierceQuincuncial:function(){return If},geoPolyconic:function(){return Cc},geoPolyconicRaw:function(){return xu},geoPolyhedral:function(){return ga},geoPolyhedralButterfly:function(){return Bl},geoPolyhedralCollignon:function(){return js},geoPolyhedralWaterman:function(){return Rs},geoProject:function(){return Rc},geoQuantize:function(){return Ff},geoQuincuncial:function(){return gs},geoRectangularPolyconic:function(){return zf},geoRectangularPolyconicRaw:function(){return Ju},geoRobinson:function(){return Ds},geoRobinsonRaw:function(){return Xo},geoSatellite:function(){return Ks},geoSatelliteRaw:function(){return Au},geoSinuMollweide:function(){return Ln},geoSinuMollweideRaw:function(){return wn},geoSinusoidal:function(){return $e},geoSinusoidalRaw:function(){return Ke},geoStitch:function(){return Xl},geoTimes:function(){return Va},geoTimesRaw:function(){return zs},geoTwoPointAzimuthal:function(){return Eu},geoTwoPointAzimuthalRaw:function(){return $u},geoTwoPointAzimuthalUsa:function(){return Qs},geoTwoPointEquidistant:function(){return Nf},geoTwoPointEquidistantRaw:function(){return Zl},geoTwoPointEquidistantUsa:function(){return Fc},geoVanDerGrinten:function(){return jl},geoVanDerGrinten2:function(){return Bf},geoVanDerGrinten2Raw:function(){return Sl},geoVanDerGrinten3:function(){return zc},geoVanDerGrinten3Raw:function(){return ks},geoVanDerGrinten4:function(){return Kl},geoVanDerGrinten4Raw:function(){return To},geoVanDerGrintenRaw:function(){return lo},geoWagner:function(){return Os},geoWagner4:function(){return Uf},geoWagner4Raw:function(){return Cu},geoWagner6:function(){return ef},geoWagner6Raw:function(){return $l},geoWagner7:function(){return qu},geoWagnerRaw:function(){return xs},geoWiechel:function(){return tf},geoWiechelRaw:function(){return $s},geoWinkel3:function(){return Vf},geoWinkel3Raw:function(){return ql}});var g=e(87952),C=Math.abs,i=Math.atan,S=Math.atan2,x=Math.cos,v=Math.exp,p=Math.floor,r=Math.log,t=Math.max,a=Math.min,n=Math.pow,f=Math.round,c=Math.sign||function(qe){return qe>0?1:qe<0?-1:0},l=Math.sin,m=Math.tan,h=1e-6,b=1e-12,u=Math.PI,o=u/2,d=u/4,w=Math.SQRT1_2,A=z(2),_=z(u),y=u*2,E=180/u,T=u/180;function s(qe){return qe?qe/Math.sin(qe):1}function L(qe){return qe>1?o:qe<-1?-o:Math.asin(qe)}function M(qe){return qe>1?0:qe<-1?u:Math.acos(qe)}function z(qe){return qe>0?Math.sqrt(qe):0}function D(qe){return qe=v(2*qe),(qe-1)/(qe+1)}function N(qe){return(v(qe)-v(-qe))/2}function I(qe){return(v(qe)+v(-qe))/2}function k(qe){return r(qe+z(qe*qe+1))}function B(qe){return r(qe+z(qe*qe-1))}function O(qe){var ot=m(qe/2),wt=2*r(x(qe/2))/(ot*ot);function Mt(Ut,zt){var Gt=x(Ut),gr=x(zt),br=l(zt),sr=gr*Gt,Mr=-((1-sr?r((1+sr)/2)/(1-sr):-.5)+wt/(1+sr));return[Mr*gr*l(Ut),Mr*br]}return Mt.invert=function(Ut,zt){var Gt=z(Ut*Ut+zt*zt),gr=-qe/2,br=50,sr;if(!Gt)return[0,0];do{var Mr=gr/2,Ir=x(Mr),Nr=l(Mr),tn=Nr/Ir,yn=-r(C(Ir));gr-=sr=(2/tn*yn-wt*tn-Gt)/(-yn/(Nr*Nr)+1-wt/(2*Ir*Ir))*(Ir<0?.7:1)}while(C(sr)>h&&--br>0);var Rn=l(gr);return[S(Ut*Rn,Gt*x(gr)),L(zt*Rn/Gt)]},Mt}function V(){var qe=o,ot=(0,g.U)(O),wt=ot(qe);return wt.radius=function(Mt){return arguments.length?ot(qe=Mt*T):qe*E},wt.scale(179.976).clipAngle(147)}function Y(qe,ot){var wt=x(ot),Mt=s(M(wt*x(qe/=2)));return[2*wt*l(qe)*Mt,l(ot)*Mt]}Y.invert=function(qe,ot){if(!(qe*qe+4*ot*ot>u*u+h)){var wt=qe,Mt=ot,Ut=25;do{var zt=l(wt),Gt=l(wt/2),gr=x(wt/2),br=l(Mt),sr=x(Mt),Mr=l(2*Mt),Ir=br*br,Nr=sr*sr,tn=Gt*Gt,yn=1-Nr*gr*gr,Rn=yn?M(sr*gr)*z(Dn=1/yn):Dn=0,Dn,Zn=2*Rn*sr*Gt-qe,Li=Rn*br-ot,Pi=Dn*(Nr*tn+Rn*sr*gr*Ir),Ri=Dn*(.5*zt*Mr-Rn*2*br*Gt),zi=Dn*.25*(Mr*Gt-Rn*br*Nr*zt),Xi=Dn*(Ir*gr+Rn*tn*sr),va=Ri*zi-Xi*Pi;if(!va)break;var Ia=(Li*Ri-Zn*Xi)/va,fe=(Zn*zi-Li*Pi)/va;wt-=Ia,Mt-=fe}while((C(Ia)>h||C(fe)>h)&&--Ut>0);return[wt,Mt]}};function j(){return(0,g.c)(Y).scale(152.63)}function te(qe){var ot=l(qe),wt=x(qe),Mt=qe>=0?1:-1,Ut=m(Mt*qe),zt=(1+ot-wt)/2;function Gt(gr,br){var sr=x(br),Mr=x(gr/=2);return[(1+sr)*l(gr),(Mt*br>-S(Mr,Ut)-.001?0:-Mt*10)+zt+l(br)*wt-(1+sr)*ot*Mr]}return Gt.invert=function(gr,br){var sr=0,Mr=0,Ir=50;do{var Nr=x(sr),tn=l(sr),yn=x(Mr),Rn=l(Mr),Dn=1+yn,Zn=Dn*tn-gr,Li=zt+Rn*wt-Dn*ot*Nr-br,Pi=Dn*Nr/2,Ri=-tn*Rn,zi=ot*Dn*tn/2,Xi=wt*yn+ot*Nr*Rn,va=Ri*zi-Xi*Pi,Ia=(Li*Ri-Zn*Xi)/va/2,fe=(Zn*zi-Li*Pi)/va;C(fe)>2&&(fe/=2),sr-=Ia,Mr-=fe}while((C(Ia)>h||C(fe)>h)&&--Ir>0);return Mt*Mr>-S(x(sr),Ut)-.001?[sr*2,Mr]:null},Gt}function ie(){var qe=20*T,ot=qe>=0?1:-1,wt=m(ot*qe),Mt=(0,g.U)(te),Ut=Mt(qe),zt=Ut.stream;return Ut.parallel=function(Gt){return arguments.length?(wt=m((ot=(qe=Gt*T)>=0?1:-1)*qe),Mt(qe)):qe*E},Ut.stream=function(Gt){var gr=Ut.rotate(),br=zt(Gt),sr=(Ut.rotate([0,0]),zt(Gt)),Mr=Ut.precision();return Ut.rotate(gr),br.sphere=function(){sr.polygonStart(),sr.lineStart();for(var Ir=ot*-180;ot*Ir<180;Ir+=ot*90)sr.point(Ir,ot*90);if(qe)for(;ot*(Ir-=3*ot*Mr)>=-180;)sr.point(Ir,ot*-S(x(Ir*T/2),wt)*E);sr.lineEnd(),sr.polygonEnd()},br},Ut.scale(218.695).center([0,28.0974])}function ue(qe,ot){var wt=m(ot/2),Mt=z(1-wt*wt),Ut=1+Mt*x(qe/=2),zt=l(qe)*Mt/Ut,Gt=wt/Ut,gr=zt*zt,br=Gt*Gt;return[1.3333333333333333*zt*(3+gr-3*br),1.3333333333333333*Gt*(3+3*gr-br)]}ue.invert=function(qe,ot){if(qe*=.375,ot*=.375,!qe&&C(ot)>1)return null;var wt=qe*qe,Mt=ot*ot,Ut=1+wt+Mt,zt=z((Ut-z(Ut*Ut-4*ot*ot))/2),Gt=L(zt)/3,gr=zt?B(C(ot/zt))/3:k(C(qe))/3,br=x(Gt),sr=I(gr),Mr=sr*sr-br*br;return[c(qe)*2*S(N(gr)*br,.25-Mr),c(ot)*2*S(sr*l(Gt),.25+Mr)]};function J(){return(0,g.c)(ue).scale(66.1603)}var X=z(8),ee=r(1+A);function G(qe,ot){var wt=C(ot);return wtb&&--Mt>0);return[qe/(x(wt)*(X-1/l(wt))),c(ot)*wt]};function Q(){return(0,g.c)(G).scale(112.314)}var oe=e(69020);function $(qe){var ot=2*u/qe;function wt(Mt,Ut){var zt=(0,oe.O)(Mt,Ut);if(C(Mt)>o){var Gt=S(zt[1],zt[0]),gr=z(zt[0]*zt[0]+zt[1]*zt[1]),br=ot*f((Gt-o)/ot)+o,sr=S(l(Gt-=br),2-x(Gt));Gt=br+L(u/gr*l(sr))-sr,zt[0]=gr*x(Gt),zt[1]=gr*l(Gt)}return zt}return wt.invert=function(Mt,Ut){var zt=z(Mt*Mt+Ut*Ut);if(zt>o){var Gt=S(Ut,Mt),gr=ot*f((Gt-o)/ot)+o,br=Gt>gr?-1:1,sr=zt*x(gr-Gt),Mr=1/m(br*M((sr-u)/z(u*(u-2*sr)+zt*zt)));Gt=gr+2*i((Mr+br*z(Mr*Mr-3))/3),Mt=zt*x(Gt),Ut=zt*l(Gt)}return oe.O.invert(Mt,Ut)},wt}function Z(){var qe=5,ot=(0,g.U)($),wt=ot(qe),Mt=wt.stream,Ut=.01,zt=-x(Ut*T),Gt=l(Ut*T);return wt.lobes=function(gr){return arguments.length?ot(qe=+gr):qe},wt.stream=function(gr){var br=wt.rotate(),sr=Mt(gr),Mr=(wt.rotate([0,0]),Mt(gr));return wt.rotate(br),sr.sphere=function(){Mr.polygonStart(),Mr.lineStart();for(var Ir=0,Nr=360/qe,tn=2*u/qe,yn=90-180/qe,Rn=o;Ir0&&C(Ut)>h);return Mt<0?NaN:wt}function we(qe,ot,wt){return ot===void 0&&(ot=40),wt===void 0&&(wt=b),function(Mt,Ut,zt,Gt){var gr,br,sr;zt=zt===void 0?0:+zt,Gt=Gt===void 0?0:+Gt;for(var Mr=0;Mrgr){zt-=br/=2,Gt-=sr/=2;continue}gr=yn;var Rn=(zt>0?-1:1)*wt,Dn=(Gt>0?-1:1)*wt,Zn=qe(zt+Rn,Gt),Li=qe(zt,Gt+Dn),Pi=(Zn[0]-Ir[0])/Rn,Ri=(Zn[1]-Ir[1])/Rn,zi=(Li[0]-Ir[0])/Dn,Xi=(Li[1]-Ir[1])/Dn,va=Xi*Pi-Ri*zi,Ia=(C(va)<.5?.5:1)/va;if(br=(tn*zi-Nr*Xi)*Ia,sr=(Nr*Ri-tn*Pi)*Ia,zt+=br,Gt+=sr,C(br)0&&(gr[1]*=1+br/1.5*gr[0]*gr[0]),gr}return Mt.invert=we(Mt),Mt}function be(){return(0,g.c)(Re()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ae(qe,ot){var wt=qe*l(ot),Mt=30,Ut;do ot-=Ut=(ot+l(ot)-wt)/(1+x(ot));while(C(Ut)>h&&--Mt>0);return ot/2}function me(qe,ot,wt){function Mt(Ut,zt){return[qe*Ut*x(zt=Ae(wt,zt)),ot*l(zt)]}return Mt.invert=function(Ut,zt){return zt=L(zt/ot),[Ut/(qe*x(zt)),L((2*zt+l(2*zt))/wt)]},Mt}var Le=me(A/o,A,u);function Ve(){return(0,g.c)(Le).scale(169.529)}var Ue=2.00276,ke=1.11072;function He(qe,ot){var wt=Ae(u,ot);return[Ue*qe/(1/x(ot)+ke/x(wt)),(ot+A*l(wt))/Ue]}He.invert=function(qe,ot){var wt=Ue*ot,Mt=ot<0?-d:d,Ut=25,zt,Gt;do Gt=wt-A*l(Mt),Mt-=zt=(l(2*Mt)+2*Mt-u*l(Gt))/(2*x(2*Mt)+2+u*x(Gt)*A*x(Mt));while(C(zt)>h&&--Ut>0);return Gt=wt-A*l(Mt),[qe*(1/x(Gt)+ke/x(Mt))/Ue,Gt]};function Ie(){return(0,g.c)(He).scale(160.857)}function rt(qe){var ot=0,wt=(0,g.U)(qe),Mt=wt(ot);return Mt.parallel=function(Ut){return arguments.length?wt(ot=Ut*T):ot*E},Mt}function Ke(qe,ot){return[qe*x(ot),ot]}Ke.invert=function(qe,ot){return[qe/x(ot),ot]};function $e(){return(0,g.c)(Ke).scale(152.63)}function lt(qe){if(!qe)return Ke;var ot=1/m(qe);function wt(Mt,Ut){var zt=ot+qe-Ut,Gt=zt&&Mt*x(Ut)/zt;return[zt*l(Gt),ot-zt*x(Gt)]}return wt.invert=function(Mt,Ut){var zt=z(Mt*Mt+(Ut=ot-Ut)*Ut),Gt=ot+qe-zt;return[zt/x(Gt)*S(Mt,Ut),Gt]},wt}function ht(){return rt(lt).scale(123.082).center([0,26.1441]).parallel(45)}function dt(qe){function ot(wt,Mt){var Ut=o-Mt,zt=Ut&&wt*qe*l(Ut)/Ut;return[Ut*l(zt)/qe,o-Ut*x(zt)]}return ot.invert=function(wt,Mt){var Ut=wt*qe,zt=o-Mt,Gt=z(Ut*Ut+zt*zt),gr=S(Ut,zt);return[(Gt?Gt/l(Gt):1)*gr/qe,o-Gt]},ot}function xt(){var qe=.5,ot=(0,g.U)(dt),wt=ot(qe);return wt.fraction=function(Mt){return arguments.length?ot(qe=+Mt):qe},wt.scale(158.837)}var St=me(1,4/u,u);function nt(){return(0,g.c)(St).scale(152.63)}var ze=e(24052),Ze=e(92992);function Je(qe,ot,wt,Mt,Ut,zt){var Gt=x(zt),gr;if(C(qe)>1||C(zt)>1)gr=M(wt*Ut+ot*Mt*Gt);else{var br=l(qe/2),sr=l(zt/2);gr=2*L(z(br*br+ot*Mt*sr*sr))}return C(gr)>h?[gr,S(Mt*l(zt),ot*Ut-wt*Mt*Gt)]:[0,0]}function We(qe,ot,wt){return M((qe*qe+ot*ot-wt*wt)/(2*qe*ot))}function Fe(qe){return qe-2*u*p((qe+u)/(2*u))}function xe(qe,ot,wt){for(var Mt=[[qe[0],qe[1],l(qe[1]),x(qe[1])],[ot[0],ot[1],l(ot[1]),x(ot[1])],[wt[0],wt[1],l(wt[1]),x(wt[1])]],Ut=Mt[2],zt,Gt=0;Gt<3;++Gt,Ut=zt)zt=Mt[Gt],Ut.v=Je(zt[1]-Ut[1],Ut[3],Ut[2],zt[3],zt[2],zt[0]-Ut[0]),Ut.point=[0,0];var gr=We(Mt[0].v[0],Mt[2].v[0],Mt[1].v[0]),br=We(Mt[0].v[0],Mt[1].v[0],Mt[2].v[0]),sr=u-gr;Mt[2].point[1]=0,Mt[0].point[0]=-(Mt[1].point[0]=Mt[0].v[0]/2);var Mr=[Mt[2].point[0]=Mt[0].point[0]+Mt[2].v[0]*x(gr),2*(Mt[0].point[1]=Mt[1].point[1]=Mt[2].v[0]*l(gr))];function Ir(Nr,tn){var yn=l(tn),Rn=x(tn),Dn=new Array(3),Zn;for(Zn=0;Zn<3;++Zn){var Li=Mt[Zn];if(Dn[Zn]=Je(tn-Li[1],Li[3],Li[2],Rn,yn,Nr-Li[0]),!Dn[Zn][0])return Li.point;Dn[Zn][1]=Fe(Dn[Zn][1]-Li.v[1])}var Pi=Mr.slice();for(Zn=0;Zn<3;++Zn){var Ri=Zn==2?0:Zn+1,zi=We(Mt[Zn].v[0],Dn[Zn][0],Dn[Ri][0]);Dn[Zn][1]<0&&(zi=-zi),Zn?Zn==1?(zi=br-zi,Pi[0]-=Dn[Zn][0]*x(zi),Pi[1]-=Dn[Zn][0]*l(zi)):(zi=sr-zi,Pi[0]+=Dn[Zn][0]*x(zi),Pi[1]+=Dn[Zn][0]*l(zi)):(Pi[0]+=Dn[Zn][0]*x(zi),Pi[1]-=Dn[Zn][0]*l(zi))}return Pi[0]/=3,Pi[1]/=3,Pi}return Ir}function ye(qe){return qe[0]*=T,qe[1]*=T,qe}function Ee(){return Me([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Me(qe,ot,wt){var Mt=(0,ze.c)({type:"MultiPoint",coordinates:[qe,ot,wt]}),Ut=[-Mt[0],-Mt[1]],zt=(0,Ze.c)(Ut),Gt=xe(ye(zt(qe)),ye(zt(ot)),ye(zt(wt)));Gt.invert=we(Gt);var gr=(0,g.c)(Gt).rotate(Ut),br=gr.center;return delete gr.rotate,gr.center=function(sr){return arguments.length?br(zt(sr)):zt.invert(br())},gr.clipAngle(90)}function Ne(qe,ot){var wt=z(1-l(ot));return[2/_*qe*wt,_*(1-wt)]}Ne.invert=function(qe,ot){var wt=(wt=ot/_-1)*wt;return[wt>0?qe*z(u/wt)/2:0,L(1-wt)]};function je(){return(0,g.c)(Ne).scale(95.6464).center([0,30])}function it(qe){var ot=m(qe);function wt(Mt,Ut){return[Mt,(Mt?Mt/l(Mt):1)*(l(Ut)*x(Mt)-ot*x(Ut))]}return wt.invert=ot?function(Mt,Ut){Mt&&(Ut*=l(Mt)/Mt);var zt=x(Mt);return[Mt,2*S(z(zt*zt+ot*ot-Ut*Ut)-zt,ot-Ut)]}:function(Mt,Ut){return[Mt,L(Mt?Ut*m(Mt)/Mt:Ut)]},wt}function mt(){return rt(it).scale(249.828).clipAngle(90)}var bt=z(3);function vt(qe,ot){return[bt*qe*(2*x(2*ot/3)-1)/_,bt*_*l(ot/3)]}vt.invert=function(qe,ot){var wt=3*L(ot/(bt*_));return[_*qe/(bt*(2*x(2*wt/3)-1)),wt]};function Lt(){return(0,g.c)(vt).scale(156.19)}function ct(qe){var ot=x(qe);function wt(Mt,Ut){return[Mt*ot,l(Ut)/ot]}return wt.invert=function(Mt,Ut){return[Mt/ot,L(Ut*ot)]},wt}function Tt(){return rt(ct).parallel(38.58).scale(195.044)}function Bt(qe){var ot=x(qe);function wt(Mt,Ut){return[Mt*ot,(1+ot)*m(Ut/2)]}return wt.invert=function(Mt,Ut){return[Mt/ot,i(Ut/(1+ot))*2]},wt}function ir(){return rt(Bt).scale(124.75)}function pt(qe,ot){var wt=z(8/(3*u));return[wt*qe*(1-C(ot)/u),wt*ot]}pt.invert=function(qe,ot){var wt=z(8/(3*u)),Mt=ot/wt;return[qe/(wt*(1-C(Mt)/u)),Mt]};function Xt(){return(0,g.c)(pt).scale(165.664)}function Kt(qe,ot){var wt=z(4-3*l(C(ot)));return[2/z(6*u)*qe*wt,c(ot)*z(2*u/3)*(2-wt)]}Kt.invert=function(qe,ot){var wt=2-C(ot)/z(2*u/3);return[qe*z(6*u)/(2*wt),c(ot)*L((4-wt*wt)/3)]};function or(){return(0,g.c)(Kt).scale(165.664)}function $t(qe,ot){var wt=z(u*(4+u));return[2/wt*qe*(1+z(1-4*ot*ot/(u*u))),4/wt*ot]}$t.invert=function(qe,ot){var wt=z(u*(4+u))/2;return[qe*wt/(1+z(1-ot*ot*(4+u)/(4*u))),ot*wt/2]};function gt(){return(0,g.c)($t).scale(180.739)}function st(qe,ot){var wt=(2+o)*l(ot);ot/=2;for(var Mt=0,Ut=1/0;Mt<10&&C(Ut)>h;Mt++){var zt=x(ot);ot-=Ut=(ot+l(ot)*(zt+2)-wt)/(2*zt*(1+zt))}return[2/z(u*(4+u))*qe*(1+x(ot)),2*z(u/(4+u))*l(ot)]}st.invert=function(qe,ot){var wt=ot*z((4+u)/u)/2,Mt=L(wt),Ut=x(Mt);return[qe/(2/z(u*(4+u))*(1+Ut)),L((Mt+wt*(Ut+2))/(2+o))]};function At(){return(0,g.c)(st).scale(180.739)}function Ct(qe,ot){return[qe*(1+x(ot))/z(2+u),2*ot/z(2+u)]}Ct.invert=function(qe,ot){var wt=z(2+u),Mt=ot*wt/2;return[wt*qe/(1+x(Mt)),Mt]};function It(){return(0,g.c)(Ct).scale(173.044)}function Pt(qe,ot){for(var wt=(1+o)*l(ot),Mt=0,Ut=1/0;Mt<10&&C(Ut)>h;Mt++)ot-=Ut=(ot+l(ot)-wt)/(1+x(ot));return wt=z(2+u),[qe*(1+x(ot))/wt,2*ot/wt]}Pt.invert=function(qe,ot){var wt=1+o,Mt=z(wt/2);return[qe*2*Mt/(1+x(ot*=Mt)),L((ot+l(ot))/wt)]};function kt(){return(0,g.c)(Pt).scale(173.044)}var Ht=3+2*A;function Jt(qe,ot){var wt=l(qe/=2),Mt=x(qe),Ut=z(x(ot)),zt=x(ot/=2),Gt=l(ot)/(zt+A*Mt*Ut),gr=z(2/(1+Gt*Gt)),br=z((A*zt+(Mt+wt)*Ut)/(A*zt+(Mt-wt)*Ut));return[Ht*(gr*(br-1/br)-2*r(br)),Ht*(gr*Gt*(br+1/br)-2*i(Gt))]}Jt.invert=function(qe,ot){if(!(zt=ue.invert(qe/1.2,ot*1.065)))return null;var wt=zt[0],Mt=zt[1],Ut=20,zt;qe/=Ht,ot/=Ht;do{var Gt=wt/2,gr=Mt/2,br=l(Gt),sr=x(Gt),Mr=l(gr),Ir=x(gr),Nr=x(Mt),tn=z(Nr),yn=Mr/(Ir+A*sr*tn),Rn=yn*yn,Dn=z(2/(1+Rn)),Zn=A*Ir+(sr+br)*tn,Li=A*Ir+(sr-br)*tn,Pi=Zn/Li,Ri=z(Pi),zi=Ri-1/Ri,Xi=Ri+1/Ri,va=Dn*zi-2*r(Ri)-qe,Ia=Dn*yn*Xi-2*i(yn)-ot,fe=Mr&&w*tn*br*Rn/Mr,Ce=(A*sr*Ir+tn)/(2*(Ir+A*sr*tn)*(Ir+A*sr*tn)*tn),Be=-.5*yn*Dn*Dn*Dn,tt=Be*fe,at=Be*Ce,ft=(ft=2*Ir+A*tn*(sr-br))*ft*Ri,Dt=(A*sr*Ir*tn+Nr)/ft,Et=-(A*br*Mr)/(tn*ft),Yt=zi*tt-2*Dt/Ri+Dn*(Dt+Dt/Pi),Zt=zi*at-2*Et/Ri+Dn*(Et+Et/Pi),nr=yn*Xi*tt-2*fe/(1+Rn)+Dn*Xi*fe+Dn*yn*(Dt-Dt/Pi),_r=yn*Xi*at-2*Ce/(1+Rn)+Dn*Xi*Ce+Dn*yn*(Et-Et/Pi),Lr=Zt*nr-_r*Yt;if(!Lr)break;var Jr=(Ia*Zt-va*_r)/Lr,on=(va*nr-Ia*Yt)/Lr;wt-=Jr,Mt=t(-o,a(o,Mt-on))}while((C(Jr)>h||C(on)>h)&&--Ut>0);return C(C(Mt)-o)Mt){var Ir=z(Mr),Nr=S(sr,br),tn=wt*f(Nr/wt),yn=Nr-tn,Rn=qe*x(yn),Dn=(qe*l(yn)-yn*l(Rn))/(o-Rn),Zn=xr(yn,Dn),Li=(u-qe)/pr(Zn,Rn,u);br=Ir;var Pi=50,Ri;do br-=Ri=(qe+pr(Zn,Rn,br)*Li-Ir)/(Zn(br)*Li);while(C(Ri)>h&&--Pi>0);sr=yn*l(br),brMt){var br=z(gr),sr=S(Gt,zt),Mr=wt*f(sr/wt),Ir=sr-Mr;zt=br*x(Ir),Gt=br*l(Ir);for(var Nr=zt-o,tn=l(zt),yn=Gt/tn,Rn=zth||C(yn)>h)&&--Rn>0);return[Ir,Nr]},br}var Dr=Pr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function cn(){return(0,g.c)(Dr).scale(149.995)}var rn=Pr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Cn(){return(0,g.c)(rn).scale(153.93)}var En=Pr(5/6*u,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Tr(){return(0,g.c)(En).scale(130.945)}function Cr(qe,ot){var wt=qe*qe,Mt=ot*ot;return[qe*(1-.162388*Mt)*(.87-952426e-9*wt*wt),ot*(1+Mt/12)]}Cr.invert=function(qe,ot){var wt=qe,Mt=ot,Ut=50,zt;do{var Gt=Mt*Mt;Mt-=zt=(Mt*(1+Gt/12)-ot)/(1+Gt/4)}while(C(zt)>h&&--Ut>0);Ut=50,qe/=1-.162388*Gt;do{var gr=(gr=wt*wt)*gr;wt-=zt=(wt*(.87-952426e-9*gr)-qe)/(.87-.00476213*gr)}while(C(zt)>h&&--Ut>0);return[wt,Mt]};function Wr(){return(0,g.c)(Cr).scale(131.747)}var Ur=Pr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function an(){return(0,g.c)(Ur).scale(131.087)}function pn(qe){var ot=qe(o,0)[0]-qe(-o,0)[0];function wt(Mt,Ut){var zt=Mt>0?-.5:.5,Gt=qe(Mt+zt*u,Ut);return Gt[0]-=zt*ot,Gt}return qe.invert&&(wt.invert=function(Mt,Ut){var zt=Mt>0?-.5:.5,Gt=qe.invert(Mt+zt*ot,Ut),gr=Gt[0]-zt*u;return gr<-u?gr+=2*u:gr>u&&(gr-=2*u),Gt[0]=gr,Gt}),wt}function gn(qe,ot){var wt=c(qe),Mt=c(ot),Ut=x(ot),zt=x(qe)*Ut,Gt=l(qe)*Ut,gr=l(Mt*ot);qe=C(S(Gt,gr)),ot=L(zt),C(qe-o)>h&&(qe%=o);var br=_n(qe>u/4?o-qe:qe,ot);return qe>u/4&&(gr=br[0],br[0]=-br[1],br[1]=-gr),br[0]*=wt,br[1]*=-Mt,br}gn.invert=function(qe,ot){C(qe)>1&&(qe=c(qe)*2-qe),C(ot)>1&&(ot=c(ot)*2-ot);var wt=c(qe),Mt=c(ot),Ut=-wt*qe,zt=-Mt*ot,Gt=zt/Ut<1,gr=kn(Gt?zt:Ut,Gt?Ut:zt),br=gr[0],sr=gr[1],Mr=x(sr);return Gt&&(br=-o-br),[wt*(S(l(br)*Mr,-l(sr))+u),Mt*L(x(br)*Mr)]};function _n(qe,ot){if(ot===o)return[0,0];var wt=l(ot),Mt=wt*wt,Ut=Mt*Mt,zt=1+Ut,Gt=1+3*Ut,gr=1-Ut,br=L(1/z(zt)),sr=gr+Mt*zt*br,Mr=(1-wt)/sr,Ir=z(Mr),Nr=Mr*zt,tn=z(Nr),yn=Ir*gr,Rn,Dn;if(qe===0)return[0,-(yn+Mt*tn)];var Zn=x(ot),Li=1/Zn,Pi=2*wt*Zn,Ri=(-3*Mt+br*Gt)*Pi,zi=(-sr*Zn-(1-wt)*Ri)/(sr*sr),Xi=.5*zi/Ir,va=gr*Xi-2*Mt*Ir*Pi,Ia=Mt*zt*zi+Mr*Gt*Pi,fe=-Li*Pi,Ce=-Li*Ia,Be=-2*Li*va,tt=4*qe/u,at;if(qe>.222*u||ot.175*u){if(Rn=(yn+Mt*z(Nr*(1+Ut)-yn*yn))/(1+Ut),qe>u/4)return[Rn,Rn];var ft=Rn,Dt=.5*Rn;Rn=.5*(Dt+ft),Dn=50;do{var Et=z(Nr-Rn*Rn),Yt=Rn*(Be+fe*Et)+Ce*L(Rn/tn)-tt;if(!Yt)break;Yt<0?Dt=Rn:ft=Rn,Rn=.5*(Dt+ft)}while(C(ft-Dt)>h&&--Dn>0)}else{Rn=h,Dn=25;do{var Zt=Rn*Rn,nr=z(Nr-Zt),_r=Be+fe*nr,Lr=Rn*_r+Ce*L(Rn/tn)-tt,Jr=_r+(Ce-fe*Zt)/nr;Rn-=at=nr?Lr/Jr:0}while(C(at)>h&&--Dn>0)}return[Rn,-yn-Mt*z(Nr-Rn*Rn)]}function kn(qe,ot){for(var wt=0,Mt=1,Ut=.5,zt=50;;){var Gt=Ut*Ut,gr=z(Ut),br=L(1/z(1+Gt)),sr=1-Gt+Ut*(1+Gt)*br,Mr=(1-gr)/sr,Ir=z(Mr),Nr=Mr*(1+Gt),tn=Ir*(1-Gt),yn=Nr-qe*qe,Rn=z(yn),Dn=ot+tn+Ut*Rn;if(C(Mt-wt)0?wt=Ut:Mt=Ut,Ut=.5*(wt+Mt)}if(!zt)return null;var Zn=L(gr),Li=x(Zn),Pi=1/Li,Ri=2*gr*Li,zi=(-3*Ut+br*(1+3*Gt))*Ri,Xi=(-sr*Li-(1-gr)*zi)/(sr*sr),va=.5*Xi/Ir,Ia=(1-Gt)*va-2*Ut*Ir*Ri,fe=-2*Pi*Ia,Ce=-Pi*Ri,Be=-Pi*(Ut*(1+Gt)*Xi+Mr*(1+3*Gt)*Ri);return[u/4*(qe*(fe+Ce*Rn)+Be*L(qe/z(Nr))),Zn]}function ni(){return(0,g.c)(pn(gn)).scale(239.75)}function ci(qe,ot,wt){var Mt,Ut,zt;return qe?(Mt=di(qe,wt),ot?(Ut=di(ot,1-wt),zt=Ut[1]*Ut[1]+wt*Mt[0]*Mt[0]*Ut[0]*Ut[0],[[Mt[0]*Ut[2]/zt,Mt[1]*Mt[2]*Ut[0]*Ut[1]/zt],[Mt[1]*Ut[1]/zt,-Mt[0]*Mt[2]*Ut[0]*Ut[2]/zt],[Mt[2]*Ut[1]*Ut[2]/zt,-wt*Mt[0]*Mt[1]*Ut[0]/zt]]):[[Mt[0],0],[Mt[1],0],[Mt[2],0]]):(Ut=di(ot,1-wt),[[0,Ut[0]/Ut[1]],[1/Ut[1],0],[Ut[2]/Ut[1],0]])}function di(qe,ot){var wt,Mt,Ut,zt,Gt;if(ot=1-h)return wt=(1-ot)/4,Mt=I(qe),zt=D(qe),Ut=1/Mt,Gt=Mt*N(qe),[zt+wt*(Gt-qe)/(Mt*Mt),Ut-wt*zt*Ut*(Gt-qe),Ut+wt*zt*Ut*(Gt+qe),2*i(v(qe))-o+wt*(Gt-qe)/Mt];var gr=[1,0,0,0,0,0,0,0,0],br=[z(ot),0,0,0,0,0,0,0,0],sr=0;for(Mt=z(1-ot),Gt=1;C(br[sr]/gr[sr])>h&&sr<8;)wt=gr[sr++],br[sr]=(wt-Mt)/2,gr[sr]=(wt+Mt)/2,Mt=z(wt*Mt),Gt*=2;Ut=Gt*gr[sr]*qe;do zt=br[sr]*l(Mt=Ut)/gr[sr],Ut=(L(zt)+Ut)/2;while(--sr);return[l(Ut),zt=x(Ut),zt/x(Ut-Mt),Ut]}function li(qe,ot,wt){var Mt=C(qe),Ut=C(ot),zt=N(Ut);if(Mt){var Gt=1/l(Mt),gr=1/(m(Mt)*m(Mt)),br=-(gr+wt*(zt*zt*Gt*Gt)-1+wt),sr=(wt-1)*gr,Mr=(-br+z(br*br-4*sr))/2;return[ri(i(1/z(Mr)),wt)*c(qe),ri(i(z((Mr/gr-1)/wt)),1-wt)*c(ot)]}return[0,ri(i(zt),1-wt)*c(ot)]}function ri(qe,ot){if(!ot)return qe;if(ot===1)return r(m(qe/2+d));for(var wt=1,Mt=z(1-ot),Ut=z(ot),zt=0;C(Ut)>h;zt++){if(qe%u){var Gt=i(Mt*m(qe)/wt);Gt<0&&(Gt+=u),qe+=Gt+~~(qe/u)*u}else qe+=qe;Ut=(wt+Mt)/2,Mt=z(wt*Mt),Ut=((wt=Ut)-Mt)/2}return qe/(n(2,zt)*wt)}function wr(qe,ot){var wt=(A-1)/(A+1),Mt=z(1-wt*wt),Ut=ri(o,Mt*Mt),zt=-1,Gt=r(m(u/4+C(ot)/2)),gr=v(zt*Gt)/z(wt),br=nn(gr*x(zt*qe),gr*l(zt*qe)),sr=li(br[0],br[1],Mt*Mt);return[-sr[1],(ot>=0?1:-1)*(.5*Ut-sr[0])]}function nn(qe,ot){var wt=qe*qe,Mt=ot+1,Ut=1-wt-ot*ot;return[.5*((qe>=0?o:-o)-S(Ut,2*qe)),-.25*r(Ut*Ut+4*wt)+.5*r(Mt*Mt+wt)]}function $r(qe,ot){var wt=ot[0]*ot[0]+ot[1]*ot[1];return[(qe[0]*ot[0]+qe[1]*ot[1])/wt,(qe[1]*ot[0]-qe[0]*ot[1])/wt]}wr.invert=function(qe,ot){var wt=(A-1)/(A+1),Mt=z(1-wt*wt),Ut=ri(o,Mt*Mt),zt=-1,Gt=ci(.5*Ut-ot,-qe,Mt*Mt),gr=$r(Gt[0],Gt[1]),br=S(gr[1],gr[0])/zt;return[br,2*i(v(.5/zt*r(wt*gr[0]*gr[0]+wt*gr[1]*gr[1])))-o]};function dn(){return(0,g.c)(pn(wr)).scale(151.496)}var Hn=e(61780);function Tn(qe){var ot=l(qe),wt=x(qe),Mt=An(qe);Mt.invert=An(-qe);function Ut(zt,Gt){var gr=Mt(zt,Gt);zt=gr[0],Gt=gr[1];var br=l(Gt),sr=x(Gt),Mr=x(zt),Ir=M(ot*br+wt*sr*Mr),Nr=l(Ir),tn=C(Nr)>h?Ir/Nr:1;return[tn*wt*l(zt),(C(zt)>o?tn:-tn)*(ot*sr-wt*br*Mr)]}return Ut.invert=function(zt,Gt){var gr=z(zt*zt+Gt*Gt),br=-l(gr),sr=x(gr),Mr=gr*sr,Ir=-Gt*br,Nr=gr*ot,tn=z(Mr*Mr+Ir*Ir-Nr*Nr),yn=S(Mr*Nr+Ir*tn,Ir*Nr-Mr*tn),Rn=(gr>o?-1:1)*S(zt*br,gr*x(yn)*sr+Gt*l(yn)*br);return Mt.invert(Rn,yn)},Ut}function An(qe){var ot=l(qe),wt=x(qe);return function(Mt,Ut){var zt=x(Ut),Gt=x(Mt)*zt,gr=l(Mt)*zt,br=l(Ut);return[S(gr,Gt*wt-br*ot),L(br*wt+Gt*ot)]}}function Bn(){var qe=0,ot=(0,g.U)(Tn),wt=ot(qe),Mt=wt.rotate,Ut=wt.stream,zt=(0,Hn.c)();return wt.parallel=function(Gt){if(!arguments.length)return qe*E;var gr=wt.rotate();return ot(qe=Gt*T).rotate(gr)},wt.rotate=function(Gt){return arguments.length?(Mt.call(wt,[Gt[0],Gt[1]-qe*E]),zt.center([-Gt[0],-Gt[1]]),wt):(Gt=Mt.call(wt),Gt[1]+=qe*E,Gt)},wt.stream=function(Gt){return Gt=Ut(Gt),Gt.sphere=function(){Gt.polygonStart();var gr=.01,br=zt.radius(90-gr)().coordinates[0],sr=br.length-1,Mr=-1,Ir;for(Gt.lineStart();++Mr=0;)Gt.point((Ir=br[Mr])[0],Ir[1]);Gt.lineEnd(),Gt.polygonEnd()},Gt},wt.scale(79.4187).parallel(45).clipAngle(179.999)}var Jn=e(84706),gi=e(16016),Di=3,Sr=L(1-1/Di)*E,kr=ct(0);function Ar(qe){var ot=Sr*T,wt=Ne(u,ot)[0]-Ne(-u,ot)[0],Mt=kr(0,ot)[1],Ut=Ne(0,ot)[1],zt=_-Ut,Gt=y/qe,gr=4/y,br=Mt+zt*zt*4/y;function sr(Mr,Ir){var Nr,tn=C(Ir);if(tn>ot){var yn=a(qe-1,t(0,p((Mr+u)/Gt)));Mr+=u*(qe-1)/qe-yn*Gt,Nr=Ne(Mr,tn),Nr[0]=Nr[0]*y/wt-y*(qe-1)/(2*qe)+yn*y/qe,Nr[1]=Mt+(Nr[1]-Ut)*4*zt/y,Ir<0&&(Nr[1]=-Nr[1])}else Nr=kr(Mr,Ir);return Nr[0]*=gr,Nr[1]/=br,Nr}return sr.invert=function(Mr,Ir){Mr/=gr,Ir*=br;var Nr=C(Ir);if(Nr>Mt){var tn=a(qe-1,t(0,p((Mr+u)/Gt)));Mr=(Mr+u*(qe-1)/qe-tn*Gt)*wt/y;var yn=Ne.invert(Mr,.25*(Nr-Mt)*y/zt+Ut);return yn[0]-=u*(qe-1)/qe-tn*Gt,Ir<0&&(yn[1]=-yn[1]),yn}return kr.invert(Mr,Ir)},sr}function Or(qe,ot){return[qe,ot&1?90-h:Sr]}function xn(qe,ot){return[qe,ot&1?-90+h:-Sr]}function In(qe){return[qe[0]*(1-h),qe[1]]}function hn(qe){var ot=[].concat((0,Jn.ik)(-180,180+qe/2,qe).map(Or),(0,Jn.ik)(180,-180-qe/2,-qe).map(xn));return{type:"Polygon",coordinates:[qe===180?ot.map(In):ot]}}function sn(){var qe=4,ot=(0,g.U)(Ar),wt=ot(qe),Mt=wt.stream;return wt.lobes=function(Ut){return arguments.length?ot(qe=+Ut):qe},wt.stream=function(Ut){var zt=wt.rotate(),Gt=Mt(Ut),gr=(wt.rotate([0,0]),Mt(Ut));return wt.rotate(zt),Gt.sphere=function(){(0,gi.c)(hn(180/qe),gr)},Gt},wt.scale(239.75)}function Er(qe){var ot=1+qe,wt=l(1/ot),Mt=L(wt),Ut=2*z(u/(zt=u+4*Mt*ot)),zt,Gt=.5*Ut*(ot+z(qe*(2+qe))),gr=qe*qe,br=ot*ot;function sr(Mr,Ir){var Nr=1-l(Ir),tn,yn;if(Nr&&Nr<2){var Rn=o-Ir,Dn=25,Zn;do{var Li=l(Rn),Pi=x(Rn),Ri=Mt+S(Li,ot-Pi),zi=1+br-2*ot*Pi;Rn-=Zn=(Rn-gr*Mt-ot*Li+zi*Ri-.5*Nr*zt)/(2*ot*Li*Ri)}while(C(Zn)>b&&--Dn>0);tn=Ut*z(zi),yn=Mr*Ri/u}else tn=Ut*(qe+Nr),yn=Mr*Mt/u;return[tn*l(yn),Gt-tn*x(yn)]}return sr.invert=function(Mr,Ir){var Nr=Mr*Mr+(Ir-=Gt)*Ir,tn=(1+br-Nr/(Ut*Ut))/(2*ot),yn=M(tn),Rn=l(yn),Dn=Mt+S(Rn,ot-tn);return[L(Mr/z(Nr))*u/Dn,L(1-2*(yn-gr*Mt-ot*Rn+(1+br-2*ot*tn)*Dn)/zt)]},sr}function Zr(){var qe=1,ot=(0,g.U)(Er),wt=ot(qe);return wt.ratio=function(Mt){return arguments.length?ot(qe=+Mt):qe},wt.scale(167.774).center([0,18.67])}var Vr=.7109889596207567,Qr=.0528035274542;function wn(qe,ot){return ot>-Vr?(qe=Le(qe,ot),qe[1]+=Qr,qe):Ke(qe,ot)}wn.invert=function(qe,ot){return ot>-Vr?Le.invert(qe,ot-Qr):Ke.invert(qe,ot)};function Ln(){return(0,g.c)(wn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Pn(qe,ot){return C(ot)>Vr?(qe=Le(qe,ot),qe[1]-=ot>0?Qr:-Qr,qe):Ke(qe,ot)}Pn.invert=function(qe,ot){return C(ot)>Vr?Le.invert(qe,ot+(ot>0?Qr:-Qr)):Ke.invert(qe,ot)};function Un(){return(0,g.c)(Pn).scale(152.63)}function On(qe,ot,wt,Mt){var Ut=z(4*u/(2*wt+(1+qe-ot/2)*l(2*wt)+(qe+ot)/2*l(4*wt)+ot/2*l(6*wt))),zt=z(Mt*l(wt)*z((1+qe*x(2*wt)+ot*x(4*wt))/(1+qe+ot))),Gt=wt*br(1);function gr(Ir){return z(1+qe*x(2*Ir)+ot*x(4*Ir))}function br(Ir){var Nr=Ir*wt;return(2*Nr+(1+qe-ot/2)*l(2*Nr)+(qe+ot)/2*l(4*Nr)+ot/2*l(6*Nr))/wt}function sr(Ir){return gr(Ir)*l(Ir)}var Mr=function(Ir,Nr){var tn=wt*Te(br,Gt*l(Nr)/wt,Nr/u);isNaN(tn)&&(tn=wt*c(Nr));var yn=Ut*gr(tn);return[yn*zt*Ir/u*x(tn),yn/zt*l(tn)]};return Mr.invert=function(Ir,Nr){var tn=Te(sr,Nr*zt/Ut);return[Ir*u/(x(tn)*Ut*zt*gr(tn)),L(wt*br(tn/wt)/Gt)]},wt===0&&(Ut=z(Mt/u),Mr=function(Ir,Nr){return[Ir*Ut,l(Nr)/Ut]},Mr.invert=function(Ir,Nr){return[Ir/Ut,L(Nr*Ut)]}),Mr}function mi(){var qe=1,ot=0,wt=45*T,Mt=2,Ut=(0,g.U)(On),zt=Ut(qe,ot,wt,Mt);return zt.a=function(Gt){return arguments.length?Ut(qe=+Gt,ot,wt,Mt):qe},zt.b=function(Gt){return arguments.length?Ut(qe,ot=+Gt,wt,Mt):ot},zt.psiMax=function(Gt){return arguments.length?Ut(qe,ot,wt=+Gt*T,Mt):wt*E},zt.ratio=function(Gt){return arguments.length?Ut(qe,ot,wt,Mt=+Gt):Mt},zt.scale(180.739)}function ai(qe,ot,wt,Mt,Ut,zt,Gt,gr,br,sr,Mr){if(Mr.nanEncountered)return NaN;var Ir,Nr,tn,yn,Rn,Dn,Zn,Li,Pi,Ri;if(Ir=wt-ot,Nr=qe(ot+Ir*.25),tn=qe(wt-Ir*.25),isNaN(Nr)){Mr.nanEncountered=!0;return}if(isNaN(tn)){Mr.nanEncountered=!0;return}return yn=Ir*(Mt+4*Nr+Ut)/12,Rn=Ir*(Ut+4*tn+zt)/12,Dn=yn+Rn,Ri=(Dn-Gt)/15,sr>br?(Mr.maxDepthCount++,Dn+Ri):Math.abs(Ri)>1;do br[Dn]>tn?Rn=Dn:yn=Dn,Dn=yn+Rn>>1;while(Dn>yn);var Zn=br[Dn+1]-br[Dn];return Zn&&(Zn=(tn-br[Dn+1])/Zn),(Dn+1+Zn)/Gt}var Ir=2*Mr(1)/u*zt/wt,Nr=function(tn,yn){var Rn=Mr(C(l(yn))),Dn=Mt(Rn)*tn;return Rn/=Ir,[Dn,yn>=0?Rn:-Rn]};return Nr.invert=function(tn,yn){var Rn;return yn*=Ir,C(yn)<1&&(Rn=c(yn)*L(Ut(C(yn))*zt)),[tn/Mt(C(yn)),Rn]},Nr}function pa(){var qe=0,ot=2.5,wt=1.183136,Mt=(0,g.U)(Ci),Ut=Mt(qe,ot,wt);return Ut.alpha=function(zt){return arguments.length?Mt(qe=+zt,ot,wt):qe},Ut.k=function(zt){return arguments.length?Mt(qe,ot=+zt,wt):ot},Ut.gamma=function(zt){return arguments.length?Mt(qe,ot,wt=+zt):wt},Ut.scale(152.63)}function ta(qe,ot){return C(qe[0]-ot[0])=0;--br)wt=qe[1][br],Mt=wt[0][0],Ut=wt[0][1],zt=wt[1][1],Gt=wt[2][0],gr=wt[2][1],ot.push(Eo([[Gt-h,gr-h],[Gt-h,zt+h],[Mt+h,zt+h],[Mt+h,Ut-h]],30));return{type:"Polygon",coordinates:[(0,Jn.Uf)(ot)]}}function Qa(qe,ot,wt){var Mt,Ut;function zt(br,sr){for(var Mr=sr<0?-1:1,Ir=ot[+(sr<0)],Nr=0,tn=Ir.length-1;NrIr[Nr][2][0];++Nr);var yn=qe(br-Ir[Nr][1][0],sr);return yn[0]+=qe(Ir[Nr][1][0],Mr*sr>Mr*Ir[Nr][0][1]?Ir[Nr][0][1]:sr)[0],yn}wt?zt.invert=wt(zt):qe.invert&&(zt.invert=function(br,sr){for(var Mr=Ut[+(sr<0)],Ir=ot[+(sr<0)],Nr=0,tn=Mr.length;Nryn&&(Rn=tn,tn=yn,yn=Rn),[[Ir,tn],[Nr,yn]]})}),Gt):ot.map(function(sr){return sr.map(function(Mr){return[[Mr[0][0]*E,Mr[0][1]*E],[Mr[1][0]*E,Mr[1][1]*E],[Mr[2][0]*E,Mr[2][1]*E]]})})},ot!=null&&Gt.lobes(ot),Gt}var ol=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Nu(){return Qa(He,ol).scale(160.857)}var bf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function $i(){return Qa(Pn,bf).scale(152.63)}var Fl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Bu(){return Qa(Le,Fl).scale(169.529)}var Xa=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function ho(){return Qa(Le,Xa).scale(169.529).rotate([20,0])}var sl=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function vu(){return Qa(wn,sl,we).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Ra=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function ll(){return Qa(Ke,Ra).scale(152.63).rotate([-20,0])}function za(qe,ot){return[3/y*qe*z(u*u/3-ot*ot),ot]}za.invert=function(qe,ot){return[y/3*qe/z(u*u/3-ot*ot),ot]};function Ua(){return(0,g.c)(za).scale(158.837)}function ul(qe){function ot(wt,Mt){if(C(C(Mt)-o)2)return null;wt/=2,Mt/=2;var zt=wt*wt,Gt=Mt*Mt,gr=2*Mt/(1+zt+Gt);return gr=n((1+gr)/(1-gr),1/qe),[S(2*wt,1-zt-Gt)/qe,L((gr-1)/(gr+1))]},ot}function $a(){var qe=.5,ot=(0,g.U)(ul),wt=ot(qe);return wt.spacing=function(Mt){return arguments.length?ot(qe=+Mt):qe},wt.scale(124.75)}var qa=u/A;function _o(qe,ot){return[qe*(1+z(x(ot)))/2,ot/(x(ot/2)*x(qe/6))]}_o.invert=function(qe,ot){var wt=C(qe),Mt=C(ot),Ut=h,zt=o;Mth||C(Dn)>h)&&--Ut>0);return Ut&&[wt,Mt]};function xc(){return(0,g.c)(bo).scale(139.98)}function es(qe,ot){return[l(qe)/x(ot),m(ot)*x(qe)]}es.invert=function(qe,ot){var wt=qe*qe,Mt=ot*ot,Ut=Mt+1,zt=wt+Ut,Gt=qe?w*z((zt-z(zt*zt-4*wt))/wt):1/z(Ut);return[L(qe*Gt),c(ot)*M(Gt)]};function Za(){return(0,g.c)(es).scale(144.049).clipAngle(89.999)}function Uu(qe){var ot=x(qe),wt=m(d+qe/2);function Mt(Ut,zt){var Gt=zt-qe,gr=C(Gt)=0;)Mr=qe[sr],Ir=Mr[0]+gr*(tn=Ir)-br*Nr,Nr=Mr[1]+gr*Nr+br*tn;return Ir=gr*(tn=Ir)-br*Nr,Nr=gr*Nr+br*tn,[Ir,Nr]}return wt.invert=function(Mt,Ut){var zt=20,Gt=Mt,gr=Ut;do{for(var br=ot,sr=qe[br],Mr=sr[0],Ir=sr[1],Nr=0,tn=0,yn;--br>=0;)sr=qe[br],Nr=Mr+Gt*(yn=Nr)-gr*tn,tn=Ir+Gt*tn+gr*yn,Mr=sr[0]+Gt*(yn=Mr)-gr*Ir,Ir=sr[1]+Gt*Ir+gr*yn;Nr=Mr+Gt*(yn=Nr)-gr*tn,tn=Ir+Gt*tn+gr*yn,Mr=Gt*(yn=Mr)-gr*Ir-Mt,Ir=Gt*Ir+gr*yn-Ut;var Rn=Nr*Nr+tn*tn,Dn,Zn;Gt-=Dn=(Mr*Nr+Ir*tn)/Rn,gr-=Zn=(Ir*Nr-Mr*tn)/Rn}while(C(Dn)+C(Zn)>h*h&&--zt>0);if(zt){var Li=z(Gt*Gt+gr*gr),Pi=2*i(Li*.5),Ri=l(Pi);return[S(Gt*Ri,Li*x(Pi)),Li?L(gr*Ri/Li):0]}},wt}var bc=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],du=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],wc=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Tc=[[.9245,0],[0,0],[.01943,0]],Ac=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Hu(){return Ys(bc,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Mc(){return Ys(du,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Sc(){return Ys(wc,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Af(){return Ys(Tc,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Mf(){return Ys(Ac,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ys(qe,ot){var wt=(0,g.c)(Tf(qe)).rotate(ot).clipAngle(90),Mt=(0,Ze.c)(ot),Ut=wt.center;return delete wt.rotate,wt.center=function(zt){return arguments.length?Ut(Mt(zt)):Mt.invert(Ut())},wt}var fl=z(6),zl=z(7);function kl(qe,ot){var wt=L(7*l(ot)/(3*fl));return[fl*qe*(2*x(2*wt/3)-1)/zl,9*l(wt/3)/zl]}kl.invert=function(qe,ot){var wt=3*L(ot*zl/9);return[qe*zl/(fl*(2*x(2*wt/3)-1)),L(l(wt)*3*fl/7)]};function Sf(){return(0,g.c)(kl).scale(164.859)}function vs(qe,ot){for(var wt=(1+w)*l(ot),Mt=ot,Ut=0,zt;Ut<25&&(Mt-=zt=(l(Mt/2)+l(Mt)-wt)/(.5*x(Mt/2)+x(Mt)),!(C(zt)b&&--Mt>0);return zt=wt*wt,Gt=zt*zt,gr=zt*Gt,[qe/(.84719-.13063*zt+gr*gr*(-.04515+.05494*zt-.02326*Gt+.00331*gr)),wt]};function Uo(){return(0,g.c)(gu).scale(175.295)}function cl(qe,ot){return[qe*(1+x(ot))/2,2*(ot-m(ot/2))]}cl.invert=function(qe,ot){for(var wt=ot/2,Mt=0,Ut=1/0;Mt<10&&C(Ut)>h;++Mt){var zt=x(ot/2);ot-=Ut=(ot-m(ot/2)-wt)/(1-.5/(zt*zt))}return[2*qe/(1+x(ot)),ot]};function Xs(){return(0,g.c)(cl).scale(152.63)}var Ol=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ls(){return Qa(ne(1/0),Ol).rotate([20,0]).scale(152.63)}function rs(qe,ot){var wt=l(ot),Mt=x(ot),Ut=c(qe);if(qe===0||C(ot)===o)return[0,ot];if(ot===0)return[qe,0];if(C(qe)===o)return[qe*Mt,o*wt];var zt=u/(2*qe)-2*qe/u,Gt=2*ot/u,gr=(1-Gt*Gt)/(wt-Gt),br=zt*zt,sr=gr*gr,Mr=1+br/sr,Ir=1+sr/br,Nr=(zt*wt/gr-zt/2)/Mr,tn=(sr*wt/br+gr/2)/Ir,yn=Nr*Nr+Mt*Mt/Mr,Rn=tn*tn-(sr*wt*wt/br+gr*wt-1)/Ir;return[o*(Nr+z(yn)*Ut),o*(tn+z(Rn<0?0:Rn)*c(-ot*zt)*Ut)]}rs.invert=function(qe,ot){qe/=o,ot/=o;var wt=qe*qe,Mt=ot*ot,Ut=wt+Mt,zt=u*u;return[qe?(Ut-1+z((1-Ut)*(1-Ut)+4*wt))/(2*qe)*o:0,Te(function(Gt){return Ut*(u*l(Gt)-2*Gt)*u+4*Gt*Gt*(ot-l(Gt))+2*u*Gt-zt*ot},0)]};function Gu(){return(0,g.c)(rs).scale(127.267)}var hl=1.0148,Vo=.23185,Ca=-.14499,Wu=.02406,_c=hl,mu=5*Vo,vl=7*Ca,dl=9*Wu,wo=1.790857183;function yu(qe,ot){var wt=ot*ot;return[qe,ot*(hl+wt*wt*(Vo+wt*(Ca+Wu*wt)))]}yu.invert=function(qe,ot){ot>wo?ot=wo:ot<-wo&&(ot=-wo);var wt=ot,Mt;do{var Ut=wt*wt;wt-=Mt=(wt*(hl+Ut*Ut*(Vo+Ut*(Ca+Wu*Ut)))-ot)/(_c+Ut*Ut*(mu+Ut*(vl+dl*Ut)))}while(C(Mt)>h);return[qe,wt]};function pl(){return(0,g.c)(yu).scale(139.319)}function xu(qe,ot){if(C(ot)h&&--Ut>0);return Gt=m(Mt),[(C(ot)=0;)if(Mt=ot[gr],wt[0]===Mt[0]&&wt[1]===Mt[1]){if(zt)return[zt,wt];zt=wt}}}function ju(qe){for(var ot=qe.length,wt=[],Mt=qe[ot-1],Ut=0;Ut0?[-Mt[0],0]:[180-Mt[0],180])};var ot=Da.map(function(wt){return{face:wt,project:qe(wt)}});return[-1,0,0,1,0,1,4,5].forEach(function(wt,Mt){var Ut=ot[wt];Ut&&(Ut.children||(Ut.children=[])).push(ot[Mt])}),ga(ot[0],function(wt,Mt){return ot[wt<-u/2?Mt<0?6:4:wt<0?Mt<0?2:0:wtMt^tn>Mt&&wt<(Nr-sr)*(Mt-Mr)/(tn-Mr)+sr&&(Ut=!Ut)}return Ut}function Rc(qe,ot){var wt=ot.stream,Mt;if(!wt)throw new Error("invalid projection");switch(qe&&qe.type){case"Feature":Mt=Ku;break;case"FeatureCollection":Mt=Dc;break;default:Mt=yl;break}return Mt(qe,wt)}function Dc(qe,ot){return{type:"FeatureCollection",features:qe.features.map(function(wt){return Ku(wt,ot)})}}function Ku(qe,ot){return{type:"Feature",id:qe.id,properties:qe.properties,geometry:yl(qe.geometry,ot)}}function Rf(qe,ot){return{type:"GeometryCollection",geometries:qe.geometries.map(function(wt){return yl(wt,ot)})}}function yl(qe,ot){if(!qe)return null;if(qe.type==="GeometryCollection")return Rf(qe,ot);var wt;switch(qe.type){case"Point":wt=xl;break;case"MultiPoint":wt=xl;break;case"LineString":wt=Df;break;case"MultiLineString":wt=Df;break;case"Polygon":wt=Vl;break;case"MultiPolygon":wt=Vl;break;case"Sphere":wt=Vl;break;default:return null}return(0,gi.c)(qe,ot(wt)),wt.result()}var ja=[],Co=[],xl={point:function(qe,ot){ja.push([qe,ot])},result:function(){var qe=ja.length?ja.length<2?{type:"Point",coordinates:ja[0]}:{type:"MultiPoint",coordinates:ja}:null;return ja=[],qe}},Df={lineStart:Ul,point:function(qe,ot){ja.push([qe,ot])},lineEnd:function(){ja.length&&(Co.push(ja),ja=[])},result:function(){var qe=Co.length?Co.length<2?{type:"LineString",coordinates:Co[0]}:{type:"MultiLineString",coordinates:Co}:null;return Co=[],qe}},Vl={polygonStart:Ul,lineStart:Ul,point:function(qe,ot){ja.push([qe,ot])},lineEnd:function(){var qe=ja.length;if(qe){do ja.push(ja[0].slice());while(++qe<4);Co.push(ja),ja=[]}},polygonEnd:Ul,result:function(){if(!Co.length)return null;var qe=[],ot=[];return Co.forEach(function(wt){Lc(wt)?qe.push([wt]):ot.push(wt)}),ot.forEach(function(wt){var Mt=wt[0];qe.some(function(Ut){if(Pc(Ut[0],Mt))return Ut.push(wt),!0})||qe.push([wt])}),Co=[],qe.length?qe.length>1?{type:"MultiPolygon",coordinates:qe}:{type:"Polygon",coordinates:qe[0]}:null}};function gs(qe){var ot=qe(o,0)[0]-qe(-o,0)[0];function wt(Mt,Ut){var zt=C(Mt)0?Mt-u:Mt+u,Ut),gr=(Gt[0]-Gt[1])*w,br=(Gt[0]+Gt[1])*w;if(zt)return[gr,br];var sr=ot*w,Mr=gr>0^br>0?-1:1;return[Mr*gr-c(br)*sr,Mr*br-c(gr)*sr]}return qe.invert&&(wt.invert=function(Mt,Ut){var zt=(Mt+Ut)*w,Gt=(Ut-Mt)*w,gr=C(zt)<.5*ot&&C(Gt)<.5*ot;if(!gr){var br=ot*w,sr=zt>0^Gt>0?-1:1,Mr=-sr*Mt+(Gt>0?1:-1)*br,Ir=-sr*Ut+(zt>0?1:-1)*br;zt=(-Mr-Ir)*w,Gt=(Mr-Ir)*w}var Nr=qe.invert(zt,Gt);return gr||(Nr[0]+=zt>0?u:-u),Nr}),(0,g.c)(wt).rotate([-90,-90,45]).clipAngle(179.999)}function Ic(){return gs(gn).scale(176.423)}function If(){return gs(wr).scale(111.48)}function Ff(qe,ot){if(!(0<=(ot=+ot)&&ot<=20))throw new Error("invalid digits");function wt(sr){var Mr=sr.length,Ir=2,Nr=new Array(Mr);for(Nr[0]=+sr[0].toFixed(ot),Nr[1]=+sr[1].toFixed(ot);Ir2||tn[0]!=Mr[0]||tn[1]!=Mr[1])&&(Ir.push(tn),Mr=tn)}return Ir.length===1&&sr.length>1&&Ir.push(wt(sr[sr.length-1])),Ir}function zt(sr){return sr.map(Ut)}function Gt(sr){if(sr==null)return sr;var Mr;switch(sr.type){case"GeometryCollection":Mr={type:"GeometryCollection",geometries:sr.geometries.map(Gt)};break;case"Point":Mr={type:"Point",coordinates:wt(sr.coordinates)};break;case"MultiPoint":Mr={type:sr.type,coordinates:Mt(sr.coordinates)};break;case"LineString":Mr={type:sr.type,coordinates:Ut(sr.coordinates)};break;case"MultiLineString":case"Polygon":Mr={type:sr.type,coordinates:zt(sr.coordinates)};break;case"MultiPolygon":Mr={type:"MultiPolygon",coordinates:sr.coordinates.map(zt)};break;default:return sr}return sr.bbox!=null&&(Mr.bbox=sr.bbox),Mr}function gr(sr){var Mr={type:"Feature",properties:sr.properties,geometry:Gt(sr.geometry)};return sr.id!=null&&(Mr.id=sr.id),sr.bbox!=null&&(Mr.bbox=sr.bbox),Mr}if(qe!=null)switch(qe.type){case"Feature":return gr(qe);case"FeatureCollection":{var br={type:"FeatureCollection",features:qe.features.map(gr)};return qe.bbox!=null&&(br.bbox=qe.bbox),br}default:return Gt(qe)}return qe}function Ju(qe){var ot=l(qe);function wt(Mt,Ut){var zt=ot?m(Mt*ot/2)/ot:Mt/2;if(!Ut)return[2*zt,-qe];var Gt=2*i(zt*l(Ut)),gr=1/m(Ut);return[l(Gt)*gr,Ut+(1-x(Gt))*gr-qe]}return wt.invert=function(Mt,Ut){if(C(Ut+=qe)h&&--gr>0);var Nr=Mt*(sr=m(Gt)),tn=m(C(Ut)0?o:-o)*(br+Ut*(Mr-Gt)/2+Ut*Ut*(Mr-2*br+Gt)/2)]}Xo.invert=function(qe,ot){var wt=ot/o,Mt=wt*90,Ut=a(18,C(Mt/5)),zt=t(0,p(Ut));do{var Gt=vo[zt][1],gr=vo[zt+1][1],br=vo[a(19,zt+2)][1],sr=br-Gt,Mr=br-2*gr+Gt,Ir=2*(C(wt)-gr)/sr,Nr=Mr/sr,tn=Ir*(1-Nr*Ir*(1-2*Nr*Ir));if(tn>=0||zt===1){Mt=(ot>=0?5:-5)*(tn+Ut);var yn=50,Rn;do Ut=a(18,C(Mt)/5),zt=p(Ut),tn=Ut-zt,Gt=vo[zt][1],gr=vo[zt+1][1],br=vo[a(19,zt+2)][1],Mt-=(Rn=(ot>=0?o:-o)*(gr+tn*(br-Gt)/2+tn*tn*(br-2*gr+Gt)/2)-ot)*E;while(C(Rn)>b&&--yn>0);break}}while(--zt>=0);var Dn=vo[zt][0],Zn=vo[zt+1][0],Li=vo[a(19,zt+2)][0];return[qe/(Zn+tn*(Li-Dn)/2+tn*tn*(Li-2*Zn+Dn)/2),Mt*T]};function Ds(){return(0,g.c)(Xo).scale(152.63)}function bl(qe){function ot(wt,Mt){var Ut=x(Mt),zt=(qe-1)/(qe-Ut*x(wt));return[zt*Ut*l(wt),zt*l(Mt)]}return ot.invert=function(wt,Mt){var Ut=wt*wt+Mt*Mt,zt=z(Ut),Gt=(qe-z(1-Ut*(qe+1)/(qe-1)))/((qe-1)/zt+zt/(qe-1));return[S(wt*Gt,zt*z(1-Gt*Gt)),zt?L(Mt*Gt/zt):0]},ot}function Au(qe,ot){var wt=bl(qe);if(!ot)return wt;var Mt=x(ot),Ut=l(ot);function zt(Gt,gr){var br=wt(Gt,gr),sr=br[1],Mr=sr*Ut/(qe-1)+Mt;return[br[0]*Mt/Mr,sr/Mr]}return zt.invert=function(Gt,gr){var br=(qe-1)/(qe-1-gr*Ut);return wt.invert(br*Gt,br*gr*Mt)},zt}function Ks(){var qe=2,ot=0,wt=(0,g.U)(Au),Mt=wt(qe,ot);return Mt.distance=function(Ut){return arguments.length?wt(qe=+Ut,ot):qe},Mt.tilt=function(Ut){return arguments.length?wt(qe,ot=Ut*T):ot*E},Mt.scale(432.147).clipAngle(M(1/qe)*E-1e-6)}var Js=1e-4,kf=1e4,ms=-180,wl=ms+Js,Is=180,ys=Is-Js,Hl=-90,Tl=Hl+Js,ha=90,Al=ha-Js;function Mu(qe){return qe.length>0}function Of(qe){return Math.floor(qe*kf)/kf}function Ml(qe){return qe===Hl||qe===ha?[0,qe]:[ms,Of(qe)]}function Gl(qe){var ot=qe[0],wt=qe[1],Mt=!1;return ot<=wl?(ot=ms,Mt=!0):ot>=ys&&(ot=Is,Mt=!0),wt<=Tl?(wt=Hl,Mt=!0):wt>=Al&&(wt=ha,Mt=!0),Mt?[ot,wt]:qe}function Su(qe){return qe.map(Gl)}function Qu(qe,ot,wt){for(var Mt=0,Ut=qe.length;Mt=ys||Mr<=Tl||Mr>=Al){zt[Gt]=Gl(br);for(var Ir=Gt+1;Irwl&&tnTl&&yn=gr)break;wt.push({index:-1,polygon:ot,ring:zt=zt.slice(Ir-1)}),zt[0]=Ml(zt[0][1]),Gt=-1,gr=zt.length}}}}function Wl(qe){var ot,wt=qe.length,Mt={},Ut={},zt,Gt,gr,br,sr;for(ot=0;ot0?u-gr:gr)*E],sr=(0,g.c)(qe(Gt)).rotate(br),Mr=(0,Ze.c)(br),Ir=sr.center;return delete sr.rotate,sr.center=function(Nr){return arguments.length?Ir(Mr(Nr)):Mr.invert(Ir())},sr.clipAngle(90)}function $u(qe){var ot=x(qe);function wt(Mt,Ut){var zt=(0,Ps.Y)(Mt,Ut);return zt[0]*=ot,zt}return wt.invert=function(Mt,Ut){return Ps.Y.invert(Mt/ot,Ut)},wt}function Qs(){return Eu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Eu(qe,ot){return ns($u,qe,ot)}function Zl(qe){if(!(qe*=2))return oe.O;var ot=-qe/2,wt=-ot,Mt=qe*qe,Ut=m(wt),zt=.5/l(wt);function Gt(gr,br){var sr=M(x(br)*x(gr-ot)),Mr=M(x(br)*x(gr-wt)),Ir=br<0?-1:1;return sr*=sr,Mr*=Mr,[(sr-Mr)/(2*qe),Ir*z(4*Mt*Mr-(Mt-sr+Mr)*(Mt-sr+Mr))/(2*qe)]}return Gt.invert=function(gr,br){var sr=br*br,Mr=x(z(sr+(Nr=gr+ot)*Nr)),Ir=x(z(sr+(Nr=gr+wt)*Nr)),Nr,tn;return[S(tn=Mr-Ir,Nr=(Mr+Ir)*Ut),(br<0?-1:1)*M(z(Nr*Nr+tn*tn)*zt)]},Gt}function Fc(){return Nf([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Nf(qe,ot){return ns(Zl,qe,ot)}function lo(qe,ot){if(C(ot)h&&--gr>0);return[c(qe)*(z(Ut*Ut+4)+Ut)*u/4,o*Gt]};function Kl(){return(0,g.c)(To).scale(127.16)}function _u(qe,ot,wt,Mt,Ut){function zt(Gt,gr){var br=wt*l(Mt*gr),sr=z(1-br*br),Mr=z(2/(1+sr*x(Gt*=Ut)));return[qe*sr*Mr*l(Gt),ot*br*Mr]}return zt.invert=function(Gt,gr){var br=Gt/qe,sr=gr/ot,Mr=z(br*br+sr*sr),Ir=2*L(Mr/2);return[S(Gt*m(Ir),qe*Mr)/Ut,Mr&&L(gr*l(Ir)/(ot*wt*Mr))/Mt]},zt}function xs(qe,ot,wt,Mt){var Ut=u/3;qe=t(qe,h),ot=t(ot,h),qe=a(qe,o),ot=a(ot,u-h),wt=t(wt,0),wt=a(wt,100-h),Mt=t(Mt,h);var zt=wt/100+1,Gt=Mt/100,gr=M(zt*x(Ut))/Ut,br=l(qe)/l(gr*o),sr=ot/u,Mr=z(Gt*l(qe/2)/l(ot/2)),Ir=Mr/z(sr*br*gr),Nr=1/(Mr*z(sr*br*gr));return _u(Ir,Nr,br,gr,sr)}function Os(){var qe=65*T,ot=60*T,wt=20,Mt=200,Ut=(0,g.U)(xs),zt=Ut(qe,ot,wt,Mt);return zt.poleline=function(Gt){return arguments.length?Ut(qe=+Gt*T,ot,wt,Mt):qe*E},zt.parallels=function(Gt){return arguments.length?Ut(qe,ot=+Gt*T,wt,Mt):ot*E},zt.inflation=function(Gt){return arguments.length?Ut(qe,ot,wt=+Gt,Mt):wt},zt.ratio=function(Gt){return arguments.length?Ut(qe,ot,wt,Mt=+Gt):Mt},zt.scale(163.775)}function qu(){return Os().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Jl=4*u+3*z(3),Ql=2*z(2*u*z(3)/Jl),Cu=me(Ql*z(3)/u,Ql,Jl/6);function Uf(){return(0,g.c)(Cu).scale(176.84)}function $l(qe,ot){return[qe*z(1-3*ot*ot/(u*u)),ot]}$l.invert=function(qe,ot){return[qe/z(1-3*ot*ot/(u*u)),ot]};function ef(){return(0,g.c)($l).scale(152.63)}function $s(qe,ot){var wt=x(ot),Mt=x(qe)*wt,Ut=1-Mt,zt=x(qe=S(l(qe)*wt,-l(ot))),Gt=l(qe);return wt=z(1-Mt*Mt),[Gt*wt-zt*Ut,-zt*wt-Gt*Ut]}$s.invert=function(qe,ot){var wt=(qe*qe+ot*ot)/-2,Mt=z(-wt*(2+wt)),Ut=ot*wt+qe*Mt,zt=qe*wt-ot*Mt,Gt=z(zt*zt+Ut*Ut);return[S(Mt*Ut,Gt*(1+wt)),Gt?-L(Mt*zt/Gt):0]};function tf(){return(0,g.c)($s).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function ql(qe,ot){var wt=Y(qe,ot);return[(wt[0]+qe/o)/2,(wt[1]+ot)/2]}ql.invert=function(qe,ot){var wt=qe,Mt=ot,Ut=25;do{var zt=x(Mt),Gt=l(Mt),gr=l(2*Mt),br=Gt*Gt,sr=zt*zt,Mr=l(wt),Ir=x(wt/2),Nr=l(wt/2),tn=Nr*Nr,yn=1-sr*Ir*Ir,Rn=yn?M(zt*Ir)*z(Dn=1/yn):Dn=0,Dn,Zn=.5*(2*Rn*zt*Nr+wt/o)-qe,Li=.5*(Rn*Gt+Mt)-ot,Pi=.5*Dn*(sr*tn+Rn*zt*Ir*br)+.5/o,Ri=Dn*(Mr*gr/4-Rn*Gt*Nr),zi=.125*Dn*(gr*Nr-Rn*Gt*sr*Mr),Xi=.5*Dn*(br*Ir+Rn*tn*zt)+.5,va=Ri*zi-Xi*Pi,Ia=(Li*Ri-Zn*Xi)/va,fe=(Zn*zi-Li*Pi)/va;wt-=Ia,Mt-=fe}while((C(Ia)>h||C(fe)>h)&&--Ut>0);return[wt,Mt]};function Vf(){return(0,g.c)(ql).scale(158.837)}},88728:function(H,U,e){e.d(U,{c:function(){return g}});function g(){return new C}function C(){this.reset()}C.prototype={constructor:C,reset:function(){this.s=this.t=0},add:function(x){S(i,x,this.t),S(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new C;function S(x,v,p){var r=x.s=v+p,t=r-v,a=r-t;x.t=v-a+(p-t)}},95384:function(H,U,e){e.d(U,{cp:function(){return b},mQ:function(){return x},oB:function(){return f}});var g=e(88728),C=e(64528),i=e(70932),S=e(16016),x=(0,g.c)(),v=(0,g.c)(),p,r,t,a,n,f={point:i.c,lineStart:i.c,lineEnd:i.c,polygonStart:function(){x.reset(),f.lineStart=c,f.lineEnd=l},polygonEnd:function(){var u=+x;v.add(u<0?C.kD+u:u),this.lineStart=this.lineEnd=this.point=i.c},sphere:function(){v.add(C.kD)}};function c(){f.point=m}function l(){h(p,r)}function m(u,o){f.point=h,p=u,r=o,u*=C.qw,o*=C.qw,t=u,a=(0,C.W8)(o=o/2+C.wL),n=(0,C.g$)(o)}function h(u,o){u*=C.qw,o*=C.qw,o=o/2+C.wL;var d=u-t,w=d>=0?1:-1,A=w*d,_=(0,C.W8)(o),y=(0,C.g$)(o),E=n*y,T=a*_+E*(0,C.W8)(A),s=E*w*(0,C.g$)(A);x.add((0,C.WE)(s,T)),t=u,a=_,n=y}function b(u){return v.reset(),(0,S.c)(u,f),v*2}},13696:function(H,U,e){e.d(U,{c:function(){return L}});var g=e(88728),C=e(95384),i=e(84220),S=e(64528),x=e(16016),v,p,r,t,a,n,f,c,l=(0,g.c)(),m,h,b={point:u,lineStart:d,lineEnd:w,polygonStart:function(){b.point=A,b.lineStart=_,b.lineEnd=y,l.reset(),C.oB.polygonStart()},polygonEnd:function(){C.oB.polygonEnd(),b.point=u,b.lineStart=d,b.lineEnd=w,C.mQ<0?(v=-(r=180),p=-(t=90)):l>S.Gg?t=90:l<-S.Gg&&(p=-90),h[0]=v,h[1]=r},sphere:function(){v=-(r=180),p=-(t=90)}};function u(M,z){m.push(h=[v=M,r=M]),zt&&(t=z)}function o(M,z){var D=(0,i.ux)([M*S.qw,z*S.qw]);if(c){var N=(0,i.CW)(c,D),I=[N[1],-N[0],0],k=(0,i.CW)(I,N);(0,i.cJ)(k),k=(0,i.G)(k);var B=M-a,O=B>0?1:-1,V=k[0]*S.oh*O,Y,j=(0,S.a2)(B)>180;j^(O*at&&(t=Y)):(V=(V+360)%360-180,j^(O*at&&(t=z))),j?ME(v,r)&&(r=M):E(M,r)>E(v,r)&&(v=M):r>=v?(Mr&&(r=M)):M>a?E(v,M)>E(v,r)&&(r=M):E(M,r)>E(v,r)&&(v=M)}else m.push(h=[v=M,r=M]);zt&&(t=z),c=D,a=M}function d(){b.point=o}function w(){h[0]=v,h[1]=r,b.point=u,c=null}function A(M,z){if(c){var D=M-a;l.add((0,S.a2)(D)>180?D+(D>0?360:-360):D)}else n=M,f=z;C.oB.point(M,z),o(M,z)}function _(){C.oB.lineStart()}function y(){A(n,f),C.oB.lineEnd(),(0,S.a2)(l)>S.Gg&&(v=-(r=180)),h[0]=v,h[1]=r,c=null}function E(M,z){return(z-=M)<0?z+360:z}function T(M,z){return M[0]-z[0]}function s(M,z){return M[0]<=M[1]?M[0]<=z&&z<=M[1]:zE(N[0],N[1])&&(N[1]=I[1]),E(I[0],N[1])>E(N[0],N[1])&&(N[0]=I[0])):k.push(N=I);for(B=-1/0,D=k.length-1,z=0,N=k[D];z<=D;N=I,++z)I=k[z],(O=E(N[1],I[0]))>B&&(B=O,v=I[0],r=N[1])}return m=h=null,v===1/0||p===1/0?[[NaN,NaN],[NaN,NaN]]:[[v,p],[r,t]]}},84220:function(H,U,e){e.d(U,{CW:function(){return x},Ez:function(){return S},G:function(){return C},cJ:function(){return r},mg:function(){return v},ux:function(){return i},wx:function(){return p}});var g=e(64528);function C(t){return[(0,g.WE)(t[1],t[0]),(0,g.qR)(t[2])]}function i(t){var a=t[0],n=t[1],f=(0,g.W8)(n);return[f*(0,g.W8)(a),f*(0,g.g$)(a),(0,g.g$)(n)]}function S(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]}function x(t,a){return[t[1]*a[2]-t[2]*a[1],t[2]*a[0]-t[0]*a[2],t[0]*a[1]-t[1]*a[0]]}function v(t,a){t[0]+=a[0],t[1]+=a[1],t[2]+=a[2]}function p(t,a){return[t[0]*a,t[1]*a,t[2]*a]}function r(t){var a=(0,g._I)(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=a,t[1]/=a,t[2]/=a}},24052:function(H,U,e){e.d(U,{c:function(){return D}});var g=e(64528),C=e(70932),i=e(16016),S,x,v,p,r,t,a,n,f,c,l,m,h,b,u,o,d={sphere:C.c,point:w,lineStart:_,lineEnd:T,polygonStart:function(){d.lineStart=s,d.lineEnd=L},polygonEnd:function(){d.lineStart=_,d.lineEnd=T}};function w(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I);A(k*(0,g.W8)(N),k*(0,g.g$)(N),(0,g.g$)(I))}function A(N,I,k){++S,v+=(N-v)/S,p+=(I-p)/S,r+=(k-r)/S}function _(){d.point=y}function y(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I);b=k*(0,g.W8)(N),u=k*(0,g.g$)(N),o=(0,g.g$)(I),d.point=E,A(b,u,o)}function E(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I),B=k*(0,g.W8)(N),O=k*(0,g.g$)(N),V=(0,g.g$)(I),Y=(0,g.WE)((0,g._I)((Y=u*V-o*O)*Y+(Y=o*B-b*V)*Y+(Y=b*O-u*B)*Y),b*B+u*O+o*V);x+=Y,t+=Y*(b+(b=B)),a+=Y*(u+(u=O)),n+=Y*(o+(o=V)),A(b,u,o)}function T(){d.point=w}function s(){d.point=M}function L(){z(m,h),d.point=w}function M(N,I){m=N,h=I,N*=g.qw,I*=g.qw,d.point=z;var k=(0,g.W8)(I);b=k*(0,g.W8)(N),u=k*(0,g.g$)(N),o=(0,g.g$)(I),A(b,u,o)}function z(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I),B=k*(0,g.W8)(N),O=k*(0,g.g$)(N),V=(0,g.g$)(I),Y=u*V-o*O,j=o*B-b*V,te=b*O-u*B,ie=(0,g._I)(Y*Y+j*j+te*te),ue=(0,g.qR)(ie),J=ie&&-ue/ie;f+=J*Y,c+=J*j,l+=J*te,x+=ue,t+=ue*(b+(b=B)),a+=ue*(u+(u=O)),n+=ue*(o+(o=V)),A(b,u,o)}function D(N){S=x=v=p=r=t=a=n=f=c=l=0,(0,i.c)(N,d);var I=f,k=c,B=l,O=I*I+k*k+B*B;return O0?fc)&&(f+=n*i.kD));for(var b,u=f;n>0?u>c:u0?C.pi:-C.pi,l=(0,C.a2)(n-p);(0,C.a2)(l-C.pi)0?C.or:-C.or),v.point(t,r),v.lineEnd(),v.lineStart(),v.point(c,r),v.point(n,r),a=0):t!==c&&l>=C.pi&&((0,C.a2)(p-t)C.Gg?(0,C.MQ)(((0,C.g$)(p)*(n=(0,C.W8)(t))*(0,C.g$)(r)-(0,C.g$)(t)*(a=(0,C.W8)(p))*(0,C.g$)(v))/(a*n*f)):(p+t)/2}function x(v,p,r,t){var a;if(v==null)a=r*C.or,t.point(-C.pi,a),t.point(0,a),t.point(C.pi,a),t.point(C.pi,0),t.point(C.pi,-a),t.point(0,-a),t.point(-C.pi,-a),t.point(-C.pi,0),t.point(-C.pi,a);else if((0,C.a2)(v[0]-p[0])>C.Gg){var n=v[0]1&&i.push(i.pop().concat(i.shift()))},result:function(){var x=i;return i=[],S=null,x}}}},2728:function(H,U,e){e.d(U,{c:function(){return v}});var g=e(84220),C=e(61780),i=e(64528),S=e(41860),x=e(14229);function v(p){var r=(0,i.W8)(p),t=6*i.qw,a=r>0,n=(0,i.a2)(r)>i.Gg;function f(b,u,o,d){(0,C.Q)(d,p,t,o,b,u)}function c(b,u){return(0,i.W8)(b)*(0,i.W8)(u)>r}function l(b){var u,o,d,w,A;return{lineStart:function(){w=d=!1,A=1},point:function(_,y){var E=[_,y],T,s=c(_,y),L=a?s?0:h(_,y):s?h(_+(_<0?i.pi:-i.pi),y):0;if(!u&&(w=d=s)&&b.lineStart(),s!==d&&(T=m(u,E),(!T||(0,S.c)(u,T)||(0,S.c)(E,T))&&(E[2]=1)),s!==d)A=0,s?(b.lineStart(),T=m(E,u),b.point(T[0],T[1])):(T=m(u,E),b.point(T[0],T[1],2),b.lineEnd()),u=T;else if(n&&u&&a^s){var M;!(L&o)&&(M=m(E,u,!0))&&(A=0,a?(b.lineStart(),b.point(M[0][0],M[0][1]),b.point(M[1][0],M[1][1]),b.lineEnd()):(b.point(M[1][0],M[1][1]),b.lineEnd(),b.lineStart(),b.point(M[0][0],M[0][1],3)))}s&&(!u||!(0,S.c)(u,E))&&b.point(E[0],E[1]),u=E,d=s,o=L},lineEnd:function(){d&&b.lineEnd(),u=null},clean:function(){return A|(w&&d)<<1}}}function m(b,u,o){var d=(0,g.ux)(b),w=(0,g.ux)(u),A=[1,0,0],_=(0,g.CW)(d,w),y=(0,g.Ez)(_,_),E=_[0],T=y-E*E;if(!T)return!o&&b;var s=r*y/T,L=-r*E/T,M=(0,g.CW)(A,_),z=(0,g.wx)(A,s),D=(0,g.wx)(_,L);(0,g.mg)(z,D);var N=M,I=(0,g.Ez)(z,N),k=(0,g.Ez)(N,N),B=I*I-k*((0,g.Ez)(z,z)-1);if(!(B<0)){var O=(0,i._I)(B),V=(0,g.wx)(N,(-I-O)/k);if((0,g.mg)(V,z),V=(0,g.G)(V),!o)return V;var Y=b[0],j=u[0],te=b[1],ie=u[1],ue;j0^V[1]<((0,i.a2)(V[0]-Y)i.pi^(Y<=V[0]&&V[0]<=j)){var G=(0,g.wx)(N,(-I+O)/k);return(0,g.mg)(G,z),[V,(0,g.G)(G)]}}}function h(b,u){var o=a?p:i.pi-p,d=0;return b<-o?d|=1:b>o&&(d|=2),u<-o?d|=4:u>o&&(d|=8),d}return(0,x.c)(c,l,f,a?[0,-p]:[-i.pi,p-i.pi])}},14229:function(H,U,e){e.d(U,{c:function(){return v}});var g=e(97208),C=e(32232),i=e(64528),S=e(58196),x=e(84706);function v(t,a,n,f){return function(c){var l=a(c),m=(0,g.c)(),h=a(m),b=!1,u,o,d,w={point:A,lineStart:y,lineEnd:E,polygonStart:function(){w.point=T,w.lineStart=s,w.lineEnd=L,o=[],u=[]},polygonEnd:function(){w.point=A,w.lineStart=y,w.lineEnd=E,o=(0,x.Uf)(o);var M=(0,S.c)(u,f);o.length?(b||(c.polygonStart(),b=!0),(0,C.c)(o,r,M,n,c)):M&&(b||(c.polygonStart(),b=!0),c.lineStart(),n(null,null,1,c),c.lineEnd()),b&&(c.polygonEnd(),b=!1),o=u=null},sphere:function(){c.polygonStart(),c.lineStart(),n(null,null,1,c),c.lineEnd(),c.polygonEnd()}};function A(M,z){t(M,z)&&c.point(M,z)}function _(M,z){l.point(M,z)}function y(){w.point=_,l.lineStart()}function E(){w.point=A,l.lineEnd()}function T(M,z){d.push([M,z]),h.point(M,z)}function s(){h.lineStart(),d=[]}function L(){T(d[0][0],d[0][1]),h.lineEnd();var M=h.clean(),z=m.result(),D,N=z.length,I,k,B;if(d.pop(),u.push(d),d=null,!!N){if(M&1){if(k=z[0],(I=k.length-1)>0){for(b||(c.polygonStart(),b=!0),c.lineStart(),D=0;D1&&M&2&&z.push(z.pop().concat(z.shift())),o.push(z.filter(p))}}return w}}function p(t){return t.length>1}function r(t,a){return((t=t.x)[0]<0?t[1]-i.or-i.Gg:i.or-t[1])-((a=a.x)[0]<0?a[1]-i.or-i.Gg:i.or-a[1])}},21676:function(H,U,e){e.d(U,{c:function(){return r}});var g=e(64528),C=e(97208);function i(t,a,n,f,c,l){var m=t[0],h=t[1],b=a[0],u=a[1],o=0,d=1,w=b-m,A=u-h,_;if(_=n-m,!(!w&&_>0)){if(_/=w,w<0){if(_0){if(_>d)return;_>o&&(o=_)}if(_=c-m,!(!w&&_<0)){if(_/=w,w<0){if(_>d)return;_>o&&(o=_)}else if(w>0){if(_0)){if(_/=A,A<0){if(_0){if(_>d)return;_>o&&(o=_)}if(_=l-h,!(!A&&_<0)){if(_/=A,A<0){if(_>d)return;_>o&&(o=_)}else if(A>0){if(_0&&(t[0]=m+o*w,t[1]=h+o*A),d<1&&(a[0]=m+d*w,a[1]=h+d*A),!0}}}}}var S=e(32232),x=e(84706),v=1e9,p=-v;function r(t,a,n,f){function c(u,o){return t<=u&&u<=n&&a<=o&&o<=f}function l(u,o,d,w){var A=0,_=0;if(u==null||(A=m(u,d))!==(_=m(o,d))||b(u,o)<0^d>0)do w.point(A===0||A===3?t:n,A>1?f:a);while((A=(A+d+4)%4)!==_);else w.point(o[0],o[1])}function m(u,o){return(0,g.a2)(u[0]-t)0?0:3:(0,g.a2)(u[0]-n)0?2:1:(0,g.a2)(u[1]-a)0?1:0:o>0?3:2}function h(u,o){return b(u.x,o.x)}function b(u,o){var d=m(u,1),w=m(o,1);return d!==w?d-w:d===0?o[1]-u[1]:d===1?u[0]-o[0]:d===2?u[1]-o[1]:o[0]-u[0]}return function(u){var o=u,d=(0,C.c)(),w,A,_,y,E,T,s,L,M,z,D,N={point:I,lineStart:V,lineEnd:Y,polygonStart:B,polygonEnd:O};function I(te,ie){c(te,ie)&&o.point(te,ie)}function k(){for(var te=0,ie=0,ue=A.length;ief&&($-Q)*(f-oe)>(Z-oe)*(t-Q)&&++te:Z<=f&&($-Q)*(f-oe)<(Z-oe)*(t-Q)&&--te;return te}function B(){o=d,w=[],A=[],D=!0}function O(){var te=k(),ie=D&&te,ue=(w=(0,x.Uf)(w)).length;(ie||ue)&&(u.polygonStart(),ie&&(u.lineStart(),l(null,null,1,u),u.lineEnd()),ue&&(0,S.c)(w,h,te,l,u),u.polygonEnd()),o=u,w=A=_=null}function V(){N.point=j,A&&A.push(_=[]),z=!0,M=!1,s=L=NaN}function Y(){w&&(j(y,E),T&&M&&d.rejoin(),w.push(d.result())),N.point=I,M&&o.lineEnd()}function j(te,ie){var ue=c(te,ie);if(A&&_.push([te,ie]),z)y=te,E=ie,T=ue,z=!1,ue&&(o.lineStart(),o.point(te,ie));else if(ue&&M)o.point(te,ie);else{var J=[s=Math.max(p,Math.min(v,s)),L=Math.max(p,Math.min(v,L))],X=[te=Math.max(p,Math.min(v,te)),ie=Math.max(p,Math.min(v,ie))];i(J,X,t,a,n,f)?(M||(o.lineStart(),o.point(J[0],J[1])),o.point(X[0],X[1]),ue||o.lineEnd(),D=!1):ue&&(o.lineStart(),o.point(te,ie),D=!1)}s=te,L=ie,M=ue}return N}}},32232:function(H,U,e){e.d(U,{c:function(){return S}});var g=e(41860),C=e(64528);function i(v,p,r,t){this.x=v,this.z=p,this.o=r,this.e=t,this.v=!1,this.n=this.p=null}function S(v,p,r,t,a){var n=[],f=[],c,l;if(v.forEach(function(d){if(!((w=d.length-1)<=0)){var w,A=d[0],_=d[w],y;if((0,g.c)(A,_)){if(!A[2]&&!_[2]){for(a.lineStart(),c=0;c=0;--c)a.point((b=h[c])[0],b[1]);else t(u.x,u.p.x,-1,a);u=u.p}u=u.o,h=u.z,o=!o}while(!u.v);a.lineEnd()}}}function x(v){if(p=v.length){for(var p,r=0,t=v[0],a;++r0&&(an=T(Tr[pn],Tr[pn-1]),an>0&&Wr<=an&&Ur<=an&&(Wr+Ur-an)*(1-Math.pow((Wr-Ur)/an,2))n.Gg}).map(li)).concat((0,O.ik)((0,n.Km)(pn/ni)*ni,an,ni).filter(function(Tn){return(0,n.a2)(Tn%di)>n.Gg}).map(ri))}return dn.lines=function(){return Hn().map(function(Tn){return{type:"LineString",coordinates:Tn}})},dn.outline=function(){return{type:"Polygon",coordinates:[wr(Ur).concat(nn(gn).slice(1),wr(Wr).reverse().slice(1),nn(_n).reverse().slice(1))]}},dn.extent=function(Tn){return arguments.length?dn.extentMajor(Tn).extentMinor(Tn):dn.extentMinor()},dn.extentMajor=function(Tn){return arguments.length?(Ur=+Tn[0][0],Wr=+Tn[1][0],_n=+Tn[0][1],gn=+Tn[1][1],Ur>Wr&&(Tn=Ur,Ur=Wr,Wr=Tn),_n>gn&&(Tn=_n,_n=gn,gn=Tn),dn.precision($r)):[[Ur,_n],[Wr,gn]]},dn.extentMinor=function(Tn){return arguments.length?(Cr=+Tn[0][0],Tr=+Tn[1][0],pn=+Tn[0][1],an=+Tn[1][1],Cr>Tr&&(Tn=Cr,Cr=Tr,Tr=Tn),pn>an&&(Tn=pn,pn=an,an=Tn),dn.precision($r)):[[Cr,pn],[Tr,an]]},dn.step=function(Tn){return arguments.length?dn.stepMajor(Tn).stepMinor(Tn):dn.stepMinor()},dn.stepMajor=function(Tn){return arguments.length?(ci=+Tn[0],di=+Tn[1],dn):[ci,di]},dn.stepMinor=function(Tn){return arguments.length?(kn=+Tn[0],ni=+Tn[1],dn):[kn,ni]},dn.precision=function(Tn){return arguments.length?($r=+Tn,li=V(pn,an,90),ri=Y(Cr,Tr,$r),wr=V(_n,gn,90),nn=Y(Ur,Wr,$r),dn):$r},dn.extentMajor([[-180,-90+n.Gg],[180,90-n.Gg]]).extentMinor([[-180,-80-n.Gg],[180,80+n.Gg]])}function te(){return j()()}var ie=e(27284),ue=e(7376),J=(0,a.c)(),X=(0,a.c)(),ee,G,Q,oe,$={point:f.c,lineStart:f.c,lineEnd:f.c,polygonStart:function(){$.lineStart=Z,$.lineEnd=ce},polygonEnd:function(){$.lineStart=$.lineEnd=$.point=f.c,J.add((0,n.a2)(X)),X.reset()},result:function(){var Tr=J/2;return J.reset(),Tr}};function Z(){$.point=se}function se(Tr,Cr){$.point=ne,ee=Q=Tr,G=oe=Cr}function ne(Tr,Cr){X.add(oe*Tr-Q*Cr),Q=Tr,oe=Cr}function ce(){ne(ee,G)}var ge=$,Te=e(73784),we=0,Re=0,be=0,Ae=0,me=0,Le=0,Ve=0,Ue=0,ke=0,He,Ie,rt,Ke,$e={point:lt,lineStart:ht,lineEnd:St,polygonStart:function(){$e.lineStart=nt,$e.lineEnd=ze},polygonEnd:function(){$e.point=lt,$e.lineStart=ht,$e.lineEnd=St},result:function(){var Tr=ke?[Ve/ke,Ue/ke]:Le?[Ae/Le,me/Le]:be?[we/be,Re/be]:[NaN,NaN];return we=Re=be=Ae=me=Le=Ve=Ue=ke=0,Tr}};function lt(Tr,Cr){we+=Tr,Re+=Cr,++be}function ht(){$e.point=dt}function dt(Tr,Cr){$e.point=xt,lt(rt=Tr,Ke=Cr)}function xt(Tr,Cr){var Wr=Tr-rt,Ur=Cr-Ke,an=(0,n._I)(Wr*Wr+Ur*Ur);Ae+=an*(rt+Tr)/2,me+=an*(Ke+Cr)/2,Le+=an,lt(rt=Tr,Ke=Cr)}function St(){$e.point=lt}function nt(){$e.point=Ze}function ze(){Je(He,Ie)}function Ze(Tr,Cr){$e.point=Je,lt(He=rt=Tr,Ie=Ke=Cr)}function Je(Tr,Cr){var Wr=Tr-rt,Ur=Cr-Ke,an=(0,n._I)(Wr*Wr+Ur*Ur);Ae+=an*(rt+Tr)/2,me+=an*(Ke+Cr)/2,Le+=an,an=Ke*Tr-rt*Cr,Ve+=an*(rt+Tr),Ue+=an*(Ke+Cr),ke+=an*3,lt(rt=Tr,Ke=Cr)}var We=$e;function Fe(Tr){this._context=Tr}Fe.prototype={_radius:4.5,pointRadius:function(Tr){return this._radius=Tr,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Tr,Cr){switch(this._point){case 0:{this._context.moveTo(Tr,Cr),this._point=1;break}case 1:{this._context.lineTo(Tr,Cr);break}default:{this._context.moveTo(Tr+this._radius,Cr),this._context.arc(Tr,Cr,this._radius,0,n.kD);break}}},result:f.c};var xe=(0,a.c)(),ye,Ee,Me,Ne,je,it={point:f.c,lineStart:function(){it.point=mt},lineEnd:function(){ye&&bt(Ee,Me),it.point=f.c},polygonStart:function(){ye=!0},polygonEnd:function(){ye=null},result:function(){var Tr=+xe;return xe.reset(),Tr}};function mt(Tr,Cr){it.point=bt,Ee=Ne=Tr,Me=je=Cr}function bt(Tr,Cr){Ne-=Tr,je-=Cr,xe.add((0,n._I)(Ne*Ne+je*je)),Ne=Tr,je=Cr}var vt=it;function Lt(){this._string=[]}Lt.prototype={_radius:4.5,_circle:ct(4.5),pointRadius:function(Tr){return(Tr=+Tr)!==this._radius&&(this._radius=Tr,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Tr,Cr){switch(this._point){case 0:{this._string.push("M",Tr,",",Cr),this._point=1;break}case 1:{this._string.push("L",Tr,",",Cr);break}default:{this._circle==null&&(this._circle=ct(this._radius)),this._string.push("M",Tr,",",Cr,this._circle);break}}},result:function(){if(this._string.length){var Tr=this._string.join("");return this._string=[],Tr}else return null}};function ct(Tr){return"m0,"+Tr+"a"+Tr+","+Tr+" 0 1,1 0,"+-2*Tr+"a"+Tr+","+Tr+" 0 1,1 0,"+2*Tr+"z"}function Tt(Tr,Cr){var Wr=4.5,Ur,an;function pn(gn){return gn&&(typeof Wr=="function"&&an.pointRadius(+Wr.apply(this,arguments)),(0,c.c)(gn,Ur(an))),an.result()}return pn.area=function(gn){return(0,c.c)(gn,Ur(ge)),ge.result()},pn.measure=function(gn){return(0,c.c)(gn,Ur(vt)),vt.result()},pn.bounds=function(gn){return(0,c.c)(gn,Ur(Te.c)),Te.c.result()},pn.centroid=function(gn){return(0,c.c)(gn,Ur(We)),We.result()},pn.projection=function(gn){return arguments.length?(Ur=gn==null?(Tr=null,ue.c):(Tr=gn).stream,pn):Tr},pn.context=function(gn){return arguments.length?(an=gn==null?(Cr=null,new Lt):new Fe(Cr=gn),typeof Wr!="function"&&an.pointRadius(Wr),pn):Cr},pn.pointRadius=function(gn){return arguments.length?(Wr=typeof gn=="function"?gn:(an.pointRadius(+gn),+gn),pn):Wr},pn.projection(Tr).context(Cr)}var Bt=e(87952);function ir(Tr){var Cr=0,Wr=n.pi/3,Ur=(0,Bt.U)(Tr),an=Ur(Cr,Wr);return an.parallels=function(pn){return arguments.length?Ur(Cr=pn[0]*n.qw,Wr=pn[1]*n.qw):[Cr*n.oh,Wr*n.oh]},an}function pt(Tr){var Cr=(0,n.W8)(Tr);function Wr(Ur,an){return[Ur*Cr,(0,n.g$)(an)/Cr]}return Wr.invert=function(Ur,an){return[Ur/Cr,(0,n.qR)(an*Cr)]},Wr}function Xt(Tr,Cr){var Wr=(0,n.g$)(Tr),Ur=(Wr+(0,n.g$)(Cr))/2;if((0,n.a2)(Ur)=.12&&$r<.234&&nn>=-.425&&nn<-.214?an:$r>=.166&&$r<.234&&nn>=-.214&&nn<-.115?gn:Wr).invert(li)},ci.stream=function(li){return Tr&&Cr===li?Tr:Tr=gt([Wr.stream(Cr=li),an.stream(li),gn.stream(li)])},ci.precision=function(li){return arguments.length?(Wr.precision(li),an.precision(li),gn.precision(li),di()):Wr.precision()},ci.scale=function(li){return arguments.length?(Wr.scale(li),an.scale(li*.35),gn.scale(li),ci.translate(Wr.translate())):Wr.scale()},ci.translate=function(li){if(!arguments.length)return Wr.translate();var ri=Wr.scale(),wr=+li[0],nn=+li[1];return Ur=Wr.translate(li).clipExtent([[wr-.455*ri,nn-.238*ri],[wr+.455*ri,nn+.238*ri]]).stream(ni),pn=an.translate([wr-.307*ri,nn+.201*ri]).clipExtent([[wr-.425*ri+n.Gg,nn+.12*ri+n.Gg],[wr-.214*ri-n.Gg,nn+.234*ri-n.Gg]]).stream(ni),_n=gn.translate([wr-.205*ri,nn+.212*ri]).clipExtent([[wr-.214*ri+n.Gg,nn+.166*ri+n.Gg],[wr-.115*ri-n.Gg,nn+.234*ri-n.Gg]]).stream(ni),di()},ci.fitExtent=function(li,ri){return(0,$t.QX)(ci,li,ri)},ci.fitSize=function(li,ri){return(0,$t.UV)(ci,li,ri)},ci.fitWidth=function(li,ri){return(0,$t.Qx)(ci,li,ri)},ci.fitHeight=function(li,ri){return(0,$t.OW)(ci,li,ri)};function di(){return Tr=Cr=null,ci}return ci.scale(1070)}var At=e(54724),Ct=e(69020),It=e(92992);function Pt(Tr,Cr){return[Tr,(0,n.Yz)((0,n.a6)((n.or+Cr)/2))]}Pt.invert=function(Tr,Cr){return[Tr,2*(0,n.MQ)((0,n.oN)(Cr))-n.or]};function kt(){return Ht(Pt).scale(961/n.kD)}function Ht(Tr){var Cr=(0,Bt.c)(Tr),Wr=Cr.center,Ur=Cr.scale,an=Cr.translate,pn=Cr.clipExtent,gn=null,_n,kn,ni;Cr.scale=function(di){return arguments.length?(Ur(di),ci()):Ur()},Cr.translate=function(di){return arguments.length?(an(di),ci()):an()},Cr.center=function(di){return arguments.length?(Wr(di),ci()):Wr()},Cr.clipExtent=function(di){return arguments.length?(di==null?gn=_n=kn=ni=null:(gn=+di[0][0],_n=+di[0][1],kn=+di[1][0],ni=+di[1][1]),ci()):gn==null?null:[[gn,_n],[kn,ni]]};function ci(){var di=n.pi*Ur(),li=Cr((0,It.c)(Cr.rotate()).invert([0,0]));return pn(gn==null?[[li[0]-di,li[1]-di],[li[0]+di,li[1]+di]]:Tr===Pt?[[Math.max(li[0]-di,gn),_n],[Math.min(li[0]+di,kn),ni]]:[[gn,Math.max(li[1]-di,_n)],[kn,Math.min(li[1]+di,ni)]])}return ci()}function Jt(Tr){return(0,n.a6)((n.or+Tr)/2)}function ur(Tr,Cr){var Wr=(0,n.W8)(Tr),Ur=Tr===Cr?(0,n.g$)(Tr):(0,n.Yz)(Wr/(0,n.W8)(Cr))/(0,n.Yz)(Jt(Cr)/Jt(Tr)),an=Wr*(0,n.g3)(Jt(Tr),Ur)/Ur;if(!Ur)return Pt;function pn(gn,_n){an>0?_n<-n.or+n.Gg&&(_n=-n.or+n.Gg):_n>n.or-n.Gg&&(_n=n.or-n.Gg);var kn=an/(0,n.g3)(Jt(_n),Ur);return[kn*(0,n.g$)(Ur*gn),an-kn*(0,n.W8)(Ur*gn)]}return pn.invert=function(gn,_n){var kn=an-_n,ni=(0,n.kq)(Ur)*(0,n._I)(gn*gn+kn*kn),ci=(0,n.WE)(gn,(0,n.a2)(kn))*(0,n.kq)(kn);return kn*Ur<0&&(ci-=n.pi*(0,n.kq)(gn)*(0,n.kq)(kn)),[ci/Ur,2*(0,n.MQ)((0,n.g3)(an/ni,1/Ur))-n.or]},pn}function hr(){return ir(ur).scale(109.5).parallels([30,30])}var vr=e(69604);function Ye(Tr,Cr){var Wr=(0,n.W8)(Tr),Ur=Tr===Cr?(0,n.g$)(Tr):(Wr-(0,n.W8)(Cr))/(Cr-Tr),an=Wr/Ur+Tr;if((0,n.a2)(Ur)2?Ur[2]+90:90]):(Ur=Wr(),[Ur[0],Ur[1],Ur[2]-90])},Wr([0,0,90]).scale(159.155)}},27284:function(H,U,e){e.d(U,{c:function(){return C}});var g=e(64528);function C(i,S){var x=i[0]*g.qw,v=i[1]*g.qw,p=S[0]*g.qw,r=S[1]*g.qw,t=(0,g.W8)(v),a=(0,g.g$)(v),n=(0,g.W8)(r),f=(0,g.g$)(r),c=t*(0,g.W8)(x),l=t*(0,g.g$)(x),m=n*(0,g.W8)(p),h=n*(0,g.g$)(p),b=2*(0,g.qR)((0,g._I)((0,g.SD)(r-v)+t*n*(0,g.SD)(p-x))),u=(0,g.g$)(b),o=b?function(d){var w=(0,g.g$)(d*=b)/u,A=(0,g.g$)(b-d)/u,_=A*c+w*m,y=A*l+w*h,E=A*a+w*f;return[(0,g.WE)(y,_)*g.oh,(0,g.WE)(E,(0,g._I)(_*_+y*y))*g.oh]}:function(){return[x*g.oh,v*g.oh]};return o.distance=b,o}},64528:function(H,U,e){e.d(U,{Gg:function(){return g},Km:function(){return c},MQ:function(){return a},SD:function(){return _},W8:function(){return f},WE:function(){return n},Yz:function(){return m},_I:function(){return o},a2:function(){return t},a6:function(){return d},a8:function(){return C},g$:function(){return b},g3:function(){return h},kD:function(){return v},kq:function(){return u},mE:function(){return w},oN:function(){return l},oh:function(){return p},or:function(){return S},pi:function(){return i},qR:function(){return A},qw:function(){return r},wL:function(){return x}});var g=1e-6,C=1e-12,i=Math.PI,S=i/2,x=i/4,v=i*2,p=180/i,r=i/180,t=Math.abs,a=Math.atan,n=Math.atan2,f=Math.cos,c=Math.ceil,l=Math.exp,m=Math.log,h=Math.pow,b=Math.sin,u=Math.sign||function(y){return y>0?1:y<0?-1:0},o=Math.sqrt,d=Math.tan;function w(y){return y>1?0:y<-1?i:Math.acos(y)}function A(y){return y>1?S:y<-1?-S:Math.asin(y)}function _(y){return(y=b(y/2))*y}},70932:function(H,U,e){e.d(U,{c:function(){return g}});function g(){}},73784:function(H,U,e){var g=e(70932),C=1/0,i=C,S=-C,x=S,v={point:p,lineStart:g.c,lineEnd:g.c,polygonStart:g.c,polygonEnd:g.c,result:function(){var r=[[C,i],[S,x]];return S=x=-(i=C=1/0),r}};function p(r,t){rS&&(S=r),tx&&(x=t)}U.c=v},41860:function(H,U,e){e.d(U,{c:function(){return C}});var g=e(64528);function C(i,S){return(0,g.a2)(i[0]-S[0])=0?1:-1,N=D*z,I=N>i.pi,k=A*L;if(S.add((0,i.WE)(k*D*(0,i.g$)(N),_*M+k*(0,i.W8)(N))),c+=I?z+D*i.kD:z,I^d>=t^T>=t){var B=(0,C.CW)((0,C.ux)(o),(0,C.ux)(E));(0,C.cJ)(B);var O=(0,C.CW)(f,B);(0,C.cJ)(O);var V=(I^z>=0?-1:1)*(0,i.qR)(O[2]);(a>V||a===V&&(B[0]||B[1]))&&(l+=I^z>=0?1:-1)}}return(c<-i.Gg||c4*_&&V--){var ue=L+k,J=M+B,X=z+O,ee=(0,v._I)(ue*ue+J*J+X*X),G=(0,v.qR)(X/=ee),Q=(0,v.a2)((0,v.a2)(X)-1)_||(0,v.a2)((j*se+te*ne)/ie-.5)>.3||L*k+M*B+z*O2?ce[2]%360*v.qw:0,se()):[M*v.oh,z*v.oh,D*v.oh]},$.angle=function(ce){return arguments.length?(I=ce%360*v.qw,se()):I*v.oh},$.reflectX=function(ce){return arguments.length?(k=ce?-1:1,se()):k<0},$.reflectY=function(ce){return arguments.length?(B=ce?-1:1,se()):B<0},$.precision=function(ce){return arguments.length?(X=c(ee,J=ce*ce),ne()):(0,v._I)(J)},$.fitExtent=function(ce,ge){return(0,t.QX)($,ce,ge)},$.fitSize=function(ce,ge){return(0,t.UV)($,ce,ge)},$.fitWidth=function(ce,ge){return(0,t.Qx)($,ce,ge)},$.fitHeight=function(ce,ge){return(0,t.OW)($,ce,ge)};function se(){var ce=o(y,0,0,k,B,I).apply(null,_(s,L)),ge=(I?o:u)(y,E-ce[0],T-ce[1],k,B,I);return N=(0,p.O)(M,z,D),ee=(0,S.c)(_,ge),G=(0,S.c)(N,ee),X=c(ee,J),ne()}function ne(){return Q=oe=null,$}return function(){return _=A.apply(this,arguments),$.invert=_.invert&&Z,se()}}},47984:function(H,U,e){e.d(U,{c:function(){return S},g:function(){return i}});var g=e(87952),C=e(64528);function i(x,v){var p=v*v,r=p*p;return[x*(.8707-.131979*p+r*(-.013791+r*(.003971*p-.001529*r))),v*(1.007226+p*(.015085+r*(-.044475+.028874*p-.005916*r)))]}i.invert=function(x,v){var p=v,r=25,t;do{var a=p*p,n=a*a;p-=t=(p*(1.007226+a*(.015085+n*(-.044475+.028874*a-.005916*n)))-v)/(1.007226+a*(.045255+n*(-.311325+.259866*a-.06507600000000001*n)))}while((0,C.a2)(t)>C.Gg&&--r>0);return[x/(.8707+(a=p*p)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),p]};function S(){return(0,g.c)(i).scale(175.295)}},4888:function(H,U,e){e.d(U,{c:function(){return x},t:function(){return S}});var g=e(64528),C=e(62280),i=e(87952);function S(v,p){return[(0,g.W8)(p)*(0,g.g$)(v),(0,g.g$)(p)]}S.invert=(0,C.g)(g.qR);function x(){return(0,i.c)(S).scale(249.5).clipAngle(90+g.Gg)}},92992:function(H,U,e){e.d(U,{O:function(){return S},c:function(){return r}});var g=e(68120),C=e(64528);function i(t,a){return[(0,C.a2)(t)>C.pi?t+Math.round(-t/C.kD)*C.kD:t,a]}i.invert=i;function S(t,a,n){return(t%=C.kD)?a||n?(0,g.c)(v(t),p(a,n)):v(t):a||n?p(a,n):i}function x(t){return function(a,n){return a+=t,[a>C.pi?a-C.kD:a<-C.pi?a+C.kD:a,n]}}function v(t){var a=x(t);return a.invert=x(-t),a}function p(t,a){var n=(0,C.W8)(t),f=(0,C.g$)(t),c=(0,C.W8)(a),l=(0,C.g$)(a);function m(h,b){var u=(0,C.W8)(b),o=(0,C.W8)(h)*u,d=(0,C.g$)(h)*u,w=(0,C.g$)(b),A=w*n+o*f;return[(0,C.WE)(d*c-A*l,o*n-w*f),(0,C.qR)(A*c+d*l)]}return m.invert=function(h,b){var u=(0,C.W8)(b),o=(0,C.W8)(h)*u,d=(0,C.g$)(h)*u,w=(0,C.g$)(b),A=w*c-d*l;return[(0,C.WE)(d*c+w*l,o*n+A*f),(0,C.qR)(A*n-o*f)]},m}function r(t){t=S(t[0]*C.qw,t[1]*C.qw,t.length>2?t[2]*C.qw:0);function a(n){return n=t(n[0]*C.qw,n[1]*C.qw),n[0]*=C.oh,n[1]*=C.oh,n}return a.invert=function(n){return n=t.invert(n[0]*C.qw,n[1]*C.qw),n[0]*=C.oh,n[1]*=C.oh,n},a}},16016:function(H,U,e){e.d(U,{c:function(){return v}});function g(p,r){p&&i.hasOwnProperty(p.type)&&i[p.type](p,r)}var C={Feature:function(p,r){g(p.geometry,r)},FeatureCollection:function(p,r){for(var t=p.features,a=-1,n=t.length;++a=0;)xe+=ye[Ee].value;Fe.value=xe}function a(){return this.eachAfter(t)}function n(Fe){var xe=this,ye,Ee=[xe],Me,Ne,je;do for(ye=Ee.reverse(),Ee=[];xe=ye.pop();)if(Fe(xe),Me=xe.children,Me)for(Ne=0,je=Me.length;Ne=0;--Me)ye.push(Ee[Me]);return this}function c(Fe){for(var xe=this,ye=[xe],Ee=[],Me,Ne,je;xe=ye.pop();)if(Ee.push(xe),Me=xe.children,Me)for(Ne=0,je=Me.length;Ne=0;)ye+=Ee[Me].value;xe.value=ye})}function m(Fe){return this.eachBefore(function(xe){xe.children&&xe.children.sort(Fe)})}function h(Fe){for(var xe=this,ye=b(xe,Fe),Ee=[xe];xe!==ye;)xe=xe.parent,Ee.push(xe);for(var Me=Ee.length;Fe!==ye;)Ee.splice(Me,0,Fe),Fe=Fe.parent;return Ee}function b(Fe,xe){if(Fe===xe)return Fe;var ye=Fe.ancestors(),Ee=xe.ancestors(),Me=null;for(Fe=ye.pop(),xe=Ee.pop();Fe===xe;)Me=Fe,Fe=ye.pop(),xe=Ee.pop();return Me}function u(){for(var Fe=this,xe=[Fe];Fe=Fe.parent;)xe.push(Fe);return xe}function o(){var Fe=[];return this.each(function(xe){Fe.push(xe)}),Fe}function d(){var Fe=[];return this.eachBefore(function(xe){xe.children||Fe.push(xe)}),Fe}function w(){var Fe=this,xe=[];return Fe.each(function(ye){ye!==Fe&&xe.push({source:ye.parent,target:ye})}),xe}function A(Fe,xe){var ye=new s(Fe),Ee=+Fe.value&&(ye.value=Fe.value),Me,Ne=[ye],je,it,mt,bt;for(xe==null&&(xe=y);Me=Ne.pop();)if(Ee&&(Me.value=+Me.data.value),(it=xe(Me.data))&&(bt=it.length))for(Me.children=new Array(bt),mt=bt-1;mt>=0;--mt)Ne.push(je=Me.children[mt]=new s(it[mt])),je.parent=Me,je.depth=Me.depth+1;return ye.eachBefore(T)}function _(){return A(this).eachBefore(E)}function y(Fe){return Fe.children}function E(Fe){Fe.data=Fe.data.data}function T(Fe){var xe=0;do Fe.height=xe;while((Fe=Fe.parent)&&Fe.height<++xe)}function s(Fe){this.data=Fe,this.depth=this.height=0,this.parent=null}s.prototype=A.prototype={constructor:s,count:a,each:n,eachAfter:c,eachBefore:f,sum:l,sort:m,path:h,ancestors:u,descendants:o,leaves:d,links:w,copy:_};var L=Array.prototype.slice;function M(Fe){for(var xe=Fe.length,ye,Ee;xe;)Ee=Math.random()*xe--|0,ye=Fe[xe],Fe[xe]=Fe[Ee],Fe[Ee]=ye;return Fe}function z(Fe){for(var xe=0,ye=(Fe=M(L.call(Fe))).length,Ee=[],Me,Ne;xe0&&ye*ye>Ee*Ee+Me*Me}function k(Fe,xe){for(var ye=0;yemt?(Me=(bt+mt-Ne)/(2*bt),it=Math.sqrt(Math.max(0,mt/bt-Me*Me)),ye.x=Fe.x-Me*Ee-it*je,ye.y=Fe.y-Me*je+it*Ee):(Me=(bt+Ne-mt)/(2*bt),it=Math.sqrt(Math.max(0,Ne/bt-Me*Me)),ye.x=xe.x+Me*Ee-it*je,ye.y=xe.y+Me*je+it*Ee)):(ye.x=xe.x+ye.r,ye.y=xe.y)}function te(Fe,xe){var ye=Fe.r+xe.r-1e-6,Ee=xe.x-Fe.x,Me=xe.y-Fe.y;return ye>0&&ye*ye>Ee*Ee+Me*Me}function ie(Fe){var xe=Fe._,ye=Fe.next._,Ee=xe.r+ye.r,Me=(xe.x*ye.r+ye.x*xe.r)/Ee,Ne=(xe.y*ye.r+ye.y*xe.r)/Ee;return Me*Me+Ne*Ne}function ue(Fe){this._=Fe,this.next=null,this.previous=null}function J(Fe){if(!(Me=Fe.length))return 0;var xe,ye,Ee,Me,Ne,je,it,mt,bt,vt,Lt;if(xe=Fe[0],xe.x=0,xe.y=0,!(Me>1))return xe.r;if(ye=Fe[1],xe.x=-ye.r,ye.x=xe.r,ye.y=0,!(Me>2))return xe.r+ye.r;j(ye,xe,Ee=Fe[2]),xe=new ue(xe),ye=new ue(ye),Ee=new ue(Ee),xe.next=Ee.previous=ye,ye.next=xe.previous=Ee,Ee.next=ye.previous=xe;e:for(it=3;it0)throw new Error("cycle");return it}return ye.id=function(Ee){return arguments.length?(Fe=G(Ee),ye):Fe},ye.parentId=function(Ee){return arguments.length?(xe=G(Ee),ye):xe},ye}function Ue(Fe,xe){return Fe.parent===xe.parent?1:2}function ke(Fe){var xe=Fe.children;return xe?xe[0]:Fe.t}function He(Fe){var xe=Fe.children;return xe?xe[xe.length-1]:Fe.t}function Ie(Fe,xe,ye){var Ee=ye/(xe.i-Fe.i);xe.c-=Ee,xe.s+=ye,Fe.c+=Ee,xe.z+=ye,xe.m+=ye}function rt(Fe){for(var xe=0,ye=0,Ee=Fe.children,Me=Ee.length,Ne;--Me>=0;)Ne=Ee[Me],Ne.z+=xe,Ne.m+=xe,xe+=Ne.s+(ye+=Ne.c)}function Ke(Fe,xe,ye){return Fe.a.parent===xe.parent?Fe.a:ye}function $e(Fe,xe){this._=Fe,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=xe}$e.prototype=Object.create(s.prototype);function lt(Fe){for(var xe=new $e(Fe,0),ye,Ee=[xe],Me,Ne,je,it;ye=Ee.pop();)if(Ne=ye._.children)for(ye.children=new Array(it=Ne.length),je=it-1;je>=0;--je)Ee.push(Me=ye.children[je]=new $e(Ne[je],je)),Me.parent=ye;return(xe.parent=new $e(null,0)).children=[xe],xe}function ht(){var Fe=Ue,xe=1,ye=1,Ee=null;function Me(bt){var vt=lt(bt);if(vt.eachAfter(Ne),vt.parent.m=-vt.z,vt.eachBefore(je),Ee)bt.eachBefore(mt);else{var Lt=bt,ct=bt,Tt=bt;bt.eachBefore(function(Kt){Kt.xct.x&&(ct=Kt),Kt.depth>Tt.depth&&(Tt=Kt)});var Bt=Lt===ct?1:Fe(Lt,ct)/2,ir=Bt-Lt.x,pt=xe/(ct.x+Bt+ir),Xt=ye/(Tt.depth||1);bt.eachBefore(function(Kt){Kt.x=(Kt.x+ir)*pt,Kt.y=Kt.depth*Xt})}return bt}function Ne(bt){var vt=bt.children,Lt=bt.parent.children,ct=bt.i?Lt[bt.i-1]:null;if(vt){rt(bt);var Tt=(vt[0].z+vt[vt.length-1].z)/2;ct?(bt.z=ct.z+Fe(bt._,ct._),bt.m=bt.z-Tt):bt.z=Tt}else ct&&(bt.z=ct.z+Fe(bt._,ct._));bt.parent.A=it(bt,ct,bt.parent.A||Lt[0])}function je(bt){bt._.x=bt.z+bt.parent.m,bt.m+=bt.parent.m}function it(bt,vt,Lt){if(vt){for(var ct=bt,Tt=bt,Bt=vt,ir=ct.parent.children[0],pt=ct.m,Xt=Tt.m,Kt=Bt.m,or=ir.m,$t;Bt=He(Bt),ct=ke(ct),Bt&&ct;)ir=ke(ir),Tt=He(Tt),Tt.a=bt,$t=Bt.z+Kt-ct.z-pt+Fe(Bt._,ct._),$t>0&&(Ie(Ke(Bt,bt,Lt),bt,$t),pt+=$t,Xt+=$t),Kt+=Bt.m,pt+=ct.m,or+=ir.m,Xt+=Tt.m;Bt&&!He(Tt)&&(Tt.t=Bt,Tt.m+=Kt-Xt),ct&&!ke(ir)&&(ir.t=ct,ir.m+=pt-or,Lt=bt)}return Lt}function mt(bt){bt.x*=xe,bt.y=bt.depth*ye}return Me.separation=function(bt){return arguments.length?(Fe=bt,Me):Fe},Me.size=function(bt){return arguments.length?(Ee=!1,xe=+bt[0],ye=+bt[1],Me):Ee?null:[xe,ye]},Me.nodeSize=function(bt){return arguments.length?(Ee=!0,xe=+bt[0],ye=+bt[1],Me):Ee?[xe,ye]:null},Me}function dt(Fe,xe,ye,Ee,Me){for(var Ne=Fe.children,je,it=-1,mt=Ne.length,bt=Fe.value&&(Me-ye)/Fe.value;++itKt&&(Kt=bt),st=pt*pt*gt,or=Math.max(Kt/st,st/Xt),or>$t){pt-=bt;break}$t=or}je.push(mt={value:pt,dice:Tt1?Ee:1)},ye}(xt);function ze(){var Fe=nt,xe=!1,ye=1,Ee=1,Me=[0],Ne=Q,je=Q,it=Q,mt=Q,bt=Q;function vt(ct){return ct.x0=ct.y0=0,ct.x1=ye,ct.y1=Ee,ct.eachBefore(Lt),Me=[0],xe&&ct.eachBefore(ge),ct}function Lt(ct){var Tt=Me[ct.depth],Bt=ct.x0+Tt,ir=ct.y0+Tt,pt=ct.x1-Tt,Xt=ct.y1-Tt;pt=ct-1){var Kt=Ne[Lt];Kt.x0=Bt,Kt.y0=ir,Kt.x1=pt,Kt.y1=Xt;return}for(var or=bt[Lt],$t=Tt/2+or,gt=Lt+1,st=ct-1;gt>>1;bt[At]<$t?gt=At+1:st=At}$t-bt[gt-1]Xt-ir){var Pt=(Bt*It+pt*Ct)/Tt;vt(Lt,gt,Ct,Bt,ir,Pt,Xt),vt(gt,ct,It,Pt,ir,pt,Xt)}else{var kt=(ir*It+Xt*Ct)/Tt;vt(Lt,gt,Ct,Bt,ir,pt,kt),vt(gt,ct,It,Bt,kt,pt,Xt)}}}function Je(Fe,xe,ye,Ee,Me){(Fe.depth&1?dt:Te)(Fe,xe,ye,Ee,Me)}var We=function Fe(xe){function ye(Ee,Me,Ne,je,it){if((mt=Ee._squarify)&&mt.ratio===xe)for(var mt,bt,vt,Lt,ct=-1,Tt,Bt=mt.length,ir=Ee.value;++ct1?Ee:1)},ye}(xt)},10132:function(H,U,e){e.d(U,{ak:function(){return h}});var g=Math.PI,C=2*g,i=1e-6,S=C-i;function x(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function v(){return new x}x.prototype=v.prototype={constructor:x,moveTo:function(b,u){this._+="M"+(this._x0=this._x1=+b)+","+(this._y0=this._y1=+u)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(b,u){this._+="L"+(this._x1=+b)+","+(this._y1=+u)},quadraticCurveTo:function(b,u,o,d){this._+="Q"+ +b+","+ +u+","+(this._x1=+o)+","+(this._y1=+d)},bezierCurveTo:function(b,u,o,d,w,A){this._+="C"+ +b+","+ +u+","+ +o+","+ +d+","+(this._x1=+w)+","+(this._y1=+A)},arcTo:function(b,u,o,d,w){b=+b,u=+u,o=+o,d=+d,w=+w;var A=this._x1,_=this._y1,y=o-b,E=d-u,T=A-b,s=_-u,L=T*T+s*s;if(w<0)throw new Error("negative radius: "+w);if(this._x1===null)this._+="M"+(this._x1=b)+","+(this._y1=u);else if(L>i)if(!(Math.abs(s*y-E*T)>i)||!w)this._+="L"+(this._x1=b)+","+(this._y1=u);else{var M=o-A,z=d-_,D=y*y+E*E,N=M*M+z*z,I=Math.sqrt(D),k=Math.sqrt(L),B=w*Math.tan((g-Math.acos((D+L-N)/(2*I*k)))/2),O=B/k,V=B/I;Math.abs(O-1)>i&&(this._+="L"+(b+O*T)+","+(u+O*s)),this._+="A"+w+","+w+",0,0,"+ +(s*M>T*z)+","+(this._x1=b+V*y)+","+(this._y1=u+V*E)}},arc:function(b,u,o,d,w,A){b=+b,u=+u,o=+o,A=!!A;var _=o*Math.cos(d),y=o*Math.sin(d),E=b+_,T=u+y,s=1^A,L=A?d-w:w-d;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+E+","+T:(Math.abs(this._x1-E)>i||Math.abs(this._y1-T)>i)&&(this._+="L"+E+","+T),o&&(L<0&&(L=L%C+C),L>S?this._+="A"+o+","+o+",0,1,"+s+","+(b-_)+","+(u-y)+"A"+o+","+o+",0,1,"+s+","+(this._x1=E)+","+(this._y1=T):L>i&&(this._+="A"+o+","+o+",0,"+ +(L>=g)+","+s+","+(this._x1=b+o*Math.cos(w))+","+(this._y1=u+o*Math.sin(w))))},rect:function(b,u,o,d){this._+="M"+(this._x0=this._x1=+b)+","+(this._y0=this._y1=+u)+"h"+ +o+"v"+ +d+"h"+-o+"Z"},toString:function(){return this._}};var p=v,r=Array.prototype.slice;function t(b){return function(){return b}}function a(b){return b[0]}function n(b){return b[1]}function f(b){return b.source}function c(b){return b.target}function l(b){var u=f,o=c,d=a,w=n,A=null;function _(){var y,E=r.call(arguments),T=u.apply(this,E),s=o.apply(this,E);if(A||(A=y=p()),b(A,+d.apply(this,(E[0]=T,E)),+w.apply(this,E),+d.apply(this,(E[0]=s,E)),+w.apply(this,E)),y)return A=null,y+""||null}return _.source=function(y){return arguments.length?(u=y,_):u},_.target=function(y){return arguments.length?(o=y,_):o},_.x=function(y){return arguments.length?(d=typeof y=="function"?y:t(+y),_):d},_.y=function(y){return arguments.length?(w=typeof y=="function"?y:t(+y),_):w},_.context=function(y){return arguments.length?(A=y??null,_):A},_}function m(b,u,o,d,w){b.moveTo(u,o),b.bezierCurveTo(u=(u+d)/2,o,u,w,d,w)}function h(){return l(m)}},94336:function(H,U,e){e.d(U,{Yn:function(){return Ze},m_:function(){return a},E9:function(){return Je}});var g=e(8208),C=e(58931),i=e(46192),S=e(68936),x=e(32171),v=e(53528);function p(Fe){if(0<=Fe.y&&Fe.y<100){var xe=new Date(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L);return xe.setFullYear(Fe.y),xe}return new Date(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L)}function r(Fe){if(0<=Fe.y&&Fe.y<100){var xe=new Date(Date.UTC(-1,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L));return xe.setUTCFullYear(Fe.y),xe}return new Date(Date.UTC(Fe.y,Fe.m,Fe.d,Fe.H,Fe.M,Fe.S,Fe.L))}function t(Fe,xe,ye){return{y:Fe,m:xe,d:ye,H:0,M:0,S:0,L:0}}function a(Fe){var xe=Fe.dateTime,ye=Fe.date,Ee=Fe.time,Me=Fe.periods,Ne=Fe.days,je=Fe.shortDays,it=Fe.months,mt=Fe.shortMonths,bt=b(Me),vt=u(Me),Lt=b(Ne),ct=u(Ne),Tt=b(je),Bt=u(je),ir=b(it),pt=u(it),Xt=b(mt),Kt=u(mt),or={a:Ye,A:Ge,b:Nt,B:Ot,c:null,d:j,e:j,f:X,H:te,I:ie,j:ue,L:J,m:ee,M:G,p:Qt,q:tr,Q:St,s:nt,S:Q,u:oe,U:$,V:Z,w:se,W:ne,x:null,X:null,y:ce,Y:ge,Z:Te,"%":xt},$t={a:fr,A:rr,b:Vt,B:dr,c:null,d:we,e:we,f:Le,H:Re,I:be,j:Ae,L:me,m:Ve,M:Ue,p:mr,q:xr,Q:St,s:nt,S:ke,u:He,U:Ie,V:rt,w:Ke,W:$e,x:null,X:null,y:lt,Y:ht,Z:dt,"%":xt},gt={a:Pt,A:kt,b:Ht,B:Jt,c:ur,d:M,e:M,f:B,H:D,I:D,j:z,L:k,m:L,M:N,p:It,q:s,Q:V,s:Y,S:I,u:d,U:w,V:A,w:o,W:_,x:hr,X:vr,y:E,Y:y,Z:T,"%":O};or.x=st(ye,or),or.X=st(Ee,or),or.c=st(xe,or),$t.x=st(ye,$t),$t.X=st(Ee,$t),$t.c=st(xe,$t);function st(pr,Gr){return function(Pr){var Dr=[],cn=-1,rn=0,Cn=pr.length,En,Tr,Cr;for(Pr instanceof Date||(Pr=new Date(+Pr));++cn53)return null;"w"in Dr||(Dr.w=1),"Z"in Dr?(rn=r(t(Dr.y,0,1)),Cn=rn.getUTCDay(),rn=Cn>4||Cn===0?g.ot.ceil(rn):(0,g.ot)(rn),rn=C.c.offset(rn,(Dr.V-1)*7),Dr.y=rn.getUTCFullYear(),Dr.m=rn.getUTCMonth(),Dr.d=rn.getUTCDate()+(Dr.w+6)%7):(rn=p(t(Dr.y,0,1)),Cn=rn.getDay(),rn=Cn>4||Cn===0?i.qT.ceil(rn):(0,i.qT)(rn),rn=S.c.offset(rn,(Dr.V-1)*7),Dr.y=rn.getFullYear(),Dr.m=rn.getMonth(),Dr.d=rn.getDate()+(Dr.w+6)%7)}else("W"in Dr||"U"in Dr)&&("w"in Dr||(Dr.w="u"in Dr?Dr.u%7:"W"in Dr?1:0),Cn="Z"in Dr?r(t(Dr.y,0,1)).getUTCDay():p(t(Dr.y,0,1)).getDay(),Dr.m=0,Dr.d="W"in Dr?(Dr.w+6)%7+Dr.W*7-(Cn+5)%7:Dr.w+Dr.U*7-(Cn+6)%7);return"Z"in Dr?(Dr.H+=Dr.Z/100|0,Dr.M+=Dr.Z%100,r(Dr)):p(Dr)}}function Ct(pr,Gr,Pr,Dr){for(var cn=0,rn=Gr.length,Cn=Pr.length,En,Tr;cn=Cn)return-1;if(En=Gr.charCodeAt(cn++),En===37){if(En=Gr.charAt(cn++),Tr=gt[En in n?Gr.charAt(cn++):En],!Tr||(Dr=Tr(pr,Pr,Dr))<0)return-1}else if(En!=Pr.charCodeAt(Dr++))return-1}return Dr}function It(pr,Gr,Pr){var Dr=bt.exec(Gr.slice(Pr));return Dr?(pr.p=vt[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Pt(pr,Gr,Pr){var Dr=Tt.exec(Gr.slice(Pr));return Dr?(pr.w=Bt[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function kt(pr,Gr,Pr){var Dr=Lt.exec(Gr.slice(Pr));return Dr?(pr.w=ct[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Ht(pr,Gr,Pr){var Dr=Xt.exec(Gr.slice(Pr));return Dr?(pr.m=Kt[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Jt(pr,Gr,Pr){var Dr=ir.exec(Gr.slice(Pr));return Dr?(pr.m=pt[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function ur(pr,Gr,Pr){return Ct(pr,xe,Gr,Pr)}function hr(pr,Gr,Pr){return Ct(pr,ye,Gr,Pr)}function vr(pr,Gr,Pr){return Ct(pr,Ee,Gr,Pr)}function Ye(pr){return je[pr.getDay()]}function Ge(pr){return Ne[pr.getDay()]}function Nt(pr){return mt[pr.getMonth()]}function Ot(pr){return it[pr.getMonth()]}function Qt(pr){return Me[+(pr.getHours()>=12)]}function tr(pr){return 1+~~(pr.getMonth()/3)}function fr(pr){return je[pr.getUTCDay()]}function rr(pr){return Ne[pr.getUTCDay()]}function Vt(pr){return mt[pr.getUTCMonth()]}function dr(pr){return it[pr.getUTCMonth()]}function mr(pr){return Me[+(pr.getUTCHours()>=12)]}function xr(pr){return 1+~~(pr.getUTCMonth()/3)}return{format:function(pr){var Gr=st(pr+="",or);return Gr.toString=function(){return pr},Gr},parse:function(pr){var Gr=At(pr+="",!1);return Gr.toString=function(){return pr},Gr},utcFormat:function(pr){var Gr=st(pr+="",$t);return Gr.toString=function(){return pr},Gr},utcParse:function(pr){var Gr=At(pr+="",!0);return Gr.toString=function(){return pr},Gr}}}var n={"-":"",_:" ",0:"0"},f=/^\s*\d+/,c=/^%/,l=/[\\^$*+?|[\]().{}]/g;function m(Fe,xe,ye){var Ee=Fe<0?"-":"",Me=(Ee?-Fe:Fe)+"",Ne=Me.length;return Ee+(Ne68?1900:2e3),ye+Ee[0].length):-1}function T(Fe,xe,ye){var Ee=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(xe.slice(ye,ye+6));return Ee?(Fe.Z=Ee[1]?0:-(Ee[2]+(Ee[3]||"00")),ye+Ee[0].length):-1}function s(Fe,xe,ye){var Ee=f.exec(xe.slice(ye,ye+1));return Ee?(Fe.q=Ee[0]*3-3,ye+Ee[0].length):-1}function L(Fe,xe,ye){var Ee=f.exec(xe.slice(ye,ye+2));return Ee?(Fe.m=Ee[0]-1,ye+Ee[0].length):-1}function M(Fe,xe,ye){var Ee=f.exec(xe.slice(ye,ye+2));return Ee?(Fe.d=+Ee[0],ye+Ee[0].length):-1}function z(Fe,xe,ye){var Ee=f.exec(xe.slice(ye,ye+3));return Ee?(Fe.m=0,Fe.d=+Ee[0],ye+Ee[0].length):-1}function D(Fe,xe,ye){var Ee=f.exec(xe.slice(ye,ye+2));return Ee?(Fe.H=+Ee[0],ye+Ee[0].length):-1}function N(Fe,xe,ye){var Ee=f.exec(xe.slice(ye,ye+2));return Ee?(Fe.M=+Ee[0],ye+Ee[0].length):-1}function I(Fe,xe,ye){var Ee=f.exec(xe.slice(ye,ye+2));return Ee?(Fe.S=+Ee[0],ye+Ee[0].length):-1}function k(Fe,xe,ye){var Ee=f.exec(xe.slice(ye,ye+3));return Ee?(Fe.L=+Ee[0],ye+Ee[0].length):-1}function B(Fe,xe,ye){var Ee=f.exec(xe.slice(ye,ye+6));return Ee?(Fe.L=Math.floor(Ee[0]/1e3),ye+Ee[0].length):-1}function O(Fe,xe,ye){var Ee=c.exec(xe.slice(ye,ye+1));return Ee?ye+Ee[0].length:-1}function V(Fe,xe,ye){var Ee=f.exec(xe.slice(ye));return Ee?(Fe.Q=+Ee[0],ye+Ee[0].length):-1}function Y(Fe,xe,ye){var Ee=f.exec(xe.slice(ye));return Ee?(Fe.s=+Ee[0],ye+Ee[0].length):-1}function j(Fe,xe){return m(Fe.getDate(),xe,2)}function te(Fe,xe){return m(Fe.getHours(),xe,2)}function ie(Fe,xe){return m(Fe.getHours()%12||12,xe,2)}function ue(Fe,xe){return m(1+S.c.count((0,x.c)(Fe),Fe),xe,3)}function J(Fe,xe){return m(Fe.getMilliseconds(),xe,3)}function X(Fe,xe){return J(Fe,xe)+"000"}function ee(Fe,xe){return m(Fe.getMonth()+1,xe,2)}function G(Fe,xe){return m(Fe.getMinutes(),xe,2)}function Q(Fe,xe){return m(Fe.getSeconds(),xe,2)}function oe(Fe){var xe=Fe.getDay();return xe===0?7:xe}function $(Fe,xe){return m(i.uU.count((0,x.c)(Fe)-1,Fe),xe,2)}function Z(Fe,xe){var ye=Fe.getDay();return Fe=ye>=4||ye===0?(0,i.kD)(Fe):i.kD.ceil(Fe),m(i.kD.count((0,x.c)(Fe),Fe)+((0,x.c)(Fe).getDay()===4),xe,2)}function se(Fe){return Fe.getDay()}function ne(Fe,xe){return m(i.qT.count((0,x.c)(Fe)-1,Fe),xe,2)}function ce(Fe,xe){return m(Fe.getFullYear()%100,xe,2)}function ge(Fe,xe){return m(Fe.getFullYear()%1e4,xe,4)}function Te(Fe){var xe=Fe.getTimezoneOffset();return(xe>0?"-":(xe*=-1,"+"))+m(xe/60|0,"0",2)+m(xe%60,"0",2)}function we(Fe,xe){return m(Fe.getUTCDate(),xe,2)}function Re(Fe,xe){return m(Fe.getUTCHours(),xe,2)}function be(Fe,xe){return m(Fe.getUTCHours()%12||12,xe,2)}function Ae(Fe,xe){return m(1+C.c.count((0,v.c)(Fe),Fe),xe,3)}function me(Fe,xe){return m(Fe.getUTCMilliseconds(),xe,3)}function Le(Fe,xe){return me(Fe,xe)+"000"}function Ve(Fe,xe){return m(Fe.getUTCMonth()+1,xe,2)}function Ue(Fe,xe){return m(Fe.getUTCMinutes(),xe,2)}function ke(Fe,xe){return m(Fe.getUTCSeconds(),xe,2)}function He(Fe){var xe=Fe.getUTCDay();return xe===0?7:xe}function Ie(Fe,xe){return m(g.EV.count((0,v.c)(Fe)-1,Fe),xe,2)}function rt(Fe,xe){var ye=Fe.getUTCDay();return Fe=ye>=4||ye===0?(0,g.yA)(Fe):g.yA.ceil(Fe),m(g.yA.count((0,v.c)(Fe),Fe)+((0,v.c)(Fe).getUTCDay()===4),xe,2)}function Ke(Fe){return Fe.getUTCDay()}function $e(Fe,xe){return m(g.ot.count((0,v.c)(Fe)-1,Fe),xe,2)}function lt(Fe,xe){return m(Fe.getUTCFullYear()%100,xe,2)}function ht(Fe,xe){return m(Fe.getUTCFullYear()%1e4,xe,4)}function dt(){return"+0000"}function xt(){return"%"}function St(Fe){return+Fe}function nt(Fe){return Math.floor(+Fe/1e3)}var ze,Ze,Je;We({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function We(Fe){return ze=a(Fe),Ze=ze.format,ze.parse,Je=ze.utcFormat,ze.utcParse,ze}},68936:function(H,U,e){e.d(U,{m:function(){return S}});var g=e(81628),C=e(69792),i=(0,g.c)(function(x){x.setHours(0,0,0,0)},function(x,v){x.setDate(x.getDate()+v)},function(x,v){return(v-x-(v.getTimezoneOffset()-x.getTimezoneOffset())*C.iy)/C.SK},function(x){return x.getDate()-1});U.c=i;var S=i.range},69792:function(H,U,e){e.d(U,{KK:function(){return x},SK:function(){return S},cg:function(){return i},iy:function(){return C},yc:function(){return g}});var g=1e3,C=6e4,i=36e5,S=864e5,x=6048e5},73220:function(H,U,e){e.r(U),e.d(U,{timeDay:function(){return m.c},timeDays:function(){return m.m},timeFriday:function(){return h.iB},timeFridays:function(){return h.sJ},timeHour:function(){return c},timeHours:function(){return l},timeInterval:function(){return g.c},timeMillisecond:function(){return i},timeMilliseconds:function(){return S},timeMinute:function(){return a},timeMinutes:function(){return n},timeMonday:function(){return h.qT},timeMondays:function(){return h.QP},timeMonth:function(){return u},timeMonths:function(){return o},timeSaturday:function(){return h.Wc},timeSaturdays:function(){return h.aI},timeSecond:function(){return p},timeSeconds:function(){return r},timeSunday:function(){return h.uU},timeSundays:function(){return h.Ab},timeThursday:function(){return h.kD},timeThursdays:function(){return h.eC},timeTuesday:function(){return h.Mf},timeTuesdays:function(){return h.Oc},timeWednesday:function(){return h.eg},timeWednesdays:function(){return h.sn},timeWeek:function(){return h.uU},timeWeeks:function(){return h.Ab},timeYear:function(){return d.c},timeYears:function(){return d.Q},utcDay:function(){return s.c},utcDays:function(){return s.o},utcFriday:function(){return L.od},utcFridays:function(){return L.iG},utcHour:function(){return E},utcHours:function(){return T},utcMillisecond:function(){return i},utcMilliseconds:function(){return S},utcMinute:function(){return A},utcMinutes:function(){return _},utcMonday:function(){return L.ot},utcMondays:function(){return L.iO},utcMonth:function(){return z},utcMonths:function(){return D},utcSaturday:function(){return L.Ad},utcSaturdays:function(){return L.K8},utcSecond:function(){return p},utcSeconds:function(){return r},utcSunday:function(){return L.EV},utcSundays:function(){return L.Wq},utcThursday:function(){return L.yA},utcThursdays:function(){return L.ob},utcTuesday:function(){return L.sG},utcTuesdays:function(){return L.kl},utcWednesday:function(){return L._6},utcWednesdays:function(){return L.W_},utcWeek:function(){return L.EV},utcWeeks:function(){return L.Wq},utcYear:function(){return N.c},utcYears:function(){return N.i}});var g=e(81628),C=(0,g.c)(function(){},function(I,k){I.setTime(+I+k)},function(I,k){return k-I});C.every=function(I){return I=Math.floor(I),!isFinite(I)||!(I>0)?null:I>1?(0,g.c)(function(k){k.setTime(Math.floor(k/I)*I)},function(k,B){k.setTime(+k+B*I)},function(k,B){return(B-k)/I}):C};var i=C,S=C.range,x=e(69792),v=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds())},function(I,k){I.setTime(+I+k*x.yc)},function(I,k){return(k-I)/x.yc},function(I){return I.getUTCSeconds()}),p=v,r=v.range,t=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds()-I.getSeconds()*x.yc)},function(I,k){I.setTime(+I+k*x.iy)},function(I,k){return(k-I)/x.iy},function(I){return I.getMinutes()}),a=t,n=t.range,f=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds()-I.getSeconds()*x.yc-I.getMinutes()*x.iy)},function(I,k){I.setTime(+I+k*x.cg)},function(I,k){return(k-I)/x.cg},function(I){return I.getHours()}),c=f,l=f.range,m=e(68936),h=e(46192),b=(0,g.c)(function(I){I.setDate(1),I.setHours(0,0,0,0)},function(I,k){I.setMonth(I.getMonth()+k)},function(I,k){return k.getMonth()-I.getMonth()+(k.getFullYear()-I.getFullYear())*12},function(I){return I.getMonth()}),u=b,o=b.range,d=e(32171),w=(0,g.c)(function(I){I.setUTCSeconds(0,0)},function(I,k){I.setTime(+I+k*x.iy)},function(I,k){return(k-I)/x.iy},function(I){return I.getUTCMinutes()}),A=w,_=w.range,y=(0,g.c)(function(I){I.setUTCMinutes(0,0,0)},function(I,k){I.setTime(+I+k*x.cg)},function(I,k){return(k-I)/x.cg},function(I){return I.getUTCHours()}),E=y,T=y.range,s=e(58931),L=e(8208),M=(0,g.c)(function(I){I.setUTCDate(1),I.setUTCHours(0,0,0,0)},function(I,k){I.setUTCMonth(I.getUTCMonth()+k)},function(I,k){return k.getUTCMonth()-I.getUTCMonth()+(k.getUTCFullYear()-I.getUTCFullYear())*12},function(I){return I.getUTCMonth()}),z=M,D=M.range,N=e(53528)},81628:function(H,U,e){e.d(U,{c:function(){return i}});var g=new Date,C=new Date;function i(S,x,v,p){function r(t){return S(t=arguments.length===0?new Date:new Date(+t)),t}return r.floor=function(t){return S(t=new Date(+t)),t},r.ceil=function(t){return S(t=new Date(t-1)),x(t,1),S(t),t},r.round=function(t){var a=r(t),n=r.ceil(t);return t-a0))return f;do f.push(c=new Date(+t)),x(t,n),S(t);while(c=a)for(;S(a),!t(a);)a.setTime(a-1)},function(a,n){if(a>=a)if(n<0)for(;++n<=0;)for(;x(a,-1),!t(a););else for(;--n>=0;)for(;x(a,1),!t(a););})},v&&(r.count=function(t,a){return g.setTime(+t),C.setTime(+a),S(g),S(C),Math.floor(v(g,C))},r.every=function(t){return t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?r.filter(p?function(a){return p(a)%t===0}:function(a){return r.count(0,a)%t===0}):r}),r}},58931:function(H,U,e){e.d(U,{o:function(){return S}});var g=e(81628),C=e(69792),i=(0,g.c)(function(x){x.setUTCHours(0,0,0,0)},function(x,v){x.setUTCDate(x.getUTCDate()+v)},function(x,v){return(v-x)/C.SK},function(x){return x.getUTCDate()-1});U.c=i;var S=i.range},8208:function(H,U,e){e.d(U,{Ad:function(){return a},EV:function(){return S},K8:function(){return b},W_:function(){return l},Wq:function(){return n},_6:function(){return p},iG:function(){return h},iO:function(){return f},kl:function(){return c},ob:function(){return m},od:function(){return t},ot:function(){return x},sG:function(){return v},yA:function(){return r}});var g=e(81628),C=e(69792);function i(u){return(0,g.c)(function(o){o.setUTCDate(o.getUTCDate()-(o.getUTCDay()+7-u)%7),o.setUTCHours(0,0,0,0)},function(o,d){o.setUTCDate(o.getUTCDate()+d*7)},function(o,d){return(d-o)/C.KK})}var S=i(0),x=i(1),v=i(2),p=i(3),r=i(4),t=i(5),a=i(6),n=S.range,f=x.range,c=v.range,l=p.range,m=r.range,h=t.range,b=a.range},53528:function(H,U,e){e.d(U,{i:function(){return i}});var g=e(81628),C=(0,g.c)(function(S){S.setUTCMonth(0,1),S.setUTCHours(0,0,0,0)},function(S,x){S.setUTCFullYear(S.getUTCFullYear()+x)},function(S,x){return x.getUTCFullYear()-S.getUTCFullYear()},function(S){return S.getUTCFullYear()});C.every=function(S){return!isFinite(S=Math.floor(S))||!(S>0)?null:(0,g.c)(function(x){x.setUTCFullYear(Math.floor(x.getUTCFullYear()/S)*S),x.setUTCMonth(0,1),x.setUTCHours(0,0,0,0)},function(x,v){x.setUTCFullYear(x.getUTCFullYear()+v*S)})},U.c=C;var i=C.range},46192:function(H,U,e){e.d(U,{Ab:function(){return n},Mf:function(){return v},Oc:function(){return c},QP:function(){return f},Wc:function(){return a},aI:function(){return b},eC:function(){return m},eg:function(){return p},iB:function(){return t},kD:function(){return r},qT:function(){return x},sJ:function(){return h},sn:function(){return l},uU:function(){return S}});var g=e(81628),C=e(69792);function i(u){return(0,g.c)(function(o){o.setDate(o.getDate()-(o.getDay()+7-u)%7),o.setHours(0,0,0,0)},function(o,d){o.setDate(o.getDate()+d*7)},function(o,d){return(d-o-(d.getTimezoneOffset()-o.getTimezoneOffset())*C.iy)/C.KK})}var S=i(0),x=i(1),v=i(2),p=i(3),r=i(4),t=i(5),a=i(6),n=S.range,f=x.range,c=v.range,l=p.range,m=r.range,h=t.range,b=a.range},32171:function(H,U,e){e.d(U,{Q:function(){return i}});var g=e(81628),C=(0,g.c)(function(S){S.setMonth(0,1),S.setHours(0,0,0,0)},function(S,x){S.setFullYear(S.getFullYear()+x)},function(S,x){return x.getFullYear()-S.getFullYear()},function(S){return S.getFullYear()});C.every=function(S){return!isFinite(S=Math.floor(S))||!(S>0)?null:(0,g.c)(function(x){x.setFullYear(Math.floor(x.getFullYear()/S)*S),x.setMonth(0,1),x.setHours(0,0,0,0)},function(x,v){x.setFullYear(x.getFullYear()+v*S)})},U.c=C;var i=C.range},64348:function(H,U,e){var g=e(39640)(),C=e(53664),i=g&&C("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch{i=!1}var S=C("%SyntaxError%"),x=C("%TypeError%"),v=e(2304);H.exports=function(r,t,a){if(!r||typeof r!="object"&&typeof r!="function")throw new x("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new x("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new x("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new x("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new x("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new x("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,m=!!v&&v(r,t);if(i)i(r,t,{configurable:c===null&&m?m.configurable:!c,enumerable:n===null&&m?m.enumerable:!n,value:a,writable:f===null&&m?m.writable:!f});else if(l||!n&&!f&&!c)r[t]=a;else throw new S("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}},81288:function(H,U,e){var g=e(41820),C=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",i=Object.prototype.toString,S=Array.prototype.concat,x=Object.defineProperty,v=function(n){return typeof n=="function"&&i.call(n)==="[object Function]"},p=e(39640)(),r=x&&p,t=function(n,f,c,l){if(f in n){if(l===!0){if(n[f]===c)return}else if(!v(l)||!l())return}r?x(n,f,{configurable:!0,enumerable:!1,value:c,writable:!0}):n[f]=c},a=function(n,f){var c=arguments.length>2?arguments[2]:{},l=g(f);C&&(l=S.call(l,Object.getOwnPropertySymbols(f)));for(var m=0;mr*t){var l=(c-f)/r;v[n]=l*1e3}}return v}function i(S){for(var x=[],v=S[0];v<=S[1];v++)for(var p=String.fromCharCode(v),r=S[0];r"u"&&(i=0),typeof C){case"number":if(C>0)return e(C|0,i);break;case"object":if(typeof C.length=="number")return U(C,i,0);break}return[]}H.exports=g},28912:function(H){H.exports=U,H.exports.default=U;function U(D,N,I){I=I||2;var k=N&&N.length,B=k?N[0]*I:D.length,O=e(D,0,B,I,!0),V=[];if(!O||O.next===O.prev)return V;var Y,j,te,ie,ue,J,X;if(k&&(O=p(D,N,O,I)),D.length>80*I){Y=te=D[0],j=ie=D[1];for(var ee=I;eete&&(te=ue),J>ie&&(ie=J);X=Math.max(te-Y,ie-j),X=X!==0?1/X:0}return C(O,V,I,Y,j,X),V}function e(D,N,I,k,B){var O,V;if(B===z(D,N,I,k)>0)for(O=N;O=N;O-=k)V=s(O,D[O],D[O+1],V);return V&&o(V,V.next)&&(L(V),V=V.next),V}function g(D,N){if(!D)return D;N||(N=D);var I=D,k;do if(k=!1,!I.steiner&&(o(I,I.next)||u(I.prev,I,I.next)===0)){if(L(I),I=N=I.prev,I===I.next)break;k=!0}else I=I.next;while(k||I!==N);return N}function C(D,N,I,k,B,O,V){if(D){!V&&O&&f(D,k,B,O);for(var Y=D,j,te;D.prev!==D.next;){if(j=D.prev,te=D.next,O?S(D,k,B,O):i(D)){N.push(j.i/I),N.push(D.i/I),N.push(te.i/I),L(D),D=te.next,Y=te.next;continue}if(D=te,D===Y){V?V===1?(D=x(g(D),N,I),C(D,N,I,k,B,O,2)):V===2&&v(D,N,I,k,B,O):C(g(D),N,I,k,B,O,1);break}}}}function i(D){var N=D.prev,I=D,k=D.next;if(u(N,I,k)>=0)return!1;for(var B=D.next.next;B!==D.prev;){if(h(N.x,N.y,I.x,I.y,k.x,k.y,B.x,B.y)&&u(B.prev,B,B.next)>=0)return!1;B=B.next}return!0}function S(D,N,I,k){var B=D.prev,O=D,V=D.next;if(u(B,O,V)>=0)return!1;for(var Y=B.xO.x?B.x>V.x?B.x:V.x:O.x>V.x?O.x:V.x,ie=B.y>O.y?B.y>V.y?B.y:V.y:O.y>V.y?O.y:V.y,ue=l(Y,j,N,I,k),J=l(te,ie,N,I,k),X=D.prevZ,ee=D.nextZ;X&&X.z>=ue&&ee&&ee.z<=J;){if(X!==D.prev&&X!==D.next&&h(B.x,B.y,O.x,O.y,V.x,V.y,X.x,X.y)&&u(X.prev,X,X.next)>=0||(X=X.prevZ,ee!==D.prev&&ee!==D.next&&h(B.x,B.y,O.x,O.y,V.x,V.y,ee.x,ee.y)&&u(ee.prev,ee,ee.next)>=0))return!1;ee=ee.nextZ}for(;X&&X.z>=ue;){if(X!==D.prev&&X!==D.next&&h(B.x,B.y,O.x,O.y,V.x,V.y,X.x,X.y)&&u(X.prev,X,X.next)>=0)return!1;X=X.prevZ}for(;ee&&ee.z<=J;){if(ee!==D.prev&&ee!==D.next&&h(B.x,B.y,O.x,O.y,V.x,V.y,ee.x,ee.y)&&u(ee.prev,ee,ee.next)>=0)return!1;ee=ee.nextZ}return!0}function x(D,N,I){var k=D;do{var B=k.prev,O=k.next.next;!o(B,O)&&d(B,k,k.next,O)&&y(B,O)&&y(O,B)&&(N.push(B.i/I),N.push(k.i/I),N.push(O.i/I),L(k),L(k.next),k=D=O),k=k.next}while(k!==D);return g(k)}function v(D,N,I,k,B,O){var V=D;do{for(var Y=V.next.next;Y!==V.prev;){if(V.i!==Y.i&&b(V,Y)){var j=T(V,Y);V=g(V,V.next),j=g(j,j.next),C(V,N,I,k,B,O),C(j,N,I,k,B,O);return}Y=Y.next}V=V.next}while(V!==D)}function p(D,N,I,k){var B=[],O,V,Y,j,te;for(O=0,V=N.length;O=I.next.y&&I.next.y!==I.y){var Y=I.x+(B-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Y<=k&&Y>O){if(O=Y,Y===k){if(B===I.y)return I;if(B===I.next.y)return I.next}V=I.x=I.x&&I.x>=te&&k!==I.x&&h(BV.x||I.x===V.x&&n(V,I)))&&(V=I,ue=J)),I=I.next;while(I!==j);return V}function n(D,N){return u(D.prev,D,N.prev)<0&&u(N.next,D,D.next)<0}function f(D,N,I,k){var B=D;do B.z===null&&(B.z=l(B.x,B.y,N,I,k)),B.prevZ=B.prev,B.nextZ=B.next,B=B.next;while(B!==D);B.prevZ.nextZ=null,B.prevZ=null,c(B)}function c(D){var N,I,k,B,O,V,Y,j,te=1;do{for(I=D,D=null,O=null,V=0;I;){for(V++,k=I,Y=0,N=0;N0||j>0&&k;)Y!==0&&(j===0||!k||I.z<=k.z)?(B=I,I=I.nextZ,Y--):(B=k,k=k.nextZ,j--),O?O.nextZ=B:D=B,B.prevZ=O,O=B;I=k}O.nextZ=null,te*=2}while(V>1);return D}function l(D,N,I,k,B){return D=32767*(D-I)*B,N=32767*(N-k)*B,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,D|N<<1}function m(D){var N=D,I=D;do(N.x=0&&(D-V)*(k-Y)-(I-V)*(N-Y)>=0&&(I-V)*(O-Y)-(B-V)*(k-Y)>=0}function b(D,N){return D.next.i!==N.i&&D.prev.i!==N.i&&!_(D,N)&&(y(D,N)&&y(N,D)&&E(D,N)&&(u(D.prev,D,N.prev)||u(D,N.prev,N))||o(D,N)&&u(D.prev,D,D.next)>0&&u(N.prev,N,N.next)>0)}function u(D,N,I){return(N.y-D.y)*(I.x-N.x)-(N.x-D.x)*(I.y-N.y)}function o(D,N){return D.x===N.x&&D.y===N.y}function d(D,N,I,k){var B=A(u(D,N,I)),O=A(u(D,N,k)),V=A(u(I,k,D)),Y=A(u(I,k,N));return!!(B!==O&&V!==Y||B===0&&w(D,I,N)||O===0&&w(D,k,N)||V===0&&w(I,D,k)||Y===0&&w(I,N,k))}function w(D,N,I){return N.x<=Math.max(D.x,I.x)&&N.x>=Math.min(D.x,I.x)&&N.y<=Math.max(D.y,I.y)&&N.y>=Math.min(D.y,I.y)}function A(D){return D>0?1:D<0?-1:0}function _(D,N){var I=D;do{if(I.i!==D.i&&I.next.i!==D.i&&I.i!==N.i&&I.next.i!==N.i&&d(I,I.next,D,N))return!0;I=I.next}while(I!==D);return!1}function y(D,N){return u(D.prev,D,D.next)<0?u(D,N,D.next)>=0&&u(D,D.prev,N)>=0:u(D,N,D.prev)<0||u(D,D.next,N)<0}function E(D,N){var I=D,k=!1,B=(D.x+N.x)/2,O=(D.y+N.y)/2;do I.y>O!=I.next.y>O&&I.next.y!==I.y&&B<(I.next.x-I.x)*(O-I.y)/(I.next.y-I.y)+I.x&&(k=!k),I=I.next;while(I!==D);return k}function T(D,N){var I=new M(D.i,D.x,D.y),k=new M(N.i,N.x,N.y),B=D.next,O=N.prev;return D.next=N,N.prev=D,I.next=B,B.prev=I,k.next=I,I.prev=k,O.next=k,k.prev=O,k}function s(D,N,I,k){var B=new M(D,N,I);return k?(B.next=k.next,B.prev=k,k.next.prev=B,k.next=B):(B.prev=B,B.next=B),B}function L(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function M(D,N,I){this.i=D,this.x=N,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}U.deviation=function(D,N,I,k){var B=N&&N.length,O=B?N[0]*I:D.length,V=Math.abs(z(D,0,O,I));if(B)for(var Y=0,j=N.length;Y0&&(k+=D[B-1].length,I.holes.push(k))}return I}},6688:function(H,U,e){var g=e(78484);H.exports=function(i,S){var x=[],v=[],p=[],r={},t=[],a;function n(w){p[w]=!1,r.hasOwnProperty(w)&&Object.keys(r[w]).forEach(function(A){delete r[w][A],p[A]&&n(A)})}function f(w){var A=!1;v.push(w),p[w]=!0;var _,y;for(_=0;_=w})}function m(w){l(w);for(var A=i,_=g(A),y=_.components.filter(function(D){return D.length>1}),E=1/0,T,s=0;s=55296&&w<=56319&&(E+=c[++b])),E=l?a.call(l,m,E,u):E,h?(n.value=E,f(o,u,n)):o[u]=E,++u;d=u}}if(d===void 0)for(d=S(c.length),h&&(o=new h(d)),b=0;b0?1:-1}},96936:function(H,U,e){var g=e(85608),C=Math.abs,i=Math.floor;H.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:g(S)*i(C(S)))}},81304:function(H,U,e){var g=e(96936),C=Math.max;H.exports=function(i){return C(0,g(i))}},14428:function(H,U,e){var g=e(34044),C=e(9252),i=Function.prototype.bind,S=Function.prototype.call,x=Object.keys,v=Object.prototype.propertyIsEnumerable;H.exports=function(p,r){return function(t,a){var n,f=arguments[2],c=arguments[3];return t=Object(C(t)),g(a),n=x(t),c&&n.sort(typeof c=="function"?i.call(c,t):void 0),typeof p!="function"&&(p=n[p]),S.call(p,n,function(l,m){return v.call(t,l)?S.call(a,f,t[l],l,t,m):r})}}},38452:function(H,U,e){H.exports=e(96276)()?Object.assign:e(81892)},96276:function(H){H.exports=function(){var U=Object.assign,e;return typeof U!="function"?!1:(e={foo:"raz"},U(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},81892:function(H,U,e){var g=e(54768),C=e(9252),i=Math.max;H.exports=function(S,x){var v,p,r=i(arguments.length,2),t;for(S=Object(C(S)),t=function(a){try{S[a]=x[a]}catch(n){v||(v=n)}},p=1;p-1}},29768:function(H){var U=Object.prototype.toString,e=U.call("");H.exports=function(g){return typeof g=="string"||g&&typeof g=="object"&&(g instanceof String||U.call(g)===e)||!1}},82252:function(H){var U=Object.create(null),e=Math.random;H.exports=function(){var g;do g=e().toString(36).slice(2);while(U[g]);return g}},52104:function(H,U,e){var g=e(69932),C=e(71056),i=e(21092),S=e(92664),x=e(85512),v=Object.defineProperty,p;p=H.exports=function(r,t){if(!(this instanceof p))throw new TypeError("Constructor requires 'new'");x.call(this,r),t?C.call(t,"key+value")?t="key+value":C.call(t,"key")?t="key":t="value":t="value",v(this,"__kind__",i("",t))},g&&g(p,x),delete p.prototype.constructor,p.prototype=Object.create(x.prototype,{_resolve:i(function(r){return this.__kind__==="value"?this.__list__[r]:this.__kind__==="key+value"?[r,this.__list__[r]]:r})}),v(p.prototype,S.toStringTag,i("c","Array Iterator"))},76024:function(H,U,e){var g=e(60948),C=e(34044),i=e(29768),S=e(76252),x=Array.isArray,v=Function.prototype.call,p=Array.prototype.some;H.exports=function(r,t){var a,n=arguments[2],f,c,l,m,h,b,u;if(x(r)||g(r)?a="array":i(r)?a="string":r=S(r),C(t),c=function(){l=!0},a==="array"){p.call(r,function(o){return v.call(t,n,o,c),l});return}if(a==="string"){for(h=r.length,m=0;m=55296&&u<=56319&&(b+=r[++m])),v.call(t,n,b,c),!l);++m);return}for(f=r.next();!f.done;){if(v.call(t,n,f.value,c),l)return;f=r.next()}}},76252:function(H,U,e){var g=e(60948),C=e(29768),i=e(52104),S=e(80940),x=e(52891),v=e(92664).iterator;H.exports=function(p){return typeof x(p)[v]=="function"?p[v]():g(p)?new i(p):C(p)?new S(p):new i(p)}},85512:function(H,U,e){var g=e(41476),C=e(38452),i=e(34044),S=e(9252),x=e(21092),v=e(27940),p=e(92664),r=Object.defineProperty,t=Object.defineProperties,a;H.exports=a=function(n,f){if(!(this instanceof a))throw new TypeError("Constructor requires 'new'");t(this,{__list__:x("w",S(n)),__context__:x("w",f),__nextIndex__:x("w",0)}),f&&(i(f.on),f.on("_add",this._onAdd),f.on("_delete",this._onDelete),f.on("_clear",this._onClear))},delete a.prototype.constructor,t(a.prototype,C({_next:x(function(){var n;if(this.__list__){if(this.__redo__&&(n=this.__redo__.shift(),n!==void 0))return n;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){r(this,"__redo__",x("c",[n]));return}this.__redo__.forEach(function(f,c){f>=n&&(this.__redo__[c]=++f)},this),this.__redo__.push(n)}}),_onDelete:x(function(n){var f;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(f=this.__redo__.indexOf(n),f!==-1&&this.__redo__.splice(f,1),this.__redo__.forEach(function(c,l){c>n&&(this.__redo__[l]=--c)},this)))}),_onClear:x(function(){this.__redo__&&g.call(this.__redo__),this.__nextIndex__=0})}))),r(a.prototype,p.iterator,x(function(){return this}))},76368:function(H,U,e){var g=e(60948),C=e(42584),i=e(29768),S=e(92664).iterator,x=Array.isArray;H.exports=function(v){return C(v)?x(v)||i(v)||g(v)?!0:typeof v[S]=="function":!1}},80940:function(H,U,e){var g=e(69932),C=e(21092),i=e(92664),S=e(85512),x=Object.defineProperty,v;v=H.exports=function(p){if(!(this instanceof v))throw new TypeError("Constructor requires 'new'");p=String(p),S.call(this,p),x(this,"__length__",C("",p.length))},g&&g(v,S),delete v.prototype.constructor,v.prototype=Object.create(S.prototype,{_next:C(function(){if(this.__list__){if(this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r)})}),x(v.prototype,i.toStringTag,C("c","String Iterator"))},52891:function(H,U,e){var g=e(76368);H.exports=function(C){if(!g(C))throw new TypeError(C+" is not iterable");return C}},60964:function(H){function U(g,C){if(g==null)throw new TypeError("Cannot convert first argument to object");for(var i=Object(g),S=1;S0&&(E=w[0]),E instanceof Error)throw E;var T=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw T.context=E,T}var s=y[d];if(s===void 0)return!1;if(typeof s=="function")e(s,this,w);else for(var L=s.length,M=c(s,L),A=0;A0&&E.length>_&&!E.warned){E.warned=!0;var T=new Error("Possible EventEmitter memory leak detected. "+E.length+" "+String(d)+" listeners added. Use emitter.setMaxListeners() to increase limit");T.name="MaxListenersExceededWarning",T.emitter=o,T.type=d,T.count=E.length,C(T)}return o}S.prototype.addListener=function(d,w){return r(this,d,w,!1)},S.prototype.on=S.prototype.addListener,S.prototype.prependListener=function(d,w){return r(this,d,w,!0)};function t(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function a(o,d,w){var A={fired:!1,wrapFn:void 0,target:o,type:d,listener:w},_=t.bind(A);return _.listener=w,A.wrapFn=_,_}S.prototype.once=function(d,w){return v(w),this.on(d,a(this,d,w)),this},S.prototype.prependOnceListener=function(d,w){return v(w),this.prependListener(d,a(this,d,w)),this},S.prototype.removeListener=function(d,w){var A,_,y,E,T;if(v(w),_=this._events,_===void 0)return this;if(A=_[d],A===void 0)return this;if(A===w||A.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete _[d],_.removeListener&&this.emit("removeListener",d,A.listener||w));else if(typeof A!="function"){for(y=-1,E=A.length-1;E>=0;E--)if(A[E]===w||A[E].listener===w){T=A[E].listener,y=E;break}if(y<0)return this;y===0?A.shift():l(A,y),A.length===1&&(_[d]=A[0]),_.removeListener!==void 0&&this.emit("removeListener",d,T||w)}return this},S.prototype.off=S.prototype.removeListener,S.prototype.removeAllListeners=function(d){var w,A,_;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[d]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[d]),this;if(arguments.length===0){var y=Object.keys(A),E;for(_=0;_=0;_--)this.removeListener(d,w[_]);return this};function n(o,d,w){var A=o._events;if(A===void 0)return[];var _=A[d];return _===void 0?[]:typeof _=="function"?w?[_.listener||_]:[_]:w?m(_):c(_,_.length)}S.prototype.listeners=function(d){return n(this,d,!0)},S.prototype.rawListeners=function(d){return n(this,d,!1)},S.listenerCount=function(o,d){return typeof o.listenerCount=="function"?o.listenerCount(d):f.call(o,d)},S.prototype.listenerCount=f;function f(o){var d=this._events;if(d!==void 0){var w=d[o];if(typeof w=="function")return 1;if(w!==void 0)return w.length}return 0}S.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]};function c(o,d){for(var w=new Array(d),A=0;Ax[0]-r[0]/2&&(l=r[0]/2,m+=r[1]);return v}},71920:function(H){H.exports=U,U.canvas=document.createElement("canvas"),U.cache={};function U(t,S){S||(S={}),(typeof t=="string"||Array.isArray(t))&&(S.family=t);var x=Array.isArray(S.family)?S.family.join(", "):S.family;if(!x)throw Error("`family` must be defined");var v=S.size||S.fontSize||S.em||48,p=S.weight||S.fontWeight||"",r=S.style||S.fontStyle||"",t=[r,p,v].join(" ")+"px "+x,a=S.origin||"top";if(U.cache[x]&&v<=U.cache[x].em)return e(U.cache[x],a);var n=S.canvas||U.canvas,f=n.getContext("2d"),c={upper:S.upper!==void 0?S.upper:"H",lower:S.lower!==void 0?S.lower:"x",descent:S.descent!==void 0?S.descent:"p",ascent:S.ascent!==void 0?S.ascent:"h",tittle:S.tittle!==void 0?S.tittle:"i",overshoot:S.overshoot!==void 0?S.overshoot:"O"},l=Math.ceil(v*1.5);n.height=l,n.width=l*.5,f.font=t;var m="H",h={top:0};f.clearRect(0,0,l,l),f.textBaseline="top",f.fillStyle="black",f.fillText(m,0,0);var b=g(f.getImageData(0,0,l,l));f.clearRect(0,0,l,l),f.textBaseline="bottom",f.fillText(m,0,l);var u=g(f.getImageData(0,0,l,l));h.lineHeight=h.bottom=l-u+b,f.clearRect(0,0,l,l),f.textBaseline="alphabetic",f.fillText(m,0,l);var o=g(f.getImageData(0,0,l,l)),d=l-o-1+b;h.baseline=h.alphabetic=d,f.clearRect(0,0,l,l),f.textBaseline="middle",f.fillText(m,0,l*.5);var w=g(f.getImageData(0,0,l,l));h.median=h.middle=l-w-1+b-l*.5,f.clearRect(0,0,l,l),f.textBaseline="hanging",f.fillText(m,0,l*.5);var A=g(f.getImageData(0,0,l,l));h.hanging=l-A-1+b-l*.5,f.clearRect(0,0,l,l),f.textBaseline="ideographic",f.fillText(m,0,l);var _=g(f.getImageData(0,0,l,l));if(h.ideographic=l-_-1+b,c.upper&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.upper,0,0),h.upper=g(f.getImageData(0,0,l,l)),h.capHeight=h.baseline-h.upper),c.lower&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.lower,0,0),h.lower=g(f.getImageData(0,0,l,l)),h.xHeight=h.baseline-h.lower),c.tittle&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.tittle,0,0),h.tittle=g(f.getImageData(0,0,l,l))),c.ascent&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.ascent,0,0),h.ascent=g(f.getImageData(0,0,l,l))),c.descent&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.descent,0,0),h.descent=C(f.getImageData(0,0,l,l))),c.overshoot){f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.overshoot,0,0);var y=C(f.getImageData(0,0,l,l));h.overshoot=y-d}for(var E in h)h[E]/=v;return h.em=v,U.cache[x]=h,e(h,a)}function e(i,S){var x={};typeof S=="string"&&(S=i[S]);for(var v in i)v!=="em"&&(x[v]=i[v]-S);return x}function g(i){for(var S=i.height,x=i.data,v=3;v0;v-=4)if(x[v]!==0)return Math.floor((v-3)*.25/S)}},46492:function(H,U,e){var g=e(90720),C=Object.prototype.toString,i=Object.prototype.hasOwnProperty,S=function(t,a,n){for(var f=0,c=t.length;f=3&&(f=n),C.call(t)==="[object Array]"?S(t,a,f):typeof t=="string"?x(t,a,f):v(t,a,f)};H.exports=p},74336:function(H){var U="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,g=Math.max,C="[object Function]",i=function(p,r){for(var t=[],a=0;a"u"&&!g.canvas)return null;var C=g.canvas||document.createElement("canvas");typeof g.width=="number"&&(C.width=g.width),typeof g.height=="number"&&(C.height=g.height);var i=g,S;try{var x=[e];e.indexOf("webgl")===0&&x.push("experimental-"+e);for(var v=0;v"u"||!n?g:n(Uint8Array),l={"%AggregateError%":typeof AggregateError>"u"?g:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?g:ArrayBuffer,"%ArrayIteratorPrototype%":t&&n?n([][Symbol.iterator]()):g,"%AsyncFromSyncIteratorPrototype%":g,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":typeof Atomics>"u"?g:Atomics,"%BigInt%":typeof BigInt>"u"?g:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?g:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?g:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?g:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?g:Float32Array,"%Float64Array%":typeof Float64Array>"u"?g:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?g:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":typeof Int8Array>"u"?g:Int8Array,"%Int16Array%":typeof Int16Array>"u"?g:Int16Array,"%Int32Array%":typeof Int32Array>"u"?g:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":t&&n?n(n([][Symbol.iterator]())):g,"%JSON%":typeof JSON=="object"?JSON:g,"%Map%":typeof Map>"u"?g:Map,"%MapIteratorPrototype%":typeof Map>"u"||!t||!n?g:n(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?g:Promise,"%Proxy%":typeof Proxy>"u"?g:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?g:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?g:Set,"%SetIteratorPrototype%":typeof Set>"u"||!t||!n?g:n(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?g:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":t&&n?n(""[Symbol.iterator]()):g,"%Symbol%":t?Symbol:g,"%SyntaxError%":C,"%ThrowTypeError%":r,"%TypedArray%":c,"%TypeError%":S,"%Uint8Array%":typeof Uint8Array>"u"?g:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?g:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?g:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?g:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?g:WeakMap,"%WeakRef%":typeof WeakRef>"u"?g:WeakRef,"%WeakSet%":typeof WeakSet>"u"?g:WeakSet};if(n)try{null.error}catch(M){var m=n(n(M));l["%Error.prototype%"]=m}var h=function M(z){var D;if(z==="%AsyncFunction%")D=x("async function () {}");else if(z==="%GeneratorFunction%")D=x("function* () {}");else if(z==="%AsyncGeneratorFunction%")D=x("async function* () {}");else if(z==="%AsyncGenerator%"){var N=M("%AsyncGeneratorFunction%");N&&(D=N.prototype)}else if(z==="%AsyncIteratorPrototype%"){var I=M("%AsyncGenerator%");I&&n&&(D=n(I.prototype))}return l[z]=D,D},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},u=e(8844),o=e(92064),d=u.call(Function.call,Array.prototype.concat),w=u.call(Function.apply,Array.prototype.splice),A=u.call(Function.call,String.prototype.replace),_=u.call(Function.call,String.prototype.slice),y=u.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,s=function(z){var D=_(z,0,1),N=_(z,-1);if(D==="%"&&N!=="%")throw new C("invalid intrinsic syntax, expected closing `%`");if(N==="%"&&D!=="%")throw new C("invalid intrinsic syntax, expected opening `%`");var I=[];return A(z,E,function(k,B,O,V){I[I.length]=O?A(V,T,"$1"):B||k}),I},L=function(z,D){var N=z,I;if(o(b,N)&&(I=b[N],N="%"+I[0]+"%"),o(l,N)){var k=l[N];if(k===f&&(k=h(N)),typeof k>"u"&&!D)throw new S("intrinsic "+z+" exists, but is not available. Please file an issue!");return{alias:I,name:N,value:k}}throw new C("intrinsic "+z+" does not exist!")};H.exports=function(z,D){if(typeof z!="string"||z.length===0)throw new S("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof D!="boolean")throw new S('"allowMissing" argument must be a boolean');if(y(/^%?[^%]*%?$/,z)===null)throw new C("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var N=s(z),I=N.length>0?N[0]:"",k=L("%"+I+"%",D),B=k.name,O=k.value,V=!1,Y=k.alias;Y&&(I=Y[0],w(N,d([0,1],Y)));for(var j=1,te=!0;j=N.length){var X=v(O,ie);te=!!X,te&&"get"in X&&!("originalValue"in X.get)?O=X.get:O=O[ie]}else te=o(O,ie),O=O[ie];te&&!V&&(l[B]=O)}}return O}},12408:function(H){H.exports=U;function U(e,g){var C=g[0],i=g[1],S=g[2],x=g[3],v=g[4],p=g[5],r=g[6],t=g[7],a=g[8],n=g[9],f=g[10],c=g[11],l=g[12],m=g[13],h=g[14],b=g[15];return e[0]=p*(f*b-c*h)-n*(r*b-t*h)+m*(r*c-t*f),e[1]=-(i*(f*b-c*h)-n*(S*b-x*h)+m*(S*c-x*f)),e[2]=i*(r*b-t*h)-p*(S*b-x*h)+m*(S*t-x*r),e[3]=-(i*(r*c-t*f)-p*(S*c-x*f)+n*(S*t-x*r)),e[4]=-(v*(f*b-c*h)-a*(r*b-t*h)+l*(r*c-t*f)),e[5]=C*(f*b-c*h)-a*(S*b-x*h)+l*(S*c-x*f),e[6]=-(C*(r*b-t*h)-v*(S*b-x*h)+l*(S*t-x*r)),e[7]=C*(r*c-t*f)-v*(S*c-x*f)+a*(S*t-x*r),e[8]=v*(n*b-c*m)-a*(p*b-t*m)+l*(p*c-t*n),e[9]=-(C*(n*b-c*m)-a*(i*b-x*m)+l*(i*c-x*n)),e[10]=C*(p*b-t*m)-v*(i*b-x*m)+l*(i*t-x*p),e[11]=-(C*(p*c-t*n)-v*(i*c-x*n)+a*(i*t-x*p)),e[12]=-(v*(n*h-f*m)-a*(p*h-r*m)+l*(p*f-r*n)),e[13]=C*(n*h-f*m)-a*(i*h-S*m)+l*(i*f-S*n),e[14]=-(C*(p*h-r*m)-v*(i*h-S*m)+l*(i*r-S*p)),e[15]=C*(p*f-r*n)-v*(i*f-S*n)+a*(i*r-S*p),e}},76860:function(H){H.exports=U;function U(e){var g=new Float32Array(16);return g[0]=e[0],g[1]=e[1],g[2]=e[2],g[3]=e[3],g[4]=e[4],g[5]=e[5],g[6]=e[6],g[7]=e[7],g[8]=e[8],g[9]=e[9],g[10]=e[10],g[11]=e[11],g[12]=e[12],g[13]=e[13],g[14]=e[14],g[15]=e[15],g}},64492:function(H){H.exports=U;function U(e,g){return e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[4]=g[4],e[5]=g[5],e[6]=g[6],e[7]=g[7],e[8]=g[8],e[9]=g[9],e[10]=g[10],e[11]=g[11],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15],e}},54212:function(H){H.exports=U;function U(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},70800:function(H){H.exports=U;function U(e){var g=e[0],C=e[1],i=e[2],S=e[3],x=e[4],v=e[5],p=e[6],r=e[7],t=e[8],a=e[9],n=e[10],f=e[11],c=e[12],l=e[13],m=e[14],h=e[15],b=g*v-C*x,u=g*p-i*x,o=g*r-S*x,d=C*p-i*v,w=C*r-S*v,A=i*r-S*p,_=t*l-a*c,y=t*m-n*c,E=t*h-f*c,T=a*m-n*l,s=a*h-f*l,L=n*h-f*m;return b*L-u*s+o*T+d*E-w*y+A*_}},61784:function(H){H.exports=U;function U(e,g){var C=g[0],i=g[1],S=g[2],x=g[3],v=C+C,p=i+i,r=S+S,t=C*v,a=i*v,n=i*p,f=S*v,c=S*p,l=S*r,m=x*v,h=x*p,b=x*r;return e[0]=1-n-l,e[1]=a+b,e[2]=f-h,e[3]=0,e[4]=a-b,e[5]=1-t-l,e[6]=c+m,e[7]=0,e[8]=f+h,e[9]=c-m,e[10]=1-t-n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},91616:function(H){H.exports=U;function U(e,g,C){var i,S,x,v=C[0],p=C[1],r=C[2],t=Math.sqrt(v*v+p*p+r*r);return Math.abs(t)<1e-6?null:(t=1/t,v*=t,p*=t,r*=t,i=Math.sin(g),S=Math.cos(g),x=1-S,e[0]=v*v*x+S,e[1]=p*v*x+r*i,e[2]=r*v*x-p*i,e[3]=0,e[4]=v*p*x-r*i,e[5]=p*p*x+S,e[6]=r*p*x+v*i,e[7]=0,e[8]=v*r*x+p*i,e[9]=p*r*x-v*i,e[10]=r*r*x+S,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},51944:function(H){H.exports=U;function U(e,g,C){var i=g[0],S=g[1],x=g[2],v=g[3],p=i+i,r=S+S,t=x+x,a=i*p,n=i*r,f=i*t,c=S*r,l=S*t,m=x*t,h=v*p,b=v*r,u=v*t;return e[0]=1-(c+m),e[1]=n+u,e[2]=f-b,e[3]=0,e[4]=n-u,e[5]=1-(a+m),e[6]=l+h,e[7]=0,e[8]=f+b,e[9]=l-h,e[10]=1-(a+c),e[11]=0,e[12]=C[0],e[13]=C[1],e[14]=C[2],e[15]=1,e}},69444:function(H){H.exports=U;function U(e,g){return e[0]=g[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=g[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=g[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},48268:function(H){H.exports=U;function U(e,g){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=g[0],e[13]=g[1],e[14]=g[2],e[15]=1,e}},21856:function(H){H.exports=U;function U(e,g){var C=Math.sin(g),i=Math.cos(g);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=C,e[7]=0,e[8]=0,e[9]=-C,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},79216:function(H){H.exports=U;function U(e,g){var C=Math.sin(g),i=Math.cos(g);return e[0]=i,e[1]=0,e[2]=-C,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=C,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},57736:function(H){H.exports=U;function U(e,g){var C=Math.sin(g),i=Math.cos(g);return e[0]=i,e[1]=C,e[2]=0,e[3]=0,e[4]=-C,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},38848:function(H){H.exports=U;function U(e,g,C,i,S,x,v){var p=1/(C-g),r=1/(S-i),t=1/(x-v);return e[0]=x*2*p,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=x*2*r,e[6]=0,e[7]=0,e[8]=(C+g)*p,e[9]=(S+i)*r,e[10]=(v+x)*t,e[11]=-1,e[12]=0,e[13]=0,e[14]=v*x*2*t,e[15]=0,e}},36635:function(H){H.exports=U;function U(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},36524:function(H,U,e){H.exports={create:e(54212),clone:e(76860),copy:e(64492),identity:e(36635),transpose:e(86520),invert:e(4308),adjoint:e(12408),determinant:e(70800),multiply:e(80944),translate:e(35176),scale:e(68152),rotate:e(30016),rotateX:e(15456),rotateY:e(64840),rotateZ:e(4192),fromRotation:e(91616),fromRotationTranslation:e(51944),fromScaling:e(69444),fromTranslation:e(48268),fromXRotation:e(21856),fromYRotation:e(79216),fromZRotation:e(57736),fromQuat:e(61784),frustum:e(38848),perspective:e(51296),perspectiveFromFieldOfView:e(63688),ortho:e(97688),lookAt:e(56508),str:e(89412)}},4308:function(H){H.exports=U;function U(e,g){var C=g[0],i=g[1],S=g[2],x=g[3],v=g[4],p=g[5],r=g[6],t=g[7],a=g[8],n=g[9],f=g[10],c=g[11],l=g[12],m=g[13],h=g[14],b=g[15],u=C*p-i*v,o=C*r-S*v,d=C*t-x*v,w=i*r-S*p,A=i*t-x*p,_=S*t-x*r,y=a*m-n*l,E=a*h-f*l,T=a*b-c*l,s=n*h-f*m,L=n*b-c*m,M=f*b-c*h,z=u*M-o*L+d*s+w*T-A*E+_*y;return z?(z=1/z,e[0]=(p*M-r*L+t*s)*z,e[1]=(S*L-i*M-x*s)*z,e[2]=(m*_-h*A+b*w)*z,e[3]=(f*A-n*_-c*w)*z,e[4]=(r*T-v*M-t*E)*z,e[5]=(C*M-S*T+x*E)*z,e[6]=(h*d-l*_-b*o)*z,e[7]=(a*_-f*d+c*o)*z,e[8]=(v*L-p*T+t*y)*z,e[9]=(i*T-C*L-x*y)*z,e[10]=(l*A-m*d+b*u)*z,e[11]=(n*d-a*A-c*u)*z,e[12]=(p*E-v*s-r*y)*z,e[13]=(C*s-i*E+S*y)*z,e[14]=(m*o-l*w-h*u)*z,e[15]=(a*w-n*o+f*u)*z,e):null}},56508:function(H,U,e){var g=e(36635);H.exports=C;function C(i,S,x,v){var p,r,t,a,n,f,c,l,m,h,b=S[0],u=S[1],o=S[2],d=v[0],w=v[1],A=v[2],_=x[0],y=x[1],E=x[2];return Math.abs(b-_)<1e-6&&Math.abs(u-y)<1e-6&&Math.abs(o-E)<1e-6?g(i):(c=b-_,l=u-y,m=o-E,h=1/Math.sqrt(c*c+l*l+m*m),c*=h,l*=h,m*=h,p=w*m-A*l,r=A*c-d*m,t=d*l-w*c,h=Math.sqrt(p*p+r*r+t*t),h?(h=1/h,p*=h,r*=h,t*=h):(p=0,r=0,t=0),a=l*t-m*r,n=m*p-c*t,f=c*r-l*p,h=Math.sqrt(a*a+n*n+f*f),h?(h=1/h,a*=h,n*=h,f*=h):(a=0,n=0,f=0),i[0]=p,i[1]=a,i[2]=c,i[3]=0,i[4]=r,i[5]=n,i[6]=l,i[7]=0,i[8]=t,i[9]=f,i[10]=m,i[11]=0,i[12]=-(p*b+r*u+t*o),i[13]=-(a*b+n*u+f*o),i[14]=-(c*b+l*u+m*o),i[15]=1,i)}},80944:function(H){H.exports=U;function U(e,g,C){var i=g[0],S=g[1],x=g[2],v=g[3],p=g[4],r=g[5],t=g[6],a=g[7],n=g[8],f=g[9],c=g[10],l=g[11],m=g[12],h=g[13],b=g[14],u=g[15],o=C[0],d=C[1],w=C[2],A=C[3];return e[0]=o*i+d*p+w*n+A*m,e[1]=o*S+d*r+w*f+A*h,e[2]=o*x+d*t+w*c+A*b,e[3]=o*v+d*a+w*l+A*u,o=C[4],d=C[5],w=C[6],A=C[7],e[4]=o*i+d*p+w*n+A*m,e[5]=o*S+d*r+w*f+A*h,e[6]=o*x+d*t+w*c+A*b,e[7]=o*v+d*a+w*l+A*u,o=C[8],d=C[9],w=C[10],A=C[11],e[8]=o*i+d*p+w*n+A*m,e[9]=o*S+d*r+w*f+A*h,e[10]=o*x+d*t+w*c+A*b,e[11]=o*v+d*a+w*l+A*u,o=C[12],d=C[13],w=C[14],A=C[15],e[12]=o*i+d*p+w*n+A*m,e[13]=o*S+d*r+w*f+A*h,e[14]=o*x+d*t+w*c+A*b,e[15]=o*v+d*a+w*l+A*u,e}},97688:function(H){H.exports=U;function U(e,g,C,i,S,x,v){var p=1/(g-C),r=1/(i-S),t=1/(x-v);return e[0]=-2*p,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*t,e[11]=0,e[12]=(g+C)*p,e[13]=(S+i)*r,e[14]=(v+x)*t,e[15]=1,e}},51296:function(H){H.exports=U;function U(e,g,C,i,S){var x=1/Math.tan(g/2),v=1/(i-S);return e[0]=x/C,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=x,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(S+i)*v,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*S*i*v,e[15]=0,e}},63688:function(H){H.exports=U;function U(e,g,C,i){var S=Math.tan(g.upDegrees*Math.PI/180),x=Math.tan(g.downDegrees*Math.PI/180),v=Math.tan(g.leftDegrees*Math.PI/180),p=Math.tan(g.rightDegrees*Math.PI/180),r=2/(v+p),t=2/(S+x);return e[0]=r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=-((v-p)*r*.5),e[9]=(S-x)*t*.5,e[10]=i/(C-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*C/(C-i),e[15]=0,e}},30016:function(H){H.exports=U;function U(e,g,C,i){var S=i[0],x=i[1],v=i[2],p=Math.sqrt(S*S+x*x+v*v),r,t,a,n,f,c,l,m,h,b,u,o,d,w,A,_,y,E,T,s,L,M,z,D;return Math.abs(p)<1e-6?null:(p=1/p,S*=p,x*=p,v*=p,r=Math.sin(C),t=Math.cos(C),a=1-t,n=g[0],f=g[1],c=g[2],l=g[3],m=g[4],h=g[5],b=g[6],u=g[7],o=g[8],d=g[9],w=g[10],A=g[11],_=S*S*a+t,y=x*S*a+v*r,E=v*S*a-x*r,T=S*x*a-v*r,s=x*x*a+t,L=v*x*a+S*r,M=S*v*a+x*r,z=x*v*a-S*r,D=v*v*a+t,e[0]=n*_+m*y+o*E,e[1]=f*_+h*y+d*E,e[2]=c*_+b*y+w*E,e[3]=l*_+u*y+A*E,e[4]=n*T+m*s+o*L,e[5]=f*T+h*s+d*L,e[6]=c*T+b*s+w*L,e[7]=l*T+u*s+A*L,e[8]=n*M+m*z+o*D,e[9]=f*M+h*z+d*D,e[10]=c*M+b*z+w*D,e[11]=l*M+u*z+A*D,g!==e&&(e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e)}},15456:function(H){H.exports=U;function U(e,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[4],v=g[5],p=g[6],r=g[7],t=g[8],a=g[9],n=g[10],f=g[11];return g!==e&&(e[0]=g[0],e[1]=g[1],e[2]=g[2],e[3]=g[3],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[4]=x*S+t*i,e[5]=v*S+a*i,e[6]=p*S+n*i,e[7]=r*S+f*i,e[8]=t*S-x*i,e[9]=a*S-v*i,e[10]=n*S-p*i,e[11]=f*S-r*i,e}},64840:function(H){H.exports=U;function U(e,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[0],v=g[1],p=g[2],r=g[3],t=g[8],a=g[9],n=g[10],f=g[11];return g!==e&&(e[4]=g[4],e[5]=g[5],e[6]=g[6],e[7]=g[7],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[0]=x*S-t*i,e[1]=v*S-a*i,e[2]=p*S-n*i,e[3]=r*S-f*i,e[8]=x*i+t*S,e[9]=v*i+a*S,e[10]=p*i+n*S,e[11]=r*i+f*S,e}},4192:function(H){H.exports=U;function U(e,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[0],v=g[1],p=g[2],r=g[3],t=g[4],a=g[5],n=g[6],f=g[7];return g!==e&&(e[8]=g[8],e[9]=g[9],e[10]=g[10],e[11]=g[11],e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15]),e[0]=x*S+t*i,e[1]=v*S+a*i,e[2]=p*S+n*i,e[3]=r*S+f*i,e[4]=t*S-x*i,e[5]=a*S-v*i,e[6]=n*S-p*i,e[7]=f*S-r*i,e}},68152:function(H){H.exports=U;function U(e,g,C){var i=C[0],S=C[1],x=C[2];return e[0]=g[0]*i,e[1]=g[1]*i,e[2]=g[2]*i,e[3]=g[3]*i,e[4]=g[4]*S,e[5]=g[5]*S,e[6]=g[6]*S,e[7]=g[7]*S,e[8]=g[8]*x,e[9]=g[9]*x,e[10]=g[10]*x,e[11]=g[11]*x,e[12]=g[12],e[13]=g[13],e[14]=g[14],e[15]=g[15],e}},89412:function(H){H.exports=U;function U(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},35176:function(H){H.exports=U;function U(e,g,C){var i=C[0],S=C[1],x=C[2],v,p,r,t,a,n,f,c,l,m,h,b;return g===e?(e[12]=g[0]*i+g[4]*S+g[8]*x+g[12],e[13]=g[1]*i+g[5]*S+g[9]*x+g[13],e[14]=g[2]*i+g[6]*S+g[10]*x+g[14],e[15]=g[3]*i+g[7]*S+g[11]*x+g[15]):(v=g[0],p=g[1],r=g[2],t=g[3],a=g[4],n=g[5],f=g[6],c=g[7],l=g[8],m=g[9],h=g[10],b=g[11],e[0]=v,e[1]=p,e[2]=r,e[3]=t,e[4]=a,e[5]=n,e[6]=f,e[7]=c,e[8]=l,e[9]=m,e[10]=h,e[11]=b,e[12]=v*i+a*S+l*x+g[12],e[13]=p*i+n*S+m*x+g[13],e[14]=r*i+f*S+h*x+g[14],e[15]=t*i+c*S+b*x+g[15]),e}},86520:function(H){H.exports=U;function U(e,g){if(e===g){var C=g[1],i=g[2],S=g[3],x=g[6],v=g[7],p=g[11];e[1]=g[4],e[2]=g[8],e[3]=g[12],e[4]=C,e[6]=g[9],e[7]=g[13],e[8]=i,e[9]=x,e[11]=g[14],e[12]=S,e[13]=v,e[14]=p}else e[0]=g[0],e[1]=g[4],e[2]=g[8],e[3]=g[12],e[4]=g[1],e[5]=g[5],e[6]=g[9],e[7]=g[13],e[8]=g[2],e[9]=g[6],e[10]=g[10],e[11]=g[14],e[12]=g[3],e[13]=g[7],e[14]=g[11],e[15]=g[15];return e}},23352:function(H,U,e){var g=e(42771),C=e(55616),i=e(28624),S=e(55212),x=e(60463),v=e(72160),p=e(33888),r=e(14144),t=e(51160),a=e(58908),n=e(65819),f=e(23464),c=e(63768),l=e(50896),m=e(71920),h=e(47520),b=e(308),u=b.nextPow2,o=new x,d=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(d=!0),document.body.removeChild(w)}var A=function(E){_(E)?(E={regl:E},this.gl=E.regl._gl):this.gl=S(E),this.shader=o.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=E.regl||i({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),o.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(a(E)?E:{})};A.prototype.createShader=function(){var E=this.regl,T=E({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:E.prop("count"),offset:E.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:E.this("sizeBuffer")},width:{offset:0,stride:8,buffer:E.this("sizeBuffer")},char:E.this("charBuffer"),position:E.this("position")},uniforms:{atlasSize:function(L,M){return[M.atlas.width,M.atlas.height]},atlasDim:function(L,M){return[M.atlas.cols,M.atlas.rows]},atlas:function(L,M){return M.atlas.texture},charStep:function(L,M){return M.atlas.step},em:function(L,M){return M.atlas.em},color:E.prop("color"),opacity:E.prop("opacity"),viewport:E.this("viewportArray"),scale:E.this("scale"),align:E.prop("align"),baseline:E.prop("baseline"),translate:E.this("translate"),positionOffset:E.prop("positionOffset")},primitive:"points",viewport:E.this("viewport"),vert:` + */function k(At,mt){if(At===mt)return 0;for(var Lt=At.length,Ht=mt.length,Ut=0,kt=Math.min(Lt,Ht);Ut"u"?[]:new Uint8Array(256),i=0;i>2],a+=g[(p[r]&3)<<4|p[r+1]>>4],a+=g[(p[r+1]&15)<<2|p[r+2]>>6],a+=g[p[r+2]&63];return e%3===2?a=a.substring(0,a.length-1)+"=":e%3===1&&(a=a.substring(0,a.length-2)+"=="),a},x=function(v){var p=v.length*.75,r=v.length,e,a=0,n,f,c,l;v[v.length-1]==="="&&(p--,v[v.length-2]==="="&&p--);var m=new ArrayBuffer(p),h=new Uint8Array(m);for(e=0;e>4,h[a++]=(f&15)<<4|c>>2,h[a++]=(c&3)<<6|l&63;return m}},59968:function(G,U){U.byteLength=p,U.toByteArray=e,U.fromByteArray=f;for(var t=[],g=[],C=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=0,x=i.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var m=c.indexOf("=");m===-1&&(m=l);var h=m===l?0:4-m%4;return[m,h]}function p(c){var l=v(c),m=l[0],h=l[1];return(m+h)*3/4-h}function r(c,l,m){return(l+m)*3/4-m}function e(c){var l,m=v(c),h=m[0],b=m[1],u=new C(r(c,h,b)),o=0,d=b>0?h-4:h,w;for(w=0;w>16&255,u[o++]=l>>8&255,u[o++]=l&255;return b===2&&(l=g[c.charCodeAt(w)]<<2|g[c.charCodeAt(w+1)]>>4,u[o++]=l&255),b===1&&(l=g[c.charCodeAt(w)]<<10|g[c.charCodeAt(w+1)]<<4|g[c.charCodeAt(w+2)]>>2,u[o++]=l>>8&255,u[o++]=l&255),u}function a(c){return t[c>>18&63]+t[c>>12&63]+t[c>>6&63]+t[c&63]}function n(c,l,m){for(var h,b=[],u=l;ud?d:o+u));return h===1?(l=c[m-1],b.push(t[l>>2]+t[l<<4&63]+"==")):h===2&&(l=(c[m-2]<<8)+c[m-1],b.push(t[l>>10]+t[l>>4&63]+t[l<<2&63]+"=")),b.join("")}},64928:function(G){function U(x,v,p,r,e){for(var a=e+1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c>=0?(a=n,e=n-1):r=n+1}return a}function t(x,v,p,r,e){for(var a=e+1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c>0?(a=n,e=n-1):r=n+1}return a}function g(x,v,p,r,e){for(var a=r-1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c<0?(a=n,r=n+1):e=n-1}return a}function C(x,v,p,r,e){for(var a=r-1;r<=e;){var n=r+e>>>1,f=x[n],c=p!==void 0?p(f,v):f-v;c<=0?(a=n,r=n+1):e=n-1}return a}function i(x,v,p,r,e){for(;r<=e;){var a=r+e>>>1,n=x[a],f=p!==void 0?p(n,v):n-v;if(f===0)return a;f<=0?r=a+1:e=a-1}return-1}function S(x,v,p,r,e,a){return typeof p=="function"?a(x,v,p,r===void 0?0:r|0,e===void 0?x.length-1:e|0):a(x,v,void 0,p===void 0?0:p|0,r===void 0?x.length-1:r|0)}G.exports={ge:function(x,v,p,r,e){return S(x,v,p,r,e,U)},gt:function(x,v,p,r,e){return S(x,v,p,r,e,t)},lt:function(x,v,p,r,e){return S(x,v,p,r,e,g)},le:function(x,v,p,r,e){return S(x,v,p,r,e,C)},eq:function(x,v,p,r,e){return S(x,v,p,r,e,i)}}},308:function(G,U){"use restrict";var t=32;U.INT_BITS=t,U.INT_MAX=2147483647,U.INT_MIN=-1<0)-(i<0)},U.abs=function(i){var S=i>>t-1;return(i^S)-S},U.min=function(i,S){return S^(i^S)&-(i65535)<<4,i>>>=S,x=(i>255)<<3,i>>>=x,S|=x,x=(i>15)<<2,i>>>=x,S|=x,x=(i>3)<<1,i>>>=x,S|=x,S|i>>1},U.log10=function(i){return i>=1e9?9:i>=1e8?8:i>=1e7?7:i>=1e6?6:i>=1e5?5:i>=1e4?4:i>=1e3?3:i>=100?2:i>=10?1:0},U.popCount=function(i){return i=i-(i>>>1&1431655765),i=(i&858993459)+(i>>>2&858993459),(i+(i>>>4)&252645135)*16843009>>>24};function g(i){var S=32;return i&=-i,i&&S--,i&65535&&(S-=16),i&16711935&&(S-=8),i&252645135&&(S-=4),i&858993459&&(S-=2),i&1431655765&&(S-=1),S}U.countTrailingZeros=g,U.nextPow2=function(i){return i+=i===0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1},U.prevPow2=function(i){return i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i-(i>>>1)},U.parity=function(i){return i^=i>>>16,i^=i>>>8,i^=i>>>4,i&=15,27030>>>i&1};var C=new Array(256);(function(i){for(var S=0;S<256;++S){var x=S,v=S,p=7;for(x>>>=1;x;x>>>=1)v<<=1,v|=x&1,--p;i[S]=v<>>8&255]<<16|C[i>>>16&255]<<8|C[i>>>24&255]},U.interleave2=function(i,S){return i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,i|S<<1},U.deinterleave2=function(i,S){return i=i>>>S&1431655765,i=(i|i>>>1)&858993459,i=(i|i>>>2)&252645135,i=(i|i>>>4)&16711935,i=(i|i>>>16)&65535,i<<16>>16},U.interleave3=function(i,S,x){return i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,i|=S<<1,x&=1023,x=(x|x<<16)&4278190335,x=(x|x<<8)&251719695,x=(x|x<<4)&3272356035,x=(x|x<<2)&1227133513,i|x<<2},U.deinterleave3=function(i,S){return i=i>>>S&1227133513,i=(i|i>>>2)&3272356035,i=(i|i>>>4)&251719695,i=(i|i>>>8)&4278190335,i=(i|i>>>16)&1023,i<<22>>22},U.nextCombination=function(i){var S=i|i-1;return S+1|(~S&-~S)-1>>>g(i)+1}},29620:function(G,U,t){var g=t(32420);G.exports=i;var C=1e20;function i(v,p){p||(p={});var r=p.cutoff==null?.25:p.cutoff,e=p.radius==null?8:p.radius,a=p.channel||0,n,f,c,l,m,h,b,u,o,d,w;if(ArrayBuffer.isView(v)||Array.isArray(v)){if(!p.width||!p.height)throw Error("For raw data width and height should be provided by options");n=p.width,f=p.height,l=v,p.stride?h=p.stride:h=Math.floor(v.length/n/f)}else window.HTMLCanvasElement&&v instanceof window.HTMLCanvasElement?(u=v,b=u.getContext("2d"),n=u.width,f=u.height,o=b.getImageData(0,0,n,f),l=o.data,h=4):window.CanvasRenderingContext2D&&v instanceof window.CanvasRenderingContext2D?(u=v.canvas,b=v,n=u.width,f=u.height,o=b.getImageData(0,0,n,f),l=o.data,h=4):window.ImageData&&v instanceof window.ImageData&&(o=v,n=v.width,f=v.height,l=o.data,h=4);if(c=Math.max(n,f),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(m=l,l=Array(n*f),d=0,w=m.length;d-1?C(p):p}},57916:function(G,U,t){var g=t(8844),C=t(53664),i=t(14500),S=C("%TypeError%"),x=C("%Function.prototype.apply%"),v=C("%Function.prototype.call%"),p=C("%Reflect.apply%",!0)||g.call(v,x),r=C("%Object.defineProperty%",!0),e=C("%Math.max%");if(r)try{r({},"a",{value:1})}catch{r=null}G.exports=function(f){if(typeof f!="function")throw new S("a function is required");var c=p(g,v,arguments);return i(c,1+e(0,f.length-(arguments.length-1)),!0)};var a=function(){return p(g,x,arguments)};r?r(G.exports,"apply",{value:a}):G.exports.apply=a},32420:function(G){G.exports=U;function U(t,g,C){return gC?C:t:tg?g:t}},3808:function(G,U,t){var g=t(32420);G.exports=C,G.exports.to=C,G.exports.from=i;function C(S,x){x==null&&(x=!0);var v=S[0],p=S[1],r=S[2],e=S[3];e==null&&(e=x?1:255),x&&(v*=255,p*=255,r*=255,e*=255),v=g(v,0,255)&255,p=g(p,0,255)&255,r=g(r,0,255)&255,e=g(e,0,255)&255;var a=v*16777216+(p<<16)+(r<<8)+e;return a}function i(S,x){S=+S;var v=S>>>24,p=(S&16711680)>>>16,r=(S&65280)>>>8,e=S&255;return x===!1?[v,p,r,e]:[v/255,p/255,r/255,e/255]}},17592:function(G){G.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},72160:function(G,U,t){var g=t(96824),C=t(32420),i=t(72512);G.exports=function(v,p){(p==="float"||!p)&&(p="array"),p==="uint"&&(p="uint8"),p==="uint_clamped"&&(p="uint8_clamped");var r=i(p),e=new r(4),a=p!=="uint8"&&p!=="uint8_clamped";return(!v.length||typeof v=="string")&&(v=g(v),v[0]/=255,v[1]/=255,v[2]/=255),S(v)?(e[0]=v[0],e[1]=v[1],e[2]=v[2],e[3]=v[3]!=null?v[3]:255,a&&(e[0]/=255,e[1]/=255,e[2]/=255,e[3]/=255),e):(a?(e[0]=v[0],e[1]=v[1],e[2]=v[2],e[3]=v[3]!=null?v[3]:1):(e[0]=C(Math.floor(v[0]*255),0,255),e[1]=C(Math.floor(v[1]*255),0,255),e[2]=C(Math.floor(v[2]*255),0,255),e[3]=v[3]==null?255:C(Math.floor(v[3]*255),0,255)),e)};function S(x){return!!(x instanceof Uint8Array||x instanceof Uint8ClampedArray||Array.isArray(x)&&(x[0]>1||x[0]===0)&&(x[1]>1||x[1]===0)&&(x[2]>1||x[2]===0)&&(!x[3]||x[3]>1))}},96824:function(G,U,t){var g=t(95532),C=t(53576),i=t(32420);G.exports=function(x){var v,p=g(x);return p.space?(v=Array(3),v[0]=i(p.values[0],0,255),v[1]=i(p.values[1],0,255),v[2]=i(p.values[2],0,255),p.space[0]==="h"&&(v=C.rgb(v)),v.push(i(p.alpha,0,1)),v):[]}},95532:function(G,U,t){var g=t(17592);G.exports=i;var C={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function i(S){var x,v=[],p=1,r;if(typeof S=="string")if(S=S.toLowerCase(),g[S])v=g[S].slice(),r="rgb";else if(S==="transparent")p=0,r="rgb",v=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var e=S.slice(1),a=e.length,n=a<=4;p=1,n?(v=[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)],a===4&&(p=parseInt(e[3]+e[3],16)/255)):(v=[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)],a===8&&(p=parseInt(e[6]+e[7],16)/255)),v[0]||(v[0]=0),v[1]||(v[1]=0),v[2]||(v[2]=0),r="rgb"}else if(x=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var f=x[1],c=f==="rgb",e=f.replace(/a$/,"");r=e;var a=e==="cmyk"?4:e==="gray"?1:3;v=x[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,b){if(/%$/.test(h))return b===a?parseFloat(h)/100:e==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(e[b]==="h"){if(/deg$/.test(h))return parseFloat(h);if(C[h]!==void 0)return C[h]}return parseFloat(h)}),f===e&&v.push(1),p=c||v[a]===void 0?1:v[a],v=v.slice(0,a)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(v=S.match(/([0-9]+)/g).map(function(l){return parseFloat(l)}),r=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(v=[S[0],S[1],S[2]],r="rgb",p=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(r="rgb",v=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(r="hsl",v=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),p=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(p/=100)):(r="rgb",v=[S>>>16,(S&65280)>>>8,S&255]);return{space:r,values:v,alpha:p}}},53576:function(G,U,t){var g=t(19336);G.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(C){var i=C[0]/360,S=C[1]/100,x=C[2]/100,v,p,r,e,a;if(S===0)return a=x*255,[a,a,a];x<.5?p=x*(1+S):p=x+S-x*S,v=2*x-p,e=[0,0,0];for(var n=0;n<3;n++)r=i+.3333333333333333*-(n-1),r<0?r++:r>1&&r--,6*r<1?a=v+(p-v)*6*r:2*r<1?a=p:3*r<2?a=v+(p-v)*(.6666666666666666-r)*6:a=v,e[n]=a*255;return e}},g.hsl=function(C){var i=C[0]/255,S=C[1]/255,x=C[2]/255,v=Math.min(i,S,x),p=Math.max(i,S,x),r=p-v,e,a,n;return p===v?e=0:i===p?e=(S-x)/r:S===p?e=2+(x-i)/r:x===p&&(e=4+(i-S)/r),e=Math.min(e*60,360),e<0&&(e+=360),n=(v+p)/2,p===v?a=0:n<=.5?a=r/(p+v):a=r/(2-p-v),[e,a*100,n*100]}},19336:function(G){G.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},36116:function(G){G.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},42771:function(G,U,t){G.exports={parse:t(46416),stringify:t(49395)}},8744:function(G,U,t){var g=t(30584);G.exports={isSize:function(i){return/^[\d\.]/.test(i)||i.indexOf("/")!==-1||g.indexOf(i)!==-1}}},46416:function(G,U,t){var g=t(92384),C=t(68194),i=t(3748),S=t(2904),x=t(47916),v=t(7294),p=t(39956),r=t(8744).isSize;G.exports=a;var e=a.cache={};function a(f){if(typeof f!="string")throw new Error("Font argument must be a string.");if(e[f])return e[f];if(f==="")throw new Error("Cannot parse an empty string.");if(i.indexOf(f)!==-1)return e[f]={system:f};for(var c={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},l=p(f,/\s+/),m;m=l.shift();){if(C.indexOf(m)!==-1)return["style","variant","weight","stretch"].forEach(function(b){c[b]=m}),e[f]=c;if(x.indexOf(m)!==-1){c.style=m;continue}if(m==="normal"||m==="small-caps"){c.variant=m;continue}if(v.indexOf(m)!==-1){c.stretch=m;continue}if(S.indexOf(m)!==-1){c.weight=m;continue}if(r(m)){var h=p(m,"/");if(c.size=h[0],h[1]!=null?c.lineHeight=n(h[1]):l[0]==="/"&&(l.shift(),c.lineHeight=n(l.shift())),!l.length)throw new Error("Missing required font-family.");return c.family=p(l.join(" "),/\s*,\s*/).map(g),e[f]=c}throw new Error("Unknown or unsupported font token: "+m)}throw new Error("Missing required font-size.")}function n(f){var c=parseFloat(f);return c.toString()===f?c:f}},49395:function(G,U,t){var g=t(55616),C=t(8744).isSize,i=f(t(68194)),S=f(t(3748)),x=f(t(2904)),v=f(t(47916)),p=f(t(7294)),r={normal:1,"small-caps":1},e={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},a={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};G.exports=function(l){if(l=g(l,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),l.system)return l.system&&n(l.system,S),l.system;if(n(l.style,v),n(l.variant,r),n(l.weight,x),n(l.stretch,p),l.size==null&&(l.size=a.size),typeof l.size=="number"&&(l.size+="px"),!C)throw Error("Bad size value `"+l.size+"`");l.family||(l.family=a.family),Array.isArray(l.family)&&(l.family.length||(l.family=[a.family]),l.family=l.family.map(function(h){return e[h]?h:'"'+h+'"'}).join(", "));var m=[];return m.push(l.style),l.variant!==l.style&&m.push(l.variant),l.weight!==l.variant&&l.weight!==l.style&&m.push(l.weight),l.stretch!==l.weight&&l.stretch!==l.variant&&l.stretch!==l.style&&m.push(l.stretch),m.push(l.size+(l.lineHeight==null||l.lineHeight==="normal"||l.lineHeight+""=="1"?"":"/"+l.lineHeight)),m.push(l.family),m.filter(Boolean).join(" ")};function n(c,l){if(c&&!l[c]&&!i[c])throw Error("Unknown keyword `"+c+"`");return c}function f(c){for(var l={},m=0;mf?1:n>=f?0:NaN}function C(n){return n.length===1&&(n=i(n)),{left:function(f,c,l,m){for(l==null&&(l=0),m==null&&(m=f.length);l>>1;n(f[h],c)<0?l=h+1:m=h}return l},right:function(f,c,l,m){for(l==null&&(l=0),m==null&&(m=f.length);l>>1;n(f[h],c)>0?m=h:l=h+1}return l}}}function i(n){return function(f,c){return g(n(f),c)}}C(g);function S(n,f){var c=n.length,l=-1,m,h;if(f==null){for(;++l=m)for(h=m;++lh&&(h=m)}else for(;++l=m)for(h=m;++lh&&(h=m);return h}function x(n){return n===null?NaN:+n}function v(n,f){var c=n.length,l=c,m=-1,h,b=0;if(f==null)for(;++m=0;)for(b=n[f],c=b.length;--c>=0;)h[--m]=b[c];return h}function r(n,f){var c=n.length,l=-1,m,h;if(f==null){for(;++l=m)for(h=m;++lm&&(h=m)}else for(;++l=m)for(h=m;++lm&&(h=m);return h}function e(n,f,c){n=+n,f=+f,c=(m=arguments.length)<2?(f=n,n=0,1):m<3?1:+c;for(var l=-1,m=Math.max(0,Math.ceil((f-n)/c))|0,h=new Array(m);++l=f.length)return l!=null&&o.sort(l),m!=null?m(o):o;for(var _=-1,y=o.length,E=f[d++],T,s,L=S(),M,z=w();++_f.length)return o;var w,A=c[d-1];return m!=null&&d>=f.length?w=o.entries():(w=[],o.each(function(_,y){w.push({key:y,values:u(_,d)})})),A!=null?w.sort(function(_,y){return A(_.key,y.key)}):w}return h={object:function(o){return b(o,0,v,p)},map:function(o){return b(o,0,r,e)},entries:function(o){return u(b(o,0,r,e),0)},key:function(o){return f.push(o),h},sortKeys:function(o){return c[f.length-1]=o,h},sortValues:function(o){return l=o,h},rollup:function(o){return m=o,h}}}function v(){return{}}function p(f,c,l){f[c]=l}function r(){return S()}function e(f,c,l){f.set(c,l)}function a(){}var n=S.prototype;a.prototype={constructor:a,has:n.has,add:function(f){return f+="",this[g+f]=f,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each}},49812:function(G,U,t){t.r(U),t.d(U,{forceCenter:function(){return g},forceCollide:function(){return L},forceLink:function(){return N},forceManyBody:function(){return Vt},forceRadial:function(){return It},forceSimulation:function(){return kt},forceX:function(){return re},forceY:function(){return Kt}});function g($t,le){var he;$t==null&&($t=0),le==null&&(le=0);function de(){var xe,Se=he.length,ne,zt=0,Xt=0;for(xe=0;xe=(Ft=(zt+Jt)/2))?zt=Ft:Jt=Ft,(Nt=he>=(xt=(Xt+Wt)/2))?Xt=xt:Wt=xt,xe=Se,!(Se=Se[jt=Nt<<1|Mt]))return xe[jt]=ne,$t;if(yt=+$t._x.call(null,Se.data),Et=+$t._y.call(null,Se.data),le===yt&&he===Et)return ne.next=Se,xe?xe[jt]=ne:$t._root=ne,$t;do xe=xe?xe[jt]=new Array(4):$t._root=new Array(4),(Mt=le>=(Ft=(zt+Jt)/2))?zt=Ft:Jt=Ft,(Nt=he>=(xt=(Xt+Wt)/2))?Xt=xt:Wt=xt;while((jt=Nt<<1|Mt)===(ie=(Et>=xt)<<1|yt>=Ft));return xe[ie]=Se,xe[jt]=ne,$t}function v($t){var le,he,de=$t.length,xe,Se,ne=new Array(de),zt=new Array(de),Xt=1/0,Jt=1/0,Wt=-1/0,Ft=-1/0;for(he=0;heWt&&(Wt=xe),SeFt&&(Ft=Se));if(Xt>Wt||Jt>Ft)return this;for(this.cover(Xt,Jt).cover(Wt,Ft),he=0;he$t||$t>=xe||de>le||le>=Se;)switch(Jt=(leWt||(zt=Et.y0)>Ft||(Xt=Et.x1)=jt)<<1|$t>=Nt)&&(Et=xt[xt.length-1],xt[xt.length-1]=xt[xt.length-1-Mt],xt[xt.length-1-Mt]=Et)}else{var ie=$t-+this._x.call(null,yt.data),me=le-+this._y.call(null,yt.data),be=ie*ie+me*me;if(be=(xt=(ne+Xt)/2))?ne=xt:Xt=xt,(Mt=Ft>=(yt=(zt+Jt)/2))?zt=yt:Jt=yt,le=he,!(he=he[Nt=Mt<<1|Et]))return this;if(!he.length)break;(le[Nt+1&3]||le[Nt+2&3]||le[Nt+3&3])&&(de=le,jt=Nt)}for(;he.data!==$t;)if(xe=he,!(he=he.next))return this;return(Se=he.next)&&delete he.next,xe?(Se?xe.next=Se:delete xe.next,this):le?(Se?le[Nt]=Se:delete le[Nt],(he=le[0]||le[1]||le[2]||le[3])&&he===(le[3]||le[2]||le[1]||le[0])&&!he.length&&(de?de[jt]=he:this._root=he),this):(this._root=Se,this)}function c($t){for(var le=0,he=$t.length;leFt.index){var ir=xt-ce.x-ce.vx,pe=yt-ce.y-ce.vy,Xe=ir*ir+pe*pe;Xext+Be||veyt+Be||LeXt.r&&(Xt.r=Xt[Jt].r)}function zt(){if(le){var Xt,Jt=le.length,Wt;for(he=new Array(Jt),Xt=0;Xt=0&&(de=he.slice(xe+1),he=he.slice(0,xe)),he&&!le.hasOwnProperty(he))throw new Error("unknown type: "+he);return{type:he,name:de}})}B.prototype=k.prototype={constructor:B,on:function($t,le){var he=this._,de=O($t+"",he),xe,Se=-1,ne=de.length;if(arguments.length<2){for(;++Se0)for(var he=new Array(xe),de=0,xe,Se;de=0&&$t._call.call(null,le),$t=$t._next;--et}function wt(){Q=(V=$.now())+ot,et=it=0;try{Tt()}finally{et=0,bt(),Q=0}}function Rt(){var $t=$.now(),le=$t-V;le>J&&(ot-=le,V=$t)}function bt(){for(var $t,le=X,he,de=1/0;le;)le._call?(de>le._time&&(de=le._time),$t=le,le=le._next):(he=le._next,le._next=null,le=$t?$t._next=he:X=he);tt=$t,At(de)}function At($t){if(!et){it&&(it=clearTimeout(it));var le=$t-Q;le>24?($t<1/0&&(it=setTimeout(wt,$t-$.now()-ot)),ut&&(ut=clearInterval(ut))):(ut||(V=$.now(),ut=setInterval(Rt,J)),et=1,Z(wt))}}function mt($t){return $t.x}function Lt($t){return $t.y}var Ht=10,Ut=Math.PI*(3-Math.sqrt(5));function kt($t){var le,he=1,de=.001,xe=1-Math.pow(de,1/300),Se=0,ne=.6,zt=(0,M.kH)(),Xt=gt(Wt),Jt=j("tick","end");$t==null&&($t=[]);function Wt(){Ft(),Jt.call("tick",le),he1?(Mt==null?zt.remove(Et):zt.set(Et,yt(Mt)),le):zt.get(Et)},find:function(Et,Mt,Nt){var jt=0,ie=$t.length,me,be,ve,Le,ce;for(Nt==null?Nt=1/0:Nt*=Nt,jt=0;jt1?(Jt.on(Et,Mt),le):Jt.on(Et)}}}function Vt(){var $t,le,he,de=C(-30),xe,Se=1,ne=1/0,zt=.81;function Xt(xt){var yt,Et=$t.length,Mt=A($t,mt,Lt).visitAfter(Wt);for(he=xt,yt=0;yt=ne)return;(xt.data!==le||xt.next)&&(Nt===0&&(Nt=i(),me+=Nt*Nt),jt===0&&(jt=i(),me+=jt*jt),me=1e21?w.toLocaleString("en").replace(/,/g,""):w.toString(10)}function C(w,A){if((_=(w=A?w.toExponential(A-1):w.toExponential()).indexOf("e"))<0)return null;var _,y=w.slice(0,_);return[y.length>1?y[0]+y.slice(2):y,+w.slice(_+1)]}function i(w){return w=C(Math.abs(w)),w?w[1]:NaN}function S(w,A){return function(_,y){for(var E=_.length,T=[],s=0,L=w[0],M=0;E>0&&L>0&&(M+L+1>y&&(L=Math.max(1,y-M)),T.push(_.substring(E-=L,E+L)),!((M+=L+1)>y));)L=w[s=(s+1)%w.length];return T.reverse().join(A)}}function x(w){return function(A){return A.replace(/[0-9]/g,function(_){return w[+_]})}}var v=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function p(w){if(!(A=v.exec(w)))throw new Error("invalid format: "+w);var A;return new r({fill:A[1],align:A[2],sign:A[3],symbol:A[4],zero:A[5],width:A[6],comma:A[7],precision:A[8]&&A[8].slice(1),trim:A[9],type:A[10]})}p.prototype=r.prototype;function r(w){this.fill=w.fill===void 0?" ":w.fill+"",this.align=w.align===void 0?">":w.align+"",this.sign=w.sign===void 0?"-":w.sign+"",this.symbol=w.symbol===void 0?"":w.symbol+"",this.zero=!!w.zero,this.width=w.width===void 0?void 0:+w.width,this.comma=!!w.comma,this.precision=w.precision===void 0?void 0:+w.precision,this.trim=!!w.trim,this.type=w.type===void 0?"":w.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function e(w){t:for(var A=w.length,_=1,y=-1,E;_0&&(y=0);break}return y>0?w.slice(0,y)+w.slice(E+1):w}var a;function n(w,A){var _=C(w,A);if(!_)return w+"";var y=_[0],E=_[1],T=E-(a=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,s=y.length;return T===s?y:T>s?y+new Array(T-s+1).join("0"):T>0?y.slice(0,T)+"."+y.slice(T):"0."+new Array(1-T).join("0")+C(w,Math.max(0,A+T-1))[0]}function f(w,A){var _=C(w,A);if(!_)return w+"";var y=_[0],E=_[1];return E<0?"0."+new Array(-E).join("0")+y:y.length>E+1?y.slice(0,E+1)+"."+y.slice(E+1):y+new Array(E-y.length+2).join("0")}var c={"%":function(w,A){return(w*100).toFixed(A)},b:function(w){return Math.round(w).toString(2)},c:function(w){return w+""},d:g,e:function(w,A){return w.toExponential(A)},f:function(w,A){return w.toFixed(A)},g:function(w,A){return w.toPrecision(A)},o:function(w){return Math.round(w).toString(8)},p:function(w,A){return f(w*100,A)},r:f,s:n,X:function(w){return Math.round(w).toString(16).toUpperCase()},x:function(w){return Math.round(w).toString(16)}};function l(w){return w}var m=Array.prototype.map,h=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function b(w){var A=w.grouping===void 0||w.thousands===void 0?l:S(m.call(w.grouping,Number),w.thousands+""),_=w.currency===void 0?"":w.currency[0]+"",y=w.currency===void 0?"":w.currency[1]+"",E=w.decimal===void 0?".":w.decimal+"",T=w.numerals===void 0?l:x(m.call(w.numerals,String)),s=w.percent===void 0?"%":w.percent+"",L=w.minus===void 0?"-":w.minus+"",M=w.nan===void 0?"NaN":w.nan+"";function z(N){N=p(N);var I=N.fill,k=N.align,B=N.sign,O=N.symbol,H=N.zero,Y=N.width,j=N.comma,et=N.precision,it=N.trim,ut=N.type;ut==="n"?(j=!0,ut="g"):c[ut]||(et===void 0&&(et=12),it=!0,ut="g"),(H||I==="0"&&k==="=")&&(H=!0,I="0",k="=");var J=O==="$"?_:O==="#"&&/[boxX]/.test(ut)?"0"+ut.toLowerCase():"",X=O==="$"?y:/[%p]/.test(ut)?s:"",tt=c[ut],V=/[defgprs%]/.test(ut);et=et===void 0?6:/[gprs]/.test(ut)?Math.max(1,Math.min(21,et)):Math.max(0,Math.min(20,et));function Q(ot){var $=J,Z=X,st,nt,ct;if(ut==="c")Z=tt(ot)+Z,ot="";else{ot=+ot;var gt=ot<0||1/ot<0;if(ot=isNaN(ot)?M:tt(Math.abs(ot),et),it&&(ot=e(ot)),gt&&+ot==0&&B!=="+"&&(gt=!1),$=(gt?B==="("?B:L:B==="-"||B==="("?"":B)+$,Z=(ut==="s"?h[8+a/3]:"")+Z+(gt&&B==="("?")":""),V){for(st=-1,nt=ot.length;++stct||ct>57){Z=(ct===46?E+ot.slice(st+1):ot.slice(st))+Z,ot=ot.slice(0,st);break}}}j&&!H&&(ot=A(ot,1/0));var Tt=$.length+ot.length+Z.length,wt=Tt>1)+$+ot+Z+wt.slice(Tt);break;default:ot=wt+$+ot+Z;break}return T(ot)}return Q.toString=function(){return N+""},Q}function D(N,I){var k=z((N=p(N),N.type="f",N)),B=Math.max(-8,Math.min(8,Math.floor(i(I)/3)))*3,O=Math.pow(10,-B),H=h[8+B/3];return function(Y){return k(O*Y)+H}}return{format:z,formatPrefix:D}}var u,o;d({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function d(w){return u=b(w),o=u.format,u.formatPrefix,u}},87108:function(G,U,t){t.r(U),t.d(U,{geoAiry:function(){return H},geoAiryRaw:function(){return O},geoAitoff:function(){return j},geoAitoffRaw:function(){return Y},geoArmadillo:function(){return it},geoArmadilloRaw:function(){return et},geoAugust:function(){return J},geoAugustRaw:function(){return ut},geoBaker:function(){return Q},geoBakerRaw:function(){return V},geoBerghaus:function(){return Z},geoBerghausRaw:function(){return $},geoBertin1953:function(){return bt},geoBertin1953Raw:function(){return Rt},geoBoggs:function(){return It},geoBoggsRaw:function(){return Vt},geoBonne:function(){return he},geoBonneRaw:function(){return le},geoBottomley:function(){return xe},geoBottomleyRaw:function(){return de},geoBromley:function(){return ne},geoBromleyRaw:function(){return Se},geoChamberlin:function(){return Mt},geoChamberlinAfrica:function(){return Et},geoChamberlinRaw:function(){return xt},geoCollignon:function(){return jt},geoCollignonRaw:function(){return Nt},geoCraig:function(){return me},geoCraigRaw:function(){return ie},geoCraster:function(){return Le},geoCrasterRaw:function(){return ve},geoCylindricalEqualArea:function(){return Te},geoCylindricalEqualAreaRaw:function(){return ce},geoCylindricalStereographic:function(){return ir},geoCylindricalStereographicRaw:function(){return Be},geoEckert1:function(){return Xe},geoEckert1Raw:function(){return pe},geoEckert2:function(){return or},geoEckert2Raw:function(){return Ke},geoEckert3:function(){return ge},geoEckert3Raw:function(){return $e},geoEckert4:function(){return Ae},geoEckert4Raw:function(){return se},geoEckert5:function(){return Ie},geoEckert5Raw:function(){return Ce},geoEckert6:function(){return ke},geoEckert6Raw:function(){return Pe},geoEisenlohr:function(){return ur},geoEisenlohrRaw:function(){return Je},geoFahey:function(){return Yt},geoFaheyRaw:function(){return vr},geoFoucaut:function(){return Ne},geoFoucautRaw:function(){return Gt},geoFoucautSinusoidal:function(){return Qe},geoFoucautSinusoidalRaw:function(){return Oe},geoGilbert:function(){return dr},geoGingery:function(){return Gr},geoGingeryRaw:function(){return mr},geoGinzburg4:function(){return cn},geoGinzburg4Raw:function(){return Dr},geoGinzburg5:function(){return Cn},geoGinzburg5Raw:function(){return rn},geoGinzburg6:function(){return Tr},geoGinzburg6Raw:function(){return En},geoGinzburg8:function(){return Wr},geoGinzburg8Raw:function(){return Cr},geoGinzburg9:function(){return an},geoGinzburg9Raw:function(){return Ur},geoGringorten:function(){return ni},geoGringortenQuincuncial:function(){return Dc},geoGringortenRaw:function(){return gn},geoGuyou:function(){return dn},geoGuyouRaw:function(){return wr},geoHammer:function(){return gt},geoHammerRaw:function(){return nt},geoHammerRetroazimuthal:function(){return Bn},geoHammerRetroazimuthalRaw:function(){return Tn},geoHealpix:function(){return sn},geoHealpixRaw:function(){return Ar},geoHill:function(){return Zr},geoHillRaw:function(){return Er},geoHomolosine:function(){return Un},geoHomolosineRaw:function(){return Pn},geoHufnagel:function(){return mi},geoHufnagelRaw:function(){return On},geoHyperelliptical:function(){return pa},geoHyperellipticalRaw:function(){return Ci},geoInterrupt:function(){return Qa},geoInterruptedBoggs:function(){return Bu},geoInterruptedHomolosine:function(){return $i},geoInterruptedMollweide:function(){return Uu},geoInterruptedMollweideHemispheres:function(){return ho},geoInterruptedQuarticAuthalic:function(){return Ls},geoInterruptedSinuMollweide:function(){return vu},geoInterruptedSinusoidal:function(){return ul},geoKavrayskiy7:function(){return Ua},geoKavrayskiy7Raw:function(){return za},geoLagrange:function(){return $a},geoLagrangeRaw:function(){return fl},geoLarrivee:function(){return Tf},geoLarriveeRaw:function(){return _o},geoLaskowski:function(){return yc},geoLaskowskiRaw:function(){return bo},geoLittrow:function(){return Za},geoLittrowRaw:function(){return ts},geoLoximuthal:function(){return Cs},geoLoximuthalRaw:function(){return Hu},geoMiller:function(){return Vu},geoMillerRaw:function(){return es},geoModifiedStereographic:function(){return Xs},geoModifiedStereographicAlaska:function(){return Gu},geoModifiedStereographicGs48:function(){return Ac},geoModifiedStereographicGs50:function(){return Mc},geoModifiedStereographicLee:function(){return Sf},geoModifiedStereographicMiller:function(){return Mf},geoModifiedStereographicRaw:function(){return Af},geoMollweide:function(){return Ht},geoMollweideRaw:function(){return Lt},geoMtFlatPolarParabolic:function(){return Ef},geoMtFlatPolarParabolicRaw:function(){return kl},geoMtFlatPolarQuartic:function(){return Sc},geoMtFlatPolarQuarticRaw:function(){return vs},geoMtFlatPolarSinusoidal:function(){return _f},geoMtFlatPolarSinusoidalRaw:function(){return pu},geoNaturalEarth:function(){return Cf.c},geoNaturalEarth2:function(){return Uo},geoNaturalEarth2Raw:function(){return gu},geoNaturalEarthRaw:function(){return Cf.g},geoNellHammer:function(){return Zs},geoNellHammerRaw:function(){return hl},geoNicolosi:function(){return Wu},geoNicolosiRaw:function(){return rs},geoPatterson:function(){return ml},geoPattersonRaw:function(){return yu},geoPeirceQuincuncial:function(){return Ff},geoPierceQuincuncial:function(){return Ff},geoPolyconic:function(){return _c},geoPolyconicRaw:function(){return xu},geoPolyhedral:function(){return ga},geoPolyhedralButterfly:function(){return Bl},geoPolyhedralCollignon:function(){return Ks},geoPolyhedralWaterman:function(){return Rs},geoProject:function(){return Pc},geoQuantize:function(){return zf},geoQuincuncial:function(){return gs},geoRectangularPolyconic:function(){return kf},geoRectangularPolyconicRaw:function(){return Qu},geoRobinson:function(){return Ds},geoRobinsonRaw:function(){return Xo},geoSatellite:function(){return Js},geoSatelliteRaw:function(){return Au},geoSinuMollweide:function(){return Ln},geoSinuMollweideRaw:function(){return wn},geoSinusoidal:function(){return $t},geoSinusoidalRaw:function(){return Kt},geoStitch:function(){return Xl},geoTimes:function(){return Ha},geoTimesRaw:function(){return zs},geoTwoPointAzimuthal:function(){return Eu},geoTwoPointAzimuthalRaw:function(){return qu},geoTwoPointAzimuthalUsa:function(){return $s},geoTwoPointEquidistant:function(){return Bf},geoTwoPointEquidistantRaw:function(){return Zl},geoTwoPointEquidistantUsa:function(){return Ic},geoVanDerGrinten:function(){return jl},geoVanDerGrinten2:function(){return Uf},geoVanDerGrinten2Raw:function(){return El},geoVanDerGrinten3:function(){return Fc},geoVanDerGrinten3Raw:function(){return ks},geoVanDerGrinten4:function(){return Kl},geoVanDerGrinten4Raw:function(){return To},geoVanDerGrintenRaw:function(){return lo},geoWagner:function(){return Os},geoWagner4:function(){return Hf},geoWagner4Raw:function(){return Cu},geoWagner6:function(){return ef},geoWagner6Raw:function(){return $l},geoWagner7:function(){return tf},geoWagnerRaw:function(){return xs},geoWiechel:function(){return rf},geoWiechelRaw:function(){return qs},geoWinkel3:function(){return Vf},geoWinkel3Raw:function(){return ql}});var g=t(87952),C=Math.abs,i=Math.atan,S=Math.atan2,x=Math.cos,v=Math.exp,p=Math.floor,r=Math.log,e=Math.max,a=Math.min,n=Math.pow,f=Math.round,c=Math.sign||function(qt){return qt>0?1:qt<0?-1:0},l=Math.sin,m=Math.tan,h=1e-6,b=1e-12,u=Math.PI,o=u/2,d=u/4,w=Math.SQRT1_2,A=z(2),_=z(u),y=u*2,E=180/u,T=u/180;function s(qt){return qt?qt/Math.sin(qt):1}function L(qt){return qt>1?o:qt<-1?-o:Math.asin(qt)}function M(qt){return qt>1?0:qt<-1?u:Math.acos(qt)}function z(qt){return qt>0?Math.sqrt(qt):0}function D(qt){return qt=v(2*qt),(qt-1)/(qt+1)}function N(qt){return(v(qt)-v(-qt))/2}function I(qt){return(v(qt)+v(-qt))/2}function k(qt){return r(qt+z(qt*qt+1))}function B(qt){return r(qt+z(qt*qt-1))}function O(qt){var oe=m(qt/2),we=2*r(x(qt/2))/(oe*oe);function Me(Ue,ze){var Ge=x(Ue),gr=x(ze),br=l(ze),sr=gr*Ge,Mr=-((1-sr?r((1+sr)/2)/(1-sr):-.5)+we/(1+sr));return[Mr*gr*l(Ue),Mr*br]}return Me.invert=function(Ue,ze){var Ge=z(Ue*Ue+ze*ze),gr=-qt/2,br=50,sr;if(!Ge)return[0,0];do{var Mr=gr/2,Ir=x(Mr),Nr=l(Mr),en=Nr/Ir,yn=-r(C(Ir));gr-=sr=(2/en*yn-we*en-Ge)/(-yn/(Nr*Nr)+1-we/(2*Ir*Ir))*(Ir<0?.7:1)}while(C(sr)>h&&--br>0);var Rn=l(gr);return[S(Ue*Rn,Ge*x(gr)),L(ze*Rn/Ge)]},Me}function H(){var qt=o,oe=(0,g.U)(O),we=oe(qt);return we.radius=function(Me){return arguments.length?oe(qt=Me*T):qt*E},we.scale(179.976).clipAngle(147)}function Y(qt,oe){var we=x(oe),Me=s(M(we*x(qt/=2)));return[2*we*l(qt)*Me,l(oe)*Me]}Y.invert=function(qt,oe){if(!(qt*qt+4*oe*oe>u*u+h)){var we=qt,Me=oe,Ue=25;do{var ze=l(we),Ge=l(we/2),gr=x(we/2),br=l(Me),sr=x(Me),Mr=l(2*Me),Ir=br*br,Nr=sr*sr,en=Ge*Ge,yn=1-Nr*gr*gr,Rn=yn?M(sr*gr)*z(Dn=1/yn):Dn=0,Dn,Zn=2*Rn*sr*Ge-qt,Li=Rn*br-oe,Pi=Dn*(Nr*en+Rn*sr*gr*Ir),Ri=Dn*(.5*ze*Mr-Rn*2*br*Ge),zi=Dn*.25*(Mr*Ge-Rn*br*Nr*ze),Xi=Dn*(Ir*gr+Rn*en*sr),da=Ri*zi-Xi*Pi;if(!da)break;var Ia=(Li*Ri-Zn*Xi)/da,ft=(Zn*zi-Li*Pi)/da;we-=Ia,Me-=ft}while((C(Ia)>h||C(ft)>h)&&--Ue>0);return[we,Me]}};function j(){return(0,g.c)(Y).scale(152.63)}function et(qt){var oe=l(qt),we=x(qt),Me=qt>=0?1:-1,Ue=m(Me*qt),ze=(1+oe-we)/2;function Ge(gr,br){var sr=x(br),Mr=x(gr/=2);return[(1+sr)*l(gr),(Me*br>-S(Mr,Ue)-.001?0:-Me*10)+ze+l(br)*we-(1+sr)*oe*Mr]}return Ge.invert=function(gr,br){var sr=0,Mr=0,Ir=50;do{var Nr=x(sr),en=l(sr),yn=x(Mr),Rn=l(Mr),Dn=1+yn,Zn=Dn*en-gr,Li=ze+Rn*we-Dn*oe*Nr-br,Pi=Dn*Nr/2,Ri=-en*Rn,zi=oe*Dn*en/2,Xi=we*yn+oe*Nr*Rn,da=Ri*zi-Xi*Pi,Ia=(Li*Ri-Zn*Xi)/da/2,ft=(Zn*zi-Li*Pi)/da;C(ft)>2&&(ft/=2),sr-=Ia,Mr-=ft}while((C(Ia)>h||C(ft)>h)&&--Ir>0);return Me*Mr>-S(x(sr),Ue)-.001?[sr*2,Mr]:null},Ge}function it(){var qt=20*T,oe=qt>=0?1:-1,we=m(oe*qt),Me=(0,g.U)(et),Ue=Me(qt),ze=Ue.stream;return Ue.parallel=function(Ge){return arguments.length?(we=m((oe=(qt=Ge*T)>=0?1:-1)*qt),Me(qt)):qt*E},Ue.stream=function(Ge){var gr=Ue.rotate(),br=ze(Ge),sr=(Ue.rotate([0,0]),ze(Ge)),Mr=Ue.precision();return Ue.rotate(gr),br.sphere=function(){sr.polygonStart(),sr.lineStart();for(var Ir=oe*-180;oe*Ir<180;Ir+=oe*90)sr.point(Ir,oe*90);if(qt)for(;oe*(Ir-=3*oe*Mr)>=-180;)sr.point(Ir,oe*-S(x(Ir*T/2),we)*E);sr.lineEnd(),sr.polygonEnd()},br},Ue.scale(218.695).center([0,28.0974])}function ut(qt,oe){var we=m(oe/2),Me=z(1-we*we),Ue=1+Me*x(qt/=2),ze=l(qt)*Me/Ue,Ge=we/Ue,gr=ze*ze,br=Ge*Ge;return[1.3333333333333333*ze*(3+gr-3*br),1.3333333333333333*Ge*(3+3*gr-br)]}ut.invert=function(qt,oe){if(qt*=.375,oe*=.375,!qt&&C(oe)>1)return null;var we=qt*qt,Me=oe*oe,Ue=1+we+Me,ze=z((Ue-z(Ue*Ue-4*oe*oe))/2),Ge=L(ze)/3,gr=ze?B(C(oe/ze))/3:k(C(qt))/3,br=x(Ge),sr=I(gr),Mr=sr*sr-br*br;return[c(qt)*2*S(N(gr)*br,.25-Mr),c(oe)*2*S(sr*l(Ge),.25+Mr)]};function J(){return(0,g.c)(ut).scale(66.1603)}var X=z(8),tt=r(1+A);function V(qt,oe){var we=C(oe);return web&&--Me>0);return[qt/(x(we)*(X-1/l(we))),c(oe)*we]};function Q(){return(0,g.c)(V).scale(112.314)}var ot=t(69020);function $(qt){var oe=2*u/qt;function we(Me,Ue){var ze=(0,ot.O)(Me,Ue);if(C(Me)>o){var Ge=S(ze[1],ze[0]),gr=z(ze[0]*ze[0]+ze[1]*ze[1]),br=oe*f((Ge-o)/oe)+o,sr=S(l(Ge-=br),2-x(Ge));Ge=br+L(u/gr*l(sr))-sr,ze[0]=gr*x(Ge),ze[1]=gr*l(Ge)}return ze}return we.invert=function(Me,Ue){var ze=z(Me*Me+Ue*Ue);if(ze>o){var Ge=S(Ue,Me),gr=oe*f((Ge-o)/oe)+o,br=Ge>gr?-1:1,sr=ze*x(gr-Ge),Mr=1/m(br*M((sr-u)/z(u*(u-2*sr)+ze*ze)));Ge=gr+2*i((Mr+br*z(Mr*Mr-3))/3),Me=ze*x(Ge),Ue=ze*l(Ge)}return ot.O.invert(Me,Ue)},we}function Z(){var qt=5,oe=(0,g.U)($),we=oe(qt),Me=we.stream,Ue=.01,ze=-x(Ue*T),Ge=l(Ue*T);return we.lobes=function(gr){return arguments.length?oe(qt=+gr):qt},we.stream=function(gr){var br=we.rotate(),sr=Me(gr),Mr=(we.rotate([0,0]),Me(gr));return we.rotate(br),sr.sphere=function(){Mr.polygonStart(),Mr.lineStart();for(var Ir=0,Nr=360/qt,en=2*u/qt,yn=90-180/qt,Rn=o;Ir0&&C(Ue)>h);return Me<0?NaN:we}function wt(qt,oe,we){return oe===void 0&&(oe=40),we===void 0&&(we=b),function(Me,Ue,ze,Ge){var gr,br,sr;ze=ze===void 0?0:+ze,Ge=Ge===void 0?0:+Ge;for(var Mr=0;Mrgr){ze-=br/=2,Ge-=sr/=2;continue}gr=yn;var Rn=(ze>0?-1:1)*we,Dn=(Ge>0?-1:1)*we,Zn=qt(ze+Rn,Ge),Li=qt(ze,Ge+Dn),Pi=(Zn[0]-Ir[0])/Rn,Ri=(Zn[1]-Ir[1])/Rn,zi=(Li[0]-Ir[0])/Dn,Xi=(Li[1]-Ir[1])/Dn,da=Xi*Pi-Ri*zi,Ia=(C(da)<.5?.5:1)/da;if(br=(en*zi-Nr*Xi)*Ia,sr=(Nr*Ri-en*Pi)*Ia,ze+=br,Ge+=sr,C(br)0&&(gr[1]*=1+br/1.5*gr[0]*gr[0]),gr}return Me.invert=wt(Me),Me}function bt(){return(0,g.c)(Rt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function At(qt,oe){var we=qt*l(oe),Me=30,Ue;do oe-=Ue=(oe+l(oe)-we)/(1+x(oe));while(C(Ue)>h&&--Me>0);return oe/2}function mt(qt,oe,we){function Me(Ue,ze){return[qt*Ue*x(ze=At(we,ze)),oe*l(ze)]}return Me.invert=function(Ue,ze){return ze=L(ze/oe),[Ue/(qt*x(ze)),L((2*ze+l(2*ze))/we)]},Me}var Lt=mt(A/o,A,u);function Ht(){return(0,g.c)(Lt).scale(169.529)}var Ut=2.00276,kt=1.11072;function Vt(qt,oe){var we=At(u,oe);return[Ut*qt/(1/x(oe)+kt/x(we)),(oe+A*l(we))/Ut]}Vt.invert=function(qt,oe){var we=Ut*oe,Me=oe<0?-d:d,Ue=25,ze,Ge;do Ge=we-A*l(Me),Me-=ze=(l(2*Me)+2*Me-u*l(Ge))/(2*x(2*Me)+2+u*x(Ge)*A*x(Me));while(C(ze)>h&&--Ue>0);return Ge=we-A*l(Me),[qt*(1/x(Ge)+kt/x(Me))/Ut,Ge]};function It(){return(0,g.c)(Vt).scale(160.857)}function re(qt){var oe=0,we=(0,g.U)(qt),Me=we(oe);return Me.parallel=function(Ue){return arguments.length?we(oe=Ue*T):oe*E},Me}function Kt(qt,oe){return[qt*x(oe),oe]}Kt.invert=function(qt,oe){return[qt/x(oe),oe]};function $t(){return(0,g.c)(Kt).scale(152.63)}function le(qt){if(!qt)return Kt;var oe=1/m(qt);function we(Me,Ue){var ze=oe+qt-Ue,Ge=ze&&Me*x(Ue)/ze;return[ze*l(Ge),oe-ze*x(Ge)]}return we.invert=function(Me,Ue){var ze=z(Me*Me+(Ue=oe-Ue)*Ue),Ge=oe+qt-ze;return[ze/x(Ge)*S(Me,Ue),Ge]},we}function he(){return re(le).scale(123.082).center([0,26.1441]).parallel(45)}function de(qt){function oe(we,Me){var Ue=o-Me,ze=Ue&&we*qt*l(Ue)/Ue;return[Ue*l(ze)/qt,o-Ue*x(ze)]}return oe.invert=function(we,Me){var Ue=we*qt,ze=o-Me,Ge=z(Ue*Ue+ze*ze),gr=S(Ue,ze);return[(Ge?Ge/l(Ge):1)*gr/qt,o-Ge]},oe}function xe(){var qt=.5,oe=(0,g.U)(de),we=oe(qt);return we.fraction=function(Me){return arguments.length?oe(qt=+Me):qt},we.scale(158.837)}var Se=mt(1,4/u,u);function ne(){return(0,g.c)(Se).scale(152.63)}var zt=t(24052),Xt=t(92992);function Jt(qt,oe,we,Me,Ue,ze){var Ge=x(ze),gr;if(C(qt)>1||C(ze)>1)gr=M(we*Ue+oe*Me*Ge);else{var br=l(qt/2),sr=l(ze/2);gr=2*L(z(br*br+oe*Me*sr*sr))}return C(gr)>h?[gr,S(Me*l(ze),oe*Ue-we*Me*Ge)]:[0,0]}function Wt(qt,oe,we){return M((qt*qt+oe*oe-we*we)/(2*qt*oe))}function Ft(qt){return qt-2*u*p((qt+u)/(2*u))}function xt(qt,oe,we){for(var Me=[[qt[0],qt[1],l(qt[1]),x(qt[1])],[oe[0],oe[1],l(oe[1]),x(oe[1])],[we[0],we[1],l(we[1]),x(we[1])]],Ue=Me[2],ze,Ge=0;Ge<3;++Ge,Ue=ze)ze=Me[Ge],Ue.v=Jt(ze[1]-Ue[1],Ue[3],Ue[2],ze[3],ze[2],ze[0]-Ue[0]),Ue.point=[0,0];var gr=Wt(Me[0].v[0],Me[2].v[0],Me[1].v[0]),br=Wt(Me[0].v[0],Me[1].v[0],Me[2].v[0]),sr=u-gr;Me[2].point[1]=0,Me[0].point[0]=-(Me[1].point[0]=Me[0].v[0]/2);var Mr=[Me[2].point[0]=Me[0].point[0]+Me[2].v[0]*x(gr),2*(Me[0].point[1]=Me[1].point[1]=Me[2].v[0]*l(gr))];function Ir(Nr,en){var yn=l(en),Rn=x(en),Dn=new Array(3),Zn;for(Zn=0;Zn<3;++Zn){var Li=Me[Zn];if(Dn[Zn]=Jt(en-Li[1],Li[3],Li[2],Rn,yn,Nr-Li[0]),!Dn[Zn][0])return Li.point;Dn[Zn][1]=Ft(Dn[Zn][1]-Li.v[1])}var Pi=Mr.slice();for(Zn=0;Zn<3;++Zn){var Ri=Zn==2?0:Zn+1,zi=Wt(Me[Zn].v[0],Dn[Zn][0],Dn[Ri][0]);Dn[Zn][1]<0&&(zi=-zi),Zn?Zn==1?(zi=br-zi,Pi[0]-=Dn[Zn][0]*x(zi),Pi[1]-=Dn[Zn][0]*l(zi)):(zi=sr-zi,Pi[0]+=Dn[Zn][0]*x(zi),Pi[1]+=Dn[Zn][0]*l(zi)):(Pi[0]+=Dn[Zn][0]*x(zi),Pi[1]-=Dn[Zn][0]*l(zi))}return Pi[0]/=3,Pi[1]/=3,Pi}return Ir}function yt(qt){return qt[0]*=T,qt[1]*=T,qt}function Et(){return Mt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Mt(qt,oe,we){var Me=(0,zt.c)({type:"MultiPoint",coordinates:[qt,oe,we]}),Ue=[-Me[0],-Me[1]],ze=(0,Xt.c)(Ue),Ge=xt(yt(ze(qt)),yt(ze(oe)),yt(ze(we)));Ge.invert=wt(Ge);var gr=(0,g.c)(Ge).rotate(Ue),br=gr.center;return delete gr.rotate,gr.center=function(sr){return arguments.length?br(ze(sr)):ze.invert(br())},gr.clipAngle(90)}function Nt(qt,oe){var we=z(1-l(oe));return[2/_*qt*we,_*(1-we)]}Nt.invert=function(qt,oe){var we=(we=oe/_-1)*we;return[we>0?qt*z(u/we)/2:0,L(1-we)]};function jt(){return(0,g.c)(Nt).scale(95.6464).center([0,30])}function ie(qt){var oe=m(qt);function we(Me,Ue){return[Me,(Me?Me/l(Me):1)*(l(Ue)*x(Me)-oe*x(Ue))]}return we.invert=oe?function(Me,Ue){Me&&(Ue*=l(Me)/Me);var ze=x(Me);return[Me,2*S(z(ze*ze+oe*oe-Ue*Ue)-ze,oe-Ue)]}:function(Me,Ue){return[Me,L(Me?Ue*m(Me)/Me:Ue)]},we}function me(){return re(ie).scale(249.828).clipAngle(90)}var be=z(3);function ve(qt,oe){return[be*qt*(2*x(2*oe/3)-1)/_,be*_*l(oe/3)]}ve.invert=function(qt,oe){var we=3*L(oe/(be*_));return[_*qt/(be*(2*x(2*we/3)-1)),we]};function Le(){return(0,g.c)(ve).scale(156.19)}function ce(qt){var oe=x(qt);function we(Me,Ue){return[Me*oe,l(Ue)/oe]}return we.invert=function(Me,Ue){return[Me/oe,L(Ue*oe)]},we}function Te(){return re(ce).parallel(38.58).scale(195.044)}function Be(qt){var oe=x(qt);function we(Me,Ue){return[Me*oe,(1+oe)*m(Ue/2)]}return we.invert=function(Me,Ue){return[Me/oe,i(Ue/(1+oe))*2]},we}function ir(){return re(Be).scale(124.75)}function pe(qt,oe){var we=z(8/(3*u));return[we*qt*(1-C(oe)/u),we*oe]}pe.invert=function(qt,oe){var we=z(8/(3*u)),Me=oe/we;return[qt/(we*(1-C(Me)/u)),Me]};function Xe(){return(0,g.c)(pe).scale(165.664)}function Ke(qt,oe){var we=z(4-3*l(C(oe)));return[2/z(6*u)*qt*we,c(oe)*z(2*u/3)*(2-we)]}Ke.invert=function(qt,oe){var we=2-C(oe)/z(2*u/3);return[qt*z(6*u)/(2*we),c(oe)*L((4-we*we)/3)]};function or(){return(0,g.c)(Ke).scale(165.664)}function $e(qt,oe){var we=z(u*(4+u));return[2/we*qt*(1+z(1-4*oe*oe/(u*u))),4/we*oe]}$e.invert=function(qt,oe){var we=z(u*(4+u))/2;return[qt*we/(1+z(1-oe*oe*(4+u)/(4*u))),oe*we/2]};function ge(){return(0,g.c)($e).scale(180.739)}function se(qt,oe){var we=(2+o)*l(oe);oe/=2;for(var Me=0,Ue=1/0;Me<10&&C(Ue)>h;Me++){var ze=x(oe);oe-=Ue=(oe+l(oe)*(ze+2)-we)/(2*ze*(1+ze))}return[2/z(u*(4+u))*qt*(1+x(oe)),2*z(u/(4+u))*l(oe)]}se.invert=function(qt,oe){var we=oe*z((4+u)/u)/2,Me=L(we),Ue=x(Me);return[qt/(2/z(u*(4+u))*(1+Ue)),L((Me+we*(Ue+2))/(2+o))]};function Ae(){return(0,g.c)(se).scale(180.739)}function Ce(qt,oe){return[qt*(1+x(oe))/z(2+u),2*oe/z(2+u)]}Ce.invert=function(qt,oe){var we=z(2+u),Me=oe*we/2;return[we*qt/(1+x(Me)),Me]};function Ie(){return(0,g.c)(Ce).scale(173.044)}function Pe(qt,oe){for(var we=(1+o)*l(oe),Me=0,Ue=1/0;Me<10&&C(Ue)>h;Me++)oe-=Ue=(oe+l(oe)-we)/(1+x(oe));return we=z(2+u),[qt*(1+x(oe))/we,2*oe/we]}Pe.invert=function(qt,oe){var we=1+o,Me=z(we/2);return[qt*2*Me/(1+x(oe*=Me)),L((oe+l(oe))/we)]};function ke(){return(0,g.c)(Pe).scale(173.044)}var Ve=3+2*A;function Je(qt,oe){var we=l(qt/=2),Me=x(qt),Ue=z(x(oe)),ze=x(oe/=2),Ge=l(oe)/(ze+A*Me*Ue),gr=z(2/(1+Ge*Ge)),br=z((A*ze+(Me+we)*Ue)/(A*ze+(Me-we)*Ue));return[Ve*(gr*(br-1/br)-2*r(br)),Ve*(gr*Ge*(br+1/br)-2*i(Ge))]}Je.invert=function(qt,oe){if(!(ze=ut.invert(qt/1.2,oe*1.065)))return null;var we=ze[0],Me=ze[1],Ue=20,ze;qt/=Ve,oe/=Ve;do{var Ge=we/2,gr=Me/2,br=l(Ge),sr=x(Ge),Mr=l(gr),Ir=x(gr),Nr=x(Me),en=z(Nr),yn=Mr/(Ir+A*sr*en),Rn=yn*yn,Dn=z(2/(1+Rn)),Zn=A*Ir+(sr+br)*en,Li=A*Ir+(sr-br)*en,Pi=Zn/Li,Ri=z(Pi),zi=Ri-1/Ri,Xi=Ri+1/Ri,da=Dn*zi-2*r(Ri)-qt,Ia=Dn*yn*Xi-2*i(yn)-oe,ft=Mr&&w*en*br*Rn/Mr,Ct=(A*sr*Ir+en)/(2*(Ir+A*sr*en)*(Ir+A*sr*en)*en),Bt=-.5*yn*Dn*Dn*Dn,ee=Bt*ft,ae=Bt*Ct,fe=(fe=2*Ir+A*en*(sr-br))*fe*Ri,De=(A*sr*Ir*en+Nr)/fe,Ee=-(A*br*Mr)/(en*fe),Ye=zi*ee-2*De/Ri+Dn*(De+De/Pi),Ze=zi*ae-2*Ee/Ri+Dn*(Ee+Ee/Pi),nr=yn*Xi*ee-2*ft/(1+Rn)+Dn*Xi*ft+Dn*yn*(De-De/Pi),_r=yn*Xi*ae-2*Ct/(1+Rn)+Dn*Xi*Ct+Dn*yn*(Ee-Ee/Pi),Lr=Ze*nr-_r*Ye;if(!Lr)break;var Jr=(Ia*Ze-da*_r)/Lr,on=(da*nr-Ia*Ye)/Lr;we-=Jr,Me=e(-o,a(o,Me-on))}while((C(Jr)>h||C(on)>h)&&--Ue>0);return C(C(Me)-o)Me){var Ir=z(Mr),Nr=S(sr,br),en=we*f(Nr/we),yn=Nr-en,Rn=qt*x(yn),Dn=(qt*l(yn)-yn*l(Rn))/(o-Rn),Zn=xr(yn,Dn),Li=(u-qt)/pr(Zn,Rn,u);br=Ir;var Pi=50,Ri;do br-=Ri=(qt+pr(Zn,Rn,br)*Li-Ir)/(Zn(br)*Li);while(C(Ri)>h&&--Pi>0);sr=yn*l(br),brMe){var br=z(gr),sr=S(Ge,ze),Mr=we*f(sr/we),Ir=sr-Mr;ze=br*x(Ir),Ge=br*l(Ir);for(var Nr=ze-o,en=l(ze),yn=Ge/en,Rn=zeh||C(yn)>h)&&--Rn>0);return[Ir,Nr]},br}var Dr=Pr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function cn(){return(0,g.c)(Dr).scale(149.995)}var rn=Pr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Cn(){return(0,g.c)(rn).scale(153.93)}var En=Pr(5/6*u,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Tr(){return(0,g.c)(En).scale(130.945)}function Cr(qt,oe){var we=qt*qt,Me=oe*oe;return[qt*(1-.162388*Me)*(.87-952426e-9*we*we),oe*(1+Me/12)]}Cr.invert=function(qt,oe){var we=qt,Me=oe,Ue=50,ze;do{var Ge=Me*Me;Me-=ze=(Me*(1+Ge/12)-oe)/(1+Ge/4)}while(C(ze)>h&&--Ue>0);Ue=50,qt/=1-.162388*Ge;do{var gr=(gr=we*we)*gr;we-=ze=(we*(.87-952426e-9*gr)-qt)/(.87-.00476213*gr)}while(C(ze)>h&&--Ue>0);return[we,Me]};function Wr(){return(0,g.c)(Cr).scale(131.747)}var Ur=Pr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function an(){return(0,g.c)(Ur).scale(131.087)}function pn(qt){var oe=qt(o,0)[0]-qt(-o,0)[0];function we(Me,Ue){var ze=Me>0?-.5:.5,Ge=qt(Me+ze*u,Ue);return Ge[0]-=ze*oe,Ge}return qt.invert&&(we.invert=function(Me,Ue){var ze=Me>0?-.5:.5,Ge=qt.invert(Me+ze*oe,Ue),gr=Ge[0]-ze*u;return gr<-u?gr+=2*u:gr>u&&(gr-=2*u),Ge[0]=gr,Ge}),we}function gn(qt,oe){var we=c(qt),Me=c(oe),Ue=x(oe),ze=x(qt)*Ue,Ge=l(qt)*Ue,gr=l(Me*oe);qt=C(S(Ge,gr)),oe=L(ze),C(qt-o)>h&&(qt%=o);var br=_n(qt>u/4?o-qt:qt,oe);return qt>u/4&&(gr=br[0],br[0]=-br[1],br[1]=-gr),br[0]*=we,br[1]*=-Me,br}gn.invert=function(qt,oe){C(qt)>1&&(qt=c(qt)*2-qt),C(oe)>1&&(oe=c(oe)*2-oe);var we=c(qt),Me=c(oe),Ue=-we*qt,ze=-Me*oe,Ge=ze/Ue<1,gr=kn(Ge?ze:Ue,Ge?Ue:ze),br=gr[0],sr=gr[1],Mr=x(sr);return Ge&&(br=-o-br),[we*(S(l(br)*Mr,-l(sr))+u),Me*L(x(br)*Mr)]};function _n(qt,oe){if(oe===o)return[0,0];var we=l(oe),Me=we*we,Ue=Me*Me,ze=1+Ue,Ge=1+3*Ue,gr=1-Ue,br=L(1/z(ze)),sr=gr+Me*ze*br,Mr=(1-we)/sr,Ir=z(Mr),Nr=Mr*ze,en=z(Nr),yn=Ir*gr,Rn,Dn;if(qt===0)return[0,-(yn+Me*en)];var Zn=x(oe),Li=1/Zn,Pi=2*we*Zn,Ri=(-3*Me+br*Ge)*Pi,zi=(-sr*Zn-(1-we)*Ri)/(sr*sr),Xi=.5*zi/Ir,da=gr*Xi-2*Me*Ir*Pi,Ia=Me*ze*zi+Mr*Ge*Pi,ft=-Li*Pi,Ct=-Li*Ia,Bt=-2*Li*da,ee=4*qt/u,ae;if(qt>.222*u||oe.175*u){if(Rn=(yn+Me*z(Nr*(1+Ue)-yn*yn))/(1+Ue),qt>u/4)return[Rn,Rn];var fe=Rn,De=.5*Rn;Rn=.5*(De+fe),Dn=50;do{var Ee=z(Nr-Rn*Rn),Ye=Rn*(Bt+ft*Ee)+Ct*L(Rn/en)-ee;if(!Ye)break;Ye<0?De=Rn:fe=Rn,Rn=.5*(De+fe)}while(C(fe-De)>h&&--Dn>0)}else{Rn=h,Dn=25;do{var Ze=Rn*Rn,nr=z(Nr-Ze),_r=Bt+ft*nr,Lr=Rn*_r+Ct*L(Rn/en)-ee,Jr=_r+(Ct-ft*Ze)/nr;Rn-=ae=nr?Lr/Jr:0}while(C(ae)>h&&--Dn>0)}return[Rn,-yn-Me*z(Nr-Rn*Rn)]}function kn(qt,oe){for(var we=0,Me=1,Ue=.5,ze=50;;){var Ge=Ue*Ue,gr=z(Ue),br=L(1/z(1+Ge)),sr=1-Ge+Ue*(1+Ge)*br,Mr=(1-gr)/sr,Ir=z(Mr),Nr=Mr*(1+Ge),en=Ir*(1-Ge),yn=Nr-qt*qt,Rn=z(yn),Dn=oe+en+Ue*Rn;if(C(Me-we)0?we=Ue:Me=Ue,Ue=.5*(we+Me)}if(!ze)return null;var Zn=L(gr),Li=x(Zn),Pi=1/Li,Ri=2*gr*Li,zi=(-3*Ue+br*(1+3*Ge))*Ri,Xi=(-sr*Li-(1-gr)*zi)/(sr*sr),da=.5*Xi/Ir,Ia=(1-Ge)*da-2*Ue*Ir*Ri,ft=-2*Pi*Ia,Ct=-Pi*Ri,Bt=-Pi*(Ue*(1+Ge)*Xi+Mr*(1+3*Ge)*Ri);return[u/4*(qt*(ft+Ct*Rn)+Bt*L(qt/z(Nr))),Zn]}function ni(){return(0,g.c)(pn(gn)).scale(239.75)}function ci(qt,oe,we){var Me,Ue,ze;return qt?(Me=di(qt,we),oe?(Ue=di(oe,1-we),ze=Ue[1]*Ue[1]+we*Me[0]*Me[0]*Ue[0]*Ue[0],[[Me[0]*Ue[2]/ze,Me[1]*Me[2]*Ue[0]*Ue[1]/ze],[Me[1]*Ue[1]/ze,-Me[0]*Me[2]*Ue[0]*Ue[2]/ze],[Me[2]*Ue[1]*Ue[2]/ze,-we*Me[0]*Me[1]*Ue[0]/ze]]):[[Me[0],0],[Me[1],0],[Me[2],0]]):(Ue=di(oe,1-we),[[0,Ue[0]/Ue[1]],[1/Ue[1],0],[Ue[2]/Ue[1],0]])}function di(qt,oe){var we,Me,Ue,ze,Ge;if(oe=1-h)return we=(1-oe)/4,Me=I(qt),ze=D(qt),Ue=1/Me,Ge=Me*N(qt),[ze+we*(Ge-qt)/(Me*Me),Ue-we*ze*Ue*(Ge-qt),Ue+we*ze*Ue*(Ge+qt),2*i(v(qt))-o+we*(Ge-qt)/Me];var gr=[1,0,0,0,0,0,0,0,0],br=[z(oe),0,0,0,0,0,0,0,0],sr=0;for(Me=z(1-oe),Ge=1;C(br[sr]/gr[sr])>h&&sr<8;)we=gr[sr++],br[sr]=(we-Me)/2,gr[sr]=(we+Me)/2,Me=z(we*Me),Ge*=2;Ue=Ge*gr[sr]*qt;do ze=br[sr]*l(Me=Ue)/gr[sr],Ue=(L(ze)+Ue)/2;while(--sr);return[l(Ue),ze=x(Ue),ze/x(Ue-Me),Ue]}function li(qt,oe,we){var Me=C(qt),Ue=C(oe),ze=N(Ue);if(Me){var Ge=1/l(Me),gr=1/(m(Me)*m(Me)),br=-(gr+we*(ze*ze*Ge*Ge)-1+we),sr=(we-1)*gr,Mr=(-br+z(br*br-4*sr))/2;return[ri(i(1/z(Mr)),we)*c(qt),ri(i(z((Mr/gr-1)/we)),1-we)*c(oe)]}return[0,ri(i(ze),1-we)*c(oe)]}function ri(qt,oe){if(!oe)return qt;if(oe===1)return r(m(qt/2+d));for(var we=1,Me=z(1-oe),Ue=z(oe),ze=0;C(Ue)>h;ze++){if(qt%u){var Ge=i(Me*m(qt)/we);Ge<0&&(Ge+=u),qt+=Ge+~~(qt/u)*u}else qt+=qt;Ue=(we+Me)/2,Me=z(we*Me),Ue=((we=Ue)-Me)/2}return qt/(n(2,ze)*we)}function wr(qt,oe){var we=(A-1)/(A+1),Me=z(1-we*we),Ue=ri(o,Me*Me),ze=-1,Ge=r(m(u/4+C(oe)/2)),gr=v(ze*Ge)/z(we),br=nn(gr*x(ze*qt),gr*l(ze*qt)),sr=li(br[0],br[1],Me*Me);return[-sr[1],(oe>=0?1:-1)*(.5*Ue-sr[0])]}function nn(qt,oe){var we=qt*qt,Me=oe+1,Ue=1-we-oe*oe;return[.5*((qt>=0?o:-o)-S(Ue,2*qt)),-.25*r(Ue*Ue+4*we)+.5*r(Me*Me+we)]}function $r(qt,oe){var we=oe[0]*oe[0]+oe[1]*oe[1];return[(qt[0]*oe[0]+qt[1]*oe[1])/we,(qt[1]*oe[0]-qt[0]*oe[1])/we]}wr.invert=function(qt,oe){var we=(A-1)/(A+1),Me=z(1-we*we),Ue=ri(o,Me*Me),ze=-1,Ge=ci(.5*Ue-oe,-qt,Me*Me),gr=$r(Ge[0],Ge[1]),br=S(gr[1],gr[0])/ze;return[br,2*i(v(.5/ze*r(we*gr[0]*gr[0]+we*gr[1]*gr[1])))-o]};function dn(){return(0,g.c)(pn(wr)).scale(151.496)}var Vn=t(61780);function Tn(qt){var oe=l(qt),we=x(qt),Me=An(qt);Me.invert=An(-qt);function Ue(ze,Ge){var gr=Me(ze,Ge);ze=gr[0],Ge=gr[1];var br=l(Ge),sr=x(Ge),Mr=x(ze),Ir=M(oe*br+we*sr*Mr),Nr=l(Ir),en=C(Nr)>h?Ir/Nr:1;return[en*we*l(ze),(C(ze)>o?en:-en)*(oe*sr-we*br*Mr)]}return Ue.invert=function(ze,Ge){var gr=z(ze*ze+Ge*Ge),br=-l(gr),sr=x(gr),Mr=gr*sr,Ir=-Ge*br,Nr=gr*oe,en=z(Mr*Mr+Ir*Ir-Nr*Nr),yn=S(Mr*Nr+Ir*en,Ir*Nr-Mr*en),Rn=(gr>o?-1:1)*S(ze*br,gr*x(yn)*sr+Ge*l(yn)*br);return Me.invert(Rn,yn)},Ue}function An(qt){var oe=l(qt),we=x(qt);return function(Me,Ue){var ze=x(Ue),Ge=x(Me)*ze,gr=l(Me)*ze,br=l(Ue);return[S(gr,Ge*we-br*oe),L(br*we+Ge*oe)]}}function Bn(){var qt=0,oe=(0,g.U)(Tn),we=oe(qt),Me=we.rotate,Ue=we.stream,ze=(0,Vn.c)();return we.parallel=function(Ge){if(!arguments.length)return qt*E;var gr=we.rotate();return oe(qt=Ge*T).rotate(gr)},we.rotate=function(Ge){return arguments.length?(Me.call(we,[Ge[0],Ge[1]-qt*E]),ze.center([-Ge[0],-Ge[1]]),we):(Ge=Me.call(we),Ge[1]+=qt*E,Ge)},we.stream=function(Ge){return Ge=Ue(Ge),Ge.sphere=function(){Ge.polygonStart();var gr=.01,br=ze.radius(90-gr)().coordinates[0],sr=br.length-1,Mr=-1,Ir;for(Ge.lineStart();++Mr=0;)Ge.point((Ir=br[Mr])[0],Ir[1]);Ge.lineEnd(),Ge.polygonEnd()},Ge},we.scale(79.4187).parallel(45).clipAngle(179.999)}var Jn=t(84706),gi=t(16016),Di=3,Sr=L(1-1/Di)*E,kr=ce(0);function Ar(qt){var oe=Sr*T,we=Nt(u,oe)[0]-Nt(-u,oe)[0],Me=kr(0,oe)[1],Ue=Nt(0,oe)[1],ze=_-Ue,Ge=y/qt,gr=4/y,br=Me+ze*ze*4/y;function sr(Mr,Ir){var Nr,en=C(Ir);if(en>oe){var yn=a(qt-1,e(0,p((Mr+u)/Ge)));Mr+=u*(qt-1)/qt-yn*Ge,Nr=Nt(Mr,en),Nr[0]=Nr[0]*y/we-y*(qt-1)/(2*qt)+yn*y/qt,Nr[1]=Me+(Nr[1]-Ue)*4*ze/y,Ir<0&&(Nr[1]=-Nr[1])}else Nr=kr(Mr,Ir);return Nr[0]*=gr,Nr[1]/=br,Nr}return sr.invert=function(Mr,Ir){Mr/=gr,Ir*=br;var Nr=C(Ir);if(Nr>Me){var en=a(qt-1,e(0,p((Mr+u)/Ge)));Mr=(Mr+u*(qt-1)/qt-en*Ge)*we/y;var yn=Nt.invert(Mr,.25*(Nr-Me)*y/ze+Ue);return yn[0]-=u*(qt-1)/qt-en*Ge,Ir<0&&(yn[1]=-yn[1]),yn}return kr.invert(Mr,Ir)},sr}function Or(qt,oe){return[qt,oe&1?90-h:Sr]}function xn(qt,oe){return[qt,oe&1?-90+h:-Sr]}function In(qt){return[qt[0]*(1-h),qt[1]]}function hn(qt){var oe=[].concat((0,Jn.ik)(-180,180+qt/2,qt).map(Or),(0,Jn.ik)(180,-180-qt/2,-qt).map(xn));return{type:"Polygon",coordinates:[qt===180?oe.map(In):oe]}}function sn(){var qt=4,oe=(0,g.U)(Ar),we=oe(qt),Me=we.stream;return we.lobes=function(Ue){return arguments.length?oe(qt=+Ue):qt},we.stream=function(Ue){var ze=we.rotate(),Ge=Me(Ue),gr=(we.rotate([0,0]),Me(Ue));return we.rotate(ze),Ge.sphere=function(){(0,gi.c)(hn(180/qt),gr)},Ge},we.scale(239.75)}function Er(qt){var oe=1+qt,we=l(1/oe),Me=L(we),Ue=2*z(u/(ze=u+4*Me*oe)),ze,Ge=.5*Ue*(oe+z(qt*(2+qt))),gr=qt*qt,br=oe*oe;function sr(Mr,Ir){var Nr=1-l(Ir),en,yn;if(Nr&&Nr<2){var Rn=o-Ir,Dn=25,Zn;do{var Li=l(Rn),Pi=x(Rn),Ri=Me+S(Li,oe-Pi),zi=1+br-2*oe*Pi;Rn-=Zn=(Rn-gr*Me-oe*Li+zi*Ri-.5*Nr*ze)/(2*oe*Li*Ri)}while(C(Zn)>b&&--Dn>0);en=Ue*z(zi),yn=Mr*Ri/u}else en=Ue*(qt+Nr),yn=Mr*Me/u;return[en*l(yn),Ge-en*x(yn)]}return sr.invert=function(Mr,Ir){var Nr=Mr*Mr+(Ir-=Ge)*Ir,en=(1+br-Nr/(Ue*Ue))/(2*oe),yn=M(en),Rn=l(yn),Dn=Me+S(Rn,oe-en);return[L(Mr/z(Nr))*u/Dn,L(1-2*(yn-gr*Me-oe*Rn+(1+br-2*oe*en)*Dn)/ze)]},sr}function Zr(){var qt=1,oe=(0,g.U)(Er),we=oe(qt);return we.ratio=function(Me){return arguments.length?oe(qt=+Me):qt},we.scale(167.774).center([0,18.67])}var Hr=.7109889596207567,Qr=.0528035274542;function wn(qt,oe){return oe>-Hr?(qt=Lt(qt,oe),qt[1]+=Qr,qt):Kt(qt,oe)}wn.invert=function(qt,oe){return oe>-Hr?Lt.invert(qt,oe-Qr):Kt.invert(qt,oe)};function Ln(){return(0,g.c)(wn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Pn(qt,oe){return C(oe)>Hr?(qt=Lt(qt,oe),qt[1]-=oe>0?Qr:-Qr,qt):Kt(qt,oe)}Pn.invert=function(qt,oe){return C(oe)>Hr?Lt.invert(qt,oe+(oe>0?Qr:-Qr)):Kt.invert(qt,oe)};function Un(){return(0,g.c)(Pn).scale(152.63)}function On(qt,oe,we,Me){var Ue=z(4*u/(2*we+(1+qt-oe/2)*l(2*we)+(qt+oe)/2*l(4*we)+oe/2*l(6*we))),ze=z(Me*l(we)*z((1+qt*x(2*we)+oe*x(4*we))/(1+qt+oe))),Ge=we*br(1);function gr(Ir){return z(1+qt*x(2*Ir)+oe*x(4*Ir))}function br(Ir){var Nr=Ir*we;return(2*Nr+(1+qt-oe/2)*l(2*Nr)+(qt+oe)/2*l(4*Nr)+oe/2*l(6*Nr))/we}function sr(Ir){return gr(Ir)*l(Ir)}var Mr=function(Ir,Nr){var en=we*Tt(br,Ge*l(Nr)/we,Nr/u);isNaN(en)&&(en=we*c(Nr));var yn=Ue*gr(en);return[yn*ze*Ir/u*x(en),yn/ze*l(en)]};return Mr.invert=function(Ir,Nr){var en=Tt(sr,Nr*ze/Ue);return[Ir*u/(x(en)*Ue*ze*gr(en)),L(we*br(en/we)/Ge)]},we===0&&(Ue=z(Me/u),Mr=function(Ir,Nr){return[Ir*Ue,l(Nr)/Ue]},Mr.invert=function(Ir,Nr){return[Ir/Ue,L(Nr*Ue)]}),Mr}function mi(){var qt=1,oe=0,we=45*T,Me=2,Ue=(0,g.U)(On),ze=Ue(qt,oe,we,Me);return ze.a=function(Ge){return arguments.length?Ue(qt=+Ge,oe,we,Me):qt},ze.b=function(Ge){return arguments.length?Ue(qt,oe=+Ge,we,Me):oe},ze.psiMax=function(Ge){return arguments.length?Ue(qt,oe,we=+Ge*T,Me):we*E},ze.ratio=function(Ge){return arguments.length?Ue(qt,oe,we,Me=+Ge):Me},ze.scale(180.739)}function ai(qt,oe,we,Me,Ue,ze,Ge,gr,br,sr,Mr){if(Mr.nanEncountered)return NaN;var Ir,Nr,en,yn,Rn,Dn,Zn,Li,Pi,Ri;if(Ir=we-oe,Nr=qt(oe+Ir*.25),en=qt(we-Ir*.25),isNaN(Nr)){Mr.nanEncountered=!0;return}if(isNaN(en)){Mr.nanEncountered=!0;return}return yn=Ir*(Me+4*Nr+Ue)/12,Rn=Ir*(Ue+4*en+ze)/12,Dn=yn+Rn,Ri=(Dn-Ge)/15,sr>br?(Mr.maxDepthCount++,Dn+Ri):Math.abs(Ri)>1;do br[Dn]>en?Rn=Dn:yn=Dn,Dn=yn+Rn>>1;while(Dn>yn);var Zn=br[Dn+1]-br[Dn];return Zn&&(Zn=(en-br[Dn+1])/Zn),(Dn+1+Zn)/Ge}var Ir=2*Mr(1)/u*ze/we,Nr=function(en,yn){var Rn=Mr(C(l(yn))),Dn=Me(Rn)*en;return Rn/=Ir,[Dn,yn>=0?Rn:-Rn]};return Nr.invert=function(en,yn){var Rn;return yn*=Ir,C(yn)<1&&(Rn=c(yn)*L(Ue(C(yn))*ze)),[en/Me(C(yn)),Rn]},Nr}function pa(){var qt=0,oe=2.5,we=1.183136,Me=(0,g.U)(Ci),Ue=Me(qt,oe,we);return Ue.alpha=function(ze){return arguments.length?Me(qt=+ze,oe,we):qt},Ue.k=function(ze){return arguments.length?Me(qt,oe=+ze,we):oe},Ue.gamma=function(ze){return arguments.length?Me(qt,oe,we=+ze):we},Ue.scale(152.63)}function ea(qt,oe){return C(qt[0]-oe[0])=0;--br)we=qt[1][br],Me=we[0][0],Ue=we[0][1],ze=we[1][1],Ge=we[2][0],gr=we[2][1],oe.push(Eo([[Ge-h,gr-h],[Ge-h,ze+h],[Me+h,ze+h],[Me+h,Ue-h]],30));return{type:"Polygon",coordinates:[(0,Jn.Uf)(oe)]}}function Qa(qt,oe,we){var Me,Ue;function ze(br,sr){for(var Mr=sr<0?-1:1,Ir=oe[+(sr<0)],Nr=0,en=Ir.length-1;NrIr[Nr][2][0];++Nr);var yn=qt(br-Ir[Nr][1][0],sr);return yn[0]+=qt(Ir[Nr][1][0],Mr*sr>Mr*Ir[Nr][0][1]?Ir[Nr][0][1]:sr)[0],yn}we?ze.invert=we(ze):qt.invert&&(ze.invert=function(br,sr){for(var Mr=Ue[+(sr<0)],Ir=oe[+(sr<0)],Nr=0,en=Mr.length;Nryn&&(Rn=en,en=yn,yn=Rn),[[Ir,en],[Nr,yn]]})}),Ge):oe.map(function(sr){return sr.map(function(Mr){return[[Mr[0][0]*E,Mr[0][1]*E],[Mr[1][0]*E,Mr[1][1]*E],[Mr[2][0]*E,Mr[2][1]*E]]})})},oe!=null&&Ge.lobes(oe),Ge}var sl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Bu(){return Qa(Vt,sl).scale(160.857)}var wf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function $i(){return Qa(Pn,wf).scale(152.63)}var Fl=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Uu(){return Qa(Lt,Fl).scale(169.529)}var Xa=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function ho(){return Qa(Lt,Xa).scale(169.529).rotate([20,0])}var ll=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function vu(){return Qa(wn,ll,wt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Ra=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function ul(){return Qa(Kt,Ra).scale(152.63).rotate([-20,0])}function za(qt,oe){return[3/y*qt*z(u*u/3-oe*oe),oe]}za.invert=function(qt,oe){return[y/3*qt/z(u*u/3-oe*oe),oe]};function Ua(){return(0,g.c)(za).scale(158.837)}function fl(qt){function oe(we,Me){if(C(C(Me)-o)2)return null;we/=2,Me/=2;var ze=we*we,Ge=Me*Me,gr=2*Me/(1+ze+Ge);return gr=n((1+gr)/(1-gr),1/qt),[S(2*we,1-ze-Ge)/qt,L((gr-1)/(gr+1))]},oe}function $a(){var qt=.5,oe=(0,g.U)(fl),we=oe(qt);return we.spacing=function(Me){return arguments.length?oe(qt=+Me):qt},we.scale(124.75)}var qa=u/A;function _o(qt,oe){return[qt*(1+z(x(oe)))/2,oe/(x(oe/2)*x(qt/6))]}_o.invert=function(qt,oe){var we=C(qt),Me=C(oe),Ue=h,ze=o;Meh||C(Dn)>h)&&--Ue>0);return Ue&&[we,Me]};function yc(){return(0,g.c)(bo).scale(139.98)}function ts(qt,oe){return[l(qt)/x(oe),m(oe)*x(qt)]}ts.invert=function(qt,oe){var we=qt*qt,Me=oe*oe,Ue=Me+1,ze=we+Ue,Ge=qt?w*z((ze-z(ze*ze-4*we))/we):1/z(Ue);return[L(qt*Ge),c(oe)*M(Ge)]};function Za(){return(0,g.c)(ts).scale(144.049).clipAngle(89.999)}function Hu(qt){var oe=x(qt),we=m(d+qt/2);function Me(Ue,ze){var Ge=ze-qt,gr=C(Ge)=0;)Mr=qt[sr],Ir=Mr[0]+gr*(en=Ir)-br*Nr,Nr=Mr[1]+gr*Nr+br*en;return Ir=gr*(en=Ir)-br*Nr,Nr=gr*Nr+br*en,[Ir,Nr]}return we.invert=function(Me,Ue){var ze=20,Ge=Me,gr=Ue;do{for(var br=oe,sr=qt[br],Mr=sr[0],Ir=sr[1],Nr=0,en=0,yn;--br>=0;)sr=qt[br],Nr=Mr+Ge*(yn=Nr)-gr*en,en=Ir+Ge*en+gr*yn,Mr=sr[0]+Ge*(yn=Mr)-gr*Ir,Ir=sr[1]+Ge*Ir+gr*yn;Nr=Mr+Ge*(yn=Nr)-gr*en,en=Ir+Ge*en+gr*yn,Mr=Ge*(yn=Mr)-gr*Ir-Me,Ir=Ge*Ir+gr*yn-Ue;var Rn=Nr*Nr+en*en,Dn,Zn;Ge-=Dn=(Mr*Nr+Ir*en)/Rn,gr-=Zn=(Ir*Nr-Mr*en)/Rn}while(C(Dn)+C(Zn)>h*h&&--ze>0);if(ze){var Li=z(Ge*Ge+gr*gr),Pi=2*i(Li*.5),Ri=l(Pi);return[S(Ge*Ri,Li*x(Pi)),Li?L(gr*Ri/Li):0]}},we}var xc=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],du=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],bc=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],wc=[[.9245,0],[0,0],[.01943,0]],Tc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Gu(){return Xs(xc,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Ac(){return Xs(du,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Mc(){return Xs(bc,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Mf(){return Xs(wc,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Sf(){return Xs(Tc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Xs(qt,oe){var we=(0,g.c)(Af(qt)).rotate(oe).clipAngle(90),Me=(0,Xt.c)(oe),Ue=we.center;return delete we.rotate,we.center=function(ze){return arguments.length?Ue(Me(ze)):Me.invert(Ue())},we}var cl=z(6),zl=z(7);function kl(qt,oe){var we=L(7*l(oe)/(3*cl));return[cl*qt*(2*x(2*we/3)-1)/zl,9*l(we/3)/zl]}kl.invert=function(qt,oe){var we=3*L(oe*zl/9);return[qt*zl/(cl*(2*x(2*we/3)-1)),L(l(we)*3*cl/7)]};function Ef(){return(0,g.c)(kl).scale(164.859)}function vs(qt,oe){for(var we=(1+w)*l(oe),Me=oe,Ue=0,ze;Ue<25&&(Me-=ze=(l(Me/2)+l(Me)-we)/(.5*x(Me/2)+x(Me)),!(C(ze)b&&--Me>0);return ze=we*we,Ge=ze*ze,gr=ze*Ge,[qt/(.84719-.13063*ze+gr*gr*(-.04515+.05494*ze-.02326*Ge+.00331*gr)),we]};function Uo(){return(0,g.c)(gu).scale(175.295)}function hl(qt,oe){return[qt*(1+x(oe))/2,2*(oe-m(oe/2))]}hl.invert=function(qt,oe){for(var we=oe/2,Me=0,Ue=1/0;Me<10&&C(Ue)>h;++Me){var ze=x(oe/2);oe-=Ue=(oe-m(oe/2)-we)/(1-.5/(ze*ze))}return[2*qt/(1+x(oe)),oe]};function Zs(){return(0,g.c)(hl).scale(152.63)}var Ol=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ls(){return Qa(nt(1/0),Ol).rotate([20,0]).scale(152.63)}function rs(qt,oe){var we=l(oe),Me=x(oe),Ue=c(qt);if(qt===0||C(oe)===o)return[0,oe];if(oe===0)return[qt,0];if(C(qt)===o)return[qt*Me,o*we];var ze=u/(2*qt)-2*qt/u,Ge=2*oe/u,gr=(1-Ge*Ge)/(we-Ge),br=ze*ze,sr=gr*gr,Mr=1+br/sr,Ir=1+sr/br,Nr=(ze*we/gr-ze/2)/Mr,en=(sr*we/br+gr/2)/Ir,yn=Nr*Nr+Me*Me/Mr,Rn=en*en-(sr*we*we/br+gr*we-1)/Ir;return[o*(Nr+z(yn)*Ue),o*(en+z(Rn<0?0:Rn)*c(-oe*ze)*Ue)]}rs.invert=function(qt,oe){qt/=o,oe/=o;var we=qt*qt,Me=oe*oe,Ue=we+Me,ze=u*u;return[qt?(Ue-1+z((1-Ue)*(1-Ue)+4*we))/(2*qt)*o:0,Tt(function(Ge){return Ue*(u*l(Ge)-2*Ge)*u+4*Ge*Ge*(oe-l(Ge))+2*u*Ge-ze*oe},0)]};function Wu(){return(0,g.c)(rs).scale(127.267)}var vl=1.0148,Ho=.23185,Ca=-.14499,Yu=.02406,Ec=vl,mu=5*Ho,dl=7*Ca,pl=9*Yu,wo=1.790857183;function yu(qt,oe){var we=oe*oe;return[qt,oe*(vl+we*we*(Ho+we*(Ca+Yu*we)))]}yu.invert=function(qt,oe){oe>wo?oe=wo:oe<-wo&&(oe=-wo);var we=oe,Me;do{var Ue=we*we;we-=Me=(we*(vl+Ue*Ue*(Ho+Ue*(Ca+Yu*Ue)))-oe)/(Ec+Ue*Ue*(mu+Ue*(dl+pl*Ue)))}while(C(Me)>h);return[qt,we]};function ml(){return(0,g.c)(yu).scale(139.319)}function xu(qt,oe){if(C(oe)h&&--Ue>0);return Ge=m(Me),[(C(oe)=0;)if(Me=oe[gr],we[0]===Me[0]&&we[1]===Me[1]){if(ze)return[ze,we];ze=we}}}function Ku(qt){for(var oe=qt.length,we=[],Me=qt[oe-1],Ue=0;Ue0?[-Me[0],0]:[180-Me[0],180])};var oe=Da.map(function(we){return{face:we,project:qt(we)}});return[-1,0,0,1,0,1,4,5].forEach(function(we,Me){var Ue=oe[we];Ue&&(Ue.children||(Ue.children=[])).push(oe[Me])}),ga(oe[0],function(we,Me){return oe[we<-u/2?Me<0?6:4:we<0?Me<0?2:0:weMe^en>Me&&we<(Nr-sr)*(Me-Mr)/(en-Mr)+sr&&(Ue=!Ue)}return Ue}function Pc(qt,oe){var we=oe.stream,Me;if(!we)throw new Error("invalid projection");switch(qt&&qt.type){case"Feature":Me=Ju;break;case"FeatureCollection":Me=Rc;break;default:Me=xl;break}return Me(qt,we)}function Rc(qt,oe){return{type:"FeatureCollection",features:qt.features.map(function(we){return Ju(we,oe)})}}function Ju(qt,oe){return{type:"Feature",id:qt.id,properties:qt.properties,geometry:xl(qt.geometry,oe)}}function Df(qt,oe){return{type:"GeometryCollection",geometries:qt.geometries.map(function(we){return xl(we,oe)})}}function xl(qt,oe){if(!qt)return null;if(qt.type==="GeometryCollection")return Df(qt,oe);var we;switch(qt.type){case"Point":we=bl;break;case"MultiPoint":we=bl;break;case"LineString":we=If;break;case"MultiLineString":we=If;break;case"Polygon":we=Hl;break;case"MultiPolygon":we=Hl;break;case"Sphere":we=Hl;break;default:return null}return(0,gi.c)(qt,oe(we)),we.result()}var ja=[],Co=[],bl={point:function(qt,oe){ja.push([qt,oe])},result:function(){var qt=ja.length?ja.length<2?{type:"Point",coordinates:ja[0]}:{type:"MultiPoint",coordinates:ja}:null;return ja=[],qt}},If={lineStart:Ul,point:function(qt,oe){ja.push([qt,oe])},lineEnd:function(){ja.length&&(Co.push(ja),ja=[])},result:function(){var qt=Co.length?Co.length<2?{type:"LineString",coordinates:Co[0]}:{type:"MultiLineString",coordinates:Co}:null;return Co=[],qt}},Hl={polygonStart:Ul,lineStart:Ul,point:function(qt,oe){ja.push([qt,oe])},lineEnd:function(){var qt=ja.length;if(qt){do ja.push(ja[0].slice());while(++qt<4);Co.push(ja),ja=[]}},polygonEnd:Ul,result:function(){if(!Co.length)return null;var qt=[],oe=[];return Co.forEach(function(we){Cc(we)?qt.push([we]):oe.push(we)}),oe.forEach(function(we){var Me=we[0];qt.some(function(Ue){if(Lc(Ue[0],Me))return Ue.push(we),!0})||qt.push([we])}),Co=[],qt.length?qt.length>1?{type:"MultiPolygon",coordinates:qt}:{type:"Polygon",coordinates:qt[0]}:null}};function gs(qt){var oe=qt(o,0)[0]-qt(-o,0)[0];function we(Me,Ue){var ze=C(Me)0?Me-u:Me+u,Ue),gr=(Ge[0]-Ge[1])*w,br=(Ge[0]+Ge[1])*w;if(ze)return[gr,br];var sr=oe*w,Mr=gr>0^br>0?-1:1;return[Mr*gr-c(br)*sr,Mr*br-c(gr)*sr]}return qt.invert&&(we.invert=function(Me,Ue){var ze=(Me+Ue)*w,Ge=(Ue-Me)*w,gr=C(ze)<.5*oe&&C(Ge)<.5*oe;if(!gr){var br=oe*w,sr=ze>0^Ge>0?-1:1,Mr=-sr*Me+(Ge>0?1:-1)*br,Ir=-sr*Ue+(ze>0?1:-1)*br;ze=(-Mr-Ir)*w,Ge=(Mr-Ir)*w}var Nr=qt.invert(ze,Ge);return gr||(Nr[0]+=ze>0?u:-u),Nr}),(0,g.c)(we).rotate([-90,-90,45]).clipAngle(179.999)}function Dc(){return gs(gn).scale(176.423)}function Ff(){return gs(wr).scale(111.48)}function zf(qt,oe){if(!(0<=(oe=+oe)&&oe<=20))throw new Error("invalid digits");function we(sr){var Mr=sr.length,Ir=2,Nr=new Array(Mr);for(Nr[0]=+sr[0].toFixed(oe),Nr[1]=+sr[1].toFixed(oe);Ir2||en[0]!=Mr[0]||en[1]!=Mr[1])&&(Ir.push(en),Mr=en)}return Ir.length===1&&sr.length>1&&Ir.push(we(sr[sr.length-1])),Ir}function ze(sr){return sr.map(Ue)}function Ge(sr){if(sr==null)return sr;var Mr;switch(sr.type){case"GeometryCollection":Mr={type:"GeometryCollection",geometries:sr.geometries.map(Ge)};break;case"Point":Mr={type:"Point",coordinates:we(sr.coordinates)};break;case"MultiPoint":Mr={type:sr.type,coordinates:Me(sr.coordinates)};break;case"LineString":Mr={type:sr.type,coordinates:Ue(sr.coordinates)};break;case"MultiLineString":case"Polygon":Mr={type:sr.type,coordinates:ze(sr.coordinates)};break;case"MultiPolygon":Mr={type:"MultiPolygon",coordinates:sr.coordinates.map(ze)};break;default:return sr}return sr.bbox!=null&&(Mr.bbox=sr.bbox),Mr}function gr(sr){var Mr={type:"Feature",properties:sr.properties,geometry:Ge(sr.geometry)};return sr.id!=null&&(Mr.id=sr.id),sr.bbox!=null&&(Mr.bbox=sr.bbox),Mr}if(qt!=null)switch(qt.type){case"Feature":return gr(qt);case"FeatureCollection":{var br={type:"FeatureCollection",features:qt.features.map(gr)};return qt.bbox!=null&&(br.bbox=qt.bbox),br}default:return Ge(qt)}return qt}function Qu(qt){var oe=l(qt);function we(Me,Ue){var ze=oe?m(Me*oe/2)/oe:Me/2;if(!Ue)return[2*ze,-qt];var Ge=2*i(ze*l(Ue)),gr=1/m(Ue);return[l(Ge)*gr,Ue+(1-x(Ge))*gr-qt]}return we.invert=function(Me,Ue){if(C(Ue+=qt)h&&--gr>0);var Nr=Me*(sr=m(Ge)),en=m(C(Ue)0?o:-o)*(br+Ue*(Mr-Ge)/2+Ue*Ue*(Mr-2*br+Ge)/2)]}Xo.invert=function(qt,oe){var we=oe/o,Me=we*90,Ue=a(18,C(Me/5)),ze=e(0,p(Ue));do{var Ge=vo[ze][1],gr=vo[ze+1][1],br=vo[a(19,ze+2)][1],sr=br-Ge,Mr=br-2*gr+Ge,Ir=2*(C(we)-gr)/sr,Nr=Mr/sr,en=Ir*(1-Nr*Ir*(1-2*Nr*Ir));if(en>=0||ze===1){Me=(oe>=0?5:-5)*(en+Ue);var yn=50,Rn;do Ue=a(18,C(Me)/5),ze=p(Ue),en=Ue-ze,Ge=vo[ze][1],gr=vo[ze+1][1],br=vo[a(19,ze+2)][1],Me-=(Rn=(oe>=0?o:-o)*(gr+en*(br-Ge)/2+en*en*(br-2*gr+Ge)/2)-oe)*E;while(C(Rn)>b&&--yn>0);break}}while(--ze>=0);var Dn=vo[ze][0],Zn=vo[ze+1][0],Li=vo[a(19,ze+2)][0];return[qt/(Zn+en*(Li-Dn)/2+en*en*(Li-2*Zn+Dn)/2),Me*T]};function Ds(){return(0,g.c)(Xo).scale(152.63)}function wl(qt){function oe(we,Me){var Ue=x(Me),ze=(qt-1)/(qt-Ue*x(we));return[ze*Ue*l(we),ze*l(Me)]}return oe.invert=function(we,Me){var Ue=we*we+Me*Me,ze=z(Ue),Ge=(qt-z(1-Ue*(qt+1)/(qt-1)))/((qt-1)/ze+ze/(qt-1));return[S(we*Ge,ze*z(1-Ge*Ge)),ze?L(Me*Ge/ze):0]},oe}function Au(qt,oe){var we=wl(qt);if(!oe)return we;var Me=x(oe),Ue=l(oe);function ze(Ge,gr){var br=we(Ge,gr),sr=br[1],Mr=sr*Ue/(qt-1)+Me;return[br[0]*Me/Mr,sr/Mr]}return ze.invert=function(Ge,gr){var br=(qt-1)/(qt-1-gr*Ue);return we.invert(br*Ge,br*gr*Me)},ze}function Js(){var qt=2,oe=0,we=(0,g.U)(Au),Me=we(qt,oe);return Me.distance=function(Ue){return arguments.length?we(qt=+Ue,oe):qt},Me.tilt=function(Ue){return arguments.length?we(qt,oe=Ue*T):oe*E},Me.scale(432.147).clipAngle(M(1/qt)*E-1e-6)}var Qs=1e-4,Of=1e4,ms=-180,Tl=ms+Qs,Is=180,ys=Is-Qs,Vl=-90,Al=Vl+Qs,va=90,Ml=va-Qs;function Mu(qt){return qt.length>0}function Nf(qt){return Math.floor(qt*Of)/Of}function Sl(qt){return qt===Vl||qt===va?[0,qt]:[ms,Nf(qt)]}function Gl(qt){var oe=qt[0],we=qt[1],Me=!1;return oe<=Tl?(oe=ms,Me=!0):oe>=ys&&(oe=Is,Me=!0),we<=Al?(we=Vl,Me=!0):we>=Ml&&(we=va,Me=!0),Me?[oe,we]:qt}function Su(qt){return qt.map(Gl)}function $u(qt,oe,we){for(var Me=0,Ue=qt.length;Me=ys||Mr<=Al||Mr>=Ml){ze[Ge]=Gl(br);for(var Ir=Ge+1;IrTl&&enAl&&yn=gr)break;we.push({index:-1,polygon:oe,ring:ze=ze.slice(Ir-1)}),ze[0]=Sl(ze[0][1]),Ge=-1,gr=ze.length}}}}function Wl(qt){var oe,we=qt.length,Me={},Ue={},ze,Ge,gr,br,sr;for(oe=0;oe0?u-gr:gr)*E],sr=(0,g.c)(qt(Ge)).rotate(br),Mr=(0,Xt.c)(br),Ir=sr.center;return delete sr.rotate,sr.center=function(Nr){return arguments.length?Ir(Mr(Nr)):Mr.invert(Ir())},sr.clipAngle(90)}function qu(qt){var oe=x(qt);function we(Me,Ue){var ze=(0,Ps.Y)(Me,Ue);return ze[0]*=oe,ze}return we.invert=function(Me,Ue){return Ps.Y.invert(Me/oe,Ue)},we}function $s(){return Eu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Eu(qt,oe){return ns(qu,qt,oe)}function Zl(qt){if(!(qt*=2))return ot.O;var oe=-qt/2,we=-oe,Me=qt*qt,Ue=m(we),ze=.5/l(we);function Ge(gr,br){var sr=M(x(br)*x(gr-oe)),Mr=M(x(br)*x(gr-we)),Ir=br<0?-1:1;return sr*=sr,Mr*=Mr,[(sr-Mr)/(2*qt),Ir*z(4*Me*Mr-(Me-sr+Mr)*(Me-sr+Mr))/(2*qt)]}return Ge.invert=function(gr,br){var sr=br*br,Mr=x(z(sr+(Nr=gr+oe)*Nr)),Ir=x(z(sr+(Nr=gr+we)*Nr)),Nr,en;return[S(en=Mr-Ir,Nr=(Mr+Ir)*Ue),(br<0?-1:1)*M(z(Nr*Nr+en*en)*ze)]},Ge}function Ic(){return Bf([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Bf(qt,oe){return ns(Zl,qt,oe)}function lo(qt,oe){if(C(oe)h&&--gr>0);return[c(qt)*(z(Ue*Ue+4)+Ue)*u/4,o*Ge]};function Kl(){return(0,g.c)(To).scale(127.16)}function _u(qt,oe,we,Me,Ue){function ze(Ge,gr){var br=we*l(Me*gr),sr=z(1-br*br),Mr=z(2/(1+sr*x(Ge*=Ue)));return[qt*sr*Mr*l(Ge),oe*br*Mr]}return ze.invert=function(Ge,gr){var br=Ge/qt,sr=gr/oe,Mr=z(br*br+sr*sr),Ir=2*L(Mr/2);return[S(Ge*m(Ir),qt*Mr)/Ue,Mr&&L(gr*l(Ir)/(oe*we*Mr))/Me]},ze}function xs(qt,oe,we,Me){var Ue=u/3;qt=e(qt,h),oe=e(oe,h),qt=a(qt,o),oe=a(oe,u-h),we=e(we,0),we=a(we,100-h),Me=e(Me,h);var ze=we/100+1,Ge=Me/100,gr=M(ze*x(Ue))/Ue,br=l(qt)/l(gr*o),sr=oe/u,Mr=z(Ge*l(qt/2)/l(oe/2)),Ir=Mr/z(sr*br*gr),Nr=1/(Mr*z(sr*br*gr));return _u(Ir,Nr,br,gr,sr)}function Os(){var qt=65*T,oe=60*T,we=20,Me=200,Ue=(0,g.U)(xs),ze=Ue(qt,oe,we,Me);return ze.poleline=function(Ge){return arguments.length?Ue(qt=+Ge*T,oe,we,Me):qt*E},ze.parallels=function(Ge){return arguments.length?Ue(qt,oe=+Ge*T,we,Me):oe*E},ze.inflation=function(Ge){return arguments.length?Ue(qt,oe,we=+Ge,Me):we},ze.ratio=function(Ge){return arguments.length?Ue(qt,oe,we,Me=+Ge):Me},ze.scale(163.775)}function tf(){return Os().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Jl=4*u+3*z(3),Ql=2*z(2*u*z(3)/Jl),Cu=mt(Ql*z(3)/u,Ql,Jl/6);function Hf(){return(0,g.c)(Cu).scale(176.84)}function $l(qt,oe){return[qt*z(1-3*oe*oe/(u*u)),oe]}$l.invert=function(qt,oe){return[qt/z(1-3*oe*oe/(u*u)),oe]};function ef(){return(0,g.c)($l).scale(152.63)}function qs(qt,oe){var we=x(oe),Me=x(qt)*we,Ue=1-Me,ze=x(qt=S(l(qt)*we,-l(oe))),Ge=l(qt);return we=z(1-Me*Me),[Ge*we-ze*Ue,-ze*we-Ge*Ue]}qs.invert=function(qt,oe){var we=(qt*qt+oe*oe)/-2,Me=z(-we*(2+we)),Ue=oe*we+qt*Me,ze=qt*we-oe*Me,Ge=z(ze*ze+Ue*Ue);return[S(Me*Ue,Ge*(1+we)),Ge?-L(Me*ze/Ge):0]};function rf(){return(0,g.c)(qs).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function ql(qt,oe){var we=Y(qt,oe);return[(we[0]+qt/o)/2,(we[1]+oe)/2]}ql.invert=function(qt,oe){var we=qt,Me=oe,Ue=25;do{var ze=x(Me),Ge=l(Me),gr=l(2*Me),br=Ge*Ge,sr=ze*ze,Mr=l(we),Ir=x(we/2),Nr=l(we/2),en=Nr*Nr,yn=1-sr*Ir*Ir,Rn=yn?M(ze*Ir)*z(Dn=1/yn):Dn=0,Dn,Zn=.5*(2*Rn*ze*Nr+we/o)-qt,Li=.5*(Rn*Ge+Me)-oe,Pi=.5*Dn*(sr*en+Rn*ze*Ir*br)+.5/o,Ri=Dn*(Mr*gr/4-Rn*Ge*Nr),zi=.125*Dn*(gr*Nr-Rn*Ge*sr*Mr),Xi=.5*Dn*(br*Ir+Rn*en*ze)+.5,da=Ri*zi-Xi*Pi,Ia=(Li*Ri-Zn*Xi)/da,ft=(Zn*zi-Li*Pi)/da;we-=Ia,Me-=ft}while((C(Ia)>h||C(ft)>h)&&--Ue>0);return[we,Me]};function Vf(){return(0,g.c)(ql).scale(158.837)}},88728:function(G,U,t){t.d(U,{c:function(){return g}});function g(){return new C}function C(){this.reset()}C.prototype={constructor:C,reset:function(){this.s=this.t=0},add:function(x){S(i,x,this.t),S(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new C;function S(x,v,p){var r=x.s=v+p,e=r-v,a=r-e;x.t=v-a+(p-e)}},95384:function(G,U,t){t.d(U,{cp:function(){return b},mQ:function(){return x},oB:function(){return f}});var g=t(88728),C=t(64528),i=t(70932),S=t(16016),x=(0,g.c)(),v=(0,g.c)(),p,r,e,a,n,f={point:i.c,lineStart:i.c,lineEnd:i.c,polygonStart:function(){x.reset(),f.lineStart=c,f.lineEnd=l},polygonEnd:function(){var u=+x;v.add(u<0?C.kD+u:u),this.lineStart=this.lineEnd=this.point=i.c},sphere:function(){v.add(C.kD)}};function c(){f.point=m}function l(){h(p,r)}function m(u,o){f.point=h,p=u,r=o,u*=C.qw,o*=C.qw,e=u,a=(0,C.W8)(o=o/2+C.wL),n=(0,C.g$)(o)}function h(u,o){u*=C.qw,o*=C.qw,o=o/2+C.wL;var d=u-e,w=d>=0?1:-1,A=w*d,_=(0,C.W8)(o),y=(0,C.g$)(o),E=n*y,T=a*_+E*(0,C.W8)(A),s=E*w*(0,C.g$)(A);x.add((0,C.WE)(s,T)),e=u,a=_,n=y}function b(u){return v.reset(),(0,S.c)(u,f),v*2}},13696:function(G,U,t){t.d(U,{c:function(){return L}});var g=t(88728),C=t(95384),i=t(84220),S=t(64528),x=t(16016),v,p,r,e,a,n,f,c,l=(0,g.c)(),m,h,b={point:u,lineStart:d,lineEnd:w,polygonStart:function(){b.point=A,b.lineStart=_,b.lineEnd=y,l.reset(),C.oB.polygonStart()},polygonEnd:function(){C.oB.polygonEnd(),b.point=u,b.lineStart=d,b.lineEnd=w,C.mQ<0?(v=-(r=180),p=-(e=90)):l>S.Gg?e=90:l<-S.Gg&&(p=-90),h[0]=v,h[1]=r},sphere:function(){v=-(r=180),p=-(e=90)}};function u(M,z){m.push(h=[v=M,r=M]),ze&&(e=z)}function o(M,z){var D=(0,i.ux)([M*S.qw,z*S.qw]);if(c){var N=(0,i.CW)(c,D),I=[N[1],-N[0],0],k=(0,i.CW)(I,N);(0,i.cJ)(k),k=(0,i.G)(k);var B=M-a,O=B>0?1:-1,H=k[0]*S.oh*O,Y,j=(0,S.a2)(B)>180;j^(O*ae&&(e=Y)):(H=(H+360)%360-180,j^(O*ae&&(e=z))),j?ME(v,r)&&(r=M):E(M,r)>E(v,r)&&(v=M):r>=v?(Mr&&(r=M)):M>a?E(v,M)>E(v,r)&&(r=M):E(M,r)>E(v,r)&&(v=M)}else m.push(h=[v=M,r=M]);ze&&(e=z),c=D,a=M}function d(){b.point=o}function w(){h[0]=v,h[1]=r,b.point=u,c=null}function A(M,z){if(c){var D=M-a;l.add((0,S.a2)(D)>180?D+(D>0?360:-360):D)}else n=M,f=z;C.oB.point(M,z),o(M,z)}function _(){C.oB.lineStart()}function y(){A(n,f),C.oB.lineEnd(),(0,S.a2)(l)>S.Gg&&(v=-(r=180)),h[0]=v,h[1]=r,c=null}function E(M,z){return(z-=M)<0?z+360:z}function T(M,z){return M[0]-z[0]}function s(M,z){return M[0]<=M[1]?M[0]<=z&&z<=M[1]:zE(N[0],N[1])&&(N[1]=I[1]),E(I[0],N[1])>E(N[0],N[1])&&(N[0]=I[0])):k.push(N=I);for(B=-1/0,D=k.length-1,z=0,N=k[D];z<=D;N=I,++z)I=k[z],(O=E(N[1],I[0]))>B&&(B=O,v=I[0],r=N[1])}return m=h=null,v===1/0||p===1/0?[[NaN,NaN],[NaN,NaN]]:[[v,p],[r,e]]}},84220:function(G,U,t){t.d(U,{CW:function(){return x},Ez:function(){return S},G:function(){return C},cJ:function(){return r},mg:function(){return v},ux:function(){return i},wx:function(){return p}});var g=t(64528);function C(e){return[(0,g.WE)(e[1],e[0]),(0,g.qR)(e[2])]}function i(e){var a=e[0],n=e[1],f=(0,g.W8)(n);return[f*(0,g.W8)(a),f*(0,g.g$)(a),(0,g.g$)(n)]}function S(e,a){return e[0]*a[0]+e[1]*a[1]+e[2]*a[2]}function x(e,a){return[e[1]*a[2]-e[2]*a[1],e[2]*a[0]-e[0]*a[2],e[0]*a[1]-e[1]*a[0]]}function v(e,a){e[0]+=a[0],e[1]+=a[1],e[2]+=a[2]}function p(e,a){return[e[0]*a,e[1]*a,e[2]*a]}function r(e){var a=(0,g._I)(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=a,e[1]/=a,e[2]/=a}},24052:function(G,U,t){t.d(U,{c:function(){return D}});var g=t(64528),C=t(70932),i=t(16016),S,x,v,p,r,e,a,n,f,c,l,m,h,b,u,o,d={sphere:C.c,point:w,lineStart:_,lineEnd:T,polygonStart:function(){d.lineStart=s,d.lineEnd=L},polygonEnd:function(){d.lineStart=_,d.lineEnd=T}};function w(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I);A(k*(0,g.W8)(N),k*(0,g.g$)(N),(0,g.g$)(I))}function A(N,I,k){++S,v+=(N-v)/S,p+=(I-p)/S,r+=(k-r)/S}function _(){d.point=y}function y(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I);b=k*(0,g.W8)(N),u=k*(0,g.g$)(N),o=(0,g.g$)(I),d.point=E,A(b,u,o)}function E(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I),B=k*(0,g.W8)(N),O=k*(0,g.g$)(N),H=(0,g.g$)(I),Y=(0,g.WE)((0,g._I)((Y=u*H-o*O)*Y+(Y=o*B-b*H)*Y+(Y=b*O-u*B)*Y),b*B+u*O+o*H);x+=Y,e+=Y*(b+(b=B)),a+=Y*(u+(u=O)),n+=Y*(o+(o=H)),A(b,u,o)}function T(){d.point=w}function s(){d.point=M}function L(){z(m,h),d.point=w}function M(N,I){m=N,h=I,N*=g.qw,I*=g.qw,d.point=z;var k=(0,g.W8)(I);b=k*(0,g.W8)(N),u=k*(0,g.g$)(N),o=(0,g.g$)(I),A(b,u,o)}function z(N,I){N*=g.qw,I*=g.qw;var k=(0,g.W8)(I),B=k*(0,g.W8)(N),O=k*(0,g.g$)(N),H=(0,g.g$)(I),Y=u*H-o*O,j=o*B-b*H,et=b*O-u*B,it=(0,g._I)(Y*Y+j*j+et*et),ut=(0,g.qR)(it),J=it&&-ut/it;f+=J*Y,c+=J*j,l+=J*et,x+=ut,e+=ut*(b+(b=B)),a+=ut*(u+(u=O)),n+=ut*(o+(o=H)),A(b,u,o)}function D(N){S=x=v=p=r=e=a=n=f=c=l=0,(0,i.c)(N,d);var I=f,k=c,B=l,O=I*I+k*k+B*B;return O0?fc)&&(f+=n*i.kD));for(var b,u=f;n>0?u>c:u0?C.pi:-C.pi,l=(0,C.a2)(n-p);(0,C.a2)(l-C.pi)0?C.or:-C.or),v.point(e,r),v.lineEnd(),v.lineStart(),v.point(c,r),v.point(n,r),a=0):e!==c&&l>=C.pi&&((0,C.a2)(p-e)C.Gg?(0,C.MQ)(((0,C.g$)(p)*(n=(0,C.W8)(e))*(0,C.g$)(r)-(0,C.g$)(e)*(a=(0,C.W8)(p))*(0,C.g$)(v))/(a*n*f)):(p+e)/2}function x(v,p,r,e){var a;if(v==null)a=r*C.or,e.point(-C.pi,a),e.point(0,a),e.point(C.pi,a),e.point(C.pi,0),e.point(C.pi,-a),e.point(0,-a),e.point(-C.pi,-a),e.point(-C.pi,0),e.point(-C.pi,a);else if((0,C.a2)(v[0]-p[0])>C.Gg){var n=v[0]1&&i.push(i.pop().concat(i.shift()))},result:function(){var x=i;return i=[],S=null,x}}}},2728:function(G,U,t){t.d(U,{c:function(){return v}});var g=t(84220),C=t(61780),i=t(64528),S=t(41860),x=t(14229);function v(p){var r=(0,i.W8)(p),e=6*i.qw,a=r>0,n=(0,i.a2)(r)>i.Gg;function f(b,u,o,d){(0,C.Q)(d,p,e,o,b,u)}function c(b,u){return(0,i.W8)(b)*(0,i.W8)(u)>r}function l(b){var u,o,d,w,A;return{lineStart:function(){w=d=!1,A=1},point:function(_,y){var E=[_,y],T,s=c(_,y),L=a?s?0:h(_,y):s?h(_+(_<0?i.pi:-i.pi),y):0;if(!u&&(w=d=s)&&b.lineStart(),s!==d&&(T=m(u,E),(!T||(0,S.c)(u,T)||(0,S.c)(E,T))&&(E[2]=1)),s!==d)A=0,s?(b.lineStart(),T=m(E,u),b.point(T[0],T[1])):(T=m(u,E),b.point(T[0],T[1],2),b.lineEnd()),u=T;else if(n&&u&&a^s){var M;!(L&o)&&(M=m(E,u,!0))&&(A=0,a?(b.lineStart(),b.point(M[0][0],M[0][1]),b.point(M[1][0],M[1][1]),b.lineEnd()):(b.point(M[1][0],M[1][1]),b.lineEnd(),b.lineStart(),b.point(M[0][0],M[0][1],3)))}s&&(!u||!(0,S.c)(u,E))&&b.point(E[0],E[1]),u=E,d=s,o=L},lineEnd:function(){d&&b.lineEnd(),u=null},clean:function(){return A|(w&&d)<<1}}}function m(b,u,o){var d=(0,g.ux)(b),w=(0,g.ux)(u),A=[1,0,0],_=(0,g.CW)(d,w),y=(0,g.Ez)(_,_),E=_[0],T=y-E*E;if(!T)return!o&&b;var s=r*y/T,L=-r*E/T,M=(0,g.CW)(A,_),z=(0,g.wx)(A,s),D=(0,g.wx)(_,L);(0,g.mg)(z,D);var N=M,I=(0,g.Ez)(z,N),k=(0,g.Ez)(N,N),B=I*I-k*((0,g.Ez)(z,z)-1);if(!(B<0)){var O=(0,i._I)(B),H=(0,g.wx)(N,(-I-O)/k);if((0,g.mg)(H,z),H=(0,g.G)(H),!o)return H;var Y=b[0],j=u[0],et=b[1],it=u[1],ut;j0^H[1]<((0,i.a2)(H[0]-Y)i.pi^(Y<=H[0]&&H[0]<=j)){var V=(0,g.wx)(N,(-I+O)/k);return(0,g.mg)(V,z),[H,(0,g.G)(V)]}}}function h(b,u){var o=a?p:i.pi-p,d=0;return b<-o?d|=1:b>o&&(d|=2),u<-o?d|=4:u>o&&(d|=8),d}return(0,x.c)(c,l,f,a?[0,-p]:[-i.pi,p-i.pi])}},14229:function(G,U,t){t.d(U,{c:function(){return v}});var g=t(97208),C=t(32232),i=t(64528),S=t(58196),x=t(84706);function v(e,a,n,f){return function(c){var l=a(c),m=(0,g.c)(),h=a(m),b=!1,u,o,d,w={point:A,lineStart:y,lineEnd:E,polygonStart:function(){w.point=T,w.lineStart=s,w.lineEnd=L,o=[],u=[]},polygonEnd:function(){w.point=A,w.lineStart=y,w.lineEnd=E,o=(0,x.Uf)(o);var M=(0,S.c)(u,f);o.length?(b||(c.polygonStart(),b=!0),(0,C.c)(o,r,M,n,c)):M&&(b||(c.polygonStart(),b=!0),c.lineStart(),n(null,null,1,c),c.lineEnd()),b&&(c.polygonEnd(),b=!1),o=u=null},sphere:function(){c.polygonStart(),c.lineStart(),n(null,null,1,c),c.lineEnd(),c.polygonEnd()}};function A(M,z){e(M,z)&&c.point(M,z)}function _(M,z){l.point(M,z)}function y(){w.point=_,l.lineStart()}function E(){w.point=A,l.lineEnd()}function T(M,z){d.push([M,z]),h.point(M,z)}function s(){h.lineStart(),d=[]}function L(){T(d[0][0],d[0][1]),h.lineEnd();var M=h.clean(),z=m.result(),D,N=z.length,I,k,B;if(d.pop(),u.push(d),d=null,!!N){if(M&1){if(k=z[0],(I=k.length-1)>0){for(b||(c.polygonStart(),b=!0),c.lineStart(),D=0;D1&&M&2&&z.push(z.pop().concat(z.shift())),o.push(z.filter(p))}}return w}}function p(e){return e.length>1}function r(e,a){return((e=e.x)[0]<0?e[1]-i.or-i.Gg:i.or-e[1])-((a=a.x)[0]<0?a[1]-i.or-i.Gg:i.or-a[1])}},21676:function(G,U,t){t.d(U,{c:function(){return r}});var g=t(64528),C=t(97208);function i(e,a,n,f,c,l){var m=e[0],h=e[1],b=a[0],u=a[1],o=0,d=1,w=b-m,A=u-h,_;if(_=n-m,!(!w&&_>0)){if(_/=w,w<0){if(_0){if(_>d)return;_>o&&(o=_)}if(_=c-m,!(!w&&_<0)){if(_/=w,w<0){if(_>d)return;_>o&&(o=_)}else if(w>0){if(_0)){if(_/=A,A<0){if(_0){if(_>d)return;_>o&&(o=_)}if(_=l-h,!(!A&&_<0)){if(_/=A,A<0){if(_>d)return;_>o&&(o=_)}else if(A>0){if(_0&&(e[0]=m+o*w,e[1]=h+o*A),d<1&&(a[0]=m+d*w,a[1]=h+d*A),!0}}}}}var S=t(32232),x=t(84706),v=1e9,p=-v;function r(e,a,n,f){function c(u,o){return e<=u&&u<=n&&a<=o&&o<=f}function l(u,o,d,w){var A=0,_=0;if(u==null||(A=m(u,d))!==(_=m(o,d))||b(u,o)<0^d>0)do w.point(A===0||A===3?e:n,A>1?f:a);while((A=(A+d+4)%4)!==_);else w.point(o[0],o[1])}function m(u,o){return(0,g.a2)(u[0]-e)0?0:3:(0,g.a2)(u[0]-n)0?2:1:(0,g.a2)(u[1]-a)0?1:0:o>0?3:2}function h(u,o){return b(u.x,o.x)}function b(u,o){var d=m(u,1),w=m(o,1);return d!==w?d-w:d===0?o[1]-u[1]:d===1?u[0]-o[0]:d===2?u[1]-o[1]:o[0]-u[0]}return function(u){var o=u,d=(0,C.c)(),w,A,_,y,E,T,s,L,M,z,D,N={point:I,lineStart:H,lineEnd:Y,polygonStart:B,polygonEnd:O};function I(et,it){c(et,it)&&o.point(et,it)}function k(){for(var et=0,it=0,ut=A.length;itf&&($-Q)*(f-ot)>(Z-ot)*(e-Q)&&++et:Z<=f&&($-Q)*(f-ot)<(Z-ot)*(e-Q)&&--et;return et}function B(){o=d,w=[],A=[],D=!0}function O(){var et=k(),it=D&&et,ut=(w=(0,x.Uf)(w)).length;(it||ut)&&(u.polygonStart(),it&&(u.lineStart(),l(null,null,1,u),u.lineEnd()),ut&&(0,S.c)(w,h,et,l,u),u.polygonEnd()),o=u,w=A=_=null}function H(){N.point=j,A&&A.push(_=[]),z=!0,M=!1,s=L=NaN}function Y(){w&&(j(y,E),T&&M&&d.rejoin(),w.push(d.result())),N.point=I,M&&o.lineEnd()}function j(et,it){var ut=c(et,it);if(A&&_.push([et,it]),z)y=et,E=it,T=ut,z=!1,ut&&(o.lineStart(),o.point(et,it));else if(ut&&M)o.point(et,it);else{var J=[s=Math.max(p,Math.min(v,s)),L=Math.max(p,Math.min(v,L))],X=[et=Math.max(p,Math.min(v,et)),it=Math.max(p,Math.min(v,it))];i(J,X,e,a,n,f)?(M||(o.lineStart(),o.point(J[0],J[1])),o.point(X[0],X[1]),ut||o.lineEnd(),D=!1):ut&&(o.lineStart(),o.point(et,it),D=!1)}s=et,L=it,M=ut}return N}}},32232:function(G,U,t){t.d(U,{c:function(){return S}});var g=t(41860),C=t(64528);function i(v,p,r,e){this.x=v,this.z=p,this.o=r,this.e=e,this.v=!1,this.n=this.p=null}function S(v,p,r,e,a){var n=[],f=[],c,l;if(v.forEach(function(d){if(!((w=d.length-1)<=0)){var w,A=d[0],_=d[w],y;if((0,g.c)(A,_)){if(!A[2]&&!_[2]){for(a.lineStart(),c=0;c=0;--c)a.point((b=h[c])[0],b[1]);else e(u.x,u.p.x,-1,a);u=u.p}u=u.o,h=u.z,o=!o}while(!u.v);a.lineEnd()}}}function x(v){if(p=v.length){for(var p,r=0,e=v[0],a;++r0&&(an=T(Tr[pn],Tr[pn-1]),an>0&&Wr<=an&&Ur<=an&&(Wr+Ur-an)*(1-Math.pow((Wr-Ur)/an,2))n.Gg}).map(li)).concat((0,O.ik)((0,n.Km)(pn/ni)*ni,an,ni).filter(function(Tn){return(0,n.a2)(Tn%di)>n.Gg}).map(ri))}return dn.lines=function(){return Vn().map(function(Tn){return{type:"LineString",coordinates:Tn}})},dn.outline=function(){return{type:"Polygon",coordinates:[wr(Ur).concat(nn(gn).slice(1),wr(Wr).reverse().slice(1),nn(_n).reverse().slice(1))]}},dn.extent=function(Tn){return arguments.length?dn.extentMajor(Tn).extentMinor(Tn):dn.extentMinor()},dn.extentMajor=function(Tn){return arguments.length?(Ur=+Tn[0][0],Wr=+Tn[1][0],_n=+Tn[0][1],gn=+Tn[1][1],Ur>Wr&&(Tn=Ur,Ur=Wr,Wr=Tn),_n>gn&&(Tn=_n,_n=gn,gn=Tn),dn.precision($r)):[[Ur,_n],[Wr,gn]]},dn.extentMinor=function(Tn){return arguments.length?(Cr=+Tn[0][0],Tr=+Tn[1][0],pn=+Tn[0][1],an=+Tn[1][1],Cr>Tr&&(Tn=Cr,Cr=Tr,Tr=Tn),pn>an&&(Tn=pn,pn=an,an=Tn),dn.precision($r)):[[Cr,pn],[Tr,an]]},dn.step=function(Tn){return arguments.length?dn.stepMajor(Tn).stepMinor(Tn):dn.stepMinor()},dn.stepMajor=function(Tn){return arguments.length?(ci=+Tn[0],di=+Tn[1],dn):[ci,di]},dn.stepMinor=function(Tn){return arguments.length?(kn=+Tn[0],ni=+Tn[1],dn):[kn,ni]},dn.precision=function(Tn){return arguments.length?($r=+Tn,li=H(pn,an,90),ri=Y(Cr,Tr,$r),wr=H(_n,gn,90),nn=Y(Ur,Wr,$r),dn):$r},dn.extentMajor([[-180,-90+n.Gg],[180,90-n.Gg]]).extentMinor([[-180,-80-n.Gg],[180,80+n.Gg]])}function et(){return j()()}var it=t(27284),ut=t(7376),J=(0,a.c)(),X=(0,a.c)(),tt,V,Q,ot,$={point:f.c,lineStart:f.c,lineEnd:f.c,polygonStart:function(){$.lineStart=Z,$.lineEnd=ct},polygonEnd:function(){$.lineStart=$.lineEnd=$.point=f.c,J.add((0,n.a2)(X)),X.reset()},result:function(){var Tr=J/2;return J.reset(),Tr}};function Z(){$.point=st}function st(Tr,Cr){$.point=nt,tt=Q=Tr,V=ot=Cr}function nt(Tr,Cr){X.add(ot*Tr-Q*Cr),Q=Tr,ot=Cr}function ct(){nt(tt,V)}var gt=$,Tt=t(73784),wt=0,Rt=0,bt=0,At=0,mt=0,Lt=0,Ht=0,Ut=0,kt=0,Vt,It,re,Kt,$t={point:le,lineStart:he,lineEnd:Se,polygonStart:function(){$t.lineStart=ne,$t.lineEnd=zt},polygonEnd:function(){$t.point=le,$t.lineStart=he,$t.lineEnd=Se},result:function(){var Tr=kt?[Ht/kt,Ut/kt]:Lt?[At/Lt,mt/Lt]:bt?[wt/bt,Rt/bt]:[NaN,NaN];return wt=Rt=bt=At=mt=Lt=Ht=Ut=kt=0,Tr}};function le(Tr,Cr){wt+=Tr,Rt+=Cr,++bt}function he(){$t.point=de}function de(Tr,Cr){$t.point=xe,le(re=Tr,Kt=Cr)}function xe(Tr,Cr){var Wr=Tr-re,Ur=Cr-Kt,an=(0,n._I)(Wr*Wr+Ur*Ur);At+=an*(re+Tr)/2,mt+=an*(Kt+Cr)/2,Lt+=an,le(re=Tr,Kt=Cr)}function Se(){$t.point=le}function ne(){$t.point=Xt}function zt(){Jt(Vt,It)}function Xt(Tr,Cr){$t.point=Jt,le(Vt=re=Tr,It=Kt=Cr)}function Jt(Tr,Cr){var Wr=Tr-re,Ur=Cr-Kt,an=(0,n._I)(Wr*Wr+Ur*Ur);At+=an*(re+Tr)/2,mt+=an*(Kt+Cr)/2,Lt+=an,an=Kt*Tr-re*Cr,Ht+=an*(re+Tr),Ut+=an*(Kt+Cr),kt+=an*3,le(re=Tr,Kt=Cr)}var Wt=$t;function Ft(Tr){this._context=Tr}Ft.prototype={_radius:4.5,pointRadius:function(Tr){return this._radius=Tr,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Tr,Cr){switch(this._point){case 0:{this._context.moveTo(Tr,Cr),this._point=1;break}case 1:{this._context.lineTo(Tr,Cr);break}default:{this._context.moveTo(Tr+this._radius,Cr),this._context.arc(Tr,Cr,this._radius,0,n.kD);break}}},result:f.c};var xt=(0,a.c)(),yt,Et,Mt,Nt,jt,ie={point:f.c,lineStart:function(){ie.point=me},lineEnd:function(){yt&&be(Et,Mt),ie.point=f.c},polygonStart:function(){yt=!0},polygonEnd:function(){yt=null},result:function(){var Tr=+xt;return xt.reset(),Tr}};function me(Tr,Cr){ie.point=be,Et=Nt=Tr,Mt=jt=Cr}function be(Tr,Cr){Nt-=Tr,jt-=Cr,xt.add((0,n._I)(Nt*Nt+jt*jt)),Nt=Tr,jt=Cr}var ve=ie;function Le(){this._string=[]}Le.prototype={_radius:4.5,_circle:ce(4.5),pointRadius:function(Tr){return(Tr=+Tr)!==this._radius&&(this._radius=Tr,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Tr,Cr){switch(this._point){case 0:{this._string.push("M",Tr,",",Cr),this._point=1;break}case 1:{this._string.push("L",Tr,",",Cr);break}default:{this._circle==null&&(this._circle=ce(this._radius)),this._string.push("M",Tr,",",Cr,this._circle);break}}},result:function(){if(this._string.length){var Tr=this._string.join("");return this._string=[],Tr}else return null}};function ce(Tr){return"m0,"+Tr+"a"+Tr+","+Tr+" 0 1,1 0,"+-2*Tr+"a"+Tr+","+Tr+" 0 1,1 0,"+2*Tr+"z"}function Te(Tr,Cr){var Wr=4.5,Ur,an;function pn(gn){return gn&&(typeof Wr=="function"&&an.pointRadius(+Wr.apply(this,arguments)),(0,c.c)(gn,Ur(an))),an.result()}return pn.area=function(gn){return(0,c.c)(gn,Ur(gt)),gt.result()},pn.measure=function(gn){return(0,c.c)(gn,Ur(ve)),ve.result()},pn.bounds=function(gn){return(0,c.c)(gn,Ur(Tt.c)),Tt.c.result()},pn.centroid=function(gn){return(0,c.c)(gn,Ur(Wt)),Wt.result()},pn.projection=function(gn){return arguments.length?(Ur=gn==null?(Tr=null,ut.c):(Tr=gn).stream,pn):Tr},pn.context=function(gn){return arguments.length?(an=gn==null?(Cr=null,new Le):new Ft(Cr=gn),typeof Wr!="function"&&an.pointRadius(Wr),pn):Cr},pn.pointRadius=function(gn){return arguments.length?(Wr=typeof gn=="function"?gn:(an.pointRadius(+gn),+gn),pn):Wr},pn.projection(Tr).context(Cr)}var Be=t(87952);function ir(Tr){var Cr=0,Wr=n.pi/3,Ur=(0,Be.U)(Tr),an=Ur(Cr,Wr);return an.parallels=function(pn){return arguments.length?Ur(Cr=pn[0]*n.qw,Wr=pn[1]*n.qw):[Cr*n.oh,Wr*n.oh]},an}function pe(Tr){var Cr=(0,n.W8)(Tr);function Wr(Ur,an){return[Ur*Cr,(0,n.g$)(an)/Cr]}return Wr.invert=function(Ur,an){return[Ur/Cr,(0,n.qR)(an*Cr)]},Wr}function Xe(Tr,Cr){var Wr=(0,n.g$)(Tr),Ur=(Wr+(0,n.g$)(Cr))/2;if((0,n.a2)(Ur)=.12&&$r<.234&&nn>=-.425&&nn<-.214?an:$r>=.166&&$r<.234&&nn>=-.214&&nn<-.115?gn:Wr).invert(li)},ci.stream=function(li){return Tr&&Cr===li?Tr:Tr=ge([Wr.stream(Cr=li),an.stream(li),gn.stream(li)])},ci.precision=function(li){return arguments.length?(Wr.precision(li),an.precision(li),gn.precision(li),di()):Wr.precision()},ci.scale=function(li){return arguments.length?(Wr.scale(li),an.scale(li*.35),gn.scale(li),ci.translate(Wr.translate())):Wr.scale()},ci.translate=function(li){if(!arguments.length)return Wr.translate();var ri=Wr.scale(),wr=+li[0],nn=+li[1];return Ur=Wr.translate(li).clipExtent([[wr-.455*ri,nn-.238*ri],[wr+.455*ri,nn+.238*ri]]).stream(ni),pn=an.translate([wr-.307*ri,nn+.201*ri]).clipExtent([[wr-.425*ri+n.Gg,nn+.12*ri+n.Gg],[wr-.214*ri-n.Gg,nn+.234*ri-n.Gg]]).stream(ni),_n=gn.translate([wr-.205*ri,nn+.212*ri]).clipExtent([[wr-.214*ri+n.Gg,nn+.166*ri+n.Gg],[wr-.115*ri-n.Gg,nn+.234*ri-n.Gg]]).stream(ni),di()},ci.fitExtent=function(li,ri){return(0,$e.QX)(ci,li,ri)},ci.fitSize=function(li,ri){return(0,$e.UV)(ci,li,ri)},ci.fitWidth=function(li,ri){return(0,$e.Qx)(ci,li,ri)},ci.fitHeight=function(li,ri){return(0,$e.OW)(ci,li,ri)};function di(){return Tr=Cr=null,ci}return ci.scale(1070)}var Ae=t(54724),Ce=t(69020),Ie=t(92992);function Pe(Tr,Cr){return[Tr,(0,n.Yz)((0,n.a6)((n.or+Cr)/2))]}Pe.invert=function(Tr,Cr){return[Tr,2*(0,n.MQ)((0,n.oN)(Cr))-n.or]};function ke(){return Ve(Pe).scale(961/n.kD)}function Ve(Tr){var Cr=(0,Be.c)(Tr),Wr=Cr.center,Ur=Cr.scale,an=Cr.translate,pn=Cr.clipExtent,gn=null,_n,kn,ni;Cr.scale=function(di){return arguments.length?(Ur(di),ci()):Ur()},Cr.translate=function(di){return arguments.length?(an(di),ci()):an()},Cr.center=function(di){return arguments.length?(Wr(di),ci()):Wr()},Cr.clipExtent=function(di){return arguments.length?(di==null?gn=_n=kn=ni=null:(gn=+di[0][0],_n=+di[0][1],kn=+di[1][0],ni=+di[1][1]),ci()):gn==null?null:[[gn,_n],[kn,ni]]};function ci(){var di=n.pi*Ur(),li=Cr((0,Ie.c)(Cr.rotate()).invert([0,0]));return pn(gn==null?[[li[0]-di,li[1]-di],[li[0]+di,li[1]+di]]:Tr===Pe?[[Math.max(li[0]-di,gn),_n],[Math.min(li[0]+di,kn),ni]]:[[gn,Math.max(li[1]-di,_n)],[kn,Math.min(li[1]+di,ni)]])}return ci()}function Je(Tr){return(0,n.a6)((n.or+Tr)/2)}function ur(Tr,Cr){var Wr=(0,n.W8)(Tr),Ur=Tr===Cr?(0,n.g$)(Tr):(0,n.Yz)(Wr/(0,n.W8)(Cr))/(0,n.Yz)(Je(Cr)/Je(Tr)),an=Wr*(0,n.g3)(Je(Tr),Ur)/Ur;if(!Ur)return Pe;function pn(gn,_n){an>0?_n<-n.or+n.Gg&&(_n=-n.or+n.Gg):_n>n.or-n.Gg&&(_n=n.or-n.Gg);var kn=an/(0,n.g3)(Je(_n),Ur);return[kn*(0,n.g$)(Ur*gn),an-kn*(0,n.W8)(Ur*gn)]}return pn.invert=function(gn,_n){var kn=an-_n,ni=(0,n.kq)(Ur)*(0,n._I)(gn*gn+kn*kn),ci=(0,n.WE)(gn,(0,n.a2)(kn))*(0,n.kq)(kn);return kn*Ur<0&&(ci-=n.pi*(0,n.kq)(gn)*(0,n.kq)(kn)),[ci/Ur,2*(0,n.MQ)((0,n.g3)(an/ni,1/Ur))-n.or]},pn}function hr(){return ir(ur).scale(109.5).parallels([30,30])}var vr=t(69604);function Yt(Tr,Cr){var Wr=(0,n.W8)(Tr),Ur=Tr===Cr?(0,n.g$)(Tr):(Wr-(0,n.W8)(Cr))/(Cr-Tr),an=Wr/Ur+Tr;if((0,n.a2)(Ur)2?Ur[2]+90:90]):(Ur=Wr(),[Ur[0],Ur[1],Ur[2]-90])},Wr([0,0,90]).scale(159.155)}},27284:function(G,U,t){t.d(U,{c:function(){return C}});var g=t(64528);function C(i,S){var x=i[0]*g.qw,v=i[1]*g.qw,p=S[0]*g.qw,r=S[1]*g.qw,e=(0,g.W8)(v),a=(0,g.g$)(v),n=(0,g.W8)(r),f=(0,g.g$)(r),c=e*(0,g.W8)(x),l=e*(0,g.g$)(x),m=n*(0,g.W8)(p),h=n*(0,g.g$)(p),b=2*(0,g.qR)((0,g._I)((0,g.SD)(r-v)+e*n*(0,g.SD)(p-x))),u=(0,g.g$)(b),o=b?function(d){var w=(0,g.g$)(d*=b)/u,A=(0,g.g$)(b-d)/u,_=A*c+w*m,y=A*l+w*h,E=A*a+w*f;return[(0,g.WE)(y,_)*g.oh,(0,g.WE)(E,(0,g._I)(_*_+y*y))*g.oh]}:function(){return[x*g.oh,v*g.oh]};return o.distance=b,o}},64528:function(G,U,t){t.d(U,{Gg:function(){return g},Km:function(){return c},MQ:function(){return a},SD:function(){return _},W8:function(){return f},WE:function(){return n},Yz:function(){return m},_I:function(){return o},a2:function(){return e},a6:function(){return d},a8:function(){return C},g$:function(){return b},g3:function(){return h},kD:function(){return v},kq:function(){return u},mE:function(){return w},oN:function(){return l},oh:function(){return p},or:function(){return S},pi:function(){return i},qR:function(){return A},qw:function(){return r},wL:function(){return x}});var g=1e-6,C=1e-12,i=Math.PI,S=i/2,x=i/4,v=i*2,p=180/i,r=i/180,e=Math.abs,a=Math.atan,n=Math.atan2,f=Math.cos,c=Math.ceil,l=Math.exp,m=Math.log,h=Math.pow,b=Math.sin,u=Math.sign||function(y){return y>0?1:y<0?-1:0},o=Math.sqrt,d=Math.tan;function w(y){return y>1?0:y<-1?i:Math.acos(y)}function A(y){return y>1?S:y<-1?-S:Math.asin(y)}function _(y){return(y=b(y/2))*y}},70932:function(G,U,t){t.d(U,{c:function(){return g}});function g(){}},73784:function(G,U,t){var g=t(70932),C=1/0,i=C,S=-C,x=S,v={point:p,lineStart:g.c,lineEnd:g.c,polygonStart:g.c,polygonEnd:g.c,result:function(){var r=[[C,i],[S,x]];return S=x=-(i=C=1/0),r}};function p(r,e){rS&&(S=r),ex&&(x=e)}U.c=v},41860:function(G,U,t){t.d(U,{c:function(){return C}});var g=t(64528);function C(i,S){return(0,g.a2)(i[0]-S[0])=0?1:-1,N=D*z,I=N>i.pi,k=A*L;if(S.add((0,i.WE)(k*D*(0,i.g$)(N),_*M+k*(0,i.W8)(N))),c+=I?z+D*i.kD:z,I^d>=e^T>=e){var B=(0,C.CW)((0,C.ux)(o),(0,C.ux)(E));(0,C.cJ)(B);var O=(0,C.CW)(f,B);(0,C.cJ)(O);var H=(I^z>=0?-1:1)*(0,i.qR)(O[2]);(a>H||a===H&&(B[0]||B[1]))&&(l+=I^z>=0?1:-1)}}return(c<-i.Gg||c4*_&&H--){var ut=L+k,J=M+B,X=z+O,tt=(0,v._I)(ut*ut+J*J+X*X),V=(0,v.qR)(X/=tt),Q=(0,v.a2)((0,v.a2)(X)-1)_||(0,v.a2)((j*st+et*nt)/it-.5)>.3||L*k+M*B+z*O2?ct[2]%360*v.qw:0,st()):[M*v.oh,z*v.oh,D*v.oh]},$.angle=function(ct){return arguments.length?(I=ct%360*v.qw,st()):I*v.oh},$.reflectX=function(ct){return arguments.length?(k=ct?-1:1,st()):k<0},$.reflectY=function(ct){return arguments.length?(B=ct?-1:1,st()):B<0},$.precision=function(ct){return arguments.length?(X=c(tt,J=ct*ct),nt()):(0,v._I)(J)},$.fitExtent=function(ct,gt){return(0,e.QX)($,ct,gt)},$.fitSize=function(ct,gt){return(0,e.UV)($,ct,gt)},$.fitWidth=function(ct,gt){return(0,e.Qx)($,ct,gt)},$.fitHeight=function(ct,gt){return(0,e.OW)($,ct,gt)};function st(){var ct=o(y,0,0,k,B,I).apply(null,_(s,L)),gt=(I?o:u)(y,E-ct[0],T-ct[1],k,B,I);return N=(0,p.O)(M,z,D),tt=(0,S.c)(_,gt),V=(0,S.c)(N,tt),X=c(tt,J),nt()}function nt(){return Q=ot=null,$}return function(){return _=A.apply(this,arguments),$.invert=_.invert&&Z,st()}}},47984:function(G,U,t){t.d(U,{c:function(){return S},g:function(){return i}});var g=t(87952),C=t(64528);function i(x,v){var p=v*v,r=p*p;return[x*(.8707-.131979*p+r*(-.013791+r*(.003971*p-.001529*r))),v*(1.007226+p*(.015085+r*(-.044475+.028874*p-.005916*r)))]}i.invert=function(x,v){var p=v,r=25,e;do{var a=p*p,n=a*a;p-=e=(p*(1.007226+a*(.015085+n*(-.044475+.028874*a-.005916*n)))-v)/(1.007226+a*(.045255+n*(-.311325+.259866*a-.06507600000000001*n)))}while((0,C.a2)(e)>C.Gg&&--r>0);return[x/(.8707+(a=p*p)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),p]};function S(){return(0,g.c)(i).scale(175.295)}},4888:function(G,U,t){t.d(U,{c:function(){return x},t:function(){return S}});var g=t(64528),C=t(62280),i=t(87952);function S(v,p){return[(0,g.W8)(p)*(0,g.g$)(v),(0,g.g$)(p)]}S.invert=(0,C.g)(g.qR);function x(){return(0,i.c)(S).scale(249.5).clipAngle(90+g.Gg)}},92992:function(G,U,t){t.d(U,{O:function(){return S},c:function(){return r}});var g=t(68120),C=t(64528);function i(e,a){return[(0,C.a2)(e)>C.pi?e+Math.round(-e/C.kD)*C.kD:e,a]}i.invert=i;function S(e,a,n){return(e%=C.kD)?a||n?(0,g.c)(v(e),p(a,n)):v(e):a||n?p(a,n):i}function x(e){return function(a,n){return a+=e,[a>C.pi?a-C.kD:a<-C.pi?a+C.kD:a,n]}}function v(e){var a=x(e);return a.invert=x(-e),a}function p(e,a){var n=(0,C.W8)(e),f=(0,C.g$)(e),c=(0,C.W8)(a),l=(0,C.g$)(a);function m(h,b){var u=(0,C.W8)(b),o=(0,C.W8)(h)*u,d=(0,C.g$)(h)*u,w=(0,C.g$)(b),A=w*n+o*f;return[(0,C.WE)(d*c-A*l,o*n-w*f),(0,C.qR)(A*c+d*l)]}return m.invert=function(h,b){var u=(0,C.W8)(b),o=(0,C.W8)(h)*u,d=(0,C.g$)(h)*u,w=(0,C.g$)(b),A=w*c-d*l;return[(0,C.WE)(d*c+w*l,o*n+A*f),(0,C.qR)(A*n-o*f)]},m}function r(e){e=S(e[0]*C.qw,e[1]*C.qw,e.length>2?e[2]*C.qw:0);function a(n){return n=e(n[0]*C.qw,n[1]*C.qw),n[0]*=C.oh,n[1]*=C.oh,n}return a.invert=function(n){return n=e.invert(n[0]*C.qw,n[1]*C.qw),n[0]*=C.oh,n[1]*=C.oh,n},a}},16016:function(G,U,t){t.d(U,{c:function(){return v}});function g(p,r){p&&i.hasOwnProperty(p.type)&&i[p.type](p,r)}var C={Feature:function(p,r){g(p.geometry,r)},FeatureCollection:function(p,r){for(var e=p.features,a=-1,n=e.length;++a=0;)xt+=yt[Et].value;Ft.value=xt}function a(){return this.eachAfter(e)}function n(Ft){var xt=this,yt,Et=[xt],Mt,Nt,jt;do for(yt=Et.reverse(),Et=[];xt=yt.pop();)if(Ft(xt),Mt=xt.children,Mt)for(Nt=0,jt=Mt.length;Nt=0;--Mt)yt.push(Et[Mt]);return this}function c(Ft){for(var xt=this,yt=[xt],Et=[],Mt,Nt,jt;xt=yt.pop();)if(Et.push(xt),Mt=xt.children,Mt)for(Nt=0,jt=Mt.length;Nt=0;)yt+=Et[Mt].value;xt.value=yt})}function m(Ft){return this.eachBefore(function(xt){xt.children&&xt.children.sort(Ft)})}function h(Ft){for(var xt=this,yt=b(xt,Ft),Et=[xt];xt!==yt;)xt=xt.parent,Et.push(xt);for(var Mt=Et.length;Ft!==yt;)Et.splice(Mt,0,Ft),Ft=Ft.parent;return Et}function b(Ft,xt){if(Ft===xt)return Ft;var yt=Ft.ancestors(),Et=xt.ancestors(),Mt=null;for(Ft=yt.pop(),xt=Et.pop();Ft===xt;)Mt=Ft,Ft=yt.pop(),xt=Et.pop();return Mt}function u(){for(var Ft=this,xt=[Ft];Ft=Ft.parent;)xt.push(Ft);return xt}function o(){var Ft=[];return this.each(function(xt){Ft.push(xt)}),Ft}function d(){var Ft=[];return this.eachBefore(function(xt){xt.children||Ft.push(xt)}),Ft}function w(){var Ft=this,xt=[];return Ft.each(function(yt){yt!==Ft&&xt.push({source:yt.parent,target:yt})}),xt}function A(Ft,xt){var yt=new s(Ft),Et=+Ft.value&&(yt.value=Ft.value),Mt,Nt=[yt],jt,ie,me,be;for(xt==null&&(xt=y);Mt=Nt.pop();)if(Et&&(Mt.value=+Mt.data.value),(ie=xt(Mt.data))&&(be=ie.length))for(Mt.children=new Array(be),me=be-1;me>=0;--me)Nt.push(jt=Mt.children[me]=new s(ie[me])),jt.parent=Mt,jt.depth=Mt.depth+1;return yt.eachBefore(T)}function _(){return A(this).eachBefore(E)}function y(Ft){return Ft.children}function E(Ft){Ft.data=Ft.data.data}function T(Ft){var xt=0;do Ft.height=xt;while((Ft=Ft.parent)&&Ft.height<++xt)}function s(Ft){this.data=Ft,this.depth=this.height=0,this.parent=null}s.prototype=A.prototype={constructor:s,count:a,each:n,eachAfter:c,eachBefore:f,sum:l,sort:m,path:h,ancestors:u,descendants:o,leaves:d,links:w,copy:_};var L=Array.prototype.slice;function M(Ft){for(var xt=Ft.length,yt,Et;xt;)Et=Math.random()*xt--|0,yt=Ft[xt],Ft[xt]=Ft[Et],Ft[Et]=yt;return Ft}function z(Ft){for(var xt=0,yt=(Ft=M(L.call(Ft))).length,Et=[],Mt,Nt;xt0&&yt*yt>Et*Et+Mt*Mt}function k(Ft,xt){for(var yt=0;ytme?(Mt=(be+me-Nt)/(2*be),ie=Math.sqrt(Math.max(0,me/be-Mt*Mt)),yt.x=Ft.x-Mt*Et-ie*jt,yt.y=Ft.y-Mt*jt+ie*Et):(Mt=(be+Nt-me)/(2*be),ie=Math.sqrt(Math.max(0,Nt/be-Mt*Mt)),yt.x=xt.x+Mt*Et-ie*jt,yt.y=xt.y+Mt*jt+ie*Et)):(yt.x=xt.x+yt.r,yt.y=xt.y)}function et(Ft,xt){var yt=Ft.r+xt.r-1e-6,Et=xt.x-Ft.x,Mt=xt.y-Ft.y;return yt>0&&yt*yt>Et*Et+Mt*Mt}function it(Ft){var xt=Ft._,yt=Ft.next._,Et=xt.r+yt.r,Mt=(xt.x*yt.r+yt.x*xt.r)/Et,Nt=(xt.y*yt.r+yt.y*xt.r)/Et;return Mt*Mt+Nt*Nt}function ut(Ft){this._=Ft,this.next=null,this.previous=null}function J(Ft){if(!(Mt=Ft.length))return 0;var xt,yt,Et,Mt,Nt,jt,ie,me,be,ve,Le;if(xt=Ft[0],xt.x=0,xt.y=0,!(Mt>1))return xt.r;if(yt=Ft[1],xt.x=-yt.r,yt.x=xt.r,yt.y=0,!(Mt>2))return xt.r+yt.r;j(yt,xt,Et=Ft[2]),xt=new ut(xt),yt=new ut(yt),Et=new ut(Et),xt.next=Et.previous=yt,yt.next=xt.previous=Et,Et.next=yt.previous=xt;t:for(ie=3;ie0)throw new Error("cycle");return ie}return yt.id=function(Et){return arguments.length?(Ft=V(Et),yt):Ft},yt.parentId=function(Et){return arguments.length?(xt=V(Et),yt):xt},yt}function Ut(Ft,xt){return Ft.parent===xt.parent?1:2}function kt(Ft){var xt=Ft.children;return xt?xt[0]:Ft.t}function Vt(Ft){var xt=Ft.children;return xt?xt[xt.length-1]:Ft.t}function It(Ft,xt,yt){var Et=yt/(xt.i-Ft.i);xt.c-=Et,xt.s+=yt,Ft.c+=Et,xt.z+=yt,xt.m+=yt}function re(Ft){for(var xt=0,yt=0,Et=Ft.children,Mt=Et.length,Nt;--Mt>=0;)Nt=Et[Mt],Nt.z+=xt,Nt.m+=xt,xt+=Nt.s+(yt+=Nt.c)}function Kt(Ft,xt,yt){return Ft.a.parent===xt.parent?Ft.a:yt}function $t(Ft,xt){this._=Ft,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=xt}$t.prototype=Object.create(s.prototype);function le(Ft){for(var xt=new $t(Ft,0),yt,Et=[xt],Mt,Nt,jt,ie;yt=Et.pop();)if(Nt=yt._.children)for(yt.children=new Array(ie=Nt.length),jt=ie-1;jt>=0;--jt)Et.push(Mt=yt.children[jt]=new $t(Nt[jt],jt)),Mt.parent=yt;return(xt.parent=new $t(null,0)).children=[xt],xt}function he(){var Ft=Ut,xt=1,yt=1,Et=null;function Mt(be){var ve=le(be);if(ve.eachAfter(Nt),ve.parent.m=-ve.z,ve.eachBefore(jt),Et)be.eachBefore(me);else{var Le=be,ce=be,Te=be;be.eachBefore(function(Ke){Ke.xce.x&&(ce=Ke),Ke.depth>Te.depth&&(Te=Ke)});var Be=Le===ce?1:Ft(Le,ce)/2,ir=Be-Le.x,pe=xt/(ce.x+Be+ir),Xe=yt/(Te.depth||1);be.eachBefore(function(Ke){Ke.x=(Ke.x+ir)*pe,Ke.y=Ke.depth*Xe})}return be}function Nt(be){var ve=be.children,Le=be.parent.children,ce=be.i?Le[be.i-1]:null;if(ve){re(be);var Te=(ve[0].z+ve[ve.length-1].z)/2;ce?(be.z=ce.z+Ft(be._,ce._),be.m=be.z-Te):be.z=Te}else ce&&(be.z=ce.z+Ft(be._,ce._));be.parent.A=ie(be,ce,be.parent.A||Le[0])}function jt(be){be._.x=be.z+be.parent.m,be.m+=be.parent.m}function ie(be,ve,Le){if(ve){for(var ce=be,Te=be,Be=ve,ir=ce.parent.children[0],pe=ce.m,Xe=Te.m,Ke=Be.m,or=ir.m,$e;Be=Vt(Be),ce=kt(ce),Be&&ce;)ir=kt(ir),Te=Vt(Te),Te.a=be,$e=Be.z+Ke-ce.z-pe+Ft(Be._,ce._),$e>0&&(It(Kt(Be,be,Le),be,$e),pe+=$e,Xe+=$e),Ke+=Be.m,pe+=ce.m,or+=ir.m,Xe+=Te.m;Be&&!Vt(Te)&&(Te.t=Be,Te.m+=Ke-Xe),ce&&!kt(ir)&&(ir.t=ce,ir.m+=pe-or,Le=be)}return Le}function me(be){be.x*=xt,be.y=be.depth*yt}return Mt.separation=function(be){return arguments.length?(Ft=be,Mt):Ft},Mt.size=function(be){return arguments.length?(Et=!1,xt=+be[0],yt=+be[1],Mt):Et?null:[xt,yt]},Mt.nodeSize=function(be){return arguments.length?(Et=!0,xt=+be[0],yt=+be[1],Mt):Et?[xt,yt]:null},Mt}function de(Ft,xt,yt,Et,Mt){for(var Nt=Ft.children,jt,ie=-1,me=Nt.length,be=Ft.value&&(Mt-yt)/Ft.value;++ieKe&&(Ke=be),se=pe*pe*ge,or=Math.max(Ke/se,se/Xe),or>$e){pe-=be;break}$e=or}jt.push(me={value:pe,dice:Te1?Et:1)},yt}(xe);function zt(){var Ft=ne,xt=!1,yt=1,Et=1,Mt=[0],Nt=Q,jt=Q,ie=Q,me=Q,be=Q;function ve(ce){return ce.x0=ce.y0=0,ce.x1=yt,ce.y1=Et,ce.eachBefore(Le),Mt=[0],xt&&ce.eachBefore(gt),ce}function Le(ce){var Te=Mt[ce.depth],Be=ce.x0+Te,ir=ce.y0+Te,pe=ce.x1-Te,Xe=ce.y1-Te;pe=ce-1){var Ke=Nt[Le];Ke.x0=Be,Ke.y0=ir,Ke.x1=pe,Ke.y1=Xe;return}for(var or=be[Le],$e=Te/2+or,ge=Le+1,se=ce-1;ge>>1;be[Ae]<$e?ge=Ae+1:se=Ae}$e-be[ge-1]Xe-ir){var Pe=(Be*Ie+pe*Ce)/Te;ve(Le,ge,Ce,Be,ir,Pe,Xe),ve(ge,ce,Ie,Pe,ir,pe,Xe)}else{var ke=(ir*Ie+Xe*Ce)/Te;ve(Le,ge,Ce,Be,ir,pe,ke),ve(ge,ce,Ie,Be,ke,pe,Xe)}}}function Jt(Ft,xt,yt,Et,Mt){(Ft.depth&1?de:Tt)(Ft,xt,yt,Et,Mt)}var Wt=function Ft(xt){function yt(Et,Mt,Nt,jt,ie){if((me=Et._squarify)&&me.ratio===xt)for(var me,be,ve,Le,ce=-1,Te,Be=me.length,ir=Et.value;++ce1?Et:1)},yt}(xe)},10132:function(G,U,t){t.d(U,{ak:function(){return h}});var g=Math.PI,C=2*g,i=1e-6,S=C-i;function x(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function v(){return new x}x.prototype=v.prototype={constructor:x,moveTo:function(b,u){this._+="M"+(this._x0=this._x1=+b)+","+(this._y0=this._y1=+u)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(b,u){this._+="L"+(this._x1=+b)+","+(this._y1=+u)},quadraticCurveTo:function(b,u,o,d){this._+="Q"+ +b+","+ +u+","+(this._x1=+o)+","+(this._y1=+d)},bezierCurveTo:function(b,u,o,d,w,A){this._+="C"+ +b+","+ +u+","+ +o+","+ +d+","+(this._x1=+w)+","+(this._y1=+A)},arcTo:function(b,u,o,d,w){b=+b,u=+u,o=+o,d=+d,w=+w;var A=this._x1,_=this._y1,y=o-b,E=d-u,T=A-b,s=_-u,L=T*T+s*s;if(w<0)throw new Error("negative radius: "+w);if(this._x1===null)this._+="M"+(this._x1=b)+","+(this._y1=u);else if(L>i)if(!(Math.abs(s*y-E*T)>i)||!w)this._+="L"+(this._x1=b)+","+(this._y1=u);else{var M=o-A,z=d-_,D=y*y+E*E,N=M*M+z*z,I=Math.sqrt(D),k=Math.sqrt(L),B=w*Math.tan((g-Math.acos((D+L-N)/(2*I*k)))/2),O=B/k,H=B/I;Math.abs(O-1)>i&&(this._+="L"+(b+O*T)+","+(u+O*s)),this._+="A"+w+","+w+",0,0,"+ +(s*M>T*z)+","+(this._x1=b+H*y)+","+(this._y1=u+H*E)}},arc:function(b,u,o,d,w,A){b=+b,u=+u,o=+o,A=!!A;var _=o*Math.cos(d),y=o*Math.sin(d),E=b+_,T=u+y,s=1^A,L=A?d-w:w-d;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+E+","+T:(Math.abs(this._x1-E)>i||Math.abs(this._y1-T)>i)&&(this._+="L"+E+","+T),o&&(L<0&&(L=L%C+C),L>S?this._+="A"+o+","+o+",0,1,"+s+","+(b-_)+","+(u-y)+"A"+o+","+o+",0,1,"+s+","+(this._x1=E)+","+(this._y1=T):L>i&&(this._+="A"+o+","+o+",0,"+ +(L>=g)+","+s+","+(this._x1=b+o*Math.cos(w))+","+(this._y1=u+o*Math.sin(w))))},rect:function(b,u,o,d){this._+="M"+(this._x0=this._x1=+b)+","+(this._y0=this._y1=+u)+"h"+ +o+"v"+ +d+"h"+-o+"Z"},toString:function(){return this._}};var p=v,r=Array.prototype.slice;function e(b){return function(){return b}}function a(b){return b[0]}function n(b){return b[1]}function f(b){return b.source}function c(b){return b.target}function l(b){var u=f,o=c,d=a,w=n,A=null;function _(){var y,E=r.call(arguments),T=u.apply(this,E),s=o.apply(this,E);if(A||(A=y=p()),b(A,+d.apply(this,(E[0]=T,E)),+w.apply(this,E),+d.apply(this,(E[0]=s,E)),+w.apply(this,E)),y)return A=null,y+""||null}return _.source=function(y){return arguments.length?(u=y,_):u},_.target=function(y){return arguments.length?(o=y,_):o},_.x=function(y){return arguments.length?(d=typeof y=="function"?y:e(+y),_):d},_.y=function(y){return arguments.length?(w=typeof y=="function"?y:e(+y),_):w},_.context=function(y){return arguments.length?(A=y??null,_):A},_}function m(b,u,o,d,w){b.moveTo(u,o),b.bezierCurveTo(u=(u+d)/2,o,u,w,d,w)}function h(){return l(m)}},94336:function(G,U,t){t.d(U,{Yn:function(){return Xt},m_:function(){return a},E9:function(){return Jt}});var g=t(8208),C=t(58931),i=t(46192),S=t(68936),x=t(32171),v=t(53528);function p(Ft){if(0<=Ft.y&&Ft.y<100){var xt=new Date(-1,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L);return xt.setFullYear(Ft.y),xt}return new Date(Ft.y,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L)}function r(Ft){if(0<=Ft.y&&Ft.y<100){var xt=new Date(Date.UTC(-1,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L));return xt.setUTCFullYear(Ft.y),xt}return new Date(Date.UTC(Ft.y,Ft.m,Ft.d,Ft.H,Ft.M,Ft.S,Ft.L))}function e(Ft,xt,yt){return{y:Ft,m:xt,d:yt,H:0,M:0,S:0,L:0}}function a(Ft){var xt=Ft.dateTime,yt=Ft.date,Et=Ft.time,Mt=Ft.periods,Nt=Ft.days,jt=Ft.shortDays,ie=Ft.months,me=Ft.shortMonths,be=b(Mt),ve=u(Mt),Le=b(Nt),ce=u(Nt),Te=b(jt),Be=u(jt),ir=b(ie),pe=u(ie),Xe=b(me),Ke=u(me),or={a:Yt,A:Gt,b:Ne,B:Oe,c:null,d:j,e:j,f:X,H:et,I:it,j:ut,L:J,m:tt,M:V,p:Qe,q:er,Q:Se,s:ne,S:Q,u:ot,U:$,V:Z,w:st,W:nt,x:null,X:null,y:ct,Y:gt,Z:Tt,"%":xe},$e={a:fr,A:rr,b:He,B:dr,c:null,d:wt,e:wt,f:Lt,H:Rt,I:bt,j:At,L:mt,m:Ht,M:Ut,p:mr,q:xr,Q:Se,s:ne,S:kt,u:Vt,U:It,V:re,w:Kt,W:$t,x:null,X:null,y:le,Y:he,Z:de,"%":xe},ge={a:Pe,A:ke,b:Ve,B:Je,c:ur,d:M,e:M,f:B,H:D,I:D,j:z,L:k,m:L,M:N,p:Ie,q:s,Q:H,s:Y,S:I,u:d,U:w,V:A,w:o,W:_,x:hr,X:vr,y:E,Y:y,Z:T,"%":O};or.x=se(yt,or),or.X=se(Et,or),or.c=se(xt,or),$e.x=se(yt,$e),$e.X=se(Et,$e),$e.c=se(xt,$e);function se(pr,Gr){return function(Pr){var Dr=[],cn=-1,rn=0,Cn=pr.length,En,Tr,Cr;for(Pr instanceof Date||(Pr=new Date(+Pr));++cn53)return null;"w"in Dr||(Dr.w=1),"Z"in Dr?(rn=r(e(Dr.y,0,1)),Cn=rn.getUTCDay(),rn=Cn>4||Cn===0?g.ot.ceil(rn):(0,g.ot)(rn),rn=C.c.offset(rn,(Dr.V-1)*7),Dr.y=rn.getUTCFullYear(),Dr.m=rn.getUTCMonth(),Dr.d=rn.getUTCDate()+(Dr.w+6)%7):(rn=p(e(Dr.y,0,1)),Cn=rn.getDay(),rn=Cn>4||Cn===0?i.qT.ceil(rn):(0,i.qT)(rn),rn=S.c.offset(rn,(Dr.V-1)*7),Dr.y=rn.getFullYear(),Dr.m=rn.getMonth(),Dr.d=rn.getDate()+(Dr.w+6)%7)}else("W"in Dr||"U"in Dr)&&("w"in Dr||(Dr.w="u"in Dr?Dr.u%7:"W"in Dr?1:0),Cn="Z"in Dr?r(e(Dr.y,0,1)).getUTCDay():p(e(Dr.y,0,1)).getDay(),Dr.m=0,Dr.d="W"in Dr?(Dr.w+6)%7+Dr.W*7-(Cn+5)%7:Dr.w+Dr.U*7-(Cn+6)%7);return"Z"in Dr?(Dr.H+=Dr.Z/100|0,Dr.M+=Dr.Z%100,r(Dr)):p(Dr)}}function Ce(pr,Gr,Pr,Dr){for(var cn=0,rn=Gr.length,Cn=Pr.length,En,Tr;cn=Cn)return-1;if(En=Gr.charCodeAt(cn++),En===37){if(En=Gr.charAt(cn++),Tr=ge[En in n?Gr.charAt(cn++):En],!Tr||(Dr=Tr(pr,Pr,Dr))<0)return-1}else if(En!=Pr.charCodeAt(Dr++))return-1}return Dr}function Ie(pr,Gr,Pr){var Dr=be.exec(Gr.slice(Pr));return Dr?(pr.p=ve[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Pe(pr,Gr,Pr){var Dr=Te.exec(Gr.slice(Pr));return Dr?(pr.w=Be[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function ke(pr,Gr,Pr){var Dr=Le.exec(Gr.slice(Pr));return Dr?(pr.w=ce[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Ve(pr,Gr,Pr){var Dr=Xe.exec(Gr.slice(Pr));return Dr?(pr.m=Ke[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function Je(pr,Gr,Pr){var Dr=ir.exec(Gr.slice(Pr));return Dr?(pr.m=pe[Dr[0].toLowerCase()],Pr+Dr[0].length):-1}function ur(pr,Gr,Pr){return Ce(pr,xt,Gr,Pr)}function hr(pr,Gr,Pr){return Ce(pr,yt,Gr,Pr)}function vr(pr,Gr,Pr){return Ce(pr,Et,Gr,Pr)}function Yt(pr){return jt[pr.getDay()]}function Gt(pr){return Nt[pr.getDay()]}function Ne(pr){return me[pr.getMonth()]}function Oe(pr){return ie[pr.getMonth()]}function Qe(pr){return Mt[+(pr.getHours()>=12)]}function er(pr){return 1+~~(pr.getMonth()/3)}function fr(pr){return jt[pr.getUTCDay()]}function rr(pr){return Nt[pr.getUTCDay()]}function He(pr){return me[pr.getUTCMonth()]}function dr(pr){return ie[pr.getUTCMonth()]}function mr(pr){return Mt[+(pr.getUTCHours()>=12)]}function xr(pr){return 1+~~(pr.getUTCMonth()/3)}return{format:function(pr){var Gr=se(pr+="",or);return Gr.toString=function(){return pr},Gr},parse:function(pr){var Gr=Ae(pr+="",!1);return Gr.toString=function(){return pr},Gr},utcFormat:function(pr){var Gr=se(pr+="",$e);return Gr.toString=function(){return pr},Gr},utcParse:function(pr){var Gr=Ae(pr+="",!0);return Gr.toString=function(){return pr},Gr}}}var n={"-":"",_:" ",0:"0"},f=/^\s*\d+/,c=/^%/,l=/[\\^$*+?|[\]().{}]/g;function m(Ft,xt,yt){var Et=Ft<0?"-":"",Mt=(Et?-Ft:Ft)+"",Nt=Mt.length;return Et+(Nt68?1900:2e3),yt+Et[0].length):-1}function T(Ft,xt,yt){var Et=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(xt.slice(yt,yt+6));return Et?(Ft.Z=Et[1]?0:-(Et[2]+(Et[3]||"00")),yt+Et[0].length):-1}function s(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+1));return Et?(Ft.q=Et[0]*3-3,yt+Et[0].length):-1}function L(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.m=Et[0]-1,yt+Et[0].length):-1}function M(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.d=+Et[0],yt+Et[0].length):-1}function z(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+3));return Et?(Ft.m=0,Ft.d=+Et[0],yt+Et[0].length):-1}function D(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.H=+Et[0],yt+Et[0].length):-1}function N(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.M=+Et[0],yt+Et[0].length):-1}function I(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+2));return Et?(Ft.S=+Et[0],yt+Et[0].length):-1}function k(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+3));return Et?(Ft.L=+Et[0],yt+Et[0].length):-1}function B(Ft,xt,yt){var Et=f.exec(xt.slice(yt,yt+6));return Et?(Ft.L=Math.floor(Et[0]/1e3),yt+Et[0].length):-1}function O(Ft,xt,yt){var Et=c.exec(xt.slice(yt,yt+1));return Et?yt+Et[0].length:-1}function H(Ft,xt,yt){var Et=f.exec(xt.slice(yt));return Et?(Ft.Q=+Et[0],yt+Et[0].length):-1}function Y(Ft,xt,yt){var Et=f.exec(xt.slice(yt));return Et?(Ft.s=+Et[0],yt+Et[0].length):-1}function j(Ft,xt){return m(Ft.getDate(),xt,2)}function et(Ft,xt){return m(Ft.getHours(),xt,2)}function it(Ft,xt){return m(Ft.getHours()%12||12,xt,2)}function ut(Ft,xt){return m(1+S.c.count((0,x.c)(Ft),Ft),xt,3)}function J(Ft,xt){return m(Ft.getMilliseconds(),xt,3)}function X(Ft,xt){return J(Ft,xt)+"000"}function tt(Ft,xt){return m(Ft.getMonth()+1,xt,2)}function V(Ft,xt){return m(Ft.getMinutes(),xt,2)}function Q(Ft,xt){return m(Ft.getSeconds(),xt,2)}function ot(Ft){var xt=Ft.getDay();return xt===0?7:xt}function $(Ft,xt){return m(i.uU.count((0,x.c)(Ft)-1,Ft),xt,2)}function Z(Ft,xt){var yt=Ft.getDay();return Ft=yt>=4||yt===0?(0,i.kD)(Ft):i.kD.ceil(Ft),m(i.kD.count((0,x.c)(Ft),Ft)+((0,x.c)(Ft).getDay()===4),xt,2)}function st(Ft){return Ft.getDay()}function nt(Ft,xt){return m(i.qT.count((0,x.c)(Ft)-1,Ft),xt,2)}function ct(Ft,xt){return m(Ft.getFullYear()%100,xt,2)}function gt(Ft,xt){return m(Ft.getFullYear()%1e4,xt,4)}function Tt(Ft){var xt=Ft.getTimezoneOffset();return(xt>0?"-":(xt*=-1,"+"))+m(xt/60|0,"0",2)+m(xt%60,"0",2)}function wt(Ft,xt){return m(Ft.getUTCDate(),xt,2)}function Rt(Ft,xt){return m(Ft.getUTCHours(),xt,2)}function bt(Ft,xt){return m(Ft.getUTCHours()%12||12,xt,2)}function At(Ft,xt){return m(1+C.c.count((0,v.c)(Ft),Ft),xt,3)}function mt(Ft,xt){return m(Ft.getUTCMilliseconds(),xt,3)}function Lt(Ft,xt){return mt(Ft,xt)+"000"}function Ht(Ft,xt){return m(Ft.getUTCMonth()+1,xt,2)}function Ut(Ft,xt){return m(Ft.getUTCMinutes(),xt,2)}function kt(Ft,xt){return m(Ft.getUTCSeconds(),xt,2)}function Vt(Ft){var xt=Ft.getUTCDay();return xt===0?7:xt}function It(Ft,xt){return m(g.EV.count((0,v.c)(Ft)-1,Ft),xt,2)}function re(Ft,xt){var yt=Ft.getUTCDay();return Ft=yt>=4||yt===0?(0,g.yA)(Ft):g.yA.ceil(Ft),m(g.yA.count((0,v.c)(Ft),Ft)+((0,v.c)(Ft).getUTCDay()===4),xt,2)}function Kt(Ft){return Ft.getUTCDay()}function $t(Ft,xt){return m(g.ot.count((0,v.c)(Ft)-1,Ft),xt,2)}function le(Ft,xt){return m(Ft.getUTCFullYear()%100,xt,2)}function he(Ft,xt){return m(Ft.getUTCFullYear()%1e4,xt,4)}function de(){return"+0000"}function xe(){return"%"}function Se(Ft){return+Ft}function ne(Ft){return Math.floor(+Ft/1e3)}var zt,Xt,Jt;Wt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Wt(Ft){return zt=a(Ft),Xt=zt.format,zt.parse,Jt=zt.utcFormat,zt.utcParse,zt}},68936:function(G,U,t){t.d(U,{m:function(){return S}});var g=t(81628),C=t(69792),i=(0,g.c)(function(x){x.setHours(0,0,0,0)},function(x,v){x.setDate(x.getDate()+v)},function(x,v){return(v-x-(v.getTimezoneOffset()-x.getTimezoneOffset())*C.iy)/C.SK},function(x){return x.getDate()-1});U.c=i;var S=i.range},69792:function(G,U,t){t.d(U,{KK:function(){return x},SK:function(){return S},cg:function(){return i},iy:function(){return C},yc:function(){return g}});var g=1e3,C=6e4,i=36e5,S=864e5,x=6048e5},73220:function(G,U,t){t.r(U),t.d(U,{timeDay:function(){return m.c},timeDays:function(){return m.m},timeFriday:function(){return h.iB},timeFridays:function(){return h.sJ},timeHour:function(){return c},timeHours:function(){return l},timeInterval:function(){return g.c},timeMillisecond:function(){return i},timeMilliseconds:function(){return S},timeMinute:function(){return a},timeMinutes:function(){return n},timeMonday:function(){return h.qT},timeMondays:function(){return h.QP},timeMonth:function(){return u},timeMonths:function(){return o},timeSaturday:function(){return h.Wc},timeSaturdays:function(){return h.aI},timeSecond:function(){return p},timeSeconds:function(){return r},timeSunday:function(){return h.uU},timeSundays:function(){return h.Ab},timeThursday:function(){return h.kD},timeThursdays:function(){return h.eC},timeTuesday:function(){return h.Mf},timeTuesdays:function(){return h.Oc},timeWednesday:function(){return h.eg},timeWednesdays:function(){return h.sn},timeWeek:function(){return h.uU},timeWeeks:function(){return h.Ab},timeYear:function(){return d.c},timeYears:function(){return d.Q},utcDay:function(){return s.c},utcDays:function(){return s.o},utcFriday:function(){return L.od},utcFridays:function(){return L.iG},utcHour:function(){return E},utcHours:function(){return T},utcMillisecond:function(){return i},utcMilliseconds:function(){return S},utcMinute:function(){return A},utcMinutes:function(){return _},utcMonday:function(){return L.ot},utcMondays:function(){return L.iO},utcMonth:function(){return z},utcMonths:function(){return D},utcSaturday:function(){return L.Ad},utcSaturdays:function(){return L.K8},utcSecond:function(){return p},utcSeconds:function(){return r},utcSunday:function(){return L.EV},utcSundays:function(){return L.Wq},utcThursday:function(){return L.yA},utcThursdays:function(){return L.ob},utcTuesday:function(){return L.sG},utcTuesdays:function(){return L.kl},utcWednesday:function(){return L._6},utcWednesdays:function(){return L.W_},utcWeek:function(){return L.EV},utcWeeks:function(){return L.Wq},utcYear:function(){return N.c},utcYears:function(){return N.i}});var g=t(81628),C=(0,g.c)(function(){},function(I,k){I.setTime(+I+k)},function(I,k){return k-I});C.every=function(I){return I=Math.floor(I),!isFinite(I)||!(I>0)?null:I>1?(0,g.c)(function(k){k.setTime(Math.floor(k/I)*I)},function(k,B){k.setTime(+k+B*I)},function(k,B){return(B-k)/I}):C};var i=C,S=C.range,x=t(69792),v=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds())},function(I,k){I.setTime(+I+k*x.yc)},function(I,k){return(k-I)/x.yc},function(I){return I.getUTCSeconds()}),p=v,r=v.range,e=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds()-I.getSeconds()*x.yc)},function(I,k){I.setTime(+I+k*x.iy)},function(I,k){return(k-I)/x.iy},function(I){return I.getMinutes()}),a=e,n=e.range,f=(0,g.c)(function(I){I.setTime(I-I.getMilliseconds()-I.getSeconds()*x.yc-I.getMinutes()*x.iy)},function(I,k){I.setTime(+I+k*x.cg)},function(I,k){return(k-I)/x.cg},function(I){return I.getHours()}),c=f,l=f.range,m=t(68936),h=t(46192),b=(0,g.c)(function(I){I.setDate(1),I.setHours(0,0,0,0)},function(I,k){I.setMonth(I.getMonth()+k)},function(I,k){return k.getMonth()-I.getMonth()+(k.getFullYear()-I.getFullYear())*12},function(I){return I.getMonth()}),u=b,o=b.range,d=t(32171),w=(0,g.c)(function(I){I.setUTCSeconds(0,0)},function(I,k){I.setTime(+I+k*x.iy)},function(I,k){return(k-I)/x.iy},function(I){return I.getUTCMinutes()}),A=w,_=w.range,y=(0,g.c)(function(I){I.setUTCMinutes(0,0,0)},function(I,k){I.setTime(+I+k*x.cg)},function(I,k){return(k-I)/x.cg},function(I){return I.getUTCHours()}),E=y,T=y.range,s=t(58931),L=t(8208),M=(0,g.c)(function(I){I.setUTCDate(1),I.setUTCHours(0,0,0,0)},function(I,k){I.setUTCMonth(I.getUTCMonth()+k)},function(I,k){return k.getUTCMonth()-I.getUTCMonth()+(k.getUTCFullYear()-I.getUTCFullYear())*12},function(I){return I.getUTCMonth()}),z=M,D=M.range,N=t(53528)},81628:function(G,U,t){t.d(U,{c:function(){return i}});var g=new Date,C=new Date;function i(S,x,v,p){function r(e){return S(e=arguments.length===0?new Date:new Date(+e)),e}return r.floor=function(e){return S(e=new Date(+e)),e},r.ceil=function(e){return S(e=new Date(e-1)),x(e,1),S(e),e},r.round=function(e){var a=r(e),n=r.ceil(e);return e-a0))return f;do f.push(c=new Date(+e)),x(e,n),S(e);while(c=a)for(;S(a),!e(a);)a.setTime(a-1)},function(a,n){if(a>=a)if(n<0)for(;++n<=0;)for(;x(a,-1),!e(a););else for(;--n>=0;)for(;x(a,1),!e(a););})},v&&(r.count=function(e,a){return g.setTime(+e),C.setTime(+a),S(g),S(C),Math.floor(v(g,C))},r.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?r.filter(p?function(a){return p(a)%e===0}:function(a){return r.count(0,a)%e===0}):r}),r}},58931:function(G,U,t){t.d(U,{o:function(){return S}});var g=t(81628),C=t(69792),i=(0,g.c)(function(x){x.setUTCHours(0,0,0,0)},function(x,v){x.setUTCDate(x.getUTCDate()+v)},function(x,v){return(v-x)/C.SK},function(x){return x.getUTCDate()-1});U.c=i;var S=i.range},8208:function(G,U,t){t.d(U,{Ad:function(){return a},EV:function(){return S},K8:function(){return b},W_:function(){return l},Wq:function(){return n},_6:function(){return p},iG:function(){return h},iO:function(){return f},kl:function(){return c},ob:function(){return m},od:function(){return e},ot:function(){return x},sG:function(){return v},yA:function(){return r}});var g=t(81628),C=t(69792);function i(u){return(0,g.c)(function(o){o.setUTCDate(o.getUTCDate()-(o.getUTCDay()+7-u)%7),o.setUTCHours(0,0,0,0)},function(o,d){o.setUTCDate(o.getUTCDate()+d*7)},function(o,d){return(d-o)/C.KK})}var S=i(0),x=i(1),v=i(2),p=i(3),r=i(4),e=i(5),a=i(6),n=S.range,f=x.range,c=v.range,l=p.range,m=r.range,h=e.range,b=a.range},53528:function(G,U,t){t.d(U,{i:function(){return i}});var g=t(81628),C=(0,g.c)(function(S){S.setUTCMonth(0,1),S.setUTCHours(0,0,0,0)},function(S,x){S.setUTCFullYear(S.getUTCFullYear()+x)},function(S,x){return x.getUTCFullYear()-S.getUTCFullYear()},function(S){return S.getUTCFullYear()});C.every=function(S){return!isFinite(S=Math.floor(S))||!(S>0)?null:(0,g.c)(function(x){x.setUTCFullYear(Math.floor(x.getUTCFullYear()/S)*S),x.setUTCMonth(0,1),x.setUTCHours(0,0,0,0)},function(x,v){x.setUTCFullYear(x.getUTCFullYear()+v*S)})},U.c=C;var i=C.range},46192:function(G,U,t){t.d(U,{Ab:function(){return n},Mf:function(){return v},Oc:function(){return c},QP:function(){return f},Wc:function(){return a},aI:function(){return b},eC:function(){return m},eg:function(){return p},iB:function(){return e},kD:function(){return r},qT:function(){return x},sJ:function(){return h},sn:function(){return l},uU:function(){return S}});var g=t(81628),C=t(69792);function i(u){return(0,g.c)(function(o){o.setDate(o.getDate()-(o.getDay()+7-u)%7),o.setHours(0,0,0,0)},function(o,d){o.setDate(o.getDate()+d*7)},function(o,d){return(d-o-(d.getTimezoneOffset()-o.getTimezoneOffset())*C.iy)/C.KK})}var S=i(0),x=i(1),v=i(2),p=i(3),r=i(4),e=i(5),a=i(6),n=S.range,f=x.range,c=v.range,l=p.range,m=r.range,h=e.range,b=a.range},32171:function(G,U,t){t.d(U,{Q:function(){return i}});var g=t(81628),C=(0,g.c)(function(S){S.setMonth(0,1),S.setHours(0,0,0,0)},function(S,x){S.setFullYear(S.getFullYear()+x)},function(S,x){return x.getFullYear()-S.getFullYear()},function(S){return S.getFullYear()});C.every=function(S){return!isFinite(S=Math.floor(S))||!(S>0)?null:(0,g.c)(function(x){x.setFullYear(Math.floor(x.getFullYear()/S)*S),x.setMonth(0,1),x.setHours(0,0,0,0)},function(x,v){x.setFullYear(x.getFullYear()+v*S)})},U.c=C;var i=C.range},64348:function(G,U,t){var g=t(39640)(),C=t(53664),i=g&&C("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch{i=!1}var S=C("%SyntaxError%"),x=C("%TypeError%"),v=t(2304);G.exports=function(r,e,a){if(!r||typeof r!="object"&&typeof r!="function")throw new x("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new x("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new x("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new x("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new x("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new x("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,m=!!v&&v(r,e);if(i)i(r,e,{configurable:c===null&&m?m.configurable:!c,enumerable:n===null&&m?m.enumerable:!n,value:a,writable:f===null&&m?m.writable:!f});else if(l||!n&&!f&&!c)r[e]=a;else throw new S("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}},81288:function(G,U,t){var g=t(41820),C=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",i=Object.prototype.toString,S=Array.prototype.concat,x=Object.defineProperty,v=function(n){return typeof n=="function"&&i.call(n)==="[object Function]"},p=t(39640)(),r=x&&p,e=function(n,f,c,l){if(f in n){if(l===!0){if(n[f]===c)return}else if(!v(l)||!l())return}r?x(n,f,{configurable:!0,enumerable:!1,value:c,writable:!0}):n[f]=c},a=function(n,f){var c=arguments.length>2?arguments[2]:{},l=g(f);C&&(l=S.call(l,Object.getOwnPropertySymbols(f)));for(var m=0;mr*e){var l=(c-f)/r;v[n]=l*1e3}}return v}function i(S){for(var x=[],v=S[0];v<=S[1];v++)for(var p=String.fromCharCode(v),r=S[0];r"u"&&(i=0),typeof C){case"number":if(C>0)return t(C|0,i);break;case"object":if(typeof C.length=="number")return U(C,i,0);break}return[]}G.exports=g},28912:function(G){G.exports=U,G.exports.default=U;function U(D,N,I){I=I||2;var k=N&&N.length,B=k?N[0]*I:D.length,O=t(D,0,B,I,!0),H=[];if(!O||O.next===O.prev)return H;var Y,j,et,it,ut,J,X;if(k&&(O=p(D,N,O,I)),D.length>80*I){Y=et=D[0],j=it=D[1];for(var tt=I;ttet&&(et=ut),J>it&&(it=J);X=Math.max(et-Y,it-j),X=X!==0?1/X:0}return C(O,H,I,Y,j,X),H}function t(D,N,I,k,B){var O,H;if(B===z(D,N,I,k)>0)for(O=N;O=N;O-=k)H=s(O,D[O],D[O+1],H);return H&&o(H,H.next)&&(L(H),H=H.next),H}function g(D,N){if(!D)return D;N||(N=D);var I=D,k;do if(k=!1,!I.steiner&&(o(I,I.next)||u(I.prev,I,I.next)===0)){if(L(I),I=N=I.prev,I===I.next)break;k=!0}else I=I.next;while(k||I!==N);return N}function C(D,N,I,k,B,O,H){if(D){!H&&O&&f(D,k,B,O);for(var Y=D,j,et;D.prev!==D.next;){if(j=D.prev,et=D.next,O?S(D,k,B,O):i(D)){N.push(j.i/I),N.push(D.i/I),N.push(et.i/I),L(D),D=et.next,Y=et.next;continue}if(D=et,D===Y){H?H===1?(D=x(g(D),N,I),C(D,N,I,k,B,O,2)):H===2&&v(D,N,I,k,B,O):C(g(D),N,I,k,B,O,1);break}}}}function i(D){var N=D.prev,I=D,k=D.next;if(u(N,I,k)>=0)return!1;for(var B=D.next.next;B!==D.prev;){if(h(N.x,N.y,I.x,I.y,k.x,k.y,B.x,B.y)&&u(B.prev,B,B.next)>=0)return!1;B=B.next}return!0}function S(D,N,I,k){var B=D.prev,O=D,H=D.next;if(u(B,O,H)>=0)return!1;for(var Y=B.xO.x?B.x>H.x?B.x:H.x:O.x>H.x?O.x:H.x,it=B.y>O.y?B.y>H.y?B.y:H.y:O.y>H.y?O.y:H.y,ut=l(Y,j,N,I,k),J=l(et,it,N,I,k),X=D.prevZ,tt=D.nextZ;X&&X.z>=ut&&tt&&tt.z<=J;){if(X!==D.prev&&X!==D.next&&h(B.x,B.y,O.x,O.y,H.x,H.y,X.x,X.y)&&u(X.prev,X,X.next)>=0||(X=X.prevZ,tt!==D.prev&&tt!==D.next&&h(B.x,B.y,O.x,O.y,H.x,H.y,tt.x,tt.y)&&u(tt.prev,tt,tt.next)>=0))return!1;tt=tt.nextZ}for(;X&&X.z>=ut;){if(X!==D.prev&&X!==D.next&&h(B.x,B.y,O.x,O.y,H.x,H.y,X.x,X.y)&&u(X.prev,X,X.next)>=0)return!1;X=X.prevZ}for(;tt&&tt.z<=J;){if(tt!==D.prev&&tt!==D.next&&h(B.x,B.y,O.x,O.y,H.x,H.y,tt.x,tt.y)&&u(tt.prev,tt,tt.next)>=0)return!1;tt=tt.nextZ}return!0}function x(D,N,I){var k=D;do{var B=k.prev,O=k.next.next;!o(B,O)&&d(B,k,k.next,O)&&y(B,O)&&y(O,B)&&(N.push(B.i/I),N.push(k.i/I),N.push(O.i/I),L(k),L(k.next),k=D=O),k=k.next}while(k!==D);return g(k)}function v(D,N,I,k,B,O){var H=D;do{for(var Y=H.next.next;Y!==H.prev;){if(H.i!==Y.i&&b(H,Y)){var j=T(H,Y);H=g(H,H.next),j=g(j,j.next),C(H,N,I,k,B,O),C(j,N,I,k,B,O);return}Y=Y.next}H=H.next}while(H!==D)}function p(D,N,I,k){var B=[],O,H,Y,j,et;for(O=0,H=N.length;O=I.next.y&&I.next.y!==I.y){var Y=I.x+(B-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Y<=k&&Y>O){if(O=Y,Y===k){if(B===I.y)return I;if(B===I.next.y)return I.next}H=I.x=I.x&&I.x>=et&&k!==I.x&&h(BH.x||I.x===H.x&&n(H,I)))&&(H=I,ut=J)),I=I.next;while(I!==j);return H}function n(D,N){return u(D.prev,D,N.prev)<0&&u(N.next,D,D.next)<0}function f(D,N,I,k){var B=D;do B.z===null&&(B.z=l(B.x,B.y,N,I,k)),B.prevZ=B.prev,B.nextZ=B.next,B=B.next;while(B!==D);B.prevZ.nextZ=null,B.prevZ=null,c(B)}function c(D){var N,I,k,B,O,H,Y,j,et=1;do{for(I=D,D=null,O=null,H=0;I;){for(H++,k=I,Y=0,N=0;N0||j>0&&k;)Y!==0&&(j===0||!k||I.z<=k.z)?(B=I,I=I.nextZ,Y--):(B=k,k=k.nextZ,j--),O?O.nextZ=B:D=B,B.prevZ=O,O=B;I=k}O.nextZ=null,et*=2}while(H>1);return D}function l(D,N,I,k,B){return D=32767*(D-I)*B,N=32767*(N-k)*B,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,N=(N|N<<8)&16711935,N=(N|N<<4)&252645135,N=(N|N<<2)&858993459,N=(N|N<<1)&1431655765,D|N<<1}function m(D){var N=D,I=D;do(N.x=0&&(D-H)*(k-Y)-(I-H)*(N-Y)>=0&&(I-H)*(O-Y)-(B-H)*(k-Y)>=0}function b(D,N){return D.next.i!==N.i&&D.prev.i!==N.i&&!_(D,N)&&(y(D,N)&&y(N,D)&&E(D,N)&&(u(D.prev,D,N.prev)||u(D,N.prev,N))||o(D,N)&&u(D.prev,D,D.next)>0&&u(N.prev,N,N.next)>0)}function u(D,N,I){return(N.y-D.y)*(I.x-N.x)-(N.x-D.x)*(I.y-N.y)}function o(D,N){return D.x===N.x&&D.y===N.y}function d(D,N,I,k){var B=A(u(D,N,I)),O=A(u(D,N,k)),H=A(u(I,k,D)),Y=A(u(I,k,N));return!!(B!==O&&H!==Y||B===0&&w(D,I,N)||O===0&&w(D,k,N)||H===0&&w(I,D,k)||Y===0&&w(I,N,k))}function w(D,N,I){return N.x<=Math.max(D.x,I.x)&&N.x>=Math.min(D.x,I.x)&&N.y<=Math.max(D.y,I.y)&&N.y>=Math.min(D.y,I.y)}function A(D){return D>0?1:D<0?-1:0}function _(D,N){var I=D;do{if(I.i!==D.i&&I.next.i!==D.i&&I.i!==N.i&&I.next.i!==N.i&&d(I,I.next,D,N))return!0;I=I.next}while(I!==D);return!1}function y(D,N){return u(D.prev,D,D.next)<0?u(D,N,D.next)>=0&&u(D,D.prev,N)>=0:u(D,N,D.prev)<0||u(D,D.next,N)<0}function E(D,N){var I=D,k=!1,B=(D.x+N.x)/2,O=(D.y+N.y)/2;do I.y>O!=I.next.y>O&&I.next.y!==I.y&&B<(I.next.x-I.x)*(O-I.y)/(I.next.y-I.y)+I.x&&(k=!k),I=I.next;while(I!==D);return k}function T(D,N){var I=new M(D.i,D.x,D.y),k=new M(N.i,N.x,N.y),B=D.next,O=N.prev;return D.next=N,N.prev=D,I.next=B,B.prev=I,k.next=I,I.prev=k,O.next=k,k.prev=O,k}function s(D,N,I,k){var B=new M(D,N,I);return k?(B.next=k.next,B.prev=k,k.next.prev=B,k.next=B):(B.prev=B,B.next=B),B}function L(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function M(D,N,I){this.i=D,this.x=N,this.y=I,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}U.deviation=function(D,N,I,k){var B=N&&N.length,O=B?N[0]*I:D.length,H=Math.abs(z(D,0,O,I));if(B)for(var Y=0,j=N.length;Y0&&(k+=D[B-1].length,I.holes.push(k))}return I}},6688:function(G,U,t){var g=t(78484);G.exports=function(i,S){var x=[],v=[],p=[],r={},e=[],a;function n(w){p[w]=!1,r.hasOwnProperty(w)&&Object.keys(r[w]).forEach(function(A){delete r[w][A],p[A]&&n(A)})}function f(w){var A=!1;v.push(w),p[w]=!0;var _,y;for(_=0;_=w})}function m(w){l(w);for(var A=i,_=g(A),y=_.components.filter(function(D){return D.length>1}),E=1/0,T,s=0;s=55296&&w<=56319&&(E+=c[++b])),E=l?a.call(l,m,E,u):E,h?(n.value=E,f(o,u,n)):o[u]=E,++u;d=u}}if(d===void 0)for(d=S(c.length),h&&(o=new h(d)),b=0;b0?1:-1}},96936:function(G,U,t){var g=t(85608),C=Math.abs,i=Math.floor;G.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:g(S)*i(C(S)))}},81304:function(G,U,t){var g=t(96936),C=Math.max;G.exports=function(i){return C(0,g(i))}},14428:function(G,U,t){var g=t(34044),C=t(9252),i=Function.prototype.bind,S=Function.prototype.call,x=Object.keys,v=Object.prototype.propertyIsEnumerable;G.exports=function(p,r){return function(e,a){var n,f=arguments[2],c=arguments[3];return e=Object(C(e)),g(a),n=x(e),c&&n.sort(typeof c=="function"?i.call(c,e):void 0),typeof p!="function"&&(p=n[p]),S.call(p,n,function(l,m){return v.call(e,l)?S.call(a,f,e[l],l,e,m):r})}}},38452:function(G,U,t){G.exports=t(96276)()?Object.assign:t(81892)},96276:function(G){G.exports=function(){var U=Object.assign,t;return typeof U!="function"?!1:(t={foo:"raz"},U(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},81892:function(G,U,t){var g=t(54768),C=t(9252),i=Math.max;G.exports=function(S,x){var v,p,r=i(arguments.length,2),e;for(S=Object(C(S)),e=function(a){try{S[a]=x[a]}catch(n){v||(v=n)}},p=1;p-1}},29768:function(G){var U=Object.prototype.toString,t=U.call("");G.exports=function(g){return typeof g=="string"||g&&typeof g=="object"&&(g instanceof String||U.call(g)===t)||!1}},82252:function(G){var U=Object.create(null),t=Math.random;G.exports=function(){var g;do g=t().toString(36).slice(2);while(U[g]);return g}},52104:function(G,U,t){var g=t(69932),C=t(71056),i=t(21092),S=t(92664),x=t(85512),v=Object.defineProperty,p;p=G.exports=function(r,e){if(!(this instanceof p))throw new TypeError("Constructor requires 'new'");x.call(this,r),e?C.call(e,"key+value")?e="key+value":C.call(e,"key")?e="key":e="value":e="value",v(this,"__kind__",i("",e))},g&&g(p,x),delete p.prototype.constructor,p.prototype=Object.create(x.prototype,{_resolve:i(function(r){return this.__kind__==="value"?this.__list__[r]:this.__kind__==="key+value"?[r,this.__list__[r]]:r})}),v(p.prototype,S.toStringTag,i("c","Array Iterator"))},76024:function(G,U,t){var g=t(60948),C=t(34044),i=t(29768),S=t(76252),x=Array.isArray,v=Function.prototype.call,p=Array.prototype.some;G.exports=function(r,e){var a,n=arguments[2],f,c,l,m,h,b,u;if(x(r)||g(r)?a="array":i(r)?a="string":r=S(r),C(e),c=function(){l=!0},a==="array"){p.call(r,function(o){return v.call(e,n,o,c),l});return}if(a==="string"){for(h=r.length,m=0;m=55296&&u<=56319&&(b+=r[++m])),v.call(e,n,b,c),!l);++m);return}for(f=r.next();!f.done;){if(v.call(e,n,f.value,c),l)return;f=r.next()}}},76252:function(G,U,t){var g=t(60948),C=t(29768),i=t(52104),S=t(80940),x=t(52891),v=t(92664).iterator;G.exports=function(p){return typeof x(p)[v]=="function"?p[v]():g(p)?new i(p):C(p)?new S(p):new i(p)}},85512:function(G,U,t){var g=t(41476),C=t(38452),i=t(34044),S=t(9252),x=t(21092),v=t(27940),p=t(92664),r=Object.defineProperty,e=Object.defineProperties,a;G.exports=a=function(n,f){if(!(this instanceof a))throw new TypeError("Constructor requires 'new'");e(this,{__list__:x("w",S(n)),__context__:x("w",f),__nextIndex__:x("w",0)}),f&&(i(f.on),f.on("_add",this._onAdd),f.on("_delete",this._onDelete),f.on("_clear",this._onClear))},delete a.prototype.constructor,e(a.prototype,C({_next:x(function(){var n;if(this.__list__){if(this.__redo__&&(n=this.__redo__.shift(),n!==void 0))return n;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){r(this,"__redo__",x("c",[n]));return}this.__redo__.forEach(function(f,c){f>=n&&(this.__redo__[c]=++f)},this),this.__redo__.push(n)}}),_onDelete:x(function(n){var f;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(f=this.__redo__.indexOf(n),f!==-1&&this.__redo__.splice(f,1),this.__redo__.forEach(function(c,l){c>n&&(this.__redo__[l]=--c)},this)))}),_onClear:x(function(){this.__redo__&&g.call(this.__redo__),this.__nextIndex__=0})}))),r(a.prototype,p.iterator,x(function(){return this}))},76368:function(G,U,t){var g=t(60948),C=t(42584),i=t(29768),S=t(92664).iterator,x=Array.isArray;G.exports=function(v){return C(v)?x(v)||i(v)||g(v)?!0:typeof v[S]=="function":!1}},80940:function(G,U,t){var g=t(69932),C=t(21092),i=t(92664),S=t(85512),x=Object.defineProperty,v;v=G.exports=function(p){if(!(this instanceof v))throw new TypeError("Constructor requires 'new'");p=String(p),S.call(this,p),x(this,"__length__",C("",p.length))},g&&g(v,S),delete v.prototype.constructor,v.prototype=Object.create(S.prototype,{_next:C(function(){if(this.__list__){if(this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r)})}),x(v.prototype,i.toStringTag,C("c","String Iterator"))},52891:function(G,U,t){var g=t(76368);G.exports=function(C){if(!g(C))throw new TypeError(C+" is not iterable");return C}},60964:function(G){function U(g,C){if(g==null)throw new TypeError("Cannot convert first argument to object");for(var i=Object(g),S=1;S0&&(E=w[0]),E instanceof Error)throw E;var T=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw T.context=E,T}var s=y[d];if(s===void 0)return!1;if(typeof s=="function")t(s,this,w);else for(var L=s.length,M=c(s,L),A=0;A0&&E.length>_&&!E.warned){E.warned=!0;var T=new Error("Possible EventEmitter memory leak detected. "+E.length+" "+String(d)+" listeners added. Use emitter.setMaxListeners() to increase limit");T.name="MaxListenersExceededWarning",T.emitter=o,T.type=d,T.count=E.length,C(T)}return o}S.prototype.addListener=function(d,w){return r(this,d,w,!1)},S.prototype.on=S.prototype.addListener,S.prototype.prependListener=function(d,w){return r(this,d,w,!0)};function e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function a(o,d,w){var A={fired:!1,wrapFn:void 0,target:o,type:d,listener:w},_=e.bind(A);return _.listener=w,A.wrapFn=_,_}S.prototype.once=function(d,w){return v(w),this.on(d,a(this,d,w)),this},S.prototype.prependOnceListener=function(d,w){return v(w),this.prependListener(d,a(this,d,w)),this},S.prototype.removeListener=function(d,w){var A,_,y,E,T;if(v(w),_=this._events,_===void 0)return this;if(A=_[d],A===void 0)return this;if(A===w||A.listener===w)--this._eventsCount===0?this._events=Object.create(null):(delete _[d],_.removeListener&&this.emit("removeListener",d,A.listener||w));else if(typeof A!="function"){for(y=-1,E=A.length-1;E>=0;E--)if(A[E]===w||A[E].listener===w){T=A[E].listener,y=E;break}if(y<0)return this;y===0?A.shift():l(A,y),A.length===1&&(_[d]=A[0]),_.removeListener!==void 0&&this.emit("removeListener",d,T||w)}return this},S.prototype.off=S.prototype.removeListener,S.prototype.removeAllListeners=function(d){var w,A,_;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[d]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[d]),this;if(arguments.length===0){var y=Object.keys(A),E;for(_=0;_=0;_--)this.removeListener(d,w[_]);return this};function n(o,d,w){var A=o._events;if(A===void 0)return[];var _=A[d];return _===void 0?[]:typeof _=="function"?w?[_.listener||_]:[_]:w?m(_):c(_,_.length)}S.prototype.listeners=function(d){return n(this,d,!0)},S.prototype.rawListeners=function(d){return n(this,d,!1)},S.listenerCount=function(o,d){return typeof o.listenerCount=="function"?o.listenerCount(d):f.call(o,d)},S.prototype.listenerCount=f;function f(o){var d=this._events;if(d!==void 0){var w=d[o];if(typeof w=="function")return 1;if(w!==void 0)return w.length}return 0}S.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]};function c(o,d){for(var w=new Array(d),A=0;Ax[0]-r[0]/2&&(l=r[0]/2,m+=r[1]);return v}},71920:function(G){G.exports=U,U.canvas=document.createElement("canvas"),U.cache={};function U(e,S){S||(S={}),(typeof e=="string"||Array.isArray(e))&&(S.family=e);var x=Array.isArray(S.family)?S.family.join(", "):S.family;if(!x)throw Error("`family` must be defined");var v=S.size||S.fontSize||S.em||48,p=S.weight||S.fontWeight||"",r=S.style||S.fontStyle||"",e=[r,p,v].join(" ")+"px "+x,a=S.origin||"top";if(U.cache[x]&&v<=U.cache[x].em)return t(U.cache[x],a);var n=S.canvas||U.canvas,f=n.getContext("2d"),c={upper:S.upper!==void 0?S.upper:"H",lower:S.lower!==void 0?S.lower:"x",descent:S.descent!==void 0?S.descent:"p",ascent:S.ascent!==void 0?S.ascent:"h",tittle:S.tittle!==void 0?S.tittle:"i",overshoot:S.overshoot!==void 0?S.overshoot:"O"},l=Math.ceil(v*1.5);n.height=l,n.width=l*.5,f.font=e;var m="H",h={top:0};f.clearRect(0,0,l,l),f.textBaseline="top",f.fillStyle="black",f.fillText(m,0,0);var b=g(f.getImageData(0,0,l,l));f.clearRect(0,0,l,l),f.textBaseline="bottom",f.fillText(m,0,l);var u=g(f.getImageData(0,0,l,l));h.lineHeight=h.bottom=l-u+b,f.clearRect(0,0,l,l),f.textBaseline="alphabetic",f.fillText(m,0,l);var o=g(f.getImageData(0,0,l,l)),d=l-o-1+b;h.baseline=h.alphabetic=d,f.clearRect(0,0,l,l),f.textBaseline="middle",f.fillText(m,0,l*.5);var w=g(f.getImageData(0,0,l,l));h.median=h.middle=l-w-1+b-l*.5,f.clearRect(0,0,l,l),f.textBaseline="hanging",f.fillText(m,0,l*.5);var A=g(f.getImageData(0,0,l,l));h.hanging=l-A-1+b-l*.5,f.clearRect(0,0,l,l),f.textBaseline="ideographic",f.fillText(m,0,l);var _=g(f.getImageData(0,0,l,l));if(h.ideographic=l-_-1+b,c.upper&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.upper,0,0),h.upper=g(f.getImageData(0,0,l,l)),h.capHeight=h.baseline-h.upper),c.lower&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.lower,0,0),h.lower=g(f.getImageData(0,0,l,l)),h.xHeight=h.baseline-h.lower),c.tittle&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.tittle,0,0),h.tittle=g(f.getImageData(0,0,l,l))),c.ascent&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.ascent,0,0),h.ascent=g(f.getImageData(0,0,l,l))),c.descent&&(f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.descent,0,0),h.descent=C(f.getImageData(0,0,l,l))),c.overshoot){f.clearRect(0,0,l,l),f.textBaseline="top",f.fillText(c.overshoot,0,0);var y=C(f.getImageData(0,0,l,l));h.overshoot=y-d}for(var E in h)h[E]/=v;return h.em=v,U.cache[x]=h,t(h,a)}function t(i,S){var x={};typeof S=="string"&&(S=i[S]);for(var v in i)v!=="em"&&(x[v]=i[v]-S);return x}function g(i){for(var S=i.height,x=i.data,v=3;v0;v-=4)if(x[v]!==0)return Math.floor((v-3)*.25/S)}},46492:function(G,U,t){var g=t(90720),C=Object.prototype.toString,i=Object.prototype.hasOwnProperty,S=function(e,a,n){for(var f=0,c=e.length;f=3&&(f=n),C.call(e)==="[object Array]"?S(e,a,f):typeof e=="string"?x(e,a,f):v(e,a,f)};G.exports=p},74336:function(G){var U="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,g=Math.max,C="[object Function]",i=function(p,r){for(var e=[],a=0;a"u"&&!g.canvas)return null;var C=g.canvas||document.createElement("canvas");typeof g.width=="number"&&(C.width=g.width),typeof g.height=="number"&&(C.height=g.height);var i=g,S;try{var x=[t];t.indexOf("webgl")===0&&x.push("experimental-"+t);for(var v=0;v"u"||!n?g:n(Uint8Array),l={"%AggregateError%":typeof AggregateError>"u"?g:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?g:ArrayBuffer,"%ArrayIteratorPrototype%":e&&n?n([][Symbol.iterator]()):g,"%AsyncFromSyncIteratorPrototype%":g,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":typeof Atomics>"u"?g:Atomics,"%BigInt%":typeof BigInt>"u"?g:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?g:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?g:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?g:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?g:Float32Array,"%Float64Array%":typeof Float64Array>"u"?g:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?g:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":typeof Int8Array>"u"?g:Int8Array,"%Int16Array%":typeof Int16Array>"u"?g:Int16Array,"%Int32Array%":typeof Int32Array>"u"?g:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":e&&n?n(n([][Symbol.iterator]())):g,"%JSON%":typeof JSON=="object"?JSON:g,"%Map%":typeof Map>"u"?g:Map,"%MapIteratorPrototype%":typeof Map>"u"||!e||!n?g:n(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?g:Promise,"%Proxy%":typeof Proxy>"u"?g:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?g:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?g:Set,"%SetIteratorPrototype%":typeof Set>"u"||!e||!n?g:n(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?g:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":e&&n?n(""[Symbol.iterator]()):g,"%Symbol%":e?Symbol:g,"%SyntaxError%":C,"%ThrowTypeError%":r,"%TypedArray%":c,"%TypeError%":S,"%Uint8Array%":typeof Uint8Array>"u"?g:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?g:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?g:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?g:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?g:WeakMap,"%WeakRef%":typeof WeakRef>"u"?g:WeakRef,"%WeakSet%":typeof WeakSet>"u"?g:WeakSet};if(n)try{null.error}catch(M){var m=n(n(M));l["%Error.prototype%"]=m}var h=function M(z){var D;if(z==="%AsyncFunction%")D=x("async function () {}");else if(z==="%GeneratorFunction%")D=x("function* () {}");else if(z==="%AsyncGeneratorFunction%")D=x("async function* () {}");else if(z==="%AsyncGenerator%"){var N=M("%AsyncGeneratorFunction%");N&&(D=N.prototype)}else if(z==="%AsyncIteratorPrototype%"){var I=M("%AsyncGenerator%");I&&n&&(D=n(I.prototype))}return l[z]=D,D},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},u=t(8844),o=t(92064),d=u.call(Function.call,Array.prototype.concat),w=u.call(Function.apply,Array.prototype.splice),A=u.call(Function.call,String.prototype.replace),_=u.call(Function.call,String.prototype.slice),y=u.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,s=function(z){var D=_(z,0,1),N=_(z,-1);if(D==="%"&&N!=="%")throw new C("invalid intrinsic syntax, expected closing `%`");if(N==="%"&&D!=="%")throw new C("invalid intrinsic syntax, expected opening `%`");var I=[];return A(z,E,function(k,B,O,H){I[I.length]=O?A(H,T,"$1"):B||k}),I},L=function(z,D){var N=z,I;if(o(b,N)&&(I=b[N],N="%"+I[0]+"%"),o(l,N)){var k=l[N];if(k===f&&(k=h(N)),typeof k>"u"&&!D)throw new S("intrinsic "+z+" exists, but is not available. Please file an issue!");return{alias:I,name:N,value:k}}throw new C("intrinsic "+z+" does not exist!")};G.exports=function(z,D){if(typeof z!="string"||z.length===0)throw new S("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof D!="boolean")throw new S('"allowMissing" argument must be a boolean');if(y(/^%?[^%]*%?$/,z)===null)throw new C("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var N=s(z),I=N.length>0?N[0]:"",k=L("%"+I+"%",D),B=k.name,O=k.value,H=!1,Y=k.alias;Y&&(I=Y[0],w(N,d([0,1],Y)));for(var j=1,et=!0;j=N.length){var X=v(O,it);et=!!X,et&&"get"in X&&!("originalValue"in X.get)?O=X.get:O=O[it]}else et=o(O,it),O=O[it];et&&!H&&(l[B]=O)}}return O}},12408:function(G){G.exports=U;function U(t,g){var C=g[0],i=g[1],S=g[2],x=g[3],v=g[4],p=g[5],r=g[6],e=g[7],a=g[8],n=g[9],f=g[10],c=g[11],l=g[12],m=g[13],h=g[14],b=g[15];return t[0]=p*(f*b-c*h)-n*(r*b-e*h)+m*(r*c-e*f),t[1]=-(i*(f*b-c*h)-n*(S*b-x*h)+m*(S*c-x*f)),t[2]=i*(r*b-e*h)-p*(S*b-x*h)+m*(S*e-x*r),t[3]=-(i*(r*c-e*f)-p*(S*c-x*f)+n*(S*e-x*r)),t[4]=-(v*(f*b-c*h)-a*(r*b-e*h)+l*(r*c-e*f)),t[5]=C*(f*b-c*h)-a*(S*b-x*h)+l*(S*c-x*f),t[6]=-(C*(r*b-e*h)-v*(S*b-x*h)+l*(S*e-x*r)),t[7]=C*(r*c-e*f)-v*(S*c-x*f)+a*(S*e-x*r),t[8]=v*(n*b-c*m)-a*(p*b-e*m)+l*(p*c-e*n),t[9]=-(C*(n*b-c*m)-a*(i*b-x*m)+l*(i*c-x*n)),t[10]=C*(p*b-e*m)-v*(i*b-x*m)+l*(i*e-x*p),t[11]=-(C*(p*c-e*n)-v*(i*c-x*n)+a*(i*e-x*p)),t[12]=-(v*(n*h-f*m)-a*(p*h-r*m)+l*(p*f-r*n)),t[13]=C*(n*h-f*m)-a*(i*h-S*m)+l*(i*f-S*n),t[14]=-(C*(p*h-r*m)-v*(i*h-S*m)+l*(i*r-S*p)),t[15]=C*(p*f-r*n)-v*(i*f-S*n)+a*(i*r-S*p),t}},76860:function(G){G.exports=U;function U(t){var g=new Float32Array(16);return g[0]=t[0],g[1]=t[1],g[2]=t[2],g[3]=t[3],g[4]=t[4],g[5]=t[5],g[6]=t[6],g[7]=t[7],g[8]=t[8],g[9]=t[9],g[10]=t[10],g[11]=t[11],g[12]=t[12],g[13]=t[13],g[14]=t[14],g[15]=t[15],g}},64492:function(G){G.exports=U;function U(t,g){return t[0]=g[0],t[1]=g[1],t[2]=g[2],t[3]=g[3],t[4]=g[4],t[5]=g[5],t[6]=g[6],t[7]=g[7],t[8]=g[8],t[9]=g[9],t[10]=g[10],t[11]=g[11],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15],t}},54212:function(G){G.exports=U;function U(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},70800:function(G){G.exports=U;function U(t){var g=t[0],C=t[1],i=t[2],S=t[3],x=t[4],v=t[5],p=t[6],r=t[7],e=t[8],a=t[9],n=t[10],f=t[11],c=t[12],l=t[13],m=t[14],h=t[15],b=g*v-C*x,u=g*p-i*x,o=g*r-S*x,d=C*p-i*v,w=C*r-S*v,A=i*r-S*p,_=e*l-a*c,y=e*m-n*c,E=e*h-f*c,T=a*m-n*l,s=a*h-f*l,L=n*h-f*m;return b*L-u*s+o*T+d*E-w*y+A*_}},61784:function(G){G.exports=U;function U(t,g){var C=g[0],i=g[1],S=g[2],x=g[3],v=C+C,p=i+i,r=S+S,e=C*v,a=i*v,n=i*p,f=S*v,c=S*p,l=S*r,m=x*v,h=x*p,b=x*r;return t[0]=1-n-l,t[1]=a+b,t[2]=f-h,t[3]=0,t[4]=a-b,t[5]=1-e-l,t[6]=c+m,t[7]=0,t[8]=f+h,t[9]=c-m,t[10]=1-e-n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},91616:function(G){G.exports=U;function U(t,g,C){var i,S,x,v=C[0],p=C[1],r=C[2],e=Math.sqrt(v*v+p*p+r*r);return Math.abs(e)<1e-6?null:(e=1/e,v*=e,p*=e,r*=e,i=Math.sin(g),S=Math.cos(g),x=1-S,t[0]=v*v*x+S,t[1]=p*v*x+r*i,t[2]=r*v*x-p*i,t[3]=0,t[4]=v*p*x-r*i,t[5]=p*p*x+S,t[6]=r*p*x+v*i,t[7]=0,t[8]=v*r*x+p*i,t[9]=p*r*x-v*i,t[10]=r*r*x+S,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},51944:function(G){G.exports=U;function U(t,g,C){var i=g[0],S=g[1],x=g[2],v=g[3],p=i+i,r=S+S,e=x+x,a=i*p,n=i*r,f=i*e,c=S*r,l=S*e,m=x*e,h=v*p,b=v*r,u=v*e;return t[0]=1-(c+m),t[1]=n+u,t[2]=f-b,t[3]=0,t[4]=n-u,t[5]=1-(a+m),t[6]=l+h,t[7]=0,t[8]=f+b,t[9]=l-h,t[10]=1-(a+c),t[11]=0,t[12]=C[0],t[13]=C[1],t[14]=C[2],t[15]=1,t}},69444:function(G){G.exports=U;function U(t,g){return t[0]=g[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=g[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=g[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},48268:function(G){G.exports=U;function U(t,g){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=g[0],t[13]=g[1],t[14]=g[2],t[15]=1,t}},21856:function(G){G.exports=U;function U(t,g){var C=Math.sin(g),i=Math.cos(g);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=C,t[7]=0,t[8]=0,t[9]=-C,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},79216:function(G){G.exports=U;function U(t,g){var C=Math.sin(g),i=Math.cos(g);return t[0]=i,t[1]=0,t[2]=-C,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=C,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},57736:function(G){G.exports=U;function U(t,g){var C=Math.sin(g),i=Math.cos(g);return t[0]=i,t[1]=C,t[2]=0,t[3]=0,t[4]=-C,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},38848:function(G){G.exports=U;function U(t,g,C,i,S,x,v){var p=1/(C-g),r=1/(S-i),e=1/(x-v);return t[0]=x*2*p,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=x*2*r,t[6]=0,t[7]=0,t[8]=(C+g)*p,t[9]=(S+i)*r,t[10]=(v+x)*e,t[11]=-1,t[12]=0,t[13]=0,t[14]=v*x*2*e,t[15]=0,t}},36635:function(G){G.exports=U;function U(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},36524:function(G,U,t){G.exports={create:t(54212),clone:t(76860),copy:t(64492),identity:t(36635),transpose:t(86520),invert:t(4308),adjoint:t(12408),determinant:t(70800),multiply:t(80944),translate:t(35176),scale:t(68152),rotate:t(30016),rotateX:t(15456),rotateY:t(64840),rotateZ:t(4192),fromRotation:t(91616),fromRotationTranslation:t(51944),fromScaling:t(69444),fromTranslation:t(48268),fromXRotation:t(21856),fromYRotation:t(79216),fromZRotation:t(57736),fromQuat:t(61784),frustum:t(38848),perspective:t(51296),perspectiveFromFieldOfView:t(63688),ortho:t(97688),lookAt:t(56508),str:t(89412)}},4308:function(G){G.exports=U;function U(t,g){var C=g[0],i=g[1],S=g[2],x=g[3],v=g[4],p=g[5],r=g[6],e=g[7],a=g[8],n=g[9],f=g[10],c=g[11],l=g[12],m=g[13],h=g[14],b=g[15],u=C*p-i*v,o=C*r-S*v,d=C*e-x*v,w=i*r-S*p,A=i*e-x*p,_=S*e-x*r,y=a*m-n*l,E=a*h-f*l,T=a*b-c*l,s=n*h-f*m,L=n*b-c*m,M=f*b-c*h,z=u*M-o*L+d*s+w*T-A*E+_*y;return z?(z=1/z,t[0]=(p*M-r*L+e*s)*z,t[1]=(S*L-i*M-x*s)*z,t[2]=(m*_-h*A+b*w)*z,t[3]=(f*A-n*_-c*w)*z,t[4]=(r*T-v*M-e*E)*z,t[5]=(C*M-S*T+x*E)*z,t[6]=(h*d-l*_-b*o)*z,t[7]=(a*_-f*d+c*o)*z,t[8]=(v*L-p*T+e*y)*z,t[9]=(i*T-C*L-x*y)*z,t[10]=(l*A-m*d+b*u)*z,t[11]=(n*d-a*A-c*u)*z,t[12]=(p*E-v*s-r*y)*z,t[13]=(C*s-i*E+S*y)*z,t[14]=(m*o-l*w-h*u)*z,t[15]=(a*w-n*o+f*u)*z,t):null}},56508:function(G,U,t){var g=t(36635);G.exports=C;function C(i,S,x,v){var p,r,e,a,n,f,c,l,m,h,b=S[0],u=S[1],o=S[2],d=v[0],w=v[1],A=v[2],_=x[0],y=x[1],E=x[2];return Math.abs(b-_)<1e-6&&Math.abs(u-y)<1e-6&&Math.abs(o-E)<1e-6?g(i):(c=b-_,l=u-y,m=o-E,h=1/Math.sqrt(c*c+l*l+m*m),c*=h,l*=h,m*=h,p=w*m-A*l,r=A*c-d*m,e=d*l-w*c,h=Math.sqrt(p*p+r*r+e*e),h?(h=1/h,p*=h,r*=h,e*=h):(p=0,r=0,e=0),a=l*e-m*r,n=m*p-c*e,f=c*r-l*p,h=Math.sqrt(a*a+n*n+f*f),h?(h=1/h,a*=h,n*=h,f*=h):(a=0,n=0,f=0),i[0]=p,i[1]=a,i[2]=c,i[3]=0,i[4]=r,i[5]=n,i[6]=l,i[7]=0,i[8]=e,i[9]=f,i[10]=m,i[11]=0,i[12]=-(p*b+r*u+e*o),i[13]=-(a*b+n*u+f*o),i[14]=-(c*b+l*u+m*o),i[15]=1,i)}},80944:function(G){G.exports=U;function U(t,g,C){var i=g[0],S=g[1],x=g[2],v=g[3],p=g[4],r=g[5],e=g[6],a=g[7],n=g[8],f=g[9],c=g[10],l=g[11],m=g[12],h=g[13],b=g[14],u=g[15],o=C[0],d=C[1],w=C[2],A=C[3];return t[0]=o*i+d*p+w*n+A*m,t[1]=o*S+d*r+w*f+A*h,t[2]=o*x+d*e+w*c+A*b,t[3]=o*v+d*a+w*l+A*u,o=C[4],d=C[5],w=C[6],A=C[7],t[4]=o*i+d*p+w*n+A*m,t[5]=o*S+d*r+w*f+A*h,t[6]=o*x+d*e+w*c+A*b,t[7]=o*v+d*a+w*l+A*u,o=C[8],d=C[9],w=C[10],A=C[11],t[8]=o*i+d*p+w*n+A*m,t[9]=o*S+d*r+w*f+A*h,t[10]=o*x+d*e+w*c+A*b,t[11]=o*v+d*a+w*l+A*u,o=C[12],d=C[13],w=C[14],A=C[15],t[12]=o*i+d*p+w*n+A*m,t[13]=o*S+d*r+w*f+A*h,t[14]=o*x+d*e+w*c+A*b,t[15]=o*v+d*a+w*l+A*u,t}},97688:function(G){G.exports=U;function U(t,g,C,i,S,x,v){var p=1/(g-C),r=1/(i-S),e=1/(x-v);return t[0]=-2*p,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*e,t[11]=0,t[12]=(g+C)*p,t[13]=(S+i)*r,t[14]=(v+x)*e,t[15]=1,t}},51296:function(G){G.exports=U;function U(t,g,C,i,S){var x=1/Math.tan(g/2),v=1/(i-S);return t[0]=x/C,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=x,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(S+i)*v,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*S*i*v,t[15]=0,t}},63688:function(G){G.exports=U;function U(t,g,C,i){var S=Math.tan(g.upDegrees*Math.PI/180),x=Math.tan(g.downDegrees*Math.PI/180),v=Math.tan(g.leftDegrees*Math.PI/180),p=Math.tan(g.rightDegrees*Math.PI/180),r=2/(v+p),e=2/(S+x);return t[0]=r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=-((v-p)*r*.5),t[9]=(S-x)*e*.5,t[10]=i/(C-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*C/(C-i),t[15]=0,t}},30016:function(G){G.exports=U;function U(t,g,C,i){var S=i[0],x=i[1],v=i[2],p=Math.sqrt(S*S+x*x+v*v),r,e,a,n,f,c,l,m,h,b,u,o,d,w,A,_,y,E,T,s,L,M,z,D;return Math.abs(p)<1e-6?null:(p=1/p,S*=p,x*=p,v*=p,r=Math.sin(C),e=Math.cos(C),a=1-e,n=g[0],f=g[1],c=g[2],l=g[3],m=g[4],h=g[5],b=g[6],u=g[7],o=g[8],d=g[9],w=g[10],A=g[11],_=S*S*a+e,y=x*S*a+v*r,E=v*S*a-x*r,T=S*x*a-v*r,s=x*x*a+e,L=v*x*a+S*r,M=S*v*a+x*r,z=x*v*a-S*r,D=v*v*a+e,t[0]=n*_+m*y+o*E,t[1]=f*_+h*y+d*E,t[2]=c*_+b*y+w*E,t[3]=l*_+u*y+A*E,t[4]=n*T+m*s+o*L,t[5]=f*T+h*s+d*L,t[6]=c*T+b*s+w*L,t[7]=l*T+u*s+A*L,t[8]=n*M+m*z+o*D,t[9]=f*M+h*z+d*D,t[10]=c*M+b*z+w*D,t[11]=l*M+u*z+A*D,g!==t&&(t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t)}},15456:function(G){G.exports=U;function U(t,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[4],v=g[5],p=g[6],r=g[7],e=g[8],a=g[9],n=g[10],f=g[11];return g!==t&&(t[0]=g[0],t[1]=g[1],t[2]=g[2],t[3]=g[3],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t[4]=x*S+e*i,t[5]=v*S+a*i,t[6]=p*S+n*i,t[7]=r*S+f*i,t[8]=e*S-x*i,t[9]=a*S-v*i,t[10]=n*S-p*i,t[11]=f*S-r*i,t}},64840:function(G){G.exports=U;function U(t,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[0],v=g[1],p=g[2],r=g[3],e=g[8],a=g[9],n=g[10],f=g[11];return g!==t&&(t[4]=g[4],t[5]=g[5],t[6]=g[6],t[7]=g[7],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t[0]=x*S-e*i,t[1]=v*S-a*i,t[2]=p*S-n*i,t[3]=r*S-f*i,t[8]=x*i+e*S,t[9]=v*i+a*S,t[10]=p*i+n*S,t[11]=r*i+f*S,t}},4192:function(G){G.exports=U;function U(t,g,C){var i=Math.sin(C),S=Math.cos(C),x=g[0],v=g[1],p=g[2],r=g[3],e=g[4],a=g[5],n=g[6],f=g[7];return g!==t&&(t[8]=g[8],t[9]=g[9],t[10]=g[10],t[11]=g[11],t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15]),t[0]=x*S+e*i,t[1]=v*S+a*i,t[2]=p*S+n*i,t[3]=r*S+f*i,t[4]=e*S-x*i,t[5]=a*S-v*i,t[6]=n*S-p*i,t[7]=f*S-r*i,t}},68152:function(G){G.exports=U;function U(t,g,C){var i=C[0],S=C[1],x=C[2];return t[0]=g[0]*i,t[1]=g[1]*i,t[2]=g[2]*i,t[3]=g[3]*i,t[4]=g[4]*S,t[5]=g[5]*S,t[6]=g[6]*S,t[7]=g[7]*S,t[8]=g[8]*x,t[9]=g[9]*x,t[10]=g[10]*x,t[11]=g[11]*x,t[12]=g[12],t[13]=g[13],t[14]=g[14],t[15]=g[15],t}},89412:function(G){G.exports=U;function U(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},35176:function(G){G.exports=U;function U(t,g,C){var i=C[0],S=C[1],x=C[2],v,p,r,e,a,n,f,c,l,m,h,b;return g===t?(t[12]=g[0]*i+g[4]*S+g[8]*x+g[12],t[13]=g[1]*i+g[5]*S+g[9]*x+g[13],t[14]=g[2]*i+g[6]*S+g[10]*x+g[14],t[15]=g[3]*i+g[7]*S+g[11]*x+g[15]):(v=g[0],p=g[1],r=g[2],e=g[3],a=g[4],n=g[5],f=g[6],c=g[7],l=g[8],m=g[9],h=g[10],b=g[11],t[0]=v,t[1]=p,t[2]=r,t[3]=e,t[4]=a,t[5]=n,t[6]=f,t[7]=c,t[8]=l,t[9]=m,t[10]=h,t[11]=b,t[12]=v*i+a*S+l*x+g[12],t[13]=p*i+n*S+m*x+g[13],t[14]=r*i+f*S+h*x+g[14],t[15]=e*i+c*S+b*x+g[15]),t}},86520:function(G){G.exports=U;function U(t,g){if(t===g){var C=g[1],i=g[2],S=g[3],x=g[6],v=g[7],p=g[11];t[1]=g[4],t[2]=g[8],t[3]=g[12],t[4]=C,t[6]=g[9],t[7]=g[13],t[8]=i,t[9]=x,t[11]=g[14],t[12]=S,t[13]=v,t[14]=p}else t[0]=g[0],t[1]=g[4],t[2]=g[8],t[3]=g[12],t[4]=g[1],t[5]=g[5],t[6]=g[9],t[7]=g[13],t[8]=g[2],t[9]=g[6],t[10]=g[10],t[11]=g[14],t[12]=g[3],t[13]=g[7],t[14]=g[11],t[15]=g[15];return t}},23352:function(G,U,t){var g=t(42771),C=t(55616),i=t(28624),S=t(55212),x=t(60463),v=t(72160),p=t(33888),r=t(14144),e=t(51160),a=t(58908),n=t(65819),f=t(23464),c=t(63768),l=t(50896),m=t(71920),h=t(47520),b=t(308),u=b.nextPow2,o=new x,d=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(d=!0),document.body.removeChild(w)}var A=function(E){_(E)?(E={regl:E},this.gl=E.regl._gl):this.gl=S(E),this.shader=o.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=E.regl||i({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),o.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(a(E)?E:{})};A.prototype.createShader=function(){var E=this.regl,T=E({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:E.prop("count"),offset:E.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:E.this("sizeBuffer")},width:{offset:0,stride:8,buffer:E.this("sizeBuffer")},char:E.this("charBuffer"),position:E.this("position")},uniforms:{atlasSize:function(L,M){return[M.atlas.width,M.atlas.height]},atlasDim:function(L,M){return[M.atlas.cols,M.atlas.rows]},atlas:function(L,M){return M.atlas.texture},charStep:function(L,M){return M.atlas.step},em:function(L,M){return M.atlas.em},color:E.prop("color"),opacity:E.prop("opacity"),viewport:E.this("viewportArray"),scale:E.this("scale"),align:E.prop("align"),baseline:E.prop("baseline"),translate:E.this("translate"),positionOffset:E.prop("positionOffset")},primitive:"points",viewport:E.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -7059,20 +7059,20 @@ should equal // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),s={};return{regl:E,draw:T,atlas:s}},A.prototype.update=function(E){var T=this;if(typeof E=="string")E={text:E};else if(!E)return;E=C(E,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),E.opacity!=null&&(Array.isArray(E.opacity)?this.opacity=E.opacity.map(function(ke){return parseFloat(ke)}):this.opacity=parseFloat(E.opacity)),E.viewport!=null&&(this.viewport=t(E.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),E.kerning!=null&&(this.kerning=E.kerning),E.offset!=null&&(typeof E.offset=="number"&&(E.offset=[E.offset,0]),this.positionOffset=h(E.offset)),E.direction&&(this.direction=E.direction),E.range&&(this.range=E.range,this.scale=[1/(E.range[2]-E.range[0]),1/(E.range[3]-E.range[1])],this.translate=[-E.range[0],-E.range[1]]),E.scale&&(this.scale=E.scale),E.translate&&(this.translate=E.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!E.font&&(E.font=A.baseFontSize+"px sans-serif");var s=!1,L=!1;if(E.font&&(Array.isArray(E.font)?E.font:[E.font]).forEach(function(ke,He){if(typeof ke=="string")try{ke=g.parse(ke)}catch{ke=g.parse(A.baseFontSize+"px "+ke)}else ke=g.parse(g.stringify(ke));var Ie=g.stringify({size:A.baseFontSize,family:ke.family,stretch:d?ke.stretch:void 0,variant:ke.variant,weight:ke.weight,style:ke.style}),rt=n(ke.size),Ke=Math.round(rt[0]*f(rt[1]));if(Ke!==T.fontSize[He]&&(L=!0,T.fontSize[He]=Ke),(!T.font[He]||Ie!=T.font[He].baseString)&&(s=!0,T.font[He]=A.fonts[Ie],!T.font[He])){var $e=ke.family.join(", "),lt=[ke.style];ke.style!=ke.variant&<.push(ke.variant),ke.variant!=ke.weight&<.push(ke.weight),d&&ke.weight!=ke.stretch&<.push(ke.stretch),T.font[He]={baseString:Ie,family:$e,weight:ke.weight,stretch:ke.stretch,style:ke.style,variant:ke.variant,width:{},kerning:{},metrics:m($e,{origin:"top",fontSize:A.baseFontSize,fontStyle:lt.join(" ")})},A.fonts[Ie]=T.font[He]}}),(s||L)&&this.font.forEach(function(ke,He){var Ie=g.stringify({size:T.fontSize[He],family:ke.family,stretch:d?ke.stretch:void 0,variant:ke.variant,weight:ke.weight,style:ke.style});if(T.fontAtlas[He]=T.shader.atlas[Ie],!T.fontAtlas[He]){var rt=ke.metrics;T.shader.atlas[Ie]=T.fontAtlas[He]={fontString:Ie,step:Math.ceil(T.fontSize[He]*rt.bottom*.5)*2,em:T.fontSize[He],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:T.regl.texture()}}E.text==null&&(E.text=T.text)}),typeof E.text=="string"&&E.position&&E.position.length>2){for(var M=Array(E.position.length*.5),z=0;z2){for(var I=!E.position[0].length,k=r.mallocFloat(this.count*2),B=0,O=0;B1?T.align[He]:T.align[0]:T.align;if(typeof Ie=="number")return Ie;switch(Ie){case"right":case"end":return-ke;case"center":case"centre":case"middle":return-ke*.5}return 0})),this.baseline==null&&E.baseline==null&&(E.baseline=0),E.baseline!=null&&(this.baseline=E.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ke,He){var Ie=(T.font[He]||T.font[0]).metrics,rt=0;return rt+=Ie.bottom*.5,typeof ke=="number"?rt+=ke-Ie.baseline:rt+=-Ie[ke],rt*=-1,rt})),E.color!=null)if(E.color||(E.color="transparent"),typeof E.color=="string"||!isNaN(E.color))this.color=v(E.color,"uint8");else{var Te;if(typeof E.color[0]=="number"&&E.color.length>this.counts.length){var we=E.color.length;Te=r.mallocUint8(we);for(var Re=(E.color.subarray||E.color.slice).bind(E.color),be=0;be4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Le){var Ve=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(Ve);for(var Ue=0;Ue1?this.counts[Ue]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ue]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Ue*4,Ue*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ue]:this.opacity,baseline:this.baselineOffset[Ue]!=null?this.baselineOffset[Ue]:this.baselineOffset[0],align:this.align?this.alignOffset[Ue]!=null?this.alignOffset[Ue]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ue]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Ue*2,Ue*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},A.prototype.destroy=function(){},A.prototype.kerning=!0,A.prototype.position={constant:new Float32Array(2)},A.prototype.translate=null,A.prototype.scale=null,A.prototype.font=null,A.prototype.text="",A.prototype.positionOffset=[0,0],A.prototype.opacity=1,A.prototype.color=new Uint8Array([0,0,0,255]),A.prototype.alignOffset=[0,0],A.maxAtlasSize=1024,A.atlasCanvas=document.createElement("canvas"),A.atlasContext=A.atlasCanvas.getContext("2d",{alpha:!1}),A.baseFontSize=64,A.fonts={};function _(y){return typeof y=="function"&&y._gl&&y.prop&&y.texture&&y.buffer}H.exports=A},55212:function(H,U,e){var g=e(55616);H.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},i(r)?r={container:r}:S(r)?r={container:r}:x(r)?r={gl:r}:r=g(r,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),r.pixelRatio||(r.pixelRatio=e.g.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var t=document.querySelector(r.container);if(!t)throw Error("Element "+r.container+" is not found");r.container=t}i(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=v(),r.container.appendChild(r.canvas),C(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=v(),r.container.appendChild(r.canvas),C(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{r.gl=r.canvas.getContext(a,r.attrs)}catch{}return r.gl}),r.gl};function C(p){if(p.container)if(p.container==document.body)document.body.style.width||(p.canvas.width=p.width||p.pixelRatio*e.g.innerWidth),document.body.style.height||(p.canvas.height=p.height||p.pixelRatio*e.g.innerHeight);else{var r=p.container.getBoundingClientRect();p.canvas.width=p.width||r.right-r.left,p.canvas.height=p.height||r.bottom-r.top}}function i(p){return typeof p.getContext=="function"&&"width"in p&&"height"in p}function S(p){return typeof p.nodeName=="string"&&typeof p.appendChild=="function"&&typeof p.getBoundingClientRect=="function"}function x(p){return typeof p.drawArrays=="function"||typeof p.drawElements=="function"}function v(){var p=document.createElement("canvas");return p.style.position="absolute",p.style.top=0,p.style.left=0,p}},26444:function(H){H.exports=function(U){typeof U=="string"&&(U=[U]);for(var e=[].slice.call(arguments,1),g=[],C=0;C */U.read=function(e,g,C,i,S){var x,v,p=S*8-i-1,r=(1<>1,a=-7,n=C?S-1:0,f=C?-1:1,c=e[g+n];for(n+=f,x=c&(1<<-a)-1,c>>=-a,a+=p;a>0;x=x*256+e[g+n],n+=f,a-=8);for(v=x&(1<<-a)-1,x>>=-a,a+=i;a>0;v=v*256+e[g+n],n+=f,a-=8);if(x===0)x=1-t;else{if(x===r)return v?NaN:(c?-1:1)*(1/0);v=v+Math.pow(2,i),x=x-t}return(c?-1:1)*v*Math.pow(2,x-i)},U.write=function(e,g,C,i,S,x){var v,p,r,t=x*8-S-1,a=(1<>1,f=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=i?0:x-1,l=i?1:-1,m=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(p=isNaN(g)?1:0,v=a):(v=Math.floor(Math.log(g)/Math.LN2),g*(r=Math.pow(2,-v))<1&&(v--,r*=2),v+n>=1?g+=f/r:g+=f*Math.pow(2,1-n),g*r>=2&&(v++,r/=2),v+n>=a?(p=0,v=a):v+n>=1?(p=(g*r-1)*Math.pow(2,S),v=v+n):(p=g*Math.pow(2,n-1)*Math.pow(2,S),v=0));S>=8;e[C+c]=p&255,c+=l,p/=256,S-=8);for(v=v<0;e[C+c]=v&255,c+=l,v/=256,t-=8);e[C+c-l]|=m*128}},6768:function(H){typeof Object.create=="function"?H.exports=function(e,g){g&&(e.super_=g,e.prototype=Object.create(g.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:H.exports=function(e,g){if(g){e.super_=g;var C=function(){};C.prototype=g.prototype,e.prototype=new C,e.prototype.constructor=e}}},91148:function(H,U,e){var g=e(46672)(),C=e(99676),i=C("Object.prototype.toString"),S=function(r){return g&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:i(r)==="[object Arguments]"},x=function(r){return S(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&i(r)!=="[object Array]"&&i(r.callee)==="[object Function]"},v=function(){return S(arguments)}();S.isLegacyArguments=x,H.exports=v?S:x},24200:function(H){H.exports=!0},90720:function(H){var U=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,g,C;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{g=Object.defineProperty({},"length",{get:function(){throw C}}),C={},e(function(){throw 42},null,g)}catch(b){b!==C&&(e=null)}else e=null;var i=/^\s*class\b/,S=function(u){try{var o=U.call(u);return i.test(o)}catch{return!1}},x=function(u){try{return S(u)?!1:(U.call(u),!0)}catch{return!1}},v=Object.prototype.toString,p="[object Object]",r="[object Function]",t="[object GeneratorFunction]",a="[object HTMLAllCollection]",n="[object HTML document.all class]",f="[object HTMLCollection]",c=typeof Symbol=="function"&&!!Symbol.toStringTag,l=!(0 in[,]),m=function(){return!1};if(typeof document=="object"){var h=document.all;v.call(h)===v.call(document.all)&&(m=function(u){if((l||!u)&&(typeof u>"u"||typeof u=="object"))try{var o=v.call(u);return(o===a||o===n||o===f||o===p)&&u("")==null}catch{}return!1})}H.exports=e?function(u){if(m(u))return!0;if(!u||typeof u!="function"&&typeof u!="object")return!1;try{e(u,null,g)}catch(o){if(o!==C)return!1}return!S(u)&&x(u)}:function(u){if(m(u))return!0;if(!u||typeof u!="function"&&typeof u!="object")return!1;if(c)return x(u);if(S(u))return!1;var o=v.call(u);return o!==r&&o!==t&&!/^\[object HTML/.test(o)?!1:x(u)}},84420:function(H,U,e){var g=Object.prototype.toString,C=Function.prototype.toString,i=/^\s*(?:function)?\*/,S=e(46672)(),x=Object.getPrototypeOf,v=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},p;H.exports=function(t){if(typeof t!="function")return!1;if(i.test(C.call(t)))return!0;if(!S){var a=g.call(t);return a==="[object GeneratorFunction]"}if(!x)return!1;if(typeof p>"u"){var n=v();p=n?x(n):!1}return x(t)===p}},96604:function(H){H.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(H){H.exports=function(e){return e!==e}},1560:function(H,U,e){var g=e(57916),C=e(81288),i=e(85992),S=e(57740),x=e(59736),v=g(S(),Number);C(v,{getPolyfill:S,implementation:i,shim:x}),H.exports=v},57740:function(H,U,e){var g=e(85992);H.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:g}},59736:function(H,U,e){var g=e(81288),C=e(57740);H.exports=function(){var S=C();return g(Number,{isNaN:S},{isNaN:function(){return Number.isNaN!==S}}),S}},18400:function(H){H.exports=function(U){var e=typeof U;return U!==null&&(e==="object"||e==="function")}},58908:function(H){var U=Object.prototype.toString;H.exports=function(e){var g;return U.call(e)==="[object Object]"&&(g=Object.getPrototypeOf(e),g===null||g===Object.getPrototypeOf({}))}},94576:function(H){H.exports=function(U){for(var e=U.length,g,C=0;C13)&&g!==32&&g!==133&&g!==160&&g!==5760&&g!==6158&&(g<8192||g>8205)&&g!==8232&&g!==8233&&g!==8239&&g!==8287&&g!==8288&&g!==12288&&g!==65279)return!1;return!0}},53520:function(H){H.exports=function(e){return typeof e!="string"?!1:(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},7728:function(H,U,e){var g=e(46492),C=e(63436),i=e(99676),S=i("Object.prototype.toString"),x=e(46672)(),v=e(2304),p=typeof globalThis>"u"?e.g:globalThis,r=C(),t=i("Array.prototype.indexOf",!0)||function(m,h){for(var b=0;b-1}return v?c(m):!1}},76244:function(H){H.exports=Math.log2||function(U){return Math.log(U)*Math.LOG2E}},62644:function(H,U,e){H.exports=C;var g=e(93784);function C(i,S){S||(S=i,i=window);var x=0,v=0,p=0,r={shift:!1,alt:!1,control:!1,meta:!1},t=!1;function a(w){var A=!1;return"altKey"in w&&(A=A||w.altKey!==r.alt,r.alt=!!w.altKey),"shiftKey"in w&&(A=A||w.shiftKey!==r.shift,r.shift=!!w.shiftKey),"ctrlKey"in w&&(A=A||w.ctrlKey!==r.control,r.control=!!w.ctrlKey),"metaKey"in w&&(A=A||w.metaKey!==r.meta,r.meta=!!w.metaKey),A}function n(w,A){var _=g.x(A),y=g.y(A);"buttons"in A&&(w=A.buttons|0),(w!==x||_!==v||y!==p||a(A))&&(x=w|0,v=_||0,p=y||0,S&&S(x,v,p,r))}function f(w){n(0,w)}function c(){(x||v||p||r.shift||r.alt||r.meta||r.control)&&(v=p=0,x=0,r.shift=r.alt=r.control=r.meta=!1,S&&S(0,0,0,r))}function l(w){a(w)&&S&&S(x,v,p,r)}function m(w){g.buttons(w)===0?n(0,w):n(x,w)}function h(w){n(x|g.buttons(w),w)}function b(w){n(x&~g.buttons(w),w)}function u(){t||(t=!0,i.addEventListener("mousemove",m),i.addEventListener("mousedown",h),i.addEventListener("mouseup",b),i.addEventListener("mouseleave",f),i.addEventListener("mouseenter",f),i.addEventListener("mouseout",f),i.addEventListener("mouseover",f),i.addEventListener("blur",c),i.addEventListener("keyup",l),i.addEventListener("keydown",l),i.addEventListener("keypress",l),i!==window&&(window.addEventListener("blur",c),window.addEventListener("keyup",l),window.addEventListener("keydown",l),window.addEventListener("keypress",l)))}function o(){t&&(t=!1,i.removeEventListener("mousemove",m),i.removeEventListener("mousedown",h),i.removeEventListener("mouseup",b),i.removeEventListener("mouseleave",f),i.removeEventListener("mouseenter",f),i.removeEventListener("mouseout",f),i.removeEventListener("mouseover",f),i.removeEventListener("blur",c),i.removeEventListener("keyup",l),i.removeEventListener("keydown",l),i.removeEventListener("keypress",l),i!==window&&(window.removeEventListener("blur",c),window.removeEventListener("keyup",l),window.removeEventListener("keydown",l),window.removeEventListener("keypress",l)))}u();var d={element:i};return Object.defineProperties(d,{enabled:{get:function(){return t},set:function(w){w?u():o()},enumerable:!0},buttons:{get:function(){return x},enumerable:!0},x:{get:function(){return v},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return r},enumerable:!0}}),d}},29128:function(H){var U={left:0,top:0};H.exports=e;function e(C,i,S){i=i||C.currentTarget||C.srcElement,Array.isArray(S)||(S=[0,0]);var x=C.clientX||0,v=C.clientY||0,p=g(i);return S[0]=x-p.left,S[1]=v-p.top,S}function g(C){return C===window||C===document||C===document.body?U:C.getBoundingClientRect()}},93784:function(H,U){function e(S){if(typeof S=="object"){if("buttons"in S)return S.buttons;if("which"in S){var x=S.which;if(x===2)return 4;if(x===3)return 2;if(x>0)return 1<=0)return 1<2){for(var M=Array(E.position.length*.5),z=0;z2){for(var I=!E.position[0].length,k=r.mallocFloat(this.count*2),B=0,O=0;B1?T.align[Vt]:T.align[0]:T.align;if(typeof It=="number")return It;switch(It){case"right":case"end":return-kt;case"center":case"centre":case"middle":return-kt*.5}return 0})),this.baseline==null&&E.baseline==null&&(E.baseline=0),E.baseline!=null&&(this.baseline=E.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(kt,Vt){var It=(T.font[Vt]||T.font[0]).metrics,re=0;return re+=It.bottom*.5,typeof kt=="number"?re+=kt-It.baseline:re+=-It[kt],re*=-1,re})),E.color!=null)if(E.color||(E.color="transparent"),typeof E.color=="string"||!isNaN(E.color))this.color=v(E.color,"uint8");else{var Tt;if(typeof E.color[0]=="number"&&E.color.length>this.counts.length){var wt=E.color.length;Tt=r.mallocUint8(wt);for(var Rt=(E.color.subarray||E.color.slice).bind(E.color),bt=0;bt4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Lt){var Ht=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(Ht);for(var Ut=0;Ut1?this.counts[Ut]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Ut]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Ut*4,Ut*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Ut]:this.opacity,baseline:this.baselineOffset[Ut]!=null?this.baselineOffset[Ut]:this.baselineOffset[0],align:this.align?this.alignOffset[Ut]!=null?this.alignOffset[Ut]:this.alignOffset[0]:0,atlas:this.fontAtlas[Ut]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Ut*2,Ut*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},A.prototype.destroy=function(){},A.prototype.kerning=!0,A.prototype.position={constant:new Float32Array(2)},A.prototype.translate=null,A.prototype.scale=null,A.prototype.font=null,A.prototype.text="",A.prototype.positionOffset=[0,0],A.prototype.opacity=1,A.prototype.color=new Uint8Array([0,0,0,255]),A.prototype.alignOffset=[0,0],A.maxAtlasSize=1024,A.atlasCanvas=document.createElement("canvas"),A.atlasContext=A.atlasCanvas.getContext("2d",{alpha:!1}),A.baseFontSize=64,A.fonts={};function _(y){return typeof y=="function"&&y._gl&&y.prop&&y.texture&&y.buffer}G.exports=A},55212:function(G,U,t){var g=t(55616);G.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},i(r)?r={container:r}:S(r)?r={container:r}:x(r)?r={gl:r}:r=g(r,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),r.pixelRatio||(r.pixelRatio=t.g.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var e=document.querySelector(r.container);if(!e)throw Error("Element "+r.container+" is not found");r.container=e}i(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=v(),r.container.appendChild(r.canvas),C(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=v(),r.container.appendChild(r.canvas),C(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{r.gl=r.canvas.getContext(a,r.attrs)}catch{}return r.gl}),r.gl};function C(p){if(p.container)if(p.container==document.body)document.body.style.width||(p.canvas.width=p.width||p.pixelRatio*t.g.innerWidth),document.body.style.height||(p.canvas.height=p.height||p.pixelRatio*t.g.innerHeight);else{var r=p.container.getBoundingClientRect();p.canvas.width=p.width||r.right-r.left,p.canvas.height=p.height||r.bottom-r.top}}function i(p){return typeof p.getContext=="function"&&"width"in p&&"height"in p}function S(p){return typeof p.nodeName=="string"&&typeof p.appendChild=="function"&&typeof p.getBoundingClientRect=="function"}function x(p){return typeof p.drawArrays=="function"||typeof p.drawElements=="function"}function v(){var p=document.createElement("canvas");return p.style.position="absolute",p.style.top=0,p.style.left=0,p}},26444:function(G){G.exports=function(U){typeof U=="string"&&(U=[U]);for(var t=[].slice.call(arguments,1),g=[],C=0;C */U.read=function(t,g,C,i,S){var x,v,p=S*8-i-1,r=(1<>1,a=-7,n=C?S-1:0,f=C?-1:1,c=t[g+n];for(n+=f,x=c&(1<<-a)-1,c>>=-a,a+=p;a>0;x=x*256+t[g+n],n+=f,a-=8);for(v=x&(1<<-a)-1,x>>=-a,a+=i;a>0;v=v*256+t[g+n],n+=f,a-=8);if(x===0)x=1-e;else{if(x===r)return v?NaN:(c?-1:1)*(1/0);v=v+Math.pow(2,i),x=x-e}return(c?-1:1)*v*Math.pow(2,x-i)},U.write=function(t,g,C,i,S,x){var v,p,r,e=x*8-S-1,a=(1<>1,f=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=i?0:x-1,l=i?1:-1,m=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(p=isNaN(g)?1:0,v=a):(v=Math.floor(Math.log(g)/Math.LN2),g*(r=Math.pow(2,-v))<1&&(v--,r*=2),v+n>=1?g+=f/r:g+=f*Math.pow(2,1-n),g*r>=2&&(v++,r/=2),v+n>=a?(p=0,v=a):v+n>=1?(p=(g*r-1)*Math.pow(2,S),v=v+n):(p=g*Math.pow(2,n-1)*Math.pow(2,S),v=0));S>=8;t[C+c]=p&255,c+=l,p/=256,S-=8);for(v=v<0;t[C+c]=v&255,c+=l,v/=256,e-=8);t[C+c-l]|=m*128}},6768:function(G){typeof Object.create=="function"?G.exports=function(t,g){g&&(t.super_=g,t.prototype=Object.create(g.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:G.exports=function(t,g){if(g){t.super_=g;var C=function(){};C.prototype=g.prototype,t.prototype=new C,t.prototype.constructor=t}}},91148:function(G,U,t){var g=t(46672)(),C=t(99676),i=C("Object.prototype.toString"),S=function(r){return g&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:i(r)==="[object Arguments]"},x=function(r){return S(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&i(r)!=="[object Array]"&&i(r.callee)==="[object Function]"},v=function(){return S(arguments)}();S.isLegacyArguments=x,G.exports=v?S:x},24200:function(G){G.exports=!0},90720:function(G){var U=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,g,C;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{g=Object.defineProperty({},"length",{get:function(){throw C}}),C={},t(function(){throw 42},null,g)}catch(b){b!==C&&(t=null)}else t=null;var i=/^\s*class\b/,S=function(u){try{var o=U.call(u);return i.test(o)}catch{return!1}},x=function(u){try{return S(u)?!1:(U.call(u),!0)}catch{return!1}},v=Object.prototype.toString,p="[object Object]",r="[object Function]",e="[object GeneratorFunction]",a="[object HTMLAllCollection]",n="[object HTML document.all class]",f="[object HTMLCollection]",c=typeof Symbol=="function"&&!!Symbol.toStringTag,l=!(0 in[,]),m=function(){return!1};if(typeof document=="object"){var h=document.all;v.call(h)===v.call(document.all)&&(m=function(u){if((l||!u)&&(typeof u>"u"||typeof u=="object"))try{var o=v.call(u);return(o===a||o===n||o===f||o===p)&&u("")==null}catch{}return!1})}G.exports=t?function(u){if(m(u))return!0;if(!u||typeof u!="function"&&typeof u!="object")return!1;try{t(u,null,g)}catch(o){if(o!==C)return!1}return!S(u)&&x(u)}:function(u){if(m(u))return!0;if(!u||typeof u!="function"&&typeof u!="object")return!1;if(c)return x(u);if(S(u))return!1;var o=v.call(u);return o!==r&&o!==e&&!/^\[object HTML/.test(o)?!1:x(u)}},84420:function(G,U,t){var g=Object.prototype.toString,C=Function.prototype.toString,i=/^\s*(?:function)?\*/,S=t(46672)(),x=Object.getPrototypeOf,v=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},p;G.exports=function(e){if(typeof e!="function")return!1;if(i.test(C.call(e)))return!0;if(!S){var a=g.call(e);return a==="[object GeneratorFunction]"}if(!x)return!1;if(typeof p>"u"){var n=v();p=n?x(n):!1}return x(e)===p}},96604:function(G){G.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(G){G.exports=function(t){return t!==t}},1560:function(G,U,t){var g=t(57916),C=t(81288),i=t(85992),S=t(57740),x=t(59736),v=g(S(),Number);C(v,{getPolyfill:S,implementation:i,shim:x}),G.exports=v},57740:function(G,U,t){var g=t(85992);G.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:g}},59736:function(G,U,t){var g=t(81288),C=t(57740);G.exports=function(){var S=C();return g(Number,{isNaN:S},{isNaN:function(){return Number.isNaN!==S}}),S}},18400:function(G){G.exports=function(U){var t=typeof U;return U!==null&&(t==="object"||t==="function")}},58908:function(G){var U=Object.prototype.toString;G.exports=function(t){var g;return U.call(t)==="[object Object]"&&(g=Object.getPrototypeOf(t),g===null||g===Object.getPrototypeOf({}))}},94576:function(G){G.exports=function(U){for(var t=U.length,g,C=0;C13)&&g!==32&&g!==133&&g!==160&&g!==5760&&g!==6158&&(g<8192||g>8205)&&g!==8232&&g!==8233&&g!==8239&&g!==8287&&g!==8288&&g!==12288&&g!==65279)return!1;return!0}},53520:function(G){G.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},7728:function(G,U,t){var g=t(46492),C=t(63436),i=t(99676),S=i("Object.prototype.toString"),x=t(46672)(),v=t(2304),p=typeof globalThis>"u"?t.g:globalThis,r=C(),e=i("Array.prototype.indexOf",!0)||function(m,h){for(var b=0;b-1}return v?c(m):!1}},76244:function(G){G.exports=Math.log2||function(U){return Math.log(U)*Math.LOG2E}},62644:function(G,U,t){G.exports=C;var g=t(93784);function C(i,S){S||(S=i,i=window);var x=0,v=0,p=0,r={shift:!1,alt:!1,control:!1,meta:!1},e=!1;function a(w){var A=!1;return"altKey"in w&&(A=A||w.altKey!==r.alt,r.alt=!!w.altKey),"shiftKey"in w&&(A=A||w.shiftKey!==r.shift,r.shift=!!w.shiftKey),"ctrlKey"in w&&(A=A||w.ctrlKey!==r.control,r.control=!!w.ctrlKey),"metaKey"in w&&(A=A||w.metaKey!==r.meta,r.meta=!!w.metaKey),A}function n(w,A){var _=g.x(A),y=g.y(A);"buttons"in A&&(w=A.buttons|0),(w!==x||_!==v||y!==p||a(A))&&(x=w|0,v=_||0,p=y||0,S&&S(x,v,p,r))}function f(w){n(0,w)}function c(){(x||v||p||r.shift||r.alt||r.meta||r.control)&&(v=p=0,x=0,r.shift=r.alt=r.control=r.meta=!1,S&&S(0,0,0,r))}function l(w){a(w)&&S&&S(x,v,p,r)}function m(w){g.buttons(w)===0?n(0,w):n(x,w)}function h(w){n(x|g.buttons(w),w)}function b(w){n(x&~g.buttons(w),w)}function u(){e||(e=!0,i.addEventListener("mousemove",m),i.addEventListener("mousedown",h),i.addEventListener("mouseup",b),i.addEventListener("mouseleave",f),i.addEventListener("mouseenter",f),i.addEventListener("mouseout",f),i.addEventListener("mouseover",f),i.addEventListener("blur",c),i.addEventListener("keyup",l),i.addEventListener("keydown",l),i.addEventListener("keypress",l),i!==window&&(window.addEventListener("blur",c),window.addEventListener("keyup",l),window.addEventListener("keydown",l),window.addEventListener("keypress",l)))}function o(){e&&(e=!1,i.removeEventListener("mousemove",m),i.removeEventListener("mousedown",h),i.removeEventListener("mouseup",b),i.removeEventListener("mouseleave",f),i.removeEventListener("mouseenter",f),i.removeEventListener("mouseout",f),i.removeEventListener("mouseover",f),i.removeEventListener("blur",c),i.removeEventListener("keyup",l),i.removeEventListener("keydown",l),i.removeEventListener("keypress",l),i!==window&&(window.removeEventListener("blur",c),window.removeEventListener("keyup",l),window.removeEventListener("keydown",l),window.removeEventListener("keypress",l)))}u();var d={element:i};return Object.defineProperties(d,{enabled:{get:function(){return e},set:function(w){w?u():o()},enumerable:!0},buttons:{get:function(){return x},enumerable:!0},x:{get:function(){return v},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return r},enumerable:!0}}),d}},29128:function(G){var U={left:0,top:0};G.exports=t;function t(C,i,S){i=i||C.currentTarget||C.srcElement,Array.isArray(S)||(S=[0,0]);var x=C.clientX||0,v=C.clientY||0,p=g(i);return S[0]=x-p.left,S[1]=v-p.top,S}function g(C){return C===window||C===document||C===document.body?U:C.getBoundingClientRect()}},93784:function(G,U){function t(S){if(typeof S=="object"){if("buttons"in S)return S.buttons;if("which"in S){var x=S.which;if(x===2)return 4;if(x===3)return 2;if(x>0)return 1<=0)return 1<0&&r(a,w))}catch(A){c.call(new m(w),A)}}}function c(o){var d=this;d.triggered||(d.triggered=!0,d.def&&(d=d.def),d.msg=o,d.state=2,d.chain.length>0&&r(a,d))}function l(o,d,w,A){for(var _=0;_7&&(t.push(d.splice(0,7)),d.unshift("C"));break;case"S":var A=h,_=b;(r=="C"||r=="S")&&(A+=A-a,_+=_-n),d=["C",A,_,d[1],d[2],d[3],d[4]];break;case"T":r=="Q"||r=="T"?(l=h*2-l,m=b*2-m):(l=h,m=b),d=i(h,b,l,m,d[1],d[2]);break;case"Q":l=d[1],m=d[2],d=i(h,b,d[1],d[2],d[3],d[4]);break;case"L":d=C(h,b,d[1],d[2]);break;case"H":d=C(h,b,d[1],b);break;case"V":d=C(h,b,h,d[1]);break;case"Z":d=C(h,b,f,c);break}r=w,h=d[d.length-2],b=d[d.length-1],d.length>4?(a=d[d.length-4],n=d[d.length-3]):(a=h,n=b),t.push(d)}return t}function C(p,r,t,a){return["C",p,r,t,a,t,a]}function i(p,r,t,a,n,f){return["C",p/3+.6666666666666666*t,r/3+.6666666666666666*a,n/3+.6666666666666666*t,f/3+.6666666666666666*a,n,f]}function S(p,r,t,a,n,f,c,l,m,h){if(h)T=h[0],s=h[1],y=h[2],E=h[3];else{var b=x(p,r,-n);p=b.x,r=b.y,b=x(l,m,-n),l=b.x,m=b.y;var u=(p-l)/2,o=(r-m)/2,d=u*u/(t*t)+o*o/(a*a);d>1&&(d=Math.sqrt(d),t=d*t,a=d*a);var w=t*t,A=a*a,_=(f==c?-1:1)*Math.sqrt(Math.abs((w*A-w*o*o-A*u*u)/(w*o*o+A*u*u)));_==1/0&&(_=1);var y=_*t*o/a+(p+l)/2,E=_*-a*u/t+(r+m)/2,T=Math.asin(((r-E)/a).toFixed(9)),s=Math.asin(((m-E)/a).toFixed(9));T=ps&&(T=T-U*2),!c&&s>T&&(s=s-U*2)}if(Math.abs(s-T)>e){var L=s,M=l,z=m;s=T+e*(c&&s>T?1:-1),l=y+t*Math.cos(s),m=E+a*Math.sin(s);var D=S(l,m,t,a,n,0,c,M,z,[s,L,y,E])}var N=Math.tan((s-T)/4),I=4/3*t*N,k=4/3*a*N,B=[2*p-(p+I*Math.sin(T)),2*r-(r-k*Math.cos(T)),l+I*Math.sin(s),m-k*Math.cos(s),l,m];if(h)return B;D&&(B=B.concat(D));for(var O=0;O0&&r(a,w))}catch(A){c.call(new m(w),A)}}}function c(o){var d=this;d.triggered||(d.triggered=!0,d.def&&(d=d.def),d.msg=o,d.state=2,d.chain.length>0&&r(a,d))}function l(o,d,w,A){for(var _=0;_7&&(e.push(d.splice(0,7)),d.unshift("C"));break;case"S":var A=h,_=b;(r=="C"||r=="S")&&(A+=A-a,_+=_-n),d=["C",A,_,d[1],d[2],d[3],d[4]];break;case"T":r=="Q"||r=="T"?(l=h*2-l,m=b*2-m):(l=h,m=b),d=i(h,b,l,m,d[1],d[2]);break;case"Q":l=d[1],m=d[2],d=i(h,b,d[1],d[2],d[3],d[4]);break;case"L":d=C(h,b,d[1],d[2]);break;case"H":d=C(h,b,d[1],b);break;case"V":d=C(h,b,h,d[1]);break;case"Z":d=C(h,b,f,c);break}r=w,h=d[d.length-2],b=d[d.length-1],d.length>4?(a=d[d.length-4],n=d[d.length-3]):(a=h,n=b),e.push(d)}return e}function C(p,r,e,a){return["C",p,r,e,a,e,a]}function i(p,r,e,a,n,f){return["C",p/3+.6666666666666666*e,r/3+.6666666666666666*a,n/3+.6666666666666666*e,f/3+.6666666666666666*a,n,f]}function S(p,r,e,a,n,f,c,l,m,h){if(h)T=h[0],s=h[1],y=h[2],E=h[3];else{var b=x(p,r,-n);p=b.x,r=b.y,b=x(l,m,-n),l=b.x,m=b.y;var u=(p-l)/2,o=(r-m)/2,d=u*u/(e*e)+o*o/(a*a);d>1&&(d=Math.sqrt(d),e=d*e,a=d*a);var w=e*e,A=a*a,_=(f==c?-1:1)*Math.sqrt(Math.abs((w*A-w*o*o-A*u*u)/(w*o*o+A*u*u)));_==1/0&&(_=1);var y=_*e*o/a+(p+l)/2,E=_*-a*u/e+(r+m)/2,T=Math.asin(((r-E)/a).toFixed(9)),s=Math.asin(((m-E)/a).toFixed(9));T=ps&&(T=T-U*2),!c&&s>T&&(s=s-U*2)}if(Math.abs(s-T)>t){var L=s,M=l,z=m;s=T+t*(c&&s>T?1:-1),l=y+e*Math.cos(s),m=E+a*Math.sin(s);var D=S(l,m,e,a,n,0,c,M,z,[s,L,y,E])}var N=Math.tan((s-T)/4),I=4/3*e*N,k=4/3*a*N,B=[2*p-(p+I*Math.sin(T)),2*r-(r-k*Math.cos(T)),l+I*Math.sin(s),m-k*Math.cos(s),l,m];if(h)return B;D&&(B=B.concat(D));for(var O=0;O"u")return!1;for(var c in window)try{if(!a["$"+c]&&C.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{t(window[c])}catch{return!0}}catch{return!0}return!1}(),f=function(c){if(typeof window>"u"||!n)return t(c);try{return t(c)}catch{return!1}};g=function(l){var m=l!==null&&typeof l=="object",h=i.call(l)==="[object Function]",b=S(l),u=m&&i.call(l)==="[object String]",o=[];if(!m&&!h&&!b)throw new TypeError("Object.keys called on a non-object");var d=p&&h;if(u&&l.length>0&&!C.call(l,0))for(var w=0;w0)for(var A=0;A=0&&U.call(g.callee)==="[object Function]"),i}},32868:function(H){function U(C,i){if(typeof C!="string")return[C];var S=[C];typeof i=="string"||Array.isArray(i)?i={brackets:i}:i||(i={});var x=i.brackets?Array.isArray(i.brackets)?i.brackets:[i.brackets]:["{}","[]","()"],v=i.escape||"___",p=!!i.flat;x.forEach(function(a){var n=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),f=[];function c(l,m,h){var b=S.push(l.slice(a[0].length,-a[1].length))-1;return f.push(b),v+b+v}S.forEach(function(l,m){for(var h,b=0;l!=h;)if(h=l,l=l.replace(n,c),b++>1e4)throw Error("References have circular dependency. Please, check them.");S[m]=l}),f=f.reverse(),S=S.map(function(l){return f.forEach(function(m){l=l.replace(new RegExp("(\\"+v+m+"\\"+v+")","g"),a[0]+"$1"+a[1])}),l})});var r=new RegExp("\\"+v+"([0-9]+)\\"+v);function t(a,n,f){for(var c=[],l,m=0;l=r.exec(a);){if(m++>1e4)throw Error("Circular references in parenthesis");c.push(a.slice(0,l.index)),c.push(t(n[l[1]],n)),a=a.slice(l.index+l[0].length)}return c.push(a),c}return p?S:t(S[0],S)}function e(C,i){if(i&&i.flat){var S=i&&i.escape||"___",x=C[0],v;if(!x)return"";for(var p=new RegExp("\\"+S+"([0-9]+)\\"+S),r=0;x!=v;){if(r++>1e4)throw Error("Circular references in "+C);v=x,x=x.replace(p,t)}return x}return C.reduce(function a(n,f){return Array.isArray(f)&&(f=f.reduce(a,"")),n+f},"");function t(a,n){if(C[n]==null)throw Error("Reference "+n+"is undefined");return C[n]}}function g(C,i){return Array.isArray(C)?e(C,i):U(C,i)}g.parse=U,g.stringify=e,H.exports=g},51160:function(H,U,e){var g=e(55616);H.exports=C;function C(i){var S;return arguments.length>1&&(i=arguments),typeof i=="string"?i=i.split(/\s/).map(parseFloat):typeof i=="number"&&(i=[i]),i.length&&typeof i[0]=="number"?i.length===1?S={width:i[0],height:i[0],x:0,y:0}:i.length===2?S={width:i[0],height:i[1],x:0,y:0}:S={x:i[0],y:i[1],width:i[2]-i[0]||0,height:i[3]-i[1]||0}:i&&(i=g(i,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),S={x:i.left||0,y:i.top||0},i.width==null?i.right?S.width=i.right-S.x:S.width=0:S.width=i.width,i.height==null?i.bottom?S.height=i.bottom-S.y:S.height=0:S.height=i.height),S}},21984:function(H){H.exports=g;var U={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function g(S){var x=[];return S.replace(e,function(v,p,r){var t=p.toLowerCase();for(r=i(r),t=="m"&&r.length>2&&(x.push([p].concat(r.splice(0,2))),t="l",p=p=="m"?"l":"L");;){if(r.length==U[t])return r.unshift(p),x.push(r);if(r.lengthx!=c>x&&S<(f-a)*(x-n)/(c-n)+a;l&&(v=!v)}return v}},14756:function(H,U,e){/* +*/var U=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;function C(S){if(S==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(S)}function i(){try{if(!Object.assign)return!1;var S=new String("abc");if(S[5]="de",Object.getOwnPropertyNames(S)[0]==="5")return!1;for(var x={},v=0;v<10;v++)x["_"+String.fromCharCode(v)]=v;var p=Object.getOwnPropertyNames(x).map(function(e){return x[e]});if(p.join("")!=="0123456789")return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}G.exports=i()?Object.assign:function(S,x){for(var v,p=C(S),r,e=1;e"u")return!1;for(var c in window)try{if(!a["$"+c]&&C.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{e(window[c])}catch{return!0}}catch{return!0}return!1}(),f=function(c){if(typeof window>"u"||!n)return e(c);try{return e(c)}catch{return!1}};g=function(l){var m=l!==null&&typeof l=="object",h=i.call(l)==="[object Function]",b=S(l),u=m&&i.call(l)==="[object String]",o=[];if(!m&&!h&&!b)throw new TypeError("Object.keys called on a non-object");var d=p&&h;if(u&&l.length>0&&!C.call(l,0))for(var w=0;w0)for(var A=0;A=0&&U.call(g.callee)==="[object Function]"),i}},32868:function(G){function U(C,i){if(typeof C!="string")return[C];var S=[C];typeof i=="string"||Array.isArray(i)?i={brackets:i}:i||(i={});var x=i.brackets?Array.isArray(i.brackets)?i.brackets:[i.brackets]:["{}","[]","()"],v=i.escape||"___",p=!!i.flat;x.forEach(function(a){var n=new RegExp(["\\",a[0],"[^\\",a[0],"\\",a[1],"]*\\",a[1]].join("")),f=[];function c(l,m,h){var b=S.push(l.slice(a[0].length,-a[1].length))-1;return f.push(b),v+b+v}S.forEach(function(l,m){for(var h,b=0;l!=h;)if(h=l,l=l.replace(n,c),b++>1e4)throw Error("References have circular dependency. Please, check them.");S[m]=l}),f=f.reverse(),S=S.map(function(l){return f.forEach(function(m){l=l.replace(new RegExp("(\\"+v+m+"\\"+v+")","g"),a[0]+"$1"+a[1])}),l})});var r=new RegExp("\\"+v+"([0-9]+)\\"+v);function e(a,n,f){for(var c=[],l,m=0;l=r.exec(a);){if(m++>1e4)throw Error("Circular references in parenthesis");c.push(a.slice(0,l.index)),c.push(e(n[l[1]],n)),a=a.slice(l.index+l[0].length)}return c.push(a),c}return p?S:e(S[0],S)}function t(C,i){if(i&&i.flat){var S=i&&i.escape||"___",x=C[0],v;if(!x)return"";for(var p=new RegExp("\\"+S+"([0-9]+)\\"+S),r=0;x!=v;){if(r++>1e4)throw Error("Circular references in "+C);v=x,x=x.replace(p,e)}return x}return C.reduce(function a(n,f){return Array.isArray(f)&&(f=f.reduce(a,"")),n+f},"");function e(a,n){if(C[n]==null)throw Error("Reference "+n+"is undefined");return C[n]}}function g(C,i){return Array.isArray(C)?t(C,i):U(C,i)}g.parse=U,g.stringify=t,G.exports=g},51160:function(G,U,t){var g=t(55616);G.exports=C;function C(i){var S;return arguments.length>1&&(i=arguments),typeof i=="string"?i=i.split(/\s/).map(parseFloat):typeof i=="number"&&(i=[i]),i.length&&typeof i[0]=="number"?i.length===1?S={width:i[0],height:i[0],x:0,y:0}:i.length===2?S={width:i[0],height:i[1],x:0,y:0}:S={x:i[0],y:i[1],width:i[2]-i[0]||0,height:i[3]-i[1]||0}:i&&(i=g(i,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),S={x:i.left||0,y:i.top||0},i.width==null?i.right?S.width=i.right-S.x:S.width=0:S.width=i.width,i.height==null?i.bottom?S.height=i.bottom-S.y:S.height=0:S.height=i.height),S}},21984:function(G){G.exports=g;var U={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},t=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function g(S){var x=[];return S.replace(t,function(v,p,r){var e=p.toLowerCase();for(r=i(r),e=="m"&&r.length>2&&(x.push([p].concat(r.splice(0,2))),e="l",p=p=="m"?"l":"L");;){if(r.length==U[e])return r.unshift(p),x.push(r);if(r.lengthx!=c>x&&S<(f-a)*(x-n)/(c-n)+a;l&&(v=!v)}return v}},14756:function(G,U,t){/* * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc * @license MIT * @preserve Project Home: https://github.com/voidqk/polybooljs - */var g=e(7688),C=e(28648),i=e(72200),S=e(11403),x=e(82368),v=e(17792),p=!1,r=C(),t;t={buildLog:function(n){return n===!0?p=g():n===!1&&(p=!1),p===!1?!1:p.list},epsilon:function(n){return r.epsilon(n)},segments:function(n){var f=i(!0,r,p);return n.regions.forEach(f.addRegion),{segments:f.calculate(n.inverted),inverted:n.inverted}},combine:function(n,f){var c=i(!1,r,p);return{combined:c.calculate(n.segments,n.inverted,f.segments,f.inverted),inverted1:n.inverted,inverted2:f.inverted}},selectUnion:function(n){return{segments:x.union(n.combined,p),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:x.intersect(n.combined,p),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:x.difference(n.combined,p),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:x.differenceRev(n.combined,p),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:x.xor(n.combined,p),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:S(n.segments,r,p),inverted:n.inverted}},polygonFromGeoJSON:function(n){return v.toPolygon(t,n)},polygonToGeoJSON:function(n){return v.fromPolygon(t,r,n)},union:function(n,f){return a(n,f,t.selectUnion)},intersect:function(n,f){return a(n,f,t.selectIntersect)},difference:function(n,f){return a(n,f,t.selectDifference)},differenceRev:function(n,f){return a(n,f,t.selectDifferenceRev)},xor:function(n,f){return a(n,f,t.selectXor)}};function a(n,f,c){var l=t.segments(n),m=t.segments(f),h=t.combine(l,m),b=c(h);return t.polygon(b)}typeof window=="object"&&(window.PolyBool=t),H.exports=t},7688:function(H){function U(){var e,g=0,C=!1;function i(S,x){return e.list.push({type:S,data:x?JSON.parse(JSON.stringify(x)):void 0}),e}return e={list:[],segmentId:function(){return g++},checkIntersection:function(S,x){return i("check",{seg1:S,seg2:x})},segmentChop:function(S,x){return i("div_seg",{seg:S,pt:x}),i("chop",{seg:S,pt:x})},statusRemove:function(S){return i("pop_seg",{seg:S})},segmentUpdate:function(S){return i("seg_update",{seg:S})},segmentNew:function(S,x){return i("new_seg",{seg:S,primary:x})},segmentRemove:function(S){return i("rem_seg",{seg:S})},tempStatus:function(S,x,v){return i("temp_status",{seg:S,above:x,below:v})},rewind:function(S){return i("rewind",{seg:S})},status:function(S,x,v){return i("status",{seg:S,above:x,below:v})},vert:function(S){return S===C?e:(C=S,i("vert",{x:S}))},log:function(S){return typeof S!="string"&&(S=JSON.stringify(S,!1," ")),i("log",{txt:S})},reset:function(){return i("reset")},selected:function(S){return i("selected",{segs:S})},chainStart:function(S){return i("chain_start",{seg:S})},chainRemoveHead:function(S,x){return i("chain_rem_head",{index:S,pt:x})},chainRemoveTail:function(S,x){return i("chain_rem_tail",{index:S,pt:x})},chainNew:function(S,x){return i("chain_new",{pt1:S,pt2:x})},chainMatch:function(S){return i("chain_match",{index:S})},chainClose:function(S){return i("chain_close",{index:S})},chainAddHead:function(S,x){return i("chain_add_head",{index:S,pt:x})},chainAddTail:function(S,x){return i("chain_add_tail",{index:S,pt:x})},chainConnect:function(S,x){return i("chain_con",{index1:S,index2:x})},chainReverse:function(S){return i("chain_rev",{index:S})},chainJoin:function(S,x){return i("chain_join",{index1:S,index2:x})},done:function(){return i("done")}},e}H.exports=U},28648:function(H){function U(e){typeof e!="number"&&(e=1e-10);var g={epsilon:function(C){return typeof C=="number"&&(e=C),e},pointAboveOrOnLine:function(C,i,S){var x=i[0],v=i[1],p=S[0],r=S[1],t=C[0],a=C[1];return(p-x)*(a-v)-(r-v)*(t-x)>=-e},pointBetween:function(C,i,S){var x=C[1]-i[1],v=S[0]-i[0],p=C[0]-i[0],r=S[1]-i[1],t=p*v+x*r;if(t-e)},pointsSameX:function(C,i){return Math.abs(C[0]-i[0])e!=p-x>e&&(v-a)*(x-n)/(p-n)+a-S>e&&(r=!r),v=a,p=n}return r}};return g}H.exports=U},17792:function(H){var U={toPolygon:function(e,g){function C(x){if(x.length<=0)return e.segments({inverted:!1,regions:[]});function v(t){var a=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[a]})}for(var p=v(x[0]),r=1;r0})}function A(I,k){var B=I.seg,O=k.seg,V=B.start,Y=B.end,j=O.start,te=O.end;x&&x.checkIntersection(B,O);var ie=S.linesIntersect(V,Y,j,te);if(ie===!1){if(!S.pointsCollinear(V,Y,j)||S.pointsSame(V,te)||S.pointsSame(Y,j))return!1;var ue=S.pointsSame(V,j),J=S.pointsSame(Y,te);if(ue&&J)return k;var X=!ue&&S.pointBetween(V,j,te),ee=!J&&S.pointBetween(Y,j,te);if(ue)return ee?m(k,Y):m(I,te),k;X&&(J||(ee?m(k,Y):m(I,te)),m(k,V))}else ie.alongA===0&&(ie.alongB===-1?m(I,j):ie.alongB===0?m(I,ie.pt):ie.alongB===1&&m(I,te)),ie.alongB===0&&(ie.alongA===-1?m(k,V):ie.alongA===0?m(k,ie.pt):ie.alongA===1&&m(k,Y));return!1}for(var _=[];!r.isEmpty();){var y=r.getHead();if(x&&x.vert(y.pt[0]),y.isStart){let I=function(){if(T){var k=A(y,T);if(k)return k}return s?A(y,s):!1};x&&x.segmentNew(y.seg,y.primary);var E=w(y),T=E.before?E.before.ev:null,s=E.after?E.after.ev:null;x&&x.tempStatus(y.seg,T?T.seg:!1,s?s.seg:!1);var L=I();if(L){if(i){var M;y.seg.myFill.below===null?M=!0:M=y.seg.myFill.above!==y.seg.myFill.below,M&&(L.seg.myFill.above=!L.seg.myFill.above)}else L.seg.otherFill=y.seg.myFill;x&&x.segmentUpdate(L.seg),y.other.remove(),y.remove()}if(r.getHead()!==y){x&&x.rewind(y.seg);continue}if(i){var M;y.seg.myFill.below===null?M=!0:M=y.seg.myFill.above!==y.seg.myFill.below,s?y.seg.myFill.below=s.seg.myFill.above:y.seg.myFill.below=b,M?y.seg.myFill.above=!y.seg.myFill.below:y.seg.myFill.above=y.seg.myFill.below}else if(y.seg.otherFill===null){var z;s?y.primary===s.primary?z=s.seg.otherFill.above:z=s.seg.myFill.above:z=y.primary?u:b,y.seg.otherFill={above:z,below:z}}x&&x.status(y.seg,T?T.seg:!1,s?s.seg:!1),y.other.status=E.insert(g.node({ev:y}))}else{var D=y.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(o.exists(D.prev)&&o.exists(D.next)&&A(D.prev.ev,D.next.ev),x&&x.statusRemove(D.ev.seg),D.remove(),!y.primary){var N=y.seg.myFill;y.seg.myFill=y.seg.otherFill,y.seg.otherFill=N}_.push(y.seg)}r.getHead().remove()}return x&&x.done(),_}return i?{addRegion:function(b){for(var u,o=b[b.length-1],d=0;d0&&!this.aborted;){var S=this.ifds_to_read.shift();S.offset&&this.scan_ifd(S.id,S.offset,C)}},g.prototype.read_uint16=function(C){var i=this.input;if(C+2>i.length)throw U("unexpected EOF","EBADDATA");return this.big_endian?i[C]*256+i[C+1]:i[C]+i[C+1]*256},g.prototype.read_uint32=function(C){var i=this.input;if(C+4>i.length)throw U("unexpected EOF","EBADDATA");return this.big_endian?i[C]*16777216+i[C+1]*65536+i[C+2]*256+i[C+3]:i[C]+i[C+1]*256+i[C+2]*65536+i[C+3]*16777216},g.prototype.is_subifd_link=function(C,i){return C===0&&i===34665||C===0&&i===34853||C===34665&&i===40965},g.prototype.exif_format_length=function(C){switch(C){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},g.prototype.exif_format_read=function(C,i){var S;switch(C){case 1:case 2:return S=this.input[i],S;case 6:return S=this.input[i],S|(S&128)*33554430;case 3:return S=this.read_uint16(i),S;case 8:return S=this.read_uint16(i),S|(S&32768)*131070;case 4:return S=this.read_uint32(i),S;case 9:return S=this.read_uint32(i),S|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},g.prototype.scan_ifd=function(C,i,S){var x=this.read_uint16(i);i+=2;for(var v=0;vthis.input.length)throw U("unexpected EOF","EBADDATA");for(var l=[],m=f,h=0;h0&&(this.ifds_to_read.push({id:p,offset:l[0]}),c=!0);var u={is_big_endian:this.big_endian,ifd:C,tag:p,format:r,count:t,entry_offset:i+this.start,data_length:n,data_offset:f+this.start,value:l,is_subifd_link:c};if(S(u)===!1){this.aborted=!0;return}i+=12}C===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(i)})},H.exports.ExifParser=g,H.exports.get_orientation=function(C){var i=0;try{return new g(C,0,C.length).each(function(S){if(S.ifd===0&&S.tag===274&&Array.isArray(S.value))return i=S.value[0],!1}),i}catch{return-1}}},44600:function(H,U,e){var g=e(9696).eW,C=e(9696).eI;function i(n,f){if(n.length<4+f)return null;var c=C(n,f);return n.length>4&15,l=n[4]&15,m=n[5]>>4&15,h=g(n,6),b=8,u=0;uh.width||m.width===h.width&&m.height>h.height?m:h}),c=n.reduce(function(m,h){return m.height>h.height||m.height===h.height&&m.width>h.width?m:h}),l;return f.width>c.height||f.width===c.height&&f.height>c.width?l=f:l=c,l}H.exports.readSizeFromMeta=function(n){var f={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(t(n,f),!!f.sizes.length){var c=a(f.sizes),l=1;f.transforms.forEach(function(h){var b={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},u={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(h.type==="imir"&&(h.value===0?l=u[l]:(l=u[l],l=b[l],l=b[l])),h.type==="irot")for(var o=0;o1&&(l.variants=c.variants),c.orientation&&(l.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=p.length){var m=i(p,c.exif_location.offset),h=p.slice(c.exif_location.offset+m+4,c.exif_location.offset+c.exif_location.length),b=x.get_orientation(h);b>0&&(l.orientation=b)}return l}}}}}}},38728:function(H,U,e){var g=e(9696).wR,C=e(9696).gS,i=e(9696).Bz,S=g("BM");H.exports=function(x){if(!(x.length<26)&&C(x,0,S))return{width:i(x,18),height:i(x,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},5588:function(H,U,e){var g=e(9696).wR,C=e(9696).gS,i=e(9696).Bz,S=g("GIF87a"),x=g("GIF89a");H.exports=function(v){if(!(v.length<10)&&!(!C(v,0,S)&&!C(v,0,x)))return{width:i(v,6),height:i(v,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},41924:function(H,U,e){var g=e(9696).Bz,C=0,i=1,S=16;H.exports=function(x){var v=g(x,0),p=g(x,2),r=g(x,4);if(!(v!==C||p!==i||!r)){for(var t=[],a={width:0,height:0},n=0;na.width||c>a.height)&&(a=l)}return{width:a.width,height:a.height,variants:t,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},87968:function(H,U,e){var g=e(9696).eW,C=e(9696).wR,i=e(9696).gS,S=e(11688),x=C("Exif\0\0");H.exports=function(v){if(!(v.length<2)&&!(v[0]!==255||v[1]!==216||v[2]!==255))for(var p=2;;){for(;;){if(v.length-p<2)return;if(v[p++]===255)break}for(var r=v[p++],t;r===255;)r=v[p++];if(208<=r&&r<=217||r===1)t=0;else if(192<=r&&r<=254){if(v.length-p<2)return;t=g(v,p)-2,p+=2}else return;if(r===217||r===218)return;var a;if(r===225&&t>=10&&i(v,p,x)&&(a=S.get_orientation(v.slice(p+6,p+t))),t>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(v.length-p0&&(n.orientation=a),n}p+=t}}},37276:function(H,U,e){var g=e(9696).wR,C=e(9696).gS,i=e(9696).eI,S=g(`‰PNG\r + */var g=t(7688),C=t(28648),i=t(72200),S=t(11403),x=t(82368),v=t(17792),p=!1,r=C(),e;e={buildLog:function(n){return n===!0?p=g():n===!1&&(p=!1),p===!1?!1:p.list},epsilon:function(n){return r.epsilon(n)},segments:function(n){var f=i(!0,r,p);return n.regions.forEach(f.addRegion),{segments:f.calculate(n.inverted),inverted:n.inverted}},combine:function(n,f){var c=i(!1,r,p);return{combined:c.calculate(n.segments,n.inverted,f.segments,f.inverted),inverted1:n.inverted,inverted2:f.inverted}},selectUnion:function(n){return{segments:x.union(n.combined,p),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:x.intersect(n.combined,p),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:x.difference(n.combined,p),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:x.differenceRev(n.combined,p),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:x.xor(n.combined,p),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:S(n.segments,r,p),inverted:n.inverted}},polygonFromGeoJSON:function(n){return v.toPolygon(e,n)},polygonToGeoJSON:function(n){return v.fromPolygon(e,r,n)},union:function(n,f){return a(n,f,e.selectUnion)},intersect:function(n,f){return a(n,f,e.selectIntersect)},difference:function(n,f){return a(n,f,e.selectDifference)},differenceRev:function(n,f){return a(n,f,e.selectDifferenceRev)},xor:function(n,f){return a(n,f,e.selectXor)}};function a(n,f,c){var l=e.segments(n),m=e.segments(f),h=e.combine(l,m),b=c(h);return e.polygon(b)}typeof window=="object"&&(window.PolyBool=e),G.exports=e},7688:function(G){function U(){var t,g=0,C=!1;function i(S,x){return t.list.push({type:S,data:x?JSON.parse(JSON.stringify(x)):void 0}),t}return t={list:[],segmentId:function(){return g++},checkIntersection:function(S,x){return i("check",{seg1:S,seg2:x})},segmentChop:function(S,x){return i("div_seg",{seg:S,pt:x}),i("chop",{seg:S,pt:x})},statusRemove:function(S){return i("pop_seg",{seg:S})},segmentUpdate:function(S){return i("seg_update",{seg:S})},segmentNew:function(S,x){return i("new_seg",{seg:S,primary:x})},segmentRemove:function(S){return i("rem_seg",{seg:S})},tempStatus:function(S,x,v){return i("temp_status",{seg:S,above:x,below:v})},rewind:function(S){return i("rewind",{seg:S})},status:function(S,x,v){return i("status",{seg:S,above:x,below:v})},vert:function(S){return S===C?t:(C=S,i("vert",{x:S}))},log:function(S){return typeof S!="string"&&(S=JSON.stringify(S,!1," ")),i("log",{txt:S})},reset:function(){return i("reset")},selected:function(S){return i("selected",{segs:S})},chainStart:function(S){return i("chain_start",{seg:S})},chainRemoveHead:function(S,x){return i("chain_rem_head",{index:S,pt:x})},chainRemoveTail:function(S,x){return i("chain_rem_tail",{index:S,pt:x})},chainNew:function(S,x){return i("chain_new",{pt1:S,pt2:x})},chainMatch:function(S){return i("chain_match",{index:S})},chainClose:function(S){return i("chain_close",{index:S})},chainAddHead:function(S,x){return i("chain_add_head",{index:S,pt:x})},chainAddTail:function(S,x){return i("chain_add_tail",{index:S,pt:x})},chainConnect:function(S,x){return i("chain_con",{index1:S,index2:x})},chainReverse:function(S){return i("chain_rev",{index:S})},chainJoin:function(S,x){return i("chain_join",{index1:S,index2:x})},done:function(){return i("done")}},t}G.exports=U},28648:function(G){function U(t){typeof t!="number"&&(t=1e-10);var g={epsilon:function(C){return typeof C=="number"&&(t=C),t},pointAboveOrOnLine:function(C,i,S){var x=i[0],v=i[1],p=S[0],r=S[1],e=C[0],a=C[1];return(p-x)*(a-v)-(r-v)*(e-x)>=-t},pointBetween:function(C,i,S){var x=C[1]-i[1],v=S[0]-i[0],p=C[0]-i[0],r=S[1]-i[1],e=p*v+x*r;if(e-t)},pointsSameX:function(C,i){return Math.abs(C[0]-i[0])t!=p-x>t&&(v-a)*(x-n)/(p-n)+a-S>t&&(r=!r),v=a,p=n}return r}};return g}G.exports=U},17792:function(G){var U={toPolygon:function(t,g){function C(x){if(x.length<=0)return t.segments({inverted:!1,regions:[]});function v(e){var a=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[a]})}for(var p=v(x[0]),r=1;r0})}function A(I,k){var B=I.seg,O=k.seg,H=B.start,Y=B.end,j=O.start,et=O.end;x&&x.checkIntersection(B,O);var it=S.linesIntersect(H,Y,j,et);if(it===!1){if(!S.pointsCollinear(H,Y,j)||S.pointsSame(H,et)||S.pointsSame(Y,j))return!1;var ut=S.pointsSame(H,j),J=S.pointsSame(Y,et);if(ut&&J)return k;var X=!ut&&S.pointBetween(H,j,et),tt=!J&&S.pointBetween(Y,j,et);if(ut)return tt?m(k,Y):m(I,et),k;X&&(J||(tt?m(k,Y):m(I,et)),m(k,H))}else it.alongA===0&&(it.alongB===-1?m(I,j):it.alongB===0?m(I,it.pt):it.alongB===1&&m(I,et)),it.alongB===0&&(it.alongA===-1?m(k,H):it.alongA===0?m(k,it.pt):it.alongA===1&&m(k,Y));return!1}for(var _=[];!r.isEmpty();){var y=r.getHead();if(x&&x.vert(y.pt[0]),y.isStart){let I=function(){if(T){var k=A(y,T);if(k)return k}return s?A(y,s):!1};x&&x.segmentNew(y.seg,y.primary);var E=w(y),T=E.before?E.before.ev:null,s=E.after?E.after.ev:null;x&&x.tempStatus(y.seg,T?T.seg:!1,s?s.seg:!1);var L=I();if(L){if(i){var M;y.seg.myFill.below===null?M=!0:M=y.seg.myFill.above!==y.seg.myFill.below,M&&(L.seg.myFill.above=!L.seg.myFill.above)}else L.seg.otherFill=y.seg.myFill;x&&x.segmentUpdate(L.seg),y.other.remove(),y.remove()}if(r.getHead()!==y){x&&x.rewind(y.seg);continue}if(i){var M;y.seg.myFill.below===null?M=!0:M=y.seg.myFill.above!==y.seg.myFill.below,s?y.seg.myFill.below=s.seg.myFill.above:y.seg.myFill.below=b,M?y.seg.myFill.above=!y.seg.myFill.below:y.seg.myFill.above=y.seg.myFill.below}else if(y.seg.otherFill===null){var z;s?y.primary===s.primary?z=s.seg.otherFill.above:z=s.seg.myFill.above:z=y.primary?u:b,y.seg.otherFill={above:z,below:z}}x&&x.status(y.seg,T?T.seg:!1,s?s.seg:!1),y.other.status=E.insert(g.node({ev:y}))}else{var D=y.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(o.exists(D.prev)&&o.exists(D.next)&&A(D.prev.ev,D.next.ev),x&&x.statusRemove(D.ev.seg),D.remove(),!y.primary){var N=y.seg.myFill;y.seg.myFill=y.seg.otherFill,y.seg.otherFill=N}_.push(y.seg)}r.getHead().remove()}return x&&x.done(),_}return i?{addRegion:function(b){for(var u,o=b[b.length-1],d=0;d0&&!this.aborted;){var S=this.ifds_to_read.shift();S.offset&&this.scan_ifd(S.id,S.offset,C)}},g.prototype.read_uint16=function(C){var i=this.input;if(C+2>i.length)throw U("unexpected EOF","EBADDATA");return this.big_endian?i[C]*256+i[C+1]:i[C]+i[C+1]*256},g.prototype.read_uint32=function(C){var i=this.input;if(C+4>i.length)throw U("unexpected EOF","EBADDATA");return this.big_endian?i[C]*16777216+i[C+1]*65536+i[C+2]*256+i[C+3]:i[C]+i[C+1]*256+i[C+2]*65536+i[C+3]*16777216},g.prototype.is_subifd_link=function(C,i){return C===0&&i===34665||C===0&&i===34853||C===34665&&i===40965},g.prototype.exif_format_length=function(C){switch(C){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},g.prototype.exif_format_read=function(C,i){var S;switch(C){case 1:case 2:return S=this.input[i],S;case 6:return S=this.input[i],S|(S&128)*33554430;case 3:return S=this.read_uint16(i),S;case 8:return S=this.read_uint16(i),S|(S&32768)*131070;case 4:return S=this.read_uint32(i),S;case 9:return S=this.read_uint32(i),S|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},g.prototype.scan_ifd=function(C,i,S){var x=this.read_uint16(i);i+=2;for(var v=0;vthis.input.length)throw U("unexpected EOF","EBADDATA");for(var l=[],m=f,h=0;h0&&(this.ifds_to_read.push({id:p,offset:l[0]}),c=!0);var u={is_big_endian:this.big_endian,ifd:C,tag:p,format:r,count:e,entry_offset:i+this.start,data_length:n,data_offset:f+this.start,value:l,is_subifd_link:c};if(S(u)===!1){this.aborted=!0;return}i+=12}C===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(i)})},G.exports.ExifParser=g,G.exports.get_orientation=function(C){var i=0;try{return new g(C,0,C.length).each(function(S){if(S.ifd===0&&S.tag===274&&Array.isArray(S.value))return i=S.value[0],!1}),i}catch{return-1}}},44600:function(G,U,t){var g=t(9696).eW,C=t(9696).eI;function i(n,f){if(n.length<4+f)return null;var c=C(n,f);return n.length>4&15,l=n[4]&15,m=n[5]>>4&15,h=g(n,6),b=8,u=0;uh.width||m.width===h.width&&m.height>h.height?m:h}),c=n.reduce(function(m,h){return m.height>h.height||m.height===h.height&&m.width>h.width?m:h}),l;return f.width>c.height||f.width===c.height&&f.height>c.width?l=f:l=c,l}G.exports.readSizeFromMeta=function(n){var f={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(e(n,f),!!f.sizes.length){var c=a(f.sizes),l=1;f.transforms.forEach(function(h){var b={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},u={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(h.type==="imir"&&(h.value===0?l=u[l]:(l=u[l],l=b[l],l=b[l])),h.type==="irot")for(var o=0;o1&&(l.variants=c.variants),c.orientation&&(l.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=p.length){var m=i(p,c.exif_location.offset),h=p.slice(c.exif_location.offset+m+4,c.exif_location.offset+c.exif_location.length),b=x.get_orientation(h);b>0&&(l.orientation=b)}return l}}}}}}},38728:function(G,U,t){var g=t(9696).wR,C=t(9696).gS,i=t(9696).Bz,S=g("BM");G.exports=function(x){if(!(x.length<26)&&C(x,0,S))return{width:i(x,18),height:i(x,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},5588:function(G,U,t){var g=t(9696).wR,C=t(9696).gS,i=t(9696).Bz,S=g("GIF87a"),x=g("GIF89a");G.exports=function(v){if(!(v.length<10)&&!(!C(v,0,S)&&!C(v,0,x)))return{width:i(v,6),height:i(v,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},41924:function(G,U,t){var g=t(9696).Bz,C=0,i=1,S=16;G.exports=function(x){var v=g(x,0),p=g(x,2),r=g(x,4);if(!(v!==C||p!==i||!r)){for(var e=[],a={width:0,height:0},n=0;na.width||c>a.height)&&(a=l)}return{width:a.width,height:a.height,variants:e,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},87968:function(G,U,t){var g=t(9696).eW,C=t(9696).wR,i=t(9696).gS,S=t(11688),x=C("Exif\0\0");G.exports=function(v){if(!(v.length<2)&&!(v[0]!==255||v[1]!==216||v[2]!==255))for(var p=2;;){for(;;){if(v.length-p<2)return;if(v[p++]===255)break}for(var r=v[p++],e;r===255;)r=v[p++];if(208<=r&&r<=217||r===1)e=0;else if(192<=r&&r<=254){if(v.length-p<2)return;e=g(v,p)-2,p+=2}else return;if(r===217||r===218)return;var a;if(r===225&&e>=10&&i(v,p,x)&&(a=S.get_orientation(v.slice(p+6,p+e))),e>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(v.length-p0&&(n.orientation=a),n}p+=e}}},37276:function(G,U,t){var g=t(9696).wR,C=t(9696).gS,i=t(9696).eI,S=g(`‰PNG\r  -`),x=g("IHDR");H.exports=function(v){if(!(v.length<24)&&C(v,0,S)&&C(v,12,x))return{width:i(v,16),height:i(v,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},90328:function(H,U,e){var g=e(9696).wR,C=e(9696).gS,i=e(9696).eI,S=g("8BPS\0");H.exports=function(x){if(!(x.length<22)&&C(x,0,S))return{width:i(x,18),height:i(x,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},16024:function(H){function U(a){return a===32||a===9||a===13||a===10}function e(a){return typeof a=="number"&&isFinite(a)&&a>0}function g(a){var n=0,f=a.length;for(a[0]===239&&a[1]===187&&a[2]===191&&(n=3);n]*>/,i=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,S=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,x=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,v=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,p=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function r(a){var n=a.match(S),f=a.match(x),c=a.match(v);return{width:n&&(n[1]||n[2]),height:f&&(f[1]||f[2]),viewbox:c&&(c[1]||c[2])}}function t(a){return p.test(a)?a.match(p)[0]:"px"}H.exports=function(a){if(g(a)){for(var n="",f=0;f>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function a(n,f){return{width:(n[f+6]<<16|n[f+5]<<8|n[f+4])+1,height:(n[f+9]<n.length)){for(;f+8=10?c=c||r(n,f+8):h==="VP8L"&&b>=9?c=c||t(n,f+8):h==="VP8X"&&b>=10?c=c||a(n,f+8):h==="EXIF"&&(l=x.get_orientation(n.slice(f+8,f+8+b)),f=1/0),f+=8+b}if(c)return l>0&&(c.orientation=l),c}}}},87480:function(H,U,e){H.exports={avif:e(40528),bmp:e(38728),gif:e(5588),ico:e(41924),jpeg:e(87968),png:e(37276),psd:e(90328),svg:e(16024),tiff:e(98792),webp:e(20704)}},19480:function(H,U,e){var g=e(87480);function C(i){for(var S=Object.keys(g),x=0;x1)for(var h=1;h"u"?e.g:window,i=["moz","webkit"],S="AnimationFrame",x=C["request"+S],v=C["cancel"+S]||C["cancelRequest"+S],p=0;!x&&p0}function g(a){var n=0,f=a.length;for(a[0]===239&&a[1]===187&&a[2]===191&&(n=3);n]*>/,i=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,S=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,x=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,v=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,p=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function r(a){var n=a.match(S),f=a.match(x),c=a.match(v);return{width:n&&(n[1]||n[2]),height:f&&(f[1]||f[2]),viewbox:c&&(c[1]||c[2])}}function e(a){return p.test(a)?a.match(p)[0]:"px"}G.exports=function(a){if(g(a)){for(var n="",f=0;f>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function a(n,f){return{width:(n[f+6]<<16|n[f+5]<<8|n[f+4])+1,height:(n[f+9]<n.length)){for(;f+8=10?c=c||r(n,f+8):h==="VP8L"&&b>=9?c=c||e(n,f+8):h==="VP8X"&&b>=10?c=c||a(n,f+8):h==="EXIF"&&(l=x.get_orientation(n.slice(f+8,f+8+b)),f=1/0),f+=8+b}if(c)return l>0&&(c.orientation=l),c}}}},87480:function(G,U,t){G.exports={avif:t(40528),bmp:t(38728),gif:t(5588),ico:t(41924),jpeg:t(87968),png:t(37276),psd:t(90328),svg:t(16024),tiff:t(98792),webp:t(20704)}},19480:function(G,U,t){var g=t(87480);function C(i){for(var S=Object.keys(g),x=0;x1)for(var h=1;h"u"?t.g:window,i=["moz","webkit"],S="AnimationFrame",x=C["request"+S],v=C["cancel"+S]||C["cancelRequest"+S],p=0;!x&&p1&&(L.scaleRatio=[L.scale[0]*L.viewport.width,L.scale[1]*L.viewport.height],m(L),L.after&&L.after(L))}function T(L){if(L){L.length!=null?typeof L[0]=="number"&&(L=[{positions:L}]):Array.isArray(L)||(L=[L]);var M=0,z=0;if(_.groups=A=L.map(function(V,Y){var j=A[Y];if(V)typeof V=="function"?V={after:V}:typeof V[0]=="number"&&(V={positions:V});else return j;return V=S(V,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),j||(A[Y]=j={id:Y,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},V=x({},w,V)),i(j,V,[{lineWidth:function(te){return+te*.5},capSize:function(te){return+te*.5},opacity:parseFloat,errors:function(te){return te=v(te),z+=te.length,te},positions:function(te,ie){return te=v(te,"float64"),ie.count=Math.floor(te.length/2),ie.bounds=g(te,2),ie.offset=M,M+=ie.count,te}},{color:function(te,ie){var ue=ie.count;if(te||(te="transparent"),!Array.isArray(te)||typeof te[0]=="number"){var J=te;te=Array(ue);for(var X=0;X1&&(L.scaleRatio=[L.scale[0]*L.viewport.width,L.scale[1]*L.viewport.height],m(L),L.after&&L.after(L))}function T(L){if(L){L.length!=null?typeof L[0]=="number"&&(L=[{positions:L}]):Array.isArray(L)||(L=[L]);var M=0,z=0;if(_.groups=A=L.map(function(H,Y){var j=A[Y];if(H)typeof H=="function"?H={after:H}:typeof H[0]=="number"&&(H={positions:H});else return j;return H=S(H,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),j||(A[Y]=j={id:Y,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},H=x({},w,H)),i(j,H,[{lineWidth:function(et){return+et*.5},capSize:function(et){return+et*.5},opacity:parseFloat,errors:function(et){return et=v(et),z+=et.length,et},positions:function(et,it){return et=v(et,"float64"),it.count=Math.floor(et.length/2),it.bounds=g(et,2),it.offset=M,M+=it.count,et}},{color:function(et,it){var ut=it.count;if(et||(et="transparent"),!Array.isArray(et)||typeof et[0]=="number"){var J=et;et=Array(ut);for(var X=0;X1&&y.opacity&&(w.regl._refresh(),y.fill&&y.triangles&&y.triangles.length>2&&w.shaders.fill(y),y.thickness&&(y.scale[0]*y.viewport.width>d.precisionThreshold||y.scale[1]*y.viewport.height>d.precisionThreshold||y.join==="rect"||!y.join&&(y.thickness<=2||y.count>=d.maxPoints)?w.shaders.rect(y):w.shaders.miter(y)))}),this},d.prototype.update=function(w){var A=this;if(w){w.length!=null?typeof w[0]=="number"&&(w=[{positions:w}]):Array.isArray(w)||(w=[w]);var _=this,y=_.regl,E=_.gl;if(w.forEach(function(z,D){var N=A.passes[D];if(z!==void 0){if(z===null){A.passes[D]=null;return}if(typeof z[0]=="number"&&(z={positions:z}),z=S(z,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),N||(A.passes[D]=N={id:D,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:y.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:y.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:y.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:y.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},z=i({},d.defaults,z)),z.thickness!=null&&(N.thickness=parseFloat(z.thickness)),z.opacity!=null&&(N.opacity=parseFloat(z.opacity)),z.miterLimit!=null&&(N.miterLimit=parseFloat(z.miterLimit)),z.overlay!=null&&(N.overlay=!!z.overlay,D=Z});Q=Q.slice(0,se),Q.push(Z)}for(var ne=function(Me){var Ne=j.slice($*2,Q[Me]*2).concat(Z?j.slice(Z*2):[]),je=(N.hole||[]).map(function(mt){return mt-Z+(Q[Me]-$)}),it=v(Ne,je);it=it.map(function(mt){return mt+$+(mt+$s.length)&&(L=s.length);for(var M=0,z=new Array(L);M1&&y.opacity&&(w.regl._refresh(),y.fill&&y.triangles&&y.triangles.length>2&&w.shaders.fill(y),y.thickness&&(y.scale[0]*y.viewport.width>d.precisionThreshold||y.scale[1]*y.viewport.height>d.precisionThreshold||y.join==="rect"||!y.join&&(y.thickness<=2||y.count>=d.maxPoints)?w.shaders.rect(y):w.shaders.miter(y)))}),this},d.prototype.update=function(w){var A=this;if(w){w.length!=null?typeof w[0]=="number"&&(w=[{positions:w}]):Array.isArray(w)||(w=[w]);var _=this,y=_.regl,E=_.gl;if(w.forEach(function(z,D){var N=A.passes[D];if(z!==void 0){if(z===null){A.passes[D]=null;return}if(typeof z[0]=="number"&&(z={positions:z}),z=S(z,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),N||(A.passes[D]=N={id:D,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:y.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:y.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:y.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:y.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},z=i({},d.defaults,z)),z.thickness!=null&&(N.thickness=parseFloat(z.thickness)),z.opacity!=null&&(N.opacity=parseFloat(z.opacity)),z.miterLimit!=null&&(N.miterLimit=parseFloat(z.miterLimit)),z.overlay!=null&&(N.overlay=!!z.overlay,D=Z});Q=Q.slice(0,st),Q.push(Z)}for(var nt=function(Mt){var Nt=j.slice($*2,Q[Mt]*2).concat(Z?j.slice(Z*2):[]),jt=(N.hole||[]).map(function(me){return me-Z+(Q[Mt]-$)}),ie=v(Nt,jt);ie=ie.map(function(me){return me+$+(me+$s.length)&&(L=s.length);for(var M=0,z=new Array(L);MUe)?Le.tree=l(me,{bounds:Ke}):Ue&&Ue.length&&(Le.tree=Ue),Le.tree){var $e={primitive:"points",usage:"static",data:Le.tree,type:"uint32"};Le.elements?Le.elements($e):Le.elements=I.elements($e)}var lt=w.float32(me);ke({data:lt,usage:"dynamic"});var ht=w.fract32(me,lt);return He({data:ht,usage:"dynamic"}),Ie({data:new Uint8Array(rt),type:"uint8",usage:"stream"}),me}},{marker:function(me,Le,Ve){var Ue=Le.activation;if(Ue.forEach(function(ht){return ht&&ht.destroy&&ht.destroy()}),Ue.length=0,!me||typeof me[0]=="number"){var ke=s.addMarker(me);Ue[ke]=!0}else{for(var He=[],Ie=0,rt=Math.min(me.length,Le.count);Ie=0)return D;var N;if(s instanceof Uint8Array||s instanceof Uint8ClampedArray)N=s;else{N=new Uint8Array(s.length);for(var I=0,k=s.length;Iz*4&&(this.tooManyColors=!0),this.updatePalette(M),D.length===1?D[0]:D},y.prototype.updatePalette=function(s){if(!this.tooManyColors){var L=this.maxColors,M=this.paletteTexture,z=Math.ceil(s.length*.25/L);if(z>1){s=s.slice();for(var D=s.length*.25%L;Dz)&&!(!b.lower&&M2?(o[0],o[2],m=o[1],h=o[3]):o.length?(m=o[0],h=o[1]):(o.x,m=o.y,o.x+o.width,h=o.y+o.height),d.length>2?(b=d[0],u=d[2],d[1],d[3]):d.length?(b=d[0],u=d[1]):(b=d.x,d.y,u=d.x+d.width,d.y+d.height),[b,m,u,h]}function n(f){if(typeof f=="number")return[f,f,f,f];if(f.length===2)return[f[0],f[1],f[0],f[1]];var c=v(f);return[c.x,c.y,c.x+c.width,c.y+c.height]}},28624:function(H){(function(U,e){H.exports=e()})(this,function(){function U(pt,Xt){this.id=ce++,this.type=pt,this.data=Xt}function e(pt){if(pt.length===0)return[];var Xt=pt.charAt(0),Kt=pt.charAt(pt.length-1);if(1"u"?1:window.devicePixelRatio,It=!1,Pt={},kt=function(Jt){},Ht=function(){};if(typeof Xt=="string"?Kt=document.querySelector(Xt):typeof Xt=="object"&&(typeof Xt.nodeName=="string"&&typeof Xt.appendChild=="function"&&typeof Xt.getBoundingClientRect=="function"?Kt=Xt:typeof Xt.drawArrays=="function"||typeof Xt.drawElements=="function"?(gt=Xt,$t=gt.canvas):("gl"in Xt?gt=Xt.gl:"canvas"in Xt?$t=p(Xt.canvas):"container"in Xt&&(or=p(Xt.container)),"attributes"in Xt&&(pt=Xt.attributes),"extensions"in Xt&&(st=v(Xt.extensions)),"optionalExtensions"in Xt&&(At=v(Xt.optionalExtensions)),"onDone"in Xt&&(kt=Xt.onDone),"profile"in Xt&&(It=!!Xt.profile),"pixelRatio"in Xt&&(Ct=+Xt.pixelRatio),"cachedCode"in Xt&&(Pt=Xt.cachedCode))),Kt&&(Kt.nodeName.toLowerCase()==="canvas"?$t=Kt:or=Kt),!gt){if(!$t){if(Kt=S(or||document.body,kt,Ct),!Kt)return null;$t=Kt.canvas,Ht=Kt.onDestroy}pt.premultipliedAlpha===void 0&&(pt.premultipliedAlpha=!0),gt=x($t,pt)}return gt?{gl:gt,canvas:$t,container:or,extensions:st,optionalExtensions:At,pixelRatio:Ct,profile:It,cachedCode:Pt,onDone:kt,onDestroy:Ht}:(Ht(),kt("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function t(pt,Xt){function Kt(st){st=st.toLowerCase();var At;try{At=or[st]=pt.getExtension(st)}catch{}return!!At}for(var or={},$t=0;$t>>=Xt,Kt=(255>>=Kt,Xt|=Kt,Kt=(15>>=Kt,Xt|=Kt,Kt=(3>>Kt>>1}function f(){function pt(or){e:{for(var $t=16;268435456>=$t;$t*=16)if(or<=$t){or=$t;break e}or=0}return $t=Kt[n(or)>>2],0<$t.length?$t.pop():new ArrayBuffer(or)}function Xt(or){Kt[n(or.byteLength)>>2].push(or)}var Kt=a(8,function(){return[]});return{alloc:pt,free:Xt,allocType:function(or,$t){var gt=null;switch(or){case 5120:gt=new Int8Array(pt($t),0,$t);break;case 5121:gt=new Uint8Array(pt($t),0,$t);break;case 5122:gt=new Int16Array(pt(2*$t),0,$t);break;case 5123:gt=new Uint16Array(pt(2*$t),0,$t);break;case 5124:gt=new Int32Array(pt(4*$t),0,$t);break;case 5125:gt=new Uint32Array(pt(4*$t),0,$t);break;case 5126:gt=new Float32Array(pt(4*$t),0,$t);break;default:return null}return gt.length!==$t?gt.subarray(0,$t):gt},freeType:function(or){Xt(or.buffer)}}}function c(pt){return!!pt&&typeof pt=="object"&&Array.isArray(pt.shape)&&Array.isArray(pt.stride)&&typeof pt.offset=="number"&&pt.shape.length===pt.stride.length&&(Array.isArray(pt.data)||Ae(pt.data))}function l(pt,Xt,Kt,or,$t,gt){for(var st=0;stHt&&(Ht=kt.buffer.byteLength,Ge===5123?Ht>>=1:Ge===5125&&(Ht>>=2)),kt.vertCount=Ht,Ht=ur,0>ur&&(Ht=4,ur=kt.buffer.dimension,ur===1&&(Ht=0),ur===2&&(Ht=1),ur===3&&(Ht=4)),kt.primType=Ht}function st(kt){or.elementsCount--,delete At[kt.id],kt.buffer.destroy(),kt.buffer=null}var At={},Ct=0,It={uint8:5121,uint16:5123};Xt.oes_element_index_uint&&(It.uint32=5125),$t.prototype.bind=function(){this.buffer.bind()};var Pt=[];return{create:function(kt,Ht){function Jt(vr){if(vr)if(typeof vr=="number")ur(vr),hr.primType=4,hr.vertCount=vr|0,hr.type=5121;else{var Ye=null,Ge=35044,Nt=-1,Ot=-1,Qt=0,tr=0;Array.isArray(vr)||Ae(vr)||c(vr)?Ye=vr:("data"in vr&&(Ye=vr.data),"usage"in vr&&(Ge=ke[vr.usage]),"primitive"in vr&&(Nt=Ke[vr.primitive]),"count"in vr&&(Ot=vr.count|0),"type"in vr&&(tr=It[vr.type]),"length"in vr?Qt=vr.length|0:(Qt=Ot,tr===5123||tr===5122?Qt*=2:(tr===5125||tr===5124)&&(Qt*=4))),gt(hr,Ye,Ge,Nt,Ot,Qt,tr)}else ur(),hr.primType=4,hr.vertCount=0,hr.type=5121;return Jt}var ur=Kt.create(null,34963,!0),hr=new $t(ur._buffer);return or.elementsCount++,Jt(kt),Jt._reglType="elements",Jt._elements=hr,Jt.subdata=function(vr,Ye){return ur.subdata(vr,Ye),Jt},Jt.destroy=function(){st(hr)},Jt},createStream:function(kt){var Ht=Pt.pop();return Ht||(Ht=new $t(Kt.create(null,34963,!0,!1)._buffer)),gt(Ht,kt,35040,-1,-1,0,0),Ht},destroyStream:function(kt){Pt.push(kt)},getElements:function(kt){return typeof kt=="function"&&kt._elements instanceof $t?kt._elements:null},clear:function(){me(At).forEach(st)}}}function w(pt){for(var Xt=Re.allocType(5123,pt.length),Kt=0;Kt>>31<<15,$t=(gt<<1>>>24)-127,gt=gt>>13&1023;Xt[Kt]=-24>$t?or:-14>$t?or+(gt+1024>>-14-$t):15<$t?or+31744:or+($t+15<<10)+gt}return Xt}function A(pt){return Array.isArray(pt)||Ae(pt)}function _(pt){return"[object "+pt+"]"}function y(pt){return Array.isArray(pt)&&(pt.length===0||typeof pt[0]=="number")}function E(pt){return!!(Array.isArray(pt)&&pt.length!==0&&A(pt[0]))}function T(pt){return Object.prototype.toString.call(pt)}function s(pt){if(!pt)return!1;var Xt=T(pt);return 0<=Fe.indexOf(Xt)?!0:y(pt)||E(pt)||c(pt)}function L(pt,Xt){pt.type===36193?(pt.data=w(Xt),Re.freeType(Xt)):pt.data=Xt}function M(pt,Xt,Kt,or,$t,gt){if(pt=typeof ye[pt]<"u"?ye[pt]:xt[pt]*xe[Xt],gt&&(pt*=6),$t){for(or=0;1<=Kt;)or+=pt*Kt*Kt,Kt/=2;return or}return pt*Kt*or}function z(pt,Xt,Kt,or,$t,gt,st){function At(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function Ct(wr,nn){wr.internalformat=nn.internalformat,wr.format=nn.format,wr.type=nn.type,wr.compressed=nn.compressed,wr.premultiplyAlpha=nn.premultiplyAlpha,wr.flipY=nn.flipY,wr.unpackAlignment=nn.unpackAlignment,wr.colorSpace=nn.colorSpace,wr.width=nn.width,wr.height=nn.height,wr.channels=nn.channels}function It(wr,nn){if(typeof nn=="object"&&nn){"premultiplyAlpha"in nn&&(wr.premultiplyAlpha=nn.premultiplyAlpha),"flipY"in nn&&(wr.flipY=nn.flipY),"alignment"in nn&&(wr.unpackAlignment=nn.alignment),"colorSpace"in nn&&(wr.colorSpace=cn[nn.colorSpace]),"type"in nn&&(wr.type=rn[nn.type]);var $r=wr.width,dn=wr.height,Hn=wr.channels,Tn=!1;"shape"in nn?($r=nn.shape[0],dn=nn.shape[1],nn.shape.length===3&&(Hn=nn.shape[2],Tn=!0)):("radius"in nn&&($r=dn=nn.radius),"width"in nn&&($r=nn.width),"height"in nn&&(dn=nn.height),"channels"in nn&&(Hn=nn.channels,Tn=!0)),wr.width=$r|0,wr.height=dn|0,wr.channels=Hn|0,$r=!1,"format"in nn&&($r=nn.format,dn=wr.internalformat=Cn[$r],wr.format=_n[dn],$r in rn&&!("type"in nn)&&(wr.type=rn[$r]),$r in En&&(wr.compressed=!0),$r=!0),!Tn&&$r?wr.channels=xt[wr.format]:Tn&&!$r&&wr.channels!==dt[wr.format]&&(wr.format=wr.internalformat=dt[wr.channels])}}function Pt(wr){pt.pixelStorei(37440,wr.flipY),pt.pixelStorei(37441,wr.premultiplyAlpha),pt.pixelStorei(37443,wr.colorSpace),pt.pixelStorei(3317,wr.unpackAlignment)}function kt(){At.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ht(wr,nn){var $r=null;if(s(nn)?$r=nn:nn&&(It(wr,nn),"x"in nn&&(wr.xOffset=nn.x|0),"y"in nn&&(wr.yOffset=nn.y|0),s(nn.data)&&($r=nn.data)),nn.copy){var dn=$t.viewportWidth,Hn=$t.viewportHeight;wr.width=wr.width||dn-wr.xOffset,wr.height=wr.height||Hn-wr.yOffset,wr.needsCopy=!0}else if(!$r)wr.width=wr.width||1,wr.height=wr.height||1,wr.channels=wr.channels||4;else if(Ae($r))wr.channels=wr.channels||4,wr.data=$r,"type"in nn||wr.type!==5121||(wr.type=Ve[Object.prototype.toString.call($r)]|0);else if(y($r)){switch(wr.channels=wr.channels||4,dn=$r,Hn=dn.length,wr.type){case 5121:case 5123:case 5125:case 5126:Hn=Re.allocType(wr.type,Hn),Hn.set(dn),wr.data=Hn;break;case 36193:wr.data=w(dn)}wr.alignment=1,wr.needsFree=!0}else if(c($r)){dn=$r.data,Array.isArray(dn)||wr.type!==5121||(wr.type=Ve[Object.prototype.toString.call(dn)]|0);var Hn=$r.shape,Tn=$r.stride,An,Bn,Jn,gi;Hn.length===3?(Jn=Hn[2],gi=Tn[2]):gi=Jn=1,An=Hn[0],Bn=Hn[1],Hn=Tn[0],Tn=Tn[1],wr.alignment=1,wr.width=An,wr.height=Bn,wr.channels=Jn,wr.format=wr.internalformat=dt[Jn],wr.needsFree=!0,An=gi,$r=$r.offset,Jn=wr.width,gi=wr.height,Bn=wr.channels;for(var Di=Re.allocType(wr.type===36193?5126:wr.type,Jn*gi*Bn),Sr=0,kr=0;kr>=Hn,$r.height>>=Hn,Ht($r,dn[Hn]),wr.mipmask|=1<nn;++nn)wr.images[nn]=null;return wr}function Qt(wr){for(var nn=wr.images,$r=0;$rwr){for(var nn=0;nn=--this.refCount&&xr(this)}}),st.profile&&(gt.getTotalTextureSize=function(){var wr=0;return Object.keys(di).forEach(function(nn){wr+=di[nn].stats.size}),wr}),{create2D:function(wr,nn){function $r(Hn,Tn){var An=dn.texInfo;tr.call(An);var Bn=Ot();return typeof Hn=="number"?typeof Tn=="number"?Ye(Bn,Hn|0,Tn|0):Ye(Bn,Hn|0,Hn|0):Hn?(fr(An,Hn),Ge(Bn,Hn)):Ye(Bn,1,1),An.genMipmaps&&(Bn.mipmask=(Bn.width<<1)-1),dn.mipmask=Bn.mipmask,Ct(dn,Bn),dn.internalformat=Bn.internalformat,$r.width=Bn.width,$r.height=Bn.height,dr(dn),Nt(Bn,3553),rr(An,3553),mr(),Qt(Bn),st.profile&&(dn.stats.size=M(dn.internalformat,dn.type,Bn.width,Bn.height,An.genMipmaps,!1)),$r.format=Wr[dn.internalformat],$r.type=Ur[dn.type],$r.mag=an[An.magFilter],$r.min=pn[An.minFilter],$r.wrapS=gn[An.wrapS],$r.wrapT=gn[An.wrapT],$r}var dn=new Vt(3553);return di[dn.id]=dn,gt.textureCount++,$r(wr,nn),$r.subimage=function(Hn,Tn,An,Bn){Tn|=0,An|=0,Bn|=0;var Jn=ur();return Ct(Jn,dn),Jn.width=0,Jn.height=0,Ht(Jn,Hn),Jn.width=Jn.width||(dn.width>>Bn)-Tn,Jn.height=Jn.height||(dn.height>>Bn)-An,dr(dn),Jt(Jn,3553,Tn,An,Bn),mr(),hr(Jn),$r},$r.resize=function(Hn,Tn){var An=Hn|0,Bn=Tn|0||An;if(An===dn.width&&Bn===dn.height)return $r;$r.width=dn.width=An,$r.height=dn.height=Bn,dr(dn);for(var Jn=0;dn.mipmask>>Jn;++Jn){var gi=An>>Jn,Di=Bn>>Jn;if(!gi||!Di)break;pt.texImage2D(3553,Jn,dn.format,gi,Di,0,dn.format,dn.type,null)}return mr(),st.profile&&(dn.stats.size=M(dn.internalformat,dn.type,An,Bn,!1,!1)),$r},$r._reglType="texture2d",$r._texture=dn,st.profile&&($r.stats=dn.stats),$r.destroy=function(){dn.decRef()},$r},createCube:function(wr,nn,$r,dn,Hn,Tn){function An(gi,Di,Sr,kr,Ar,Or){var xn,In=Bn.texInfo;for(tr.call(In),xn=0;6>xn;++xn)Jn[xn]=Ot();if(typeof gi=="number"||!gi)for(gi=gi|0||1,xn=0;6>xn;++xn)Ye(Jn[xn],gi,gi);else if(typeof gi=="object")if(Di)Ge(Jn[0],gi),Ge(Jn[1],Di),Ge(Jn[2],Sr),Ge(Jn[3],kr),Ge(Jn[4],Ar),Ge(Jn[5],Or);else if(fr(In,gi),It(Bn,gi),"faces"in gi)for(gi=gi.faces,xn=0;6>xn;++xn)Ct(Jn[xn],Bn),Ge(Jn[xn],gi[xn]);else for(xn=0;6>xn;++xn)Ge(Jn[xn],gi);for(Ct(Bn,Jn[0]),Bn.mipmask=In.genMipmaps?(Jn[0].width<<1)-1:Jn[0].mipmask,Bn.internalformat=Jn[0].internalformat,An.width=Jn[0].width,An.height=Jn[0].height,dr(Bn),xn=0;6>xn;++xn)Nt(Jn[xn],34069+xn);for(rr(In,34067),mr(),st.profile&&(Bn.stats.size=M(Bn.internalformat,Bn.type,An.width,An.height,In.genMipmaps,!0)),An.format=Wr[Bn.internalformat],An.type=Ur[Bn.type],An.mag=an[In.magFilter],An.min=pn[In.minFilter],An.wrapS=gn[In.wrapS],An.wrapT=gn[In.wrapT],xn=0;6>xn;++xn)Qt(Jn[xn]);return An}var Bn=new Vt(34067);di[Bn.id]=Bn,gt.cubeCount++;var Jn=Array(6);return An(wr,nn,$r,dn,Hn,Tn),An.subimage=function(gi,Di,Sr,kr,Ar){Sr|=0,kr|=0,Ar|=0;var Or=ur();return Ct(Or,Bn),Or.width=0,Or.height=0,Ht(Or,Di),Or.width=Or.width||(Bn.width>>Ar)-Sr,Or.height=Or.height||(Bn.height>>Ar)-kr,dr(Bn),Jt(Or,34069+gi,Sr,kr,Ar),mr(),hr(Or),An},An.resize=function(gi){if(gi|=0,gi!==Bn.width){An.width=Bn.width=gi,An.height=Bn.height=gi,dr(Bn);for(var Di=0;6>Di;++Di)for(var Sr=0;Bn.mipmask>>Sr;++Sr)pt.texImage2D(34069+Di,Sr,Bn.format,gi>>Sr,gi>>Sr,0,Bn.format,Bn.type,null);return mr(),st.profile&&(Bn.stats.size=M(Bn.internalformat,Bn.type,An.width,An.height,!1,!0)),An}},An._reglType="textureCube",An._texture=Bn,st.profile&&(An.stats=Bn.stats),An.destroy=function(){Bn.decRef()},An},clear:function(){for(var wr=0;wrdn;++dn)if($r.mipmask&1<>dn,$r.height>>dn,0,$r.internalformat,$r.type,null);else for(var Hn=0;6>Hn;++Hn)pt.texImage2D(34069+Hn,dn,$r.internalformat,$r.width>>dn,$r.height>>dn,0,$r.internalformat,$r.type,null);rr($r.texInfo,$r.target)})},refresh:function(){for(var wr=0;wrpr;++pr){for(rn=0;rnxr;++xr)mr[xr].resize(pr);return dr.width=dr.height=pr,dr},_reglType:"framebufferCube",destroy:function(){mr.forEach(function(xr){xr.destroy()})}})},clear:function(){me(rr).forEach(vr)},restore:function(){Nt.cur=null,Nt.next=null,Nt.dirty=!0,me(rr).forEach(function(Vt){Vt.framebuffer=pt.createFramebuffer(),Ye(Vt)})}})}function N(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function I(pt,Xt,Kt,or,$t,gt,st){function At(Ye){if(Ye!==vr.currentVAO){var Ge=Xt.oes_vertex_array_object;Ye?Ge.bindVertexArrayOES(Ye.vao):Ge.bindVertexArrayOES(null),vr.currentVAO=Ye}}function Ct(Ye){if(Ye!==vr.currentVAO){if(Ye)Ye.bindAttrs();else{for(var Ge=Xt.angle_instanced_arrays,Nt=0;Nt=dr.byteLength?mr.subdata(dr):(mr.destroy(),Nt.buffers[fr]=null)),Nt.buffers[fr]||(mr=Nt.buffers[fr]=$t.create(rr,34962,!1,!0)),Vt.buffer=$t.getBuffer(mr),Vt.size=Vt.buffer.dimension|0,Vt.normalized=!1,Vt.type=Vt.buffer.dtype,Vt.offset=0,Vt.stride=0,Vt.divisor=0,Vt.state=1,Ot[fr]=1}else $t.getBuffer(rr)?(Vt.buffer=$t.getBuffer(rr),Vt.size=Vt.buffer.dimension|0,Vt.normalized=!1,Vt.type=Vt.buffer.dtype,Vt.offset=0,Vt.stride=0,Vt.divisor=0,Vt.state=1):$t.getBuffer(rr.buffer)?(Vt.buffer=$t.getBuffer(rr.buffer),Vt.size=(+rr.size||Vt.buffer.dimension)|0,Vt.normalized=!!rr.normalized||!1,Vt.type="type"in rr?Ue[rr.type]:Vt.buffer.dtype,Vt.offset=(rr.offset||0)|0,Vt.stride=(rr.stride||0)|0,Vt.divisor=(rr.divisor||0)|0,Vt.state=1):"x"in rr&&(Vt.x=+rr.x||0,Vt.y=+rr.y||0,Vt.z=+rr.z||0,Vt.w=+rr.w||0,Vt.state=2)}for(mr=0;mrur&&(ur=hr.stats.uniformsCount)}),ur},Kt.getMaxAttributesCount=function(){var ur=0;return Ht.forEach(function(hr){hr.stats.attributesCount>ur&&(ur=hr.stats.attributesCount)}),ur}),{clear:function(){var ur=pt.deleteShader.bind(pt);me(It).forEach(ur),It={},me(Pt).forEach(ur),Pt={},Ht.forEach(function(hr){pt.deleteProgram(hr.program)}),Ht.length=0,kt={},Kt.shaderCount=0},program:function(ur,hr,vr,Ye){var Ge=kt[hr];Ge||(Ge=kt[hr]={});var Nt=Ge[ur];if(Nt&&(Nt.refCount++,!Ye))return Nt;var Ot=new At(hr,ur);return Kt.shaderCount++,Ct(Ot,vr,Ye),Nt||(Ge[ur]=Ot),Ht.push(Ot),ne(Ot,{destroy:function(){if(Ot.refCount--,0>=Ot.refCount){pt.deleteProgram(Ot.program);var Qt=Ht.indexOf(Ot);Ht.splice(Qt,1),Kt.shaderCount--}0>=Ge[Ot.vertId].refCount&&(pt.deleteShader(Pt[Ot.vertId]),delete Pt[Ot.vertId],delete kt[Ot.fragId][Ot.vertId]),Object.keys(kt[Ot.fragId]).length||(pt.deleteShader(It[Ot.fragId]),delete It[Ot.fragId],delete kt[Ot.fragId])}})},restore:function(){It={},Pt={};for(var ur=0;ur>2),or=0;or>5]|=(pt.charCodeAt(or/8)&255)<<24-or%32;var Kt=8*pt.length;pt=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225];var or=Array(64),$t,gt,st,At,Ct,It,Pt,kt,Ht,Jt,ur;for(Xt[Kt>>5]|=128<<24-Kt%32,Xt[(Kt+64>>9<<4)+15]=Kt,kt=0;ktHt;Ht++){if(16>Ht)or[Ht]=Xt[Ht+kt];else{Jt=Ht,ur=or[Ht-2],ur=j(ur,17)^j(ur,19)^ur>>>10,ur=te(ur,or[Ht-7]);var hr;hr=or[Ht-15],hr=j(hr,7)^j(hr,18)^hr>>>3,or[Jt]=te(te(ur,hr),or[Ht-16])}Jt=At,Jt=j(Jt,6)^j(Jt,11)^j(Jt,25),Jt=te(te(te(te(Pt,Jt),At&Ct^~At&It),it[Ht]),or[Ht]),Pt=Kt,Pt=j(Pt,2)^j(Pt,13)^j(Pt,22),ur=te(Pt,Kt&$t^Kt>^$t>),Pt=It,It=Ct,Ct=At,At=te(st,Jt),st=gt,gt=$t,$t=Kt,Kt=te(Jt,ur)}pt[0]=te(Kt,pt[0]),pt[1]=te($t,pt[1]),pt[2]=te(gt,pt[2]),pt[3]=te(st,pt[3]),pt[4]=te(At,pt[4]),pt[5]=te(Ct,pt[5]),pt[6]=te(It,pt[6]),pt[7]=te(Pt,pt[7])}for(Xt="",or=0;or<32*pt.length;or+=8)Xt+=String.fromCharCode(pt[or>>5]>>>24-or%32&255);return Xt}function V(pt){for(var Xt="",Kt,or=0;or>>4&15)+"0123456789abcdef".charAt(Kt&15);return Xt}function Y(pt){for(var Xt="",Kt=-1,or,$t;++Kt=or&&56320<=$t&&57343>=$t&&(or=65536+((or&1023)<<10)+($t&1023),Kt++),127>=or?Xt+=String.fromCharCode(or):2047>=or?Xt+=String.fromCharCode(192|or>>>6&31,128|or&63):65535>=or?Xt+=String.fromCharCode(224|or>>>12&15,128|or>>>6&63,128|or&63):2097151>=or&&(Xt+=String.fromCharCode(240|or>>>18&7,128|or>>>12&63,128|or>>>6&63,128|or&63));return Xt}function j(pt,Xt){return pt>>>Xt|pt<<32-Xt}function te(pt,Xt){var Kt=(pt&65535)+(Xt&65535);return(pt>>16)+(Xt>>16)+(Kt>>16)<<16|Kt&65535}function ie(pt){return Array.prototype.slice.call(pt)}function ue(pt){return ie(pt).join("")}function J(pt){function Xt(){var Pt=[],kt=[];return ne(function(){Pt.push.apply(Pt,ie(arguments))},{def:function(){var Ht="v"+$t++;return kt.push(Ht),0Ut)?Lt.tree=l(mt,{bounds:Kt}):Ut&&Ut.length&&(Lt.tree=Ut),Lt.tree){var $t={primitive:"points",usage:"static",data:Lt.tree,type:"uint32"};Lt.elements?Lt.elements($t):Lt.elements=I.elements($t)}var le=w.float32(mt);kt({data:le,usage:"dynamic"});var he=w.fract32(mt,le);return Vt({data:he,usage:"dynamic"}),It({data:new Uint8Array(re),type:"uint8",usage:"stream"}),mt}},{marker:function(mt,Lt,Ht){var Ut=Lt.activation;if(Ut.forEach(function(he){return he&&he.destroy&&he.destroy()}),Ut.length=0,!mt||typeof mt[0]=="number"){var kt=s.addMarker(mt);Ut[kt]=!0}else{for(var Vt=[],It=0,re=Math.min(mt.length,Lt.count);It=0)return D;var N;if(s instanceof Uint8Array||s instanceof Uint8ClampedArray)N=s;else{N=new Uint8Array(s.length);for(var I=0,k=s.length;Iz*4&&(this.tooManyColors=!0),this.updatePalette(M),D.length===1?D[0]:D},y.prototype.updatePalette=function(s){if(!this.tooManyColors){var L=this.maxColors,M=this.paletteTexture,z=Math.ceil(s.length*.25/L);if(z>1){s=s.slice();for(var D=s.length*.25%L;Dz)&&!(!b.lower&&M2?(o[0],o[2],m=o[1],h=o[3]):o.length?(m=o[0],h=o[1]):(o.x,m=o.y,o.x+o.width,h=o.y+o.height),d.length>2?(b=d[0],u=d[2],d[1],d[3]):d.length?(b=d[0],u=d[1]):(b=d.x,d.y,u=d.x+d.width,d.y+d.height),[b,m,u,h]}function n(f){if(typeof f=="number")return[f,f,f,f];if(f.length===2)return[f[0],f[1],f[0],f[1]];var c=v(f);return[c.x,c.y,c.x+c.width,c.y+c.height]}},28624:function(G){(function(U,t){G.exports=t()})(this,function(){function U(pe,Xe){this.id=ct++,this.type=pe,this.data=Xe}function t(pe){if(pe.length===0)return[];var Xe=pe.charAt(0),Ke=pe.charAt(pe.length-1);if(1"u"?1:window.devicePixelRatio,Ie=!1,Pe={},ke=function(Je){},Ve=function(){};if(typeof Xe=="string"?Ke=document.querySelector(Xe):typeof Xe=="object"&&(typeof Xe.nodeName=="string"&&typeof Xe.appendChild=="function"&&typeof Xe.getBoundingClientRect=="function"?Ke=Xe:typeof Xe.drawArrays=="function"||typeof Xe.drawElements=="function"?(ge=Xe,$e=ge.canvas):("gl"in Xe?ge=Xe.gl:"canvas"in Xe?$e=p(Xe.canvas):"container"in Xe&&(or=p(Xe.container)),"attributes"in Xe&&(pe=Xe.attributes),"extensions"in Xe&&(se=v(Xe.extensions)),"optionalExtensions"in Xe&&(Ae=v(Xe.optionalExtensions)),"onDone"in Xe&&(ke=Xe.onDone),"profile"in Xe&&(Ie=!!Xe.profile),"pixelRatio"in Xe&&(Ce=+Xe.pixelRatio),"cachedCode"in Xe&&(Pe=Xe.cachedCode))),Ke&&(Ke.nodeName.toLowerCase()==="canvas"?$e=Ke:or=Ke),!ge){if(!$e){if(Ke=S(or||document.body,ke,Ce),!Ke)return null;$e=Ke.canvas,Ve=Ke.onDestroy}pe.premultipliedAlpha===void 0&&(pe.premultipliedAlpha=!0),ge=x($e,pe)}return ge?{gl:ge,canvas:$e,container:or,extensions:se,optionalExtensions:Ae,pixelRatio:Ce,profile:Ie,cachedCode:Pe,onDone:ke,onDestroy:Ve}:(Ve(),ke("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function e(pe,Xe){function Ke(se){se=se.toLowerCase();var Ae;try{Ae=or[se]=pe.getExtension(se)}catch{}return!!Ae}for(var or={},$e=0;$e>>=Xe,Ke=(255>>=Ke,Xe|=Ke,Ke=(15>>=Ke,Xe|=Ke,Ke=(3>>Ke>>1}function f(){function pe(or){t:{for(var $e=16;268435456>=$e;$e*=16)if(or<=$e){or=$e;break t}or=0}return $e=Ke[n(or)>>2],0<$e.length?$e.pop():new ArrayBuffer(or)}function Xe(or){Ke[n(or.byteLength)>>2].push(or)}var Ke=a(8,function(){return[]});return{alloc:pe,free:Xe,allocType:function(or,$e){var ge=null;switch(or){case 5120:ge=new Int8Array(pe($e),0,$e);break;case 5121:ge=new Uint8Array(pe($e),0,$e);break;case 5122:ge=new Int16Array(pe(2*$e),0,$e);break;case 5123:ge=new Uint16Array(pe(2*$e),0,$e);break;case 5124:ge=new Int32Array(pe(4*$e),0,$e);break;case 5125:ge=new Uint32Array(pe(4*$e),0,$e);break;case 5126:ge=new Float32Array(pe(4*$e),0,$e);break;default:return null}return ge.length!==$e?ge.subarray(0,$e):ge},freeType:function(or){Xe(or.buffer)}}}function c(pe){return!!pe&&typeof pe=="object"&&Array.isArray(pe.shape)&&Array.isArray(pe.stride)&&typeof pe.offset=="number"&&pe.shape.length===pe.stride.length&&(Array.isArray(pe.data)||At(pe.data))}function l(pe,Xe,Ke,or,$e,ge){for(var se=0;seVe&&(Ve=ke.buffer.byteLength,Gt===5123?Ve>>=1:Gt===5125&&(Ve>>=2)),ke.vertCount=Ve,Ve=ur,0>ur&&(Ve=4,ur=ke.buffer.dimension,ur===1&&(Ve=0),ur===2&&(Ve=1),ur===3&&(Ve=4)),ke.primType=Ve}function se(ke){or.elementsCount--,delete Ae[ke.id],ke.buffer.destroy(),ke.buffer=null}var Ae={},Ce=0,Ie={uint8:5121,uint16:5123};Xe.oes_element_index_uint&&(Ie.uint32=5125),$e.prototype.bind=function(){this.buffer.bind()};var Pe=[];return{create:function(ke,Ve){function Je(vr){if(vr)if(typeof vr=="number")ur(vr),hr.primType=4,hr.vertCount=vr|0,hr.type=5121;else{var Yt=null,Gt=35044,Ne=-1,Oe=-1,Qe=0,er=0;Array.isArray(vr)||At(vr)||c(vr)?Yt=vr:("data"in vr&&(Yt=vr.data),"usage"in vr&&(Gt=kt[vr.usage]),"primitive"in vr&&(Ne=Kt[vr.primitive]),"count"in vr&&(Oe=vr.count|0),"type"in vr&&(er=Ie[vr.type]),"length"in vr?Qe=vr.length|0:(Qe=Oe,er===5123||er===5122?Qe*=2:(er===5125||er===5124)&&(Qe*=4))),ge(hr,Yt,Gt,Ne,Oe,Qe,er)}else ur(),hr.primType=4,hr.vertCount=0,hr.type=5121;return Je}var ur=Ke.create(null,34963,!0),hr=new $e(ur._buffer);return or.elementsCount++,Je(ke),Je._reglType="elements",Je._elements=hr,Je.subdata=function(vr,Yt){return ur.subdata(vr,Yt),Je},Je.destroy=function(){se(hr)},Je},createStream:function(ke){var Ve=Pe.pop();return Ve||(Ve=new $e(Ke.create(null,34963,!0,!1)._buffer)),ge(Ve,ke,35040,-1,-1,0,0),Ve},destroyStream:function(ke){Pe.push(ke)},getElements:function(ke){return typeof ke=="function"&&ke._elements instanceof $e?ke._elements:null},clear:function(){mt(Ae).forEach(se)}}}function w(pe){for(var Xe=Rt.allocType(5123,pe.length),Ke=0;Ke>>31<<15,$e=(ge<<1>>>24)-127,ge=ge>>13&1023;Xe[Ke]=-24>$e?or:-14>$e?or+(ge+1024>>-14-$e):15<$e?or+31744:or+($e+15<<10)+ge}return Xe}function A(pe){return Array.isArray(pe)||At(pe)}function _(pe){return"[object "+pe+"]"}function y(pe){return Array.isArray(pe)&&(pe.length===0||typeof pe[0]=="number")}function E(pe){return!!(Array.isArray(pe)&&pe.length!==0&&A(pe[0]))}function T(pe){return Object.prototype.toString.call(pe)}function s(pe){if(!pe)return!1;var Xe=T(pe);return 0<=Ft.indexOf(Xe)?!0:y(pe)||E(pe)||c(pe)}function L(pe,Xe){pe.type===36193?(pe.data=w(Xe),Rt.freeType(Xe)):pe.data=Xe}function M(pe,Xe,Ke,or,$e,ge){if(pe=typeof yt[pe]<"u"?yt[pe]:xe[pe]*xt[Xe],ge&&(pe*=6),$e){for(or=0;1<=Ke;)or+=pe*Ke*Ke,Ke/=2;return or}return pe*Ke*or}function z(pe,Xe,Ke,or,$e,ge,se){function Ae(){this.format=this.internalformat=6408,this.type=5121,this.flipY=this.premultiplyAlpha=this.compressed=!1,this.unpackAlignment=1,this.colorSpace=37444,this.channels=this.height=this.width=0}function Ce(wr,nn){wr.internalformat=nn.internalformat,wr.format=nn.format,wr.type=nn.type,wr.compressed=nn.compressed,wr.premultiplyAlpha=nn.premultiplyAlpha,wr.flipY=nn.flipY,wr.unpackAlignment=nn.unpackAlignment,wr.colorSpace=nn.colorSpace,wr.width=nn.width,wr.height=nn.height,wr.channels=nn.channels}function Ie(wr,nn){if(typeof nn=="object"&&nn){"premultiplyAlpha"in nn&&(wr.premultiplyAlpha=nn.premultiplyAlpha),"flipY"in nn&&(wr.flipY=nn.flipY),"alignment"in nn&&(wr.unpackAlignment=nn.alignment),"colorSpace"in nn&&(wr.colorSpace=cn[nn.colorSpace]),"type"in nn&&(wr.type=rn[nn.type]);var $r=wr.width,dn=wr.height,Vn=wr.channels,Tn=!1;"shape"in nn?($r=nn.shape[0],dn=nn.shape[1],nn.shape.length===3&&(Vn=nn.shape[2],Tn=!0)):("radius"in nn&&($r=dn=nn.radius),"width"in nn&&($r=nn.width),"height"in nn&&(dn=nn.height),"channels"in nn&&(Vn=nn.channels,Tn=!0)),wr.width=$r|0,wr.height=dn|0,wr.channels=Vn|0,$r=!1,"format"in nn&&($r=nn.format,dn=wr.internalformat=Cn[$r],wr.format=_n[dn],$r in rn&&!("type"in nn)&&(wr.type=rn[$r]),$r in En&&(wr.compressed=!0),$r=!0),!Tn&&$r?wr.channels=xe[wr.format]:Tn&&!$r&&wr.channels!==de[wr.format]&&(wr.format=wr.internalformat=de[wr.channels])}}function Pe(wr){pe.pixelStorei(37440,wr.flipY),pe.pixelStorei(37441,wr.premultiplyAlpha),pe.pixelStorei(37443,wr.colorSpace),pe.pixelStorei(3317,wr.unpackAlignment)}function ke(){Ae.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ve(wr,nn){var $r=null;if(s(nn)?$r=nn:nn&&(Ie(wr,nn),"x"in nn&&(wr.xOffset=nn.x|0),"y"in nn&&(wr.yOffset=nn.y|0),s(nn.data)&&($r=nn.data)),nn.copy){var dn=$e.viewportWidth,Vn=$e.viewportHeight;wr.width=wr.width||dn-wr.xOffset,wr.height=wr.height||Vn-wr.yOffset,wr.needsCopy=!0}else if(!$r)wr.width=wr.width||1,wr.height=wr.height||1,wr.channels=wr.channels||4;else if(At($r))wr.channels=wr.channels||4,wr.data=$r,"type"in nn||wr.type!==5121||(wr.type=Ht[Object.prototype.toString.call($r)]|0);else if(y($r)){switch(wr.channels=wr.channels||4,dn=$r,Vn=dn.length,wr.type){case 5121:case 5123:case 5125:case 5126:Vn=Rt.allocType(wr.type,Vn),Vn.set(dn),wr.data=Vn;break;case 36193:wr.data=w(dn)}wr.alignment=1,wr.needsFree=!0}else if(c($r)){dn=$r.data,Array.isArray(dn)||wr.type!==5121||(wr.type=Ht[Object.prototype.toString.call(dn)]|0);var Vn=$r.shape,Tn=$r.stride,An,Bn,Jn,gi;Vn.length===3?(Jn=Vn[2],gi=Tn[2]):gi=Jn=1,An=Vn[0],Bn=Vn[1],Vn=Tn[0],Tn=Tn[1],wr.alignment=1,wr.width=An,wr.height=Bn,wr.channels=Jn,wr.format=wr.internalformat=de[Jn],wr.needsFree=!0,An=gi,$r=$r.offset,Jn=wr.width,gi=wr.height,Bn=wr.channels;for(var Di=Rt.allocType(wr.type===36193?5126:wr.type,Jn*gi*Bn),Sr=0,kr=0;kr>=Vn,$r.height>>=Vn,Ve($r,dn[Vn]),wr.mipmask|=1<nn;++nn)wr.images[nn]=null;return wr}function Qe(wr){for(var nn=wr.images,$r=0;$rwr){for(var nn=0;nn=--this.refCount&&xr(this)}}),se.profile&&(ge.getTotalTextureSize=function(){var wr=0;return Object.keys(di).forEach(function(nn){wr+=di[nn].stats.size}),wr}),{create2D:function(wr,nn){function $r(Vn,Tn){var An=dn.texInfo;er.call(An);var Bn=Oe();return typeof Vn=="number"?typeof Tn=="number"?Yt(Bn,Vn|0,Tn|0):Yt(Bn,Vn|0,Vn|0):Vn?(fr(An,Vn),Gt(Bn,Vn)):Yt(Bn,1,1),An.genMipmaps&&(Bn.mipmask=(Bn.width<<1)-1),dn.mipmask=Bn.mipmask,Ce(dn,Bn),dn.internalformat=Bn.internalformat,$r.width=Bn.width,$r.height=Bn.height,dr(dn),Ne(Bn,3553),rr(An,3553),mr(),Qe(Bn),se.profile&&(dn.stats.size=M(dn.internalformat,dn.type,Bn.width,Bn.height,An.genMipmaps,!1)),$r.format=Wr[dn.internalformat],$r.type=Ur[dn.type],$r.mag=an[An.magFilter],$r.min=pn[An.minFilter],$r.wrapS=gn[An.wrapS],$r.wrapT=gn[An.wrapT],$r}var dn=new He(3553);return di[dn.id]=dn,ge.textureCount++,$r(wr,nn),$r.subimage=function(Vn,Tn,An,Bn){Tn|=0,An|=0,Bn|=0;var Jn=ur();return Ce(Jn,dn),Jn.width=0,Jn.height=0,Ve(Jn,Vn),Jn.width=Jn.width||(dn.width>>Bn)-Tn,Jn.height=Jn.height||(dn.height>>Bn)-An,dr(dn),Je(Jn,3553,Tn,An,Bn),mr(),hr(Jn),$r},$r.resize=function(Vn,Tn){var An=Vn|0,Bn=Tn|0||An;if(An===dn.width&&Bn===dn.height)return $r;$r.width=dn.width=An,$r.height=dn.height=Bn,dr(dn);for(var Jn=0;dn.mipmask>>Jn;++Jn){var gi=An>>Jn,Di=Bn>>Jn;if(!gi||!Di)break;pe.texImage2D(3553,Jn,dn.format,gi,Di,0,dn.format,dn.type,null)}return mr(),se.profile&&(dn.stats.size=M(dn.internalformat,dn.type,An,Bn,!1,!1)),$r},$r._reglType="texture2d",$r._texture=dn,se.profile&&($r.stats=dn.stats),$r.destroy=function(){dn.decRef()},$r},createCube:function(wr,nn,$r,dn,Vn,Tn){function An(gi,Di,Sr,kr,Ar,Or){var xn,In=Bn.texInfo;for(er.call(In),xn=0;6>xn;++xn)Jn[xn]=Oe();if(typeof gi=="number"||!gi)for(gi=gi|0||1,xn=0;6>xn;++xn)Yt(Jn[xn],gi,gi);else if(typeof gi=="object")if(Di)Gt(Jn[0],gi),Gt(Jn[1],Di),Gt(Jn[2],Sr),Gt(Jn[3],kr),Gt(Jn[4],Ar),Gt(Jn[5],Or);else if(fr(In,gi),Ie(Bn,gi),"faces"in gi)for(gi=gi.faces,xn=0;6>xn;++xn)Ce(Jn[xn],Bn),Gt(Jn[xn],gi[xn]);else for(xn=0;6>xn;++xn)Gt(Jn[xn],gi);for(Ce(Bn,Jn[0]),Bn.mipmask=In.genMipmaps?(Jn[0].width<<1)-1:Jn[0].mipmask,Bn.internalformat=Jn[0].internalformat,An.width=Jn[0].width,An.height=Jn[0].height,dr(Bn),xn=0;6>xn;++xn)Ne(Jn[xn],34069+xn);for(rr(In,34067),mr(),se.profile&&(Bn.stats.size=M(Bn.internalformat,Bn.type,An.width,An.height,In.genMipmaps,!0)),An.format=Wr[Bn.internalformat],An.type=Ur[Bn.type],An.mag=an[In.magFilter],An.min=pn[In.minFilter],An.wrapS=gn[In.wrapS],An.wrapT=gn[In.wrapT],xn=0;6>xn;++xn)Qe(Jn[xn]);return An}var Bn=new He(34067);di[Bn.id]=Bn,ge.cubeCount++;var Jn=Array(6);return An(wr,nn,$r,dn,Vn,Tn),An.subimage=function(gi,Di,Sr,kr,Ar){Sr|=0,kr|=0,Ar|=0;var Or=ur();return Ce(Or,Bn),Or.width=0,Or.height=0,Ve(Or,Di),Or.width=Or.width||(Bn.width>>Ar)-Sr,Or.height=Or.height||(Bn.height>>Ar)-kr,dr(Bn),Je(Or,34069+gi,Sr,kr,Ar),mr(),hr(Or),An},An.resize=function(gi){if(gi|=0,gi!==Bn.width){An.width=Bn.width=gi,An.height=Bn.height=gi,dr(Bn);for(var Di=0;6>Di;++Di)for(var Sr=0;Bn.mipmask>>Sr;++Sr)pe.texImage2D(34069+Di,Sr,Bn.format,gi>>Sr,gi>>Sr,0,Bn.format,Bn.type,null);return mr(),se.profile&&(Bn.stats.size=M(Bn.internalformat,Bn.type,An.width,An.height,!1,!0)),An}},An._reglType="textureCube",An._texture=Bn,se.profile&&(An.stats=Bn.stats),An.destroy=function(){Bn.decRef()},An},clear:function(){for(var wr=0;wrdn;++dn)if($r.mipmask&1<>dn,$r.height>>dn,0,$r.internalformat,$r.type,null);else for(var Vn=0;6>Vn;++Vn)pe.texImage2D(34069+Vn,dn,$r.internalformat,$r.width>>dn,$r.height>>dn,0,$r.internalformat,$r.type,null);rr($r.texInfo,$r.target)})},refresh:function(){for(var wr=0;wrpr;++pr){for(rn=0;rnxr;++xr)mr[xr].resize(pr);return dr.width=dr.height=pr,dr},_reglType:"framebufferCube",destroy:function(){mr.forEach(function(xr){xr.destroy()})}})},clear:function(){mt(rr).forEach(vr)},restore:function(){Ne.cur=null,Ne.next=null,Ne.dirty=!0,mt(rr).forEach(function(He){He.framebuffer=pe.createFramebuffer(),Yt(He)})}})}function N(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function I(pe,Xe,Ke,or,$e,ge,se){function Ae(Yt){if(Yt!==vr.currentVAO){var Gt=Xe.oes_vertex_array_object;Yt?Gt.bindVertexArrayOES(Yt.vao):Gt.bindVertexArrayOES(null),vr.currentVAO=Yt}}function Ce(Yt){if(Yt!==vr.currentVAO){if(Yt)Yt.bindAttrs();else{for(var Gt=Xe.angle_instanced_arrays,Ne=0;Ne=dr.byteLength?mr.subdata(dr):(mr.destroy(),Ne.buffers[fr]=null)),Ne.buffers[fr]||(mr=Ne.buffers[fr]=$e.create(rr,34962,!1,!0)),He.buffer=$e.getBuffer(mr),He.size=He.buffer.dimension|0,He.normalized=!1,He.type=He.buffer.dtype,He.offset=0,He.stride=0,He.divisor=0,He.state=1,Oe[fr]=1}else $e.getBuffer(rr)?(He.buffer=$e.getBuffer(rr),He.size=He.buffer.dimension|0,He.normalized=!1,He.type=He.buffer.dtype,He.offset=0,He.stride=0,He.divisor=0,He.state=1):$e.getBuffer(rr.buffer)?(He.buffer=$e.getBuffer(rr.buffer),He.size=(+rr.size||He.buffer.dimension)|0,He.normalized=!!rr.normalized||!1,He.type="type"in rr?Ut[rr.type]:He.buffer.dtype,He.offset=(rr.offset||0)|0,He.stride=(rr.stride||0)|0,He.divisor=(rr.divisor||0)|0,He.state=1):"x"in rr&&(He.x=+rr.x||0,He.y=+rr.y||0,He.z=+rr.z||0,He.w=+rr.w||0,He.state=2)}for(mr=0;mrur&&(ur=hr.stats.uniformsCount)}),ur},Ke.getMaxAttributesCount=function(){var ur=0;return Ve.forEach(function(hr){hr.stats.attributesCount>ur&&(ur=hr.stats.attributesCount)}),ur}),{clear:function(){var ur=pe.deleteShader.bind(pe);mt(Ie).forEach(ur),Ie={},mt(Pe).forEach(ur),Pe={},Ve.forEach(function(hr){pe.deleteProgram(hr.program)}),Ve.length=0,ke={},Ke.shaderCount=0},program:function(ur,hr,vr,Yt){var Gt=ke[hr];Gt||(Gt=ke[hr]={});var Ne=Gt[ur];if(Ne&&(Ne.refCount++,!Yt))return Ne;var Oe=new Ae(hr,ur);return Ke.shaderCount++,Ce(Oe,vr,Yt),Ne||(Gt[ur]=Oe),Ve.push(Oe),nt(Oe,{destroy:function(){if(Oe.refCount--,0>=Oe.refCount){pe.deleteProgram(Oe.program);var Qe=Ve.indexOf(Oe);Ve.splice(Qe,1),Ke.shaderCount--}0>=Gt[Oe.vertId].refCount&&(pe.deleteShader(Pe[Oe.vertId]),delete Pe[Oe.vertId],delete ke[Oe.fragId][Oe.vertId]),Object.keys(ke[Oe.fragId]).length||(pe.deleteShader(Ie[Oe.fragId]),delete Ie[Oe.fragId],delete ke[Oe.fragId])}})},restore:function(){Ie={},Pe={};for(var ur=0;ur>2),or=0;or>5]|=(pe.charCodeAt(or/8)&255)<<24-or%32;var Ke=8*pe.length;pe=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225];var or=Array(64),$e,ge,se,Ae,Ce,Ie,Pe,ke,Ve,Je,ur;for(Xe[Ke>>5]|=128<<24-Ke%32,Xe[(Ke+64>>9<<4)+15]=Ke,ke=0;keVe;Ve++){if(16>Ve)or[Ve]=Xe[Ve+ke];else{Je=Ve,ur=or[Ve-2],ur=j(ur,17)^j(ur,19)^ur>>>10,ur=et(ur,or[Ve-7]);var hr;hr=or[Ve-15],hr=j(hr,7)^j(hr,18)^hr>>>3,or[Je]=et(et(ur,hr),or[Ve-16])}Je=Ae,Je=j(Je,6)^j(Je,11)^j(Je,25),Je=et(et(et(et(Pe,Je),Ae&Ce^~Ae&Ie),ie[Ve]),or[Ve]),Pe=Ke,Pe=j(Pe,2)^j(Pe,13)^j(Pe,22),ur=et(Pe,Ke&$e^Ke&ge^$e&ge),Pe=Ie,Ie=Ce,Ce=Ae,Ae=et(se,Je),se=ge,ge=$e,$e=Ke,Ke=et(Je,ur)}pe[0]=et(Ke,pe[0]),pe[1]=et($e,pe[1]),pe[2]=et(ge,pe[2]),pe[3]=et(se,pe[3]),pe[4]=et(Ae,pe[4]),pe[5]=et(Ce,pe[5]),pe[6]=et(Ie,pe[6]),pe[7]=et(Pe,pe[7])}for(Xe="",or=0;or<32*pe.length;or+=8)Xe+=String.fromCharCode(pe[or>>5]>>>24-or%32&255);return Xe}function H(pe){for(var Xe="",Ke,or=0;or>>4&15)+"0123456789abcdef".charAt(Ke&15);return Xe}function Y(pe){for(var Xe="",Ke=-1,or,$e;++Ke=or&&56320<=$e&&57343>=$e&&(or=65536+((or&1023)<<10)+($e&1023),Ke++),127>=or?Xe+=String.fromCharCode(or):2047>=or?Xe+=String.fromCharCode(192|or>>>6&31,128|or&63):65535>=or?Xe+=String.fromCharCode(224|or>>>12&15,128|or>>>6&63,128|or&63):2097151>=or&&(Xe+=String.fromCharCode(240|or>>>18&7,128|or>>>12&63,128|or>>>6&63,128|or&63));return Xe}function j(pe,Xe){return pe>>>Xe|pe<<32-Xe}function et(pe,Xe){var Ke=(pe&65535)+(Xe&65535);return(pe>>16)+(Xe>>16)+(Ke>>16)<<16|Ke&65535}function it(pe){return Array.prototype.slice.call(pe)}function ut(pe){return it(pe).join("")}function J(pe){function Xe(){var Pe=[],ke=[];return nt(function(){Pe.push.apply(Pe,it(arguments))},{def:function(){var Ve="v"+$e++;return ke.push(Ve),0"+pi+"?"+Vr+".constant["+pi+"]:0;"}).join(""),"}}else{","if(",wn,"(",Vr,".buffer)){",On,"=",Ln,".createStream(",34962,",",Vr,".buffer);","}else{",On,"=",Ln,".getBuffer(",Vr,".buffer);","}",mi,'="type" in ',Vr,"?",Qr.glTypes,"[",Vr,".type]:",On,".dtype;",Pn.normalized,"=!!",Vr,".normalized;"),Zr("size"),Zr("offset"),Zr("stride"),Zr("divisor"),Er("}}"),Er.exit("if(",Pn.isStream,"){",Ln,".destroyStream(",On,");","}"),Pn})}),xn}function pr(Sr){var kr=Sr.static,Ar=Sr.dynamic,Or={};return Object.keys(kr).forEach(function(xn){var In=kr[xn];Or[xn]=oe(function(hn,sn){return typeof In=="number"||typeof In=="boolean"?""+In:hn.link(In)})}),Object.keys(Ar).forEach(function(xn){var In=Ar[xn];Or[xn]=$(In,function(hn,sn){return hn.invoke(sn,In)})}),Or}function Gr(Sr,kr,Ar,Or,xn){function In(Un){var On=sn[Un];On&&(Zr[Un]=On)}var hn=fr(Sr,kr),wn=Qt(Sr),sn=tr(Sr,wn),Er=Vt(Sr),Zr=dr(Sr),Vr=rr(Sr,xn,hn);In("viewport"),In(vr("scissor.box"));var Qr=0"u"?"Date.now()":"performance.now()"}function hn(Un){Ln=kr.def(),Un(Ln,"=",In(),";"),typeof xn=="string"?Un(Vr,".count+=",xn,";"):Un(Vr,".count++;"),Jt&&(Or?(Pn=kr.def(),Un(Pn,"=",wn,".getNumPendingQueries();")):Un(wn,".beginQuery(",Vr,");"))}function sn(Un){Un(Vr,".cpuTime+=",In(),"-",Ln,";"),Jt&&(Or?Un(wn,".pushScopeStats(",Pn,",",wn,".getNumPendingQueries(),",Vr,");"):Un(wn,".endQuery();"))}function Er(Un){var On=kr.def(Qr,".profile");kr(Qr,".profile=",Un,";"),kr.exit(Qr,".profile=",On,";")}var Zr=Sr.shared,Vr=Sr.stats,Qr=Zr.current,wn=Zr.timer;Ar=Ar.profile;var Ln,Pn;if(Ar){if(Q(Ar)){Ar.enable?(hn(kr),sn(kr.exit),Er("true")):Er("false");return}Ar=Ar.append(Sr,kr),Er(Ar)}else Ar=kr.def(Qr,".profile");Zr=Sr.block(),hn(Zr),kr("if(",Ar,"){",Zr,"}"),Sr=Sr.block(),sn(Sr),kr.exit("if(",Ar,"){",Sr,"}")}function Tr(Sr,kr,Ar,Or,xn){function In(Er){switch(Er){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}function hn(Er,Zr,Vr){function Qr(){kr("if(!",Un,".buffer){",Ln,".enableVertexAttribArray(",Pn,");}");var pi=Vr.type,Ci;Ci=Vr.size?kr.def(Vr.size,"||",Zr):Zr,kr("if(",Un,".type!==",pi,"||",Un,".size!==",Ci,"||",ai.map(function(pa){return Un+"."+pa+"!=="+Vr[pa]}).join("||"),"){",Ln,".bindBuffer(",34962,",",On,".buffer);",Ln,".vertexAttribPointer(",[Pn,Ci,pi,Vr.normalized,Vr.stride,Vr.offset],");",Un,".type=",pi,";",Un,".size=",Ci,";",ai.map(function(pa){return Un+"."+pa+"="+Vr[pa]+";"}).join(""),"}"),wr&&(pi=Vr.divisor,kr("if(",Un,".divisor!==",pi,"){",Sr.instancing,".vertexAttribDivisorANGLE(",[Pn,pi],");",Un,".divisor=",pi,";}"))}function wn(){kr("if(",Un,".buffer){",Ln,".disableVertexAttribArray(",Pn,");",Un,".buffer=null;","}if(",mt.map(function(pi,Ci){return Un+"."+pi+"!=="+mi[Ci]}).join("||"),"){",Ln,".vertexAttrib4f(",Pn,",",mi,");",mt.map(function(pi,Ci){return Un+"."+pi+"="+mi[Ci]+";"}).join(""),"}")}var Ln=sn.gl,Pn=kr.def(Er,".location"),Un=kr.def(sn.attributes,"[",Pn,"]");Er=Vr.state;var On=Vr.buffer,mi=[Vr.x,Vr.y,Vr.z,Vr.w],ai=["buffer","normalized","offset","stride"];Er===1?Qr():Er===2?wn():(kr("if(",Er,"===",1,"){"),Qr(),kr("}else{"),wn(),kr("}"))}var sn=Sr.shared;Or.forEach(function(Er){var Zr=Er.name,Vr=Ar.attributes[Zr],Qr;if(Vr){if(!xn(Vr))return;Qr=Vr.append(Sr,kr)}else{if(!xn(Bt))return;var wn=Sr.scopeAttrib(Zr);Qr={},Object.keys(new li).forEach(function(Ln){Qr[Ln]=kr.def(wn,".",Ln)})}hn(Sr.link(Er),In(Er.info.type),Qr)})}function Cr(Sr,kr,Ar,Or,xn,In){for(var hn=Sr.shared,sn=hn.gl,Er,Zr=0;Zr>1)",Un],");")}function Ci(){Ar(On,".drawArraysInstancedANGLE(",[wn,Ln,Pn,Un],");")}Qr&&Qr!=="null"?ai?pi():(Ar("if(",Qr,"){"),pi(),Ar("}else{"),Ci(),Ar("}")):Ci()}function hn(){function pi(){Ar(Er+".drawElements("+[wn,Pn,mi,Ln+"<<(("+mi+"-5121)>>1)"]+");")}function Ci(){Ar(Er+".drawArrays("+[wn,Ln,Pn]+");")}Qr&&Qr!=="null"?ai?pi():(Ar("if(",Qr,"){"),pi(),Ar("}else{"),Ci(),Ar("}")):Ci()}var sn=Sr.shared,Er=sn.gl,Zr=sn.draw,Vr=Or.draw,Qr=function(){var pi=Vr.elements,Ci=kr;return pi?((pi.contextDep&&Or.contextDynamic||pi.propDep)&&(Ci=Ar),pi=pi.append(Sr,Ci),Vr.elementsActive&&Ci("if("+pi+")"+Er+".bindBuffer(34963,"+pi+".buffer.buffer);")):(pi=Ci.def(),Ci(pi,"=",Zr,".","elements",";","if(",pi,"){",Er,".bindBuffer(",34963,",",pi,".buffer.buffer);}","else if(",sn.vao,".currentVAO){",pi,"=",Sr.shared.elements+".getElements("+sn.vao,".currentVAO.elements);",$r?"":"if("+pi+")"+Er+".bindBuffer(34963,"+pi+".buffer.buffer);","}")),pi}(),wn=xn("primitive"),Ln=xn("offset"),Pn=function(){var pi=Vr.count,Ci=kr;return pi?((pi.contextDep&&Or.contextDynamic||pi.propDep)&&(Ci=Ar),pi=pi.append(Sr,Ci)):pi=Ci.def(Zr,".","count"),pi}();if(typeof Pn=="number"){if(Pn===0)return}else Ar("if(",Pn,"){"),Ar.exit("}");var Un,On;wr&&(Un=xn("instances"),On=Sr.instancing);var mi=Qr+".type",ai=Vr.elements&&Q(Vr.elements)&&!Vr.vaoActive;wr&&(typeof Un!="number"||0<=Un)?typeof Un=="string"?(Ar("if(",Un,">0){"),In(),Ar("}else if(",Un,"<0){"),hn(),Ar("}")):In():hn()}function Ur(Sr,kr,Ar,Or,xn){return kr=Nt(),xn=kr.proc("body",xn),wr&&(kr.instancing=xn.def(kr.shared.extensions,".angle_instanced_arrays")),Sr(kr,xn,Ar,Or),kr.compile().body}function an(Sr,kr,Ar,Or){Cn(Sr,kr),Ar.useVAO?Ar.drawVAO?kr(Sr.shared.vao,".setVAO(",Ar.drawVAO.append(Sr,kr),");"):kr(Sr.shared.vao,".setVAO(",Sr.shared.vao,".targetVAO);"):(kr(Sr.shared.vao,".setVAO(null);"),Tr(Sr,kr,Ar,Or.attributes,function(){return!0})),Cr(Sr,kr,Ar,Or.uniforms,function(){return!0},!1),Wr(Sr,kr,kr,Ar)}function pn(Sr,kr){var Ar=Sr.proc("draw",1);Cn(Sr,Ar),Pr(Sr,Ar,kr.context),Dr(Sr,Ar,kr.framebuffer),cn(Sr,Ar,kr),rn(Sr,Ar,kr.state),En(Sr,Ar,kr,!1,!0);var Or=kr.shader.progVar.append(Sr,Ar);if(Ar(Sr.shared.gl,".useProgram(",Or,".program);"),kr.shader.program)an(Sr,Ar,kr,kr.shader.program);else{Ar(Sr.shared.vao,".setVAO(null);");var xn=Sr.global.def("{}"),In=Ar.def(Or,".id"),hn=Ar.def(xn,"[",In,"]");Ar(Sr.cond(hn).then(hn,".call(this,a0);").else(hn,"=",xn,"[",In,"]=",Sr.link(function(sn){return Ur(an,Sr,kr,sn,1)}),"(",Or,");",hn,".call(this,a0);"))}0=--this.refCount&&st(this)},$t.profile&&(or.getTotalRenderbufferSize=function(){var kt=0;return Object.keys(Pt).forEach(function(Ht){kt+=Pt[Ht].stats.size}),kt}),{create:function(kt,Ht){function Jt(hr,vr){var Ye=0,Ge=0,Nt=32854;if(typeof hr=="object"&&hr?("shape"in hr?(Ge=hr.shape,Ye=Ge[0]|0,Ge=Ge[1]|0):("radius"in hr&&(Ye=Ge=hr.radius|0),"width"in hr&&(Ye=hr.width|0),"height"in hr&&(Ge=hr.height|0)),"format"in hr&&(Nt=At[hr.format])):typeof hr=="number"?(Ye=hr|0,Ge=typeof vr=="number"?vr|0:Ye):hr||(Ye=Ge=1),Ye!==ur.width||Ge!==ur.height||Nt!==ur.format)return Jt.width=ur.width=Ye,Jt.height=ur.height=Ge,ur.format=Nt,pt.bindRenderbuffer(36161,ur.renderbuffer),pt.renderbufferStorage(36161,Nt,Ye,Ge),$t.profile&&(ur.stats.size=Ee[ur.format]*ur.width*ur.height),Jt.format=Ct[ur.format],Jt}var ur=new gt(pt.createRenderbuffer());return Pt[ur.id]=ur,or.renderbufferCount++,Jt(kt,Ht),Jt.resize=function(hr,vr){var Ye=hr|0,Ge=vr|0||Ye;return Ye===ur.width&&Ge===ur.height||(Jt.width=ur.width=Ye,Jt.height=ur.height=Ge,pt.bindRenderbuffer(36161,ur.renderbuffer),pt.renderbufferStorage(36161,ur.format,Ye,Ge),$t.profile&&(ur.stats.size=Ee[ur.format]*ur.width*ur.height)),Jt},Jt._reglType="renderbuffer",Jt._renderbuffer=ur,$t.profile&&(Jt.stats=ur.stats),Jt.destroy=function(){ur.decRef()},Jt},clear:function(){me(Pt).forEach(st)},restore:function(){me(Pt).forEach(function(kt){kt.renderbuffer=pt.createRenderbuffer(),pt.bindRenderbuffer(36161,kt.renderbuffer),pt.renderbufferStorage(36161,kt.format,kt.width,kt.height)}),pt.bindRenderbuffer(36161,null)}}},Ne=[];Ne[6408]=4,Ne[6407]=3;var je=[];je[5121]=1,je[5126]=4,je[36193]=2;var it=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],mt=["x","y","z","w"],bt="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),vt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Lt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ct={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Tt={cw:2304,ccw:2305},Bt=new G(!1,!1,!1,function(){}),ir=function(pt,Xt){function Kt(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function or(Pt,kt,Ht){var Jt=st.pop()||new Kt;Jt.startQueryIndex=Pt,Jt.endQueryIndex=kt,Jt.sum=0,Jt.stats=Ht,At.push(Jt)}if(!Xt.ext_disjoint_timer_query)return null;var $t=[],gt=[],st=[],At=[],Ct=[],It=[];return{beginQuery:function(Pt){var kt=$t.pop()||Xt.ext_disjoint_timer_query.createQueryEXT();Xt.ext_disjoint_timer_query.beginQueryEXT(35007,kt),gt.push(kt),or(gt.length-1,gt.length,Pt)},endQuery:function(){Xt.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:or,update:function(){var Pt,kt;if(Pt=gt.length,Pt!==0){It.length=Math.max(It.length,Pt+1),Ct.length=Math.max(Ct.length,Pt+1),Ct[0]=0;var Ht=It[0]=0;for(kt=Pt=0;kt=En.length&&or()}var _n=se(En,pn);En[_n]=gn}}}function It(){var pn=rn.viewport,gn=rn.scissor_box;pn[0]=pn[1]=gn[0]=gn[1]=0,tr.viewportWidth=tr.framebufferWidth=tr.drawingBufferWidth=pn[2]=gn[2]=Jt.drawingBufferWidth,tr.viewportHeight=tr.framebufferHeight=tr.drawingBufferHeight=pn[3]=gn[3]=Jt.drawingBufferHeight}function Pt(){tr.tick+=1,tr.time=Ht(),It(),Dr.procs.poll()}function kt(){pr.refresh(),It(),Dr.procs.refresh(),Nt&&Nt.update()}function Ht(){return(we()-Ot)/1e3}if(pt=r(pt),!pt)return null;var Jt=pt.gl,ur=Jt.getContextAttributes();Jt.isContextLost();var hr=t(Jt,pt);if(!hr)return null;var cn=i(),vr={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Ye=pt.cachedCode||{},Ge=hr.extensions,Nt=ir(Jt,Ge),Ot=we(),fr=Jt.drawingBufferWidth,Qt=Jt.drawingBufferHeight,tr={tick:0,time:0,viewportWidth:fr,viewportHeight:Qt,framebufferWidth:fr,framebufferHeight:Qt,drawingBufferWidth:fr,drawingBufferHeight:Qt,pixelRatio:pt.pixelRatio},fr={elements:null,primitive:4,count:-1,offset:0,instances:-1},rr=be(Jt,Ge),Vt=o(Jt,vr,pt,function(pn){return mr.destroyBuffer(pn)}),dr=d(Jt,Ge,Vt,vr),mr=I(Jt,Ge,rr,vr,Vt,dr,fr),xr=k(Jt,cn,vr,pt),pr=z(Jt,Ge,rr,function(){Dr.procs.poll()},tr,vr,pt),Gr=Me(Jt,Ge,rr,vr,pt),Pr=D(Jt,Ge,rr,pr,Gr,vr),Dr=Z(Jt,cn,Ge,rr,Vt,dr,pr,Pr,{},mr,xr,fr,tr,Nt,Ye,pt),cn=B(Jt,Pr,Dr.procs.poll,tr),rn=Dr.next,Cn=Jt.canvas,En=[],Tr=[],Cr=[],Wr=[pt.onDestroy],Ur=null;Cn&&(Cn.addEventListener("webglcontextlost",$t,!1),Cn.addEventListener("webglcontextrestored",gt,!1));var an=Pr.setFBO=st({framebuffer:ge.define.call(null,1,"framebuffer")});return kt(),ur=ne(st,{clear:function(pn){if("framebuffer"in pn)if(pn.framebuffer&&pn.framebuffer_reglType==="framebufferCube")for(var gn=0;6>gn;++gn)an(ne({framebuffer:pn.framebuffer.faces[gn]},pn),At);else an(pn,At);else At(null,pn)},prop:ge.define.bind(null,1),context:ge.define.bind(null,2),this:ge.define.bind(null,3),draw:st({}),buffer:function(pn){return Vt.create(pn,34962,!1,!1)},elements:function(pn){return dr.create(pn,!1)},texture:pr.create2D,cube:pr.createCube,renderbuffer:Gr.create,framebuffer:Pr.create,framebufferCube:Pr.createCube,vao:mr.createVAO,attributes:ur,frame:Ct,on:function(pn,gn){var _n;switch(pn){case"frame":return Ct(gn);case"lost":_n=Tr;break;case"restore":_n=Cr;break;case"destroy":_n=Wr}return _n.push(gn),{cancel:function(){for(var kn=0;kn<_n.length;++kn)if(_n[kn]===gn){_n[kn]=_n[_n.length-1],_n.pop();break}}}},limits:rr,hasExtension:function(pn){return 0<=rr.extensions.indexOf(pn.toLowerCase())},read:cn,destroy:function(){En.length=0,or(),Cn&&(Cn.removeEventListener("webglcontextlost",$t),Cn.removeEventListener("webglcontextrestored",gt)),xr.clear(),Pr.clear(),Gr.clear(),mr.clear(),pr.clear(),dr.clear(),Vt.clear(),Nt&&Nt.clear(),Wr.forEach(function(pn){pn()})},_gl:Jt,_refresh:kt,poll:function(){Pt(),Nt&&Nt.update()},now:Ht,stats:vr,getCachedCode:function(){return Ye},preloadCachedCode:function(pn){Object.entries(pn).forEach(function(gn){Ye[gn[0]]=gn[1]})}}),pt.onDone(null,ur),ur}})},30456:function(H,U,e){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var g=e(33576),C=g.Buffer;function i(x,v){for(var p in x)v[p]=x[p]}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?H.exports=g:(i(g,U),U.Buffer=S);function S(x,v,p){return C(x,v,p)}S.prototype=Object.create(C.prototype),i(C,S),S.from=function(x,v,p){if(typeof x=="number")throw new TypeError("Argument must not be a number");return C(x,v,p)},S.alloc=function(x,v,p){if(typeof x!="number")throw new TypeError("Argument must be a number");var r=C(x);return v!==void 0?typeof p=="string"?r.fill(v,p):r.fill(v):r.fill(0),r},S.allocUnsafe=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return C(x)},S.allocUnsafeSlow=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return g.SlowBuffer(x)}},14500:function(H,U,e){var g=e(53664),C=e(64348),i=e(39640)(),S=e(2304),x=g("%TypeError%"),v=g("%Math.floor%");H.exports=function(r,t){if(typeof r!="function")throw new x("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||v(t)!==t)throw new x("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],n=!0,f=!0;if("length"in r&&S){var c=S(r,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(f=!1)}return(n||f||!a)&&(i?C(r,"length",t,!0,!0):C(r,"length",t)),r}},29936:function(H,U,e){H.exports=i;var g=e(61252).EventEmitter,C=e(6768);C(i,g),i.Readable=e(12348),i.Writable=e(11288),i.Duplex=e(15316),i.Transform=e(22477),i.PassThrough=e(27136),i.finished=e(15932),i.pipeline=e(38180),i.Stream=i;function i(){g.call(this)}i.prototype.pipe=function(S,x){var v=this;function p(l){S.writable&&S.write(l)===!1&&v.pause&&v.pause()}v.on("data",p);function r(){v.readable&&v.resume&&v.resume()}S.on("drain",r),!S._isStdio&&(!x||x.end!==!1)&&(v.on("end",a),v.on("close",n));var t=!1;function a(){t||(t=!0,S.end())}function n(){t||(t=!0,typeof S.destroy=="function"&&S.destroy())}function f(l){if(c(),g.listenerCount(this,"error")===0)throw l}v.on("error",f),S.on("error",f);function c(){v.removeListener("data",p),S.removeListener("drain",r),v.removeListener("end",a),v.removeListener("close",n),v.removeListener("error",f),S.removeListener("error",f),v.removeListener("end",c),v.removeListener("close",c),S.removeListener("close",c)}return v.on("end",c),v.on("close",c),S.on("close",c),S.emit("pipe",v),S}},92784:function(H){function U(v,p){v.prototype=Object.create(p.prototype),v.prototype.constructor=v,v.__proto__=p}var e={};function g(v,p,r){r||(r=Error);function t(n,f,c){return typeof p=="string"?p:p(n,f,c)}var a=function(n){U(f,n);function f(c,l,m){return n.call(this,t(c,l,m))||this}return f}(r);a.prototype.name=r.name,a.prototype.code=v,e[v]=a}function C(v,p){if(Array.isArray(v)){var r=v.length;return v=v.map(function(t){return String(t)}),r>2?"one of ".concat(p," ").concat(v.slice(0,r-1).join(", "),", or ")+v[r-1]:r===2?"one of ".concat(p," ").concat(v[0]," or ").concat(v[1]):"of ".concat(p," ").concat(v[0])}else return"of ".concat(p," ").concat(String(v))}function i(v,p,r){return v.substr(!r||r<0?0:+r,p.length)===p}function S(v,p,r){return(r===void 0||r>v.length)&&(r=v.length),v.substring(r-p.length,r)===p}function x(v,p,r){return typeof r!="number"&&(r=0),r+p.length>v.length?!1:v.indexOf(p,r)!==-1}g("ERR_INVALID_OPT_VALUE",function(v,p){return'The value "'+p+'" is invalid for option "'+v+'"'},TypeError),g("ERR_INVALID_ARG_TYPE",function(v,p,r){var t;typeof p=="string"&&i(p,"not ")?(t="must not be",p=p.replace(/^not /,"")):t="must be";var a;if(S(v," argument"))a="The ".concat(v," ").concat(t," ").concat(C(p,"type"));else{var n=x(v,".")?"property":"argument";a='The "'.concat(v,'" ').concat(n," ").concat(t," ").concat(C(p,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError),g("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),g("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),g("ERR_STREAM_PREMATURE_CLOSE","Premature close"),g("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),g("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),g("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),g("ERR_STREAM_WRITE_AFTER_END","write after end"),g("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),g("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),g("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),H.exports.i=e},15316:function(H,U,e){var g=e(4168),C=Object.keys||function(n){var f=[];for(var c in n)f.push(c);return f};H.exports=r;var i=e(12348),S=e(11288);e(6768)(r,i);for(var x=C(S.prototype),v=0;v0)if(typeof Z!="string"&&!ge.objectMode&&Object.getPrototypeOf(Z)!==x.prototype&&(Z=p(Z)),ne)ge.endEmitted?_($,new o):M($,ge,Z,!0);else if(ge.ended)_($,new b);else{if(ge.destroyed)return!1;ge.reading=!1,ge.decoder&&!se?(Z=ge.decoder.write(Z),ge.objectMode||Z.length!==0?M($,ge,Z,!1):V($,ge)):M($,ge,Z,!1)}else ne||(ge.reading=!1,V($,ge))}return!ge.ended&&(ge.length=D?$=D:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function I($,Z){return $<=0||Z.length===0&&Z.ended?0:Z.objectMode?1:$!==$?Z.flowing&&Z.length?Z.buffer.head.data.length:Z.length:($>Z.highWaterMark&&(Z.highWaterMark=N($)),$<=Z.length?$:Z.ended?Z.length:(Z.needReadable=!0,0))}s.prototype.read=function($){a("read",$),$=parseInt($,10);var Z=this._readableState,se=$;if($!==0&&(Z.emittedReadable=!1),$===0&&Z.needReadable&&((Z.highWaterMark!==0?Z.length>=Z.highWaterMark:Z.length>0)||Z.ended))return a("read: emitReadable",Z.length,Z.ended),Z.length===0&&Z.ended?G(this):B(this),null;if($=I($,Z),$===0&&Z.ended)return Z.length===0&&G(this),null;var ne=Z.needReadable;a("need readable",ne),(Z.length===0||Z.length-$0?ce=ee($,Z):ce=null,ce===null?(Z.needReadable=Z.length<=Z.highWaterMark,$=0):(Z.length-=$,Z.awaitDrain=0),Z.length===0&&(Z.ended||(Z.needReadable=!0),se!==$&&Z.ended&&G(this)),ce!==null&&this.emit("data",ce),ce};function k($,Z){if(a("onEofChunk"),!Z.ended){if(Z.decoder){var se=Z.decoder.end();se&&se.length&&(Z.buffer.push(se),Z.length+=Z.objectMode?1:se.length)}Z.ended=!0,Z.sync?B($):(Z.needReadable=!1,Z.emittedReadable||(Z.emittedReadable=!0,O($)))}}function B($){var Z=$._readableState;a("emitReadable",Z.needReadable,Z.emittedReadable),Z.needReadable=!1,Z.emittedReadable||(a("emitReadable",Z.flowing),Z.emittedReadable=!0,g.nextTick(O,$))}function O($){var Z=$._readableState;a("emitReadable_",Z.destroyed,Z.length,Z.ended),!Z.destroyed&&(Z.length||Z.ended)&&($.emit("readable"),Z.emittedReadable=!1),Z.needReadable=!Z.flowing&&!Z.ended&&Z.length<=Z.highWaterMark,X($)}function V($,Z){Z.readingMore||(Z.readingMore=!0,g.nextTick(Y,$,Z))}function Y($,Z){for(;!Z.reading&&!Z.ended&&(Z.length1&&oe(ne.pipes,$)!==-1)&&!be&&(a("false write response, pause",ne.awaitDrain),ne.awaitDrain++),se.pause())}function Le(He){a("onerror",He),ke(),$.removeListener("error",Le),i($,"error")===0&&_($,He)}E($,"error",Le);function Ve(){$.removeListener("finish",Ue),ke()}$.once("close",Ve);function Ue(){a("onfinish"),$.removeListener("close",Ve),ke()}$.once("finish",Ue);function ke(){a("unpipe"),se.unpipe($)}return $.emit("pipe",se),ne.flowing||(a("pipe resume"),se.resume()),$};function j($){return function(){var se=$._readableState;a("pipeOnDrain",se.awaitDrain),se.awaitDrain&&se.awaitDrain--,se.awaitDrain===0&&i($,"data")&&(se.flowing=!0,X($))}}s.prototype.unpipe=function($){var Z=this._readableState,se={hasUnpiped:!1};if(Z.pipesCount===0)return this;if(Z.pipesCount===1)return $&&$!==Z.pipes?this:($||($=Z.pipes),Z.pipes=null,Z.pipesCount=0,Z.flowing=!1,$&&$.emit("unpipe",this,se),this);if(!$){var ne=Z.pipes,ce=Z.pipesCount;Z.pipes=null,Z.pipesCount=0,Z.flowing=!1;for(var ge=0;ge0,ne.flowing!==!1&&this.resume()):$==="readable"&&!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,a("on readable",ne.length,ne.reading),ne.length?B(this):ne.reading||g.nextTick(ie,this)),se},s.prototype.addListener=s.prototype.on,s.prototype.removeListener=function($,Z){var se=S.prototype.removeListener.call(this,$,Z);return $==="readable"&&g.nextTick(te,this),se},s.prototype.removeAllListeners=function($){var Z=S.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&g.nextTick(te,this),Z};function te($){var Z=$._readableState;Z.readableListening=$.listenerCount("readable")>0,Z.resumeScheduled&&!Z.paused?Z.flowing=!0:$.listenerCount("data")>0&&$.resume()}function ie($){a("readable nexttick read 0"),$.read(0)}s.prototype.resume=function(){var $=this._readableState;return $.flowing||(a("resume"),$.flowing=!$.readableListening,ue(this,$)),$.paused=!1,this};function ue($,Z){Z.resumeScheduled||(Z.resumeScheduled=!0,g.nextTick(J,$,Z))}function J($,Z){a("resume",Z.reading),Z.reading||$.read(0),Z.resumeScheduled=!1,$.emit("resume"),X($),Z.flowing&&!Z.reading&&$.read(0)}s.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function X($){var Z=$._readableState;for(a("flow",Z.flowing);Z.flowing&&$.read()!==null;);}s.prototype.wrap=function($){var Z=this,se=this._readableState,ne=!1;$.on("end",function(){if(a("wrapped end"),se.decoder&&!se.ended){var Te=se.decoder.end();Te&&Te.length&&Z.push(Te)}Z.push(null)}),$.on("data",function(Te){if(a("wrapped data"),se.decoder&&(Te=se.decoder.write(Te)),!(se.objectMode&&Te==null)&&!(!se.objectMode&&(!Te||!Te.length))){var we=Z.push(Te);we||(ne=!0,$.pause())}});for(var ce in $)this[ce]===void 0&&typeof $[ce]=="function"&&(this[ce]=function(we){return function(){return $[we].apply($,arguments)}}(ce));for(var ge=0;ge=Z.length?(Z.decoder?se=Z.buffer.join(""):Z.buffer.length===1?se=Z.buffer.first():se=Z.buffer.concat(Z.length),Z.buffer.clear()):se=Z.buffer.consume($,Z.decoder),se}function G($){var Z=$._readableState;a("endReadable",Z.endEmitted),Z.endEmitted||(Z.ended=!0,g.nextTick(Q,Z,$))}function Q($,Z){if(a("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,Z.readable=!1,Z.emit("end"),$.autoDestroy)){var se=Z._writableState;(!se||se.autoDestroy&&se.finished)&&Z.destroy()}}typeof Symbol=="function"&&(s.from=function($,Z){return A===void 0&&(A=e(90555)),A(s,$,Z)});function oe($,Z){for(var se=0,ne=$.length;se-1))throw new w(ee);return this._writableState.defaultEncoding=ee,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function M(X,ee,G){return!X.objectMode&&X.decodeStrings!==!1&&typeof ee=="string"&&(ee=v.from(ee,G)),ee}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(X,ee,G,Q,oe,$){if(!G){var Z=M(ee,Q,oe);Q!==Z&&(G=!0,oe="buffer",Q=Z)}var se=ee.objectMode?1:Q.length;ee.length+=se;var ne=ee.length0?this.tail.next=h:this.head=h,this.tail=h,++this.length}},{key:"unshift",value:function(m){var h={data:m,next:this.head};this.length===0&&(this.tail=h),this.head=h,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var h=this.head,b=""+h.data;h=h.next;)b+=m+h.data;return b}},{key:"concat",value:function(m){if(this.length===0)return r.alloc(0);for(var h=r.allocUnsafe(m>>>0),b=this.head,u=0;b;)f(b.data,h,u),u+=b.data.length,b=b.next;return h}},{key:"consume",value:function(m,h){var b;return mo.length?o.length:m;if(d===o.length?u+=o:u+=o.slice(0,m),m-=d,m===0){d===o.length?(++b,h.next?this.head=h.next:this.head=this.tail=null):(this.head=h,h.data=o.slice(d));break}++b}return this.length-=b,u}},{key:"_getBuffer",value:function(m){var h=r.allocUnsafe(m),b=this.head,u=1;for(b.data.copy(h),m-=b.data.length;b=b.next;){var o=b.data,d=m>o.length?o.length:m;if(o.copy(h,h.length-m,0,d),m-=d,m===0){d===o.length?(++u,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=o.slice(d));break}++u}return this.length-=u,h}},{key:n,value:function(m,h){return a(this,C({},h,{depth:0,customInspect:!1}))}}]),c}()},55324:function(H,U,e){var g=e(4168);function C(r,t){var a=this,n=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return n||f?(t?t(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,g.nextTick(v,this,r)):g.nextTick(v,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(c){!t&&c?a._writableState?a._writableState.errorEmitted?g.nextTick(S,a):(a._writableState.errorEmitted=!0,g.nextTick(i,a,c)):g.nextTick(i,a,c):t?(g.nextTick(S,a),t(c)):g.nextTick(S,a)}),this)}function i(r,t){v(r,t),S(r)}function S(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function x(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function v(r,t){r.emit("error",t)}function p(r,t){var a=r._readableState,n=r._writableState;a&&a.autoDestroy||n&&n.autoDestroy?r.destroy(t):r.emit("error",t)}H.exports={destroy:C,undestroy:x,errorOrDestroy:p}},15932:function(H,U,e){var g=e(92784).i.ERR_STREAM_PREMATURE_CLOSE;function C(v){var p=!1;return function(){if(!p){p=!0;for(var r=arguments.length,t=new Array(r),a=0;a0;return r(o,w,A,function(_){b||(b=_),_&&u.forEach(t),!w&&(u.forEach(t),h(b))})});return l.reduce(a)}H.exports=f},24888:function(H,U,e){var g=e(92784).i.ERR_INVALID_OPT_VALUE;function C(S,x,v){return S.highWaterMark!=null?S.highWaterMark:x?S[v]:null}function i(S,x,v,p){var r=C(x,p,v);if(r!=null){if(!(isFinite(r)&&Math.floor(r)===r)||r<0){var t=p?v:"highWaterMark";throw new g(t,r)}return Math.floor(r)}return S.objectMode?16:16384}H.exports={getHighWaterMark:i}},4776:function(H,U,e){H.exports=e(61252).EventEmitter},86032:function(H,U,e){var g=e(30456).Buffer,C=g.isEncoding||function(u){switch(u=""+u,u&&u.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(u){if(!u)return"utf8";for(var o;;)switch(u){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return u;default:if(o)return;u=(""+u).toLowerCase(),o=!0}}function S(u){var o=i(u);if(typeof o!="string"&&(g.isEncoding===C||!C(u)))throw new Error("Unknown encoding: "+u);return o||u}U.o=x;function x(u){this.encoding=S(u);var o;switch(this.encoding){case"utf16le":this.text=f,this.end=c,o=4;break;case"utf8":this.fillLast=t,o=4;break;case"base64":this.text=l,this.end=m,o=3;break;default:this.write=h,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(o)}x.prototype.write=function(u){if(u.length===0)return"";var o,d;if(this.lastNeed){if(o=this.fillLast(u),o===void 0)return"";d=this.lastNeed,this.lastNeed=0}else d=0;return d>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function p(u,o,d){var w=o.length-1;if(w=0?(A>0&&(u.lastNeed=A-1),A):--w=0?(A>0&&(u.lastNeed=A-2),A):--w=0?(A>0&&(A===2?A=0:u.lastNeed=A-3),A):0))}function r(u,o,d){if((o[0]&192)!==128)return u.lastNeed=0,"�";if(u.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return u.lastNeed=1,"�";if(u.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return u.lastNeed=2,"�"}}function t(u){var o=this.lastTotal-this.lastNeed,d=r(this,u);if(d!==void 0)return d;if(this.lastNeed<=u.length)return u.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,o,0,u.length),this.lastNeed-=u.length}function a(u,o){var d=p(this,u,o);if(!this.lastNeed)return u.toString("utf8",o);this.lastTotal=d;var w=u.length-(d-this.lastNeed);return u.copy(this.lastChar,0,w),u.toString("utf8",o,w)}function n(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+"�":o}function f(u,o){if((u.length-o)%2===0){var d=u.toString("utf16le",o);if(d){var w=d.charCodeAt(d.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],d.slice(0,-1)}return d}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",o,u.length-1)}function c(u){var o=u&&u.length?this.write(u):"";if(this.lastNeed){var d=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,d)}return o}function l(u,o){var d=(u.length-o)%3;return d===0?u.toString("base64",o):(this.lastNeed=3-d,this.lastTotal=3,d===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",o,u.length-d))}function m(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function h(u){return u.toString(this.encoding)}function b(u){return u&&u.length?this.write(u):""}},55619:function(H,U,e){var g=e(45408),C=e(86844)("stream-parser");H.exports=p;var i=-1,S=0,x=1,v=2;function p(u){var o=u&&typeof u._transform=="function",d=u&&typeof u._write=="function";if(!o&&!d)throw new Error("must pass a Writable or Transform stream in");C("extending Parser into stream"),u._bytes=t,u._skipBytes=a,o&&(u._passthrough=n),o?u._transform=c:u._write=f}function r(u){C("initializing parser stream"),u._parserBytesLeft=0,u._parserBuffers=[],u._parserBuffered=0,u._parserState=i,u._parserCallback=null,typeof u.push=="function"&&(u._parserOutput=u.push.bind(u)),u._parserInit=!0}function t(u,o){g(!this._parserCallback,'there is already a "callback" set!'),g(isFinite(u)&&u>0,'can only buffer a finite number of bytes > 0, got "'+u+'"'),this._parserInit||r(this),C("buffering %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=S}function a(u,o){g(!this._parserCallback,'there is already a "callback" set!'),g(u>0,'can only skip > 0 bytes, got "'+u+'"'),this._parserInit||r(this),C("skipping %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=x}function n(u,o){g(!this._parserCallback,'There is already a "callback" set!'),g(u>0,'can only pass through > 0 bytes, got "'+u+'"'),this._parserInit||r(this),C("passing through %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=v}function f(u,o,d){this._parserInit||r(this),C("write(%o bytes)",u.length),typeof o=="function"&&(d=o),h(this,u,null,d)}function c(u,o,d){this._parserInit||r(this),C("transform(%o bytes)",u.length),typeof o!="function"&&(o=this._parserOutput),h(this,u,o,d)}function l(u,o,d,w){return u._parserBytesLeft<=0?w(new Error("got data but not currently parsing anything")):o.length<=u._parserBytesLeft?function(){return m(u,o,d,w)}:function(){var A=o.slice(0,u._parserBytesLeft);return m(u,A,d,function(_){if(_)return w(_);if(o.length>A.length)return function(){return l(u,o.slice(A.length),d,w)}})}}function m(u,o,d,w){if(u._parserBytesLeft-=o.length,C("%o bytes left for stream piece",u._parserBytesLeft),u._parserState===S?(u._parserBuffers.push(o),u._parserBuffered+=o.length):u._parserState===v&&d(o),u._parserBytesLeft===0){var A=u._parserCallback;if(A&&u._parserState===S&&u._parserBuffers.length>1&&(o=Buffer.concat(u._parserBuffers,u._parserBuffered)),u._parserState!==S&&(o=null),u._parserCallback=null,u._parserBuffered=0,u._parserState=i,u._parserBuffers.splice(0),A){var _=[];o&&_.push(o),d&&_.push(d);var y=A.length>_.length;y&&_.push(b(w));var E=A.apply(u,_);if(!y||w===E)return w}}else return w}var h=b(l);function b(u){return function(){for(var o=u.apply(this,arguments);typeof o=="function";)o=o();return o}}},86844:function(H,U,e){var g=e(4168);U=H.exports=e(89416),U.log=S,U.formatArgs=i,U.save=x,U.load=v,U.useColors=C,U.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:p(),U.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function C(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}U.formatters.j=function(r){try{return JSON.stringify(r)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function i(r){var t=this.useColors;if(r[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+r[0]+(t?"%c ":" ")+"+"+U.humanize(this.diff),!!t){var a="color: "+this.color;r.splice(1,0,a,"color: inherit");var n=0,f=0;r[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(n++,c==="%c"&&(f=n))}),r.splice(f,0,a)}}function S(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function x(r){try{r==null?U.storage.removeItem("debug"):U.storage.debug=r}catch{}}function v(){var r;try{r=U.storage.debug}catch{}return!r&&typeof g<"u"&&"env"in g&&(r=g.env.DEBUG),r}U.enable(v());function p(){try{return window.localStorage}catch{}}},89416:function(H,U,e){U=H.exports=i.debug=i.default=i,U.coerce=p,U.disable=x,U.enable=S,U.enabled=v,U.humanize=e(93744),U.names=[],U.skips=[],U.formatters={};var g;function C(r){var t=0,a;for(a in r)t=(t<<5)-t+r.charCodeAt(a),t|=0;return U.colors[Math.abs(t)%U.colors.length]}function i(r){function t(){if(t.enabled){var a=t,n=+new Date,f=n-(g||n);a.diff=f,a.prev=g,a.curr=n,g=n;for(var c=new Array(arguments.length),l=0;l0)return S(r);if(a==="number"&&isNaN(r)===!1)return t.long?v(r):x(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function S(r){if(r=String(r),!(r.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(t){var a=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*C;case"hours":case"hour":case"hrs":case"hr":case"h":return a*g;case"minutes":case"minute":case"mins":case"min":case"m":return a*e;case"seconds":case"second":case"secs":case"sec":case"s":return a*U;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function x(r){return r>=C?Math.round(r/C)+"d":r>=g?Math.round(r/g)+"h":r>=e?Math.round(r/e)+"m":r>=U?Math.round(r/U)+"s":r+"ms"}function v(r){return p(r,C,"day")||p(r,g,"hour")||p(r,e,"minute")||p(r,U,"second")||r+" ms"}function p(r,t,a){if(!(r",'""',"''","``","“”","«»"]:(typeof x.ignore=="string"&&(x.ignore=[x.ignore]),x.ignore=x.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var v=g.parse(i,{flat:!0,brackets:x.ignore}),p=v[0],r=p.split(S);if(x.escape){for(var t=[],a=0;a0;){h=u[u.length-1];var o=e[h];if(x[h]=0&&p[h].push(v[w])}x[h]=d}else{if(i[h]===C[h]){for(var A=[],_=[],y=0,d=b.length-1;d>=0;--d){var E=b[d];if(S[E]=!1,A.push(E),_.push(p[E]),y+=p[E].length,v[E]=a.length,E===h){b.length=d;break}}a.push(A);for(var T=new Array(y),d=0;d<_.length;d++)for(var s=0;s<_[d].length;s++)T[--y]=_[d][s];n.push(T)}u.pop()}}}for(var r=0;r1&&(l=1),l<-1&&(l=-1),c*Math.acos(l)},v=function(t,a,n,f,c,l,m,h,b,u,o,d){var w=Math.pow(c,2),A=Math.pow(l,2),_=Math.pow(o,2),y=Math.pow(d,2),E=w*A-w*y-A*_;E<0&&(E=0),E/=w*y+A*_,E=Math.sqrt(E)*(m===h?-1:1);var T=E*c/l*d,s=E*-l/c*o,L=u*T-b*s+(t+n)/2,M=b*T+u*s+(a+f)/2,z=(o-T)/c,D=(d-s)/l,N=(-o-T)/c,I=(-d-s)/l,k=x(1,0,z,D),B=x(z,D,N,I);return h===0&&B>0&&(B-=C),h===1&&B<0&&(B+=C),[L,M,k,B]},p=function(t){var a=t.px,n=t.py,f=t.cx,c=t.cy,l=t.rx,m=t.ry,h=t.xAxisRotation,b=h===void 0?0:h,u=t.largeArcFlag,o=u===void 0?0:u,d=t.sweepFlag,w=d===void 0?0:d,A=[];if(l===0||m===0)return[];var _=Math.sin(b*C/360),y=Math.cos(b*C/360),E=y*(a-f)/2+_*(n-c)/2,T=-_*(a-f)/2+y*(n-c)/2;if(E===0&&T===0)return[];l=Math.abs(l),m=Math.abs(m);var s=Math.pow(E,2)/Math.pow(l,2)+Math.pow(T,2)/Math.pow(m,2);s>1&&(l*=Math.sqrt(s),m*=Math.sqrt(s));var L=v(a,n,f,c,l,m,o,w,_,y,E,T),M=g(L,4),z=M[0],D=M[1],N=M[2],I=M[3],k=Math.abs(I)/(C/4);Math.abs(1-k)<1e-7&&(k=1);var B=Math.max(Math.ceil(k),1);I/=B;for(var O=0;Or[2]&&(r[2]=n[f+0]),n[f+1]>r[3]&&(r[3]=n[f+1]);return r}},41976:function(H,U,e){H.exports=C;var g=e(92848);function C(x){for(var v,p=[],r=0,t=0,a=0,n=0,f=null,c=null,l=0,m=0,h=0,b=x.length;h4?(r=u[u.length-4],t=u[u.length-3]):(r=l,t=m),p.push(u)}return p}function i(x,v,p,r){return["C",x,v,p,r,p,r]}function S(x,v,p,r,t,a){return["C",x/3+.6666666666666666*p,v/3+.6666666666666666*r,t/3+.6666666666666666*p,a/3+.6666666666666666*r,t,a]}},20472:function(H,U,e){var g=e(74840),C=e(21984),i=e(22235),S=e(53520),x=e(29620),v=document.createElement("canvas"),p=v.getContext("2d");H.exports=r;function r(n,f){if(!S(n))throw Error("Argument should be valid svg path string");f||(f={});var c,l;f.shape?(c=f.shape[0],l=f.shape[1]):(c=v.width=f.w||f.width||200,l=v.height=f.h||f.height||200);var m=Math.min(c,l),h=f.stroke||0,b=f.viewbox||f.viewBox||g(n),u=[c/(b[2]-b[0]),l/(b[3]-b[1])],o=Math.min(u[0]||0,u[1]||0)/2;if(p.fillStyle="black",p.fillRect(0,0,c,l),p.fillStyle="white",h&&(typeof h!="number"&&(h=1),h>0?p.strokeStyle="white":p.strokeStyle="black",p.lineWidth=Math.abs(h)),p.translate(c*.5,l*.5),p.scale(o,o),a()){var d=new Path2D(n);p.fill(d),h&&p.stroke(d)}else{var w=C(n);i(p,w),p.fill(),h&&p.stroke()}p.setTransform(1,0,0,1,0,0);var A=x(p,{cutoff:f.cutoff!=null?f.cutoff:.5,radius:f.radius!=null?f.radius:m*.5});return A}var t;function a(){if(t!=null)return t;var n=document.createElement("canvas").getContext("2d");if(n.canvas.width=n.canvas.height=1,!window.Path2D)return t=!1;var f=new Path2D("M0,0h1v1h-1v-1Z");n.fillStyle="black",n.fill(f);var c=n.getImageData(0,0,1,1);return t=c&&c.data&&c.data[3]===255}},49760:function(H,U,e){var g;(function(C){var i=/^\s+/,S=/\s+$/,x=0,v=C.round,p=C.min,r=C.max,t=C.random;function a(Z,se){if(Z=Z||"",se=se||{},Z instanceof a)return Z;if(!(this instanceof a))return new a(Z,se);var ne=n(Z);this._originalInput=Z,this._r=ne.r,this._g=ne.g,this._b=ne.b,this._a=ne.a,this._roundA=v(100*this._a)/100,this._format=se.format||ne.format,this._gradientType=se.gradientType,this._r<1&&(this._r=v(this._r)),this._g<1&&(this._g=v(this._g)),this._b<1&&(this._b=v(this._b)),this._ok=ne.ok,this._tc_id=x++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Z=this.toRgb();return(Z.r*299+Z.g*587+Z.b*114)/1e3},getLuminance:function(){var Z=this.toRgb(),se,ne,ce,ge,Te,we;return se=Z.r/255,ne=Z.g/255,ce=Z.b/255,se<=.03928?ge=se/12.92:ge=C.pow((se+.055)/1.055,2.4),ne<=.03928?Te=ne/12.92:Te=C.pow((ne+.055)/1.055,2.4),ce<=.03928?we=ce/12.92:we=C.pow((ce+.055)/1.055,2.4),.2126*ge+.7152*Te+.0722*we},setAlpha:function(Z){return this._a=O(Z),this._roundA=v(100*this._a)/100,this},toHsv:function(){var Z=m(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,v:Z.v,a:this._a}},toHsvString:function(){var Z=m(this._r,this._g,this._b),se=v(Z.h*360),ne=v(Z.s*100),ce=v(Z.v*100);return this._a==1?"hsv("+se+", "+ne+"%, "+ce+"%)":"hsva("+se+", "+ne+"%, "+ce+"%, "+this._roundA+")"},toHsl:function(){var Z=c(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,l:Z.l,a:this._a}},toHslString:function(){var Z=c(this._r,this._g,this._b),se=v(Z.h*360),ne=v(Z.s*100),ce=v(Z.l*100);return this._a==1?"hsl("+se+", "+ne+"%, "+ce+"%)":"hsla("+se+", "+ne+"%, "+ce+"%, "+this._roundA+")"},toHex:function(Z){return b(this._r,this._g,this._b,Z)},toHexString:function(Z){return"#"+this.toHex(Z)},toHex8:function(Z){return u(this._r,this._g,this._b,this._a,Z)},toHex8String:function(Z){return"#"+this.toHex8(Z)},toRgb:function(){return{r:v(this._r),g:v(this._g),b:v(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+v(this._r)+", "+v(this._g)+", "+v(this._b)+")":"rgba("+v(this._r)+", "+v(this._g)+", "+v(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:v(V(this._r,255)*100)+"%",g:v(V(this._g,255)*100)+"%",b:v(V(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+v(V(this._r,255)*100)+"%, "+v(V(this._g,255)*100)+"%, "+v(V(this._b,255)*100)+"%)":"rgba("+v(V(this._r,255)*100)+"%, "+v(V(this._g,255)*100)+"%, "+v(V(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:k[b(this._r,this._g,this._b,!0)]||!1},toFilter:function(Z){var se="#"+o(this._r,this._g,this._b,this._a),ne=se,ce=this._gradientType?"GradientType = 1, ":"";if(Z){var ge=a(Z);ne="#"+o(ge._r,ge._g,ge._b,ge._a)}return"progid:DXImageTransform.Microsoft.gradient("+ce+"startColorstr="+se+",endColorstr="+ne+")"},toString:function(Z){var se=!!Z;Z=Z||this._format;var ne=!1,ce=this._a<1&&this._a>=0,ge=!se&&ce&&(Z==="hex"||Z==="hex6"||Z==="hex3"||Z==="hex4"||Z==="hex8"||Z==="name");return ge?Z==="name"&&this._a===0?this.toName():this.toRgbString():(Z==="rgb"&&(ne=this.toRgbString()),Z==="prgb"&&(ne=this.toPercentageRgbString()),(Z==="hex"||Z==="hex6")&&(ne=this.toHexString()),Z==="hex3"&&(ne=this.toHexString(!0)),Z==="hex4"&&(ne=this.toHex8String(!0)),Z==="hex8"&&(ne=this.toHex8String()),Z==="name"&&(ne=this.toName()),Z==="hsl"&&(ne=this.toHslString()),Z==="hsv"&&(ne=this.toHsvString()),ne||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(Z,se){var ne=Z.apply(null,[this].concat([].slice.call(se)));return this._r=ne._r,this._g=ne._g,this._b=ne._b,this.setAlpha(ne._a),this},lighten:function(){return this._applyModification(_,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(Z,se){return Z.apply(null,[this].concat([].slice.call(se)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(s,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},a.fromRatio=function(Z,se){if(typeof Z=="object"){var ne={};for(var ce in Z)Z.hasOwnProperty(ce)&&(ce==="a"?ne[ce]=Z[ce]:ne[ce]=J(Z[ce]));Z=ne}return a(Z,se)};function n(Z){var se={r:0,g:0,b:0},ne=1,ce=null,ge=null,Te=null,we=!1,Re=!1;return typeof Z=="string"&&(Z=oe(Z)),typeof Z=="object"&&(Q(Z.r)&&Q(Z.g)&&Q(Z.b)?(se=f(Z.r,Z.g,Z.b),we=!0,Re=String(Z.r).substr(-1)==="%"?"prgb":"rgb"):Q(Z.h)&&Q(Z.s)&&Q(Z.v)?(ce=J(Z.s),ge=J(Z.v),se=h(Z.h,ce,ge),we=!0,Re="hsv"):Q(Z.h)&&Q(Z.s)&&Q(Z.l)&&(ce=J(Z.s),Te=J(Z.l),se=l(Z.h,ce,Te),we=!0,Re="hsl"),Z.hasOwnProperty("a")&&(ne=Z.a)),ne=O(ne),{ok:we,format:Z.format||Re,r:p(255,r(se.r,0)),g:p(255,r(se.g,0)),b:p(255,r(se.b,0)),a:ne}}function f(Z,se,ne){return{r:V(Z,255)*255,g:V(se,255)*255,b:V(ne,255)*255}}function c(Z,se,ne){Z=V(Z,255),se=V(se,255),ne=V(ne,255);var ce=r(Z,se,ne),ge=p(Z,se,ne),Te,we,Re=(ce+ge)/2;if(ce==ge)Te=we=0;else{var be=ce-ge;switch(we=Re>.5?be/(2-ce-ge):be/(ce+ge),ce){case Z:Te=(se-ne)/be+(se1&&(Le-=1),Le<.16666666666666666?Ae+(me-Ae)*6*Le:Le<.5?me:Le<.6666666666666666?Ae+(me-Ae)*(.6666666666666666-Le)*6:Ae}if(se===0)ce=ge=Te=ne;else{var Re=ne<.5?ne*(1+se):ne+se-ne*se,be=2*ne-Re;ce=we(be,Re,Z+.3333333333333333),ge=we(be,Re,Z),Te=we(be,Re,Z-.3333333333333333)}return{r:ce*255,g:ge*255,b:Te*255}}function m(Z,se,ne){Z=V(Z,255),se=V(se,255),ne=V(ne,255);var ce=r(Z,se,ne),ge=p(Z,se,ne),Te,we,Re=ce,be=ce-ge;if(we=ce===0?0:be/ce,ce==ge)Te=0;else{switch(ce){case Z:Te=(se-ne)/be+(se>1)+720)%360;--se;)ce.h=(ce.h+ge)%360,Te.push(a(ce));return Te}function N(Z,se){se=se||6;for(var ne=a(Z).toHsv(),ce=ne.h,ge=ne.s,Te=ne.v,we=[],Re=1/se;se--;)we.push(a({h:ce,s:ge,v:Te})),Te=(Te+Re)%1;return we}a.mix=function(Z,se,ne){ne=ne===0?0:ne||50;var ce=a(Z).toRgb(),ge=a(se).toRgb(),Te=ne/100,we={r:(ge.r-ce.r)*Te+ce.r,g:(ge.g-ce.g)*Te+ce.g,b:(ge.b-ce.b)*Te+ce.b,a:(ge.a-ce.a)*Te+ce.a};return a(we)},a.readability=function(Z,se){var ne=a(Z),ce=a(se);return(C.max(ne.getLuminance(),ce.getLuminance())+.05)/(C.min(ne.getLuminance(),ce.getLuminance())+.05)},a.isReadable=function(Z,se,ne){var ce=a.readability(Z,se),ge,Te;switch(Te=!1,ge=$(ne),ge.level+ge.size){case"AAsmall":case"AAAlarge":Te=ce>=4.5;break;case"AAlarge":Te=ce>=3;break;case"AAAsmall":Te=ce>=7;break}return Te},a.mostReadable=function(Z,se,ne){var ce=null,ge=0,Te,we,Re,be;ne=ne||{},we=ne.includeFallbackColors,Re=ne.level,be=ne.size;for(var Ae=0;Aege&&(ge=Te,ce=a(se[Ae]));return a.isReadable(Z,ce,{level:Re,size:be})||!we?ce:(ne.includeFallbackColors=!1,a.mostReadable(Z,["#fff","#000"],ne))};var I=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=a.hexNames=B(I);function B(Z){var se={};for(var ne in Z)Z.hasOwnProperty(ne)&&(se[Z[ne]]=ne);return se}function O(Z){return Z=parseFloat(Z),(isNaN(Z)||Z<0||Z>1)&&(Z=1),Z}function V(Z,se){te(Z)&&(Z="100%");var ne=ie(Z);return Z=p(se,r(0,parseFloat(Z))),ne&&(Z=parseInt(Z*se,10)/100),C.abs(Z-se)<1e-6?1:Z%se/parseFloat(se)}function Y(Z){return p(1,r(0,Z))}function j(Z){return parseInt(Z,16)}function te(Z){return typeof Z=="string"&&Z.indexOf(".")!=-1&&parseFloat(Z)===1}function ie(Z){return typeof Z=="string"&&Z.indexOf("%")!=-1}function ue(Z){return Z.length==1?"0"+Z:""+Z}function J(Z){return Z<=1&&(Z=Z*100+"%"),Z}function X(Z){return C.round(parseFloat(Z)*255).toString(16)}function ee(Z){return j(Z)/255}var G=function(){var Z="[-\\+]?\\d+%?",se="[-\\+]?\\d*\\.\\d+%?",ne="(?:"+se+")|(?:"+Z+")",ce="[\\s|\\(]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")\\s*\\)?",ge="[\\s|\\(]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")\\s*\\)?";return{CSS_UNIT:new RegExp(ne),rgb:new RegExp("rgb"+ce),rgba:new RegExp("rgba"+ge),hsl:new RegExp("hsl"+ce),hsla:new RegExp("hsla"+ge),hsv:new RegExp("hsv"+ce),hsva:new RegExp("hsva"+ge),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Q(Z){return!!G.CSS_UNIT.exec(Z)}function oe(Z){Z=Z.replace(i,"").replace(S,"").toLowerCase();var se=!1;if(I[Z])Z=I[Z],se=!0;else if(Z=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ne;return(ne=G.rgb.exec(Z))?{r:ne[1],g:ne[2],b:ne[3]}:(ne=G.rgba.exec(Z))?{r:ne[1],g:ne[2],b:ne[3],a:ne[4]}:(ne=G.hsl.exec(Z))?{h:ne[1],s:ne[2],l:ne[3]}:(ne=G.hsla.exec(Z))?{h:ne[1],s:ne[2],l:ne[3],a:ne[4]}:(ne=G.hsv.exec(Z))?{h:ne[1],s:ne[2],v:ne[3]}:(ne=G.hsva.exec(Z))?{h:ne[1],s:ne[2],v:ne[3],a:ne[4]}:(ne=G.hex8.exec(Z))?{r:j(ne[1]),g:j(ne[2]),b:j(ne[3]),a:ee(ne[4]),format:se?"name":"hex8"}:(ne=G.hex6.exec(Z))?{r:j(ne[1]),g:j(ne[2]),b:j(ne[3]),format:se?"name":"hex"}:(ne=G.hex4.exec(Z))?{r:j(ne[1]+""+ne[1]),g:j(ne[2]+""+ne[2]),b:j(ne[3]+""+ne[3]),a:ee(ne[4]+""+ne[4]),format:se?"name":"hex8"}:(ne=G.hex3.exec(Z))?{r:j(ne[1]+""+ne[1]),g:j(ne[2]+""+ne[2]),b:j(ne[3]+""+ne[3]),format:se?"name":"hex"}:!1}function $(Z){var se,ne;return Z=Z||{level:"AA",size:"small"},se=(Z.level||"AA").toUpperCase(),ne=(Z.size||"small").toLowerCase(),se!=="AA"&&se!=="AAA"&&(se="AA"),ne!=="small"&&ne!=="large"&&(ne="small"),{level:se,size:ne}}H.exports?H.exports=a:(g=(function(){return a}).call(U,e,U,H),g!==void 0&&(H.exports=g))})(Math)},37816:function(H){H.exports=g,H.exports.float32=H.exports.float=g,H.exports.fract32=H.exports.fract=e;var U=new Float32Array(1);function e(C,i){if(C.length){if(C instanceof Float32Array)return new Float32Array(C.length);i instanceof Float32Array||(i=g(C));for(var S=0,x=i.length;S":(S.length>100&&(S=S.slice(0,99)+"…"),S=S.replace(C,function(x){switch(x){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}},7328:function(H,U,e){var g=e(81680),C={object:!0,function:!0,undefined:!0};H.exports=function(i){return g(i)?hasOwnProperty.call(C,typeof i):!1}},87396:function(H,U,e){var g=e(57980),C=e(85488);H.exports=function(i){return C(i)?i:g(i,"%v is not a plain function",arguments[1])}},85488:function(H,U,e){var g=e(73384),C=/^\s*class[\s{/}]/,i=Function.prototype.toString;H.exports=function(S){return!(!g(S)||C.test(i.call(S)))}},54612:function(H,U,e){var g=e(7328);H.exports=function(C){if(!g(C))return!1;try{return C.constructor?C.constructor.prototype===C:!1}catch{return!1}}},33940:function(H,U,e){var g=e(81680),C=e(7328),i=Object.prototype.toString;H.exports=function(S){if(!g(S))return null;if(C(S)){var x=S.toString;if(typeof x!="function"||x===i)return null}try{return""+S}catch{return null}}},18496:function(H,U,e){var g=e(57980),C=e(81680);H.exports=function(i){return C(i)?i:g(i,"Cannot use %v",arguments[1])}},81680:function(H){var U=void 0;H.exports=function(e){return e!==U&&e!==null}},14144:function(H,U,e){var g=e(308),C=e(10352),i=e(33576).Buffer;e.g.__TYPEDARRAY_POOL||(e.g.__TYPEDARRAY_POOL={UINT8:C([32,0]),UINT16:C([32,0]),UINT32:C([32,0]),BIGUINT64:C([32,0]),INT8:C([32,0]),INT16:C([32,0]),INT32:C([32,0]),BIGINT64:C([32,0]),FLOAT:C([32,0]),DOUBLE:C([32,0]),DATA:C([32,0]),UINT8C:C([32,0]),BUFFER:C([32,0])});var S=typeof Uint8ClampedArray<"u",x=typeof BigUint64Array<"u",v=typeof BigInt64Array<"u",p=e.g.__TYPEDARRAY_POOL;p.UINT8C||(p.UINT8C=C([32,0])),p.BIGUINT64||(p.BIGUINT64=C([32,0])),p.BIGINT64||(p.BIGINT64=C([32,0])),p.BUFFER||(p.BUFFER=C([32,0]));var r=p.DATA,t=p.BUFFER;U.free=function(s){if(i.isBuffer(s))t[g.log2(s.length)].push(s);else{if(Object.prototype.toString.call(s)!=="[object ArrayBuffer]"&&(s=s.buffer),!s)return;var L=s.length||s.byteLength,M=g.log2(L)|0;r[M].push(s)}};function a(T){if(T){var s=T.length||T.byteLength,L=g.log2(s);r[L].push(T)}}function n(T){a(T.buffer)}U.freeUint8=U.freeUint16=U.freeUint32=U.freeBigUint64=U.freeInt8=U.freeInt16=U.freeInt32=U.freeBigInt64=U.freeFloat32=U.freeFloat=U.freeFloat64=U.freeDouble=U.freeUint8Clamped=U.freeDataView=n,U.freeArrayBuffer=a,U.freeBuffer=function(s){t[g.log2(s.length)].push(s)},U.malloc=function(s,L){if(L===void 0||L==="arraybuffer")return f(s);switch(L){case"uint8":return c(s);case"uint16":return l(s);case"uint32":return m(s);case"int8":return h(s);case"int16":return b(s);case"int32":return u(s);case"float":case"float32":return o(s);case"double":case"float64":return d(s);case"uint8_clamped":return w(s);case"bigint64":return _(s);case"biguint64":return A(s);case"buffer":return E(s);case"data":case"dataview":return y(s);default:return null}return null};function f(s){var s=g.nextPow2(s),L=g.log2(s),M=r[L];return M.length>0?M.pop():new ArrayBuffer(s)}U.mallocArrayBuffer=f;function c(T){return new Uint8Array(f(T),0,T)}U.mallocUint8=c;function l(T){return new Uint16Array(f(2*T),0,T)}U.mallocUint16=l;function m(T){return new Uint32Array(f(4*T),0,T)}U.mallocUint32=m;function h(T){return new Int8Array(f(T),0,T)}U.mallocInt8=h;function b(T){return new Int16Array(f(2*T),0,T)}U.mallocInt16=b;function u(T){return new Int32Array(f(4*T),0,T)}U.mallocInt32=u;function o(T){return new Float32Array(f(4*T),0,T)}U.mallocFloat32=U.mallocFloat=o;function d(T){return new Float64Array(f(8*T),0,T)}U.mallocFloat64=U.mallocDouble=d;function w(T){return S?new Uint8ClampedArray(f(T),0,T):c(T)}U.mallocUint8Clamped=w;function A(T){return x?new BigUint64Array(f(8*T),0,T):null}U.mallocBigUint64=A;function _(T){return v?new BigInt64Array(f(8*T),0,T):null}U.mallocBigInt64=_;function y(T){return new DataView(f(T),0,T)}U.mallocDataView=y;function E(T){T=g.nextPow2(T);var s=g.log2(T),L=t[s];return L.length>0?L.pop():new i(T)}U.mallocBuffer=E,U.clearCache=function(){for(var s=0;s<32;++s)p.UINT8[s].length=0,p.UINT16[s].length=0,p.UINT32[s].length=0,p.INT8[s].length=0,p.INT16[s].length=0,p.INT32[s].length=0,p.FLOAT[s].length=0,p.DOUBLE[s].length=0,p.BIGUINT64[s].length=0,p.BIGINT64[s].length=0,p.UINT8C[s].length=0,r[s].length=0,t[s].length=0}},92384:function(H){var U=/[\'\"]/;H.exports=function(g){return g?(U.test(g.charAt(0))&&(g=g.substr(1)),U.test(g.charAt(g.length-1))&&(g=g.substr(0,g.length-1)),g):""}},45223:function(H){H.exports=function(e,g,C){Array.isArray(C)||(C=[].slice.call(arguments,2));for(var i=0,S=C.length;i"u"?!1:L.working?L(Te):Te instanceof Map}U.isMap=M;function z(Te){return r(Te)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function D(Te){return typeof Set>"u"?!1:z.working?z(Te):Te instanceof Set}U.isSet=D;function N(Te){return r(Te)==="[object WeakMap]"}N.working=typeof WeakMap<"u"&&N(new WeakMap);function I(Te){return typeof WeakMap>"u"?!1:N.working?N(Te):Te instanceof WeakMap}U.isWeakMap=I;function k(Te){return r(Te)==="[object WeakSet]"}k.working=typeof WeakSet<"u"&&k(new WeakSet);function B(Te){return k(Te)}U.isWeakSet=B;function O(Te){return r(Te)==="[object ArrayBuffer]"}O.working=typeof ArrayBuffer<"u"&&O(new ArrayBuffer);function V(Te){return typeof ArrayBuffer>"u"?!1:O.working?O(Te):Te instanceof ArrayBuffer}U.isArrayBuffer=V;function Y(Te){return r(Te)==="[object DataView]"}Y.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Y(new DataView(new ArrayBuffer(1),0,1));function j(Te){return typeof DataView>"u"?!1:Y.working?Y(Te):Te instanceof DataView}U.isDataView=j;var te=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ie(Te){return r(Te)==="[object SharedArrayBuffer]"}function ue(Te){return typeof te>"u"?!1:(typeof ie.working>"u"&&(ie.working=ie(new te)),ie.working?ie(Te):Te instanceof te)}U.isSharedArrayBuffer=ue;function J(Te){return r(Te)==="[object AsyncFunction]"}U.isAsyncFunction=J;function X(Te){return r(Te)==="[object Map Iterator]"}U.isMapIterator=X;function ee(Te){return r(Te)==="[object Set Iterator]"}U.isSetIterator=ee;function G(Te){return r(Te)==="[object Generator]"}U.isGeneratorObject=G;function Q(Te){return r(Te)==="[object WebAssembly.Module]"}U.isWebAssemblyCompiledModule=Q;function oe(Te){return l(Te,t)}U.isNumberObject=oe;function $(Te){return l(Te,a)}U.isStringObject=$;function Z(Te){return l(Te,n)}U.isBooleanObject=Z;function se(Te){return v&&l(Te,f)}U.isBigIntObject=se;function ne(Te){return p&&l(Te,c)}U.isSymbolObject=ne;function ce(Te){return oe(Te)||$(Te)||Z(Te)||se(Te)||ne(Te)}U.isBoxedPrimitive=ce;function ge(Te){return typeof Uint8Array<"u"&&(V(Te)||ue(Te))}U.isAnyArrayBuffer=ge,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Te){Object.defineProperty(U,Te,{enumerable:!1,value:function(){throw new Error(Te+" is not supported in userland")}})})},35840:function(H,U,e){var g=e(4168),C=Object.getOwnPropertyDescriptors||function(te){for(var ie=Object.keys(te),ue={},J=0;J=J)return G;switch(G){case"%s":return String(ue[ie++]);case"%d":return Number(ue[ie++]);case"%j":try{return JSON.stringify(ue[ie++])}catch{return"[Circular]"}default:return G}}),ee=ue[ie];ie"u")return function(){return U.deprecate(j,te).apply(this,arguments)};var ie=!1;function ue(){if(!ie){if(g.throwDeprecation)throw new Error(te);g.traceDeprecation?console.trace(te):console.error(te),ie=!0}return j.apply(this,arguments)}return ue};var S={},x=/^$/;if(g.env.NODE_DEBUG){var v=g.env.NODE_DEBUG;v=v.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),x=new RegExp("^"+v+"$","i")}U.debuglog=function(j){if(j=j.toUpperCase(),!S[j])if(x.test(j)){var te=g.pid;S[j]=function(){var ie=U.format.apply(U,arguments);console.error("%s %d: %s",j,te,ie)}}else S[j]=function(){};return S[j]};function p(j,te){var ie={seen:[],stylize:t};return arguments.length>=3&&(ie.depth=arguments[2]),arguments.length>=4&&(ie.colors=arguments[3]),u(te)?ie.showHidden=te:te&&U._extend(ie,te),y(ie.showHidden)&&(ie.showHidden=!1),y(ie.depth)&&(ie.depth=2),y(ie.colors)&&(ie.colors=!1),y(ie.customInspect)&&(ie.customInspect=!0),ie.colors&&(ie.stylize=r),n(ie,j,ie.depth)}U.inspect=p,p.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},p.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(j,te){var ie=p.styles[te];return ie?"\x1B["+p.colors[ie][0]+"m"+j+"\x1B["+p.colors[ie][1]+"m":j}function t(j,te){return j}function a(j){var te={};return j.forEach(function(ie,ue){te[ie]=!0}),te}function n(j,te,ie){if(j.customInspect&&te&&M(te.inspect)&&te.inspect!==U.inspect&&!(te.constructor&&te.constructor.prototype===te)){var ue=te.inspect(ie,j);return A(ue)||(ue=n(j,ue,ie)),ue}var J=f(j,te);if(J)return J;var X=Object.keys(te),ee=a(X);if(j.showHidden&&(X=Object.getOwnPropertyNames(te)),L(te)&&(X.indexOf("message")>=0||X.indexOf("description")>=0))return c(te);if(X.length===0){if(M(te)){var G=te.name?": "+te.name:"";return j.stylize("[Function"+G+"]","special")}if(E(te))return j.stylize(RegExp.prototype.toString.call(te),"regexp");if(s(te))return j.stylize(Date.prototype.toString.call(te),"date");if(L(te))return c(te)}var Q="",oe=!1,$=["{","}"];if(b(te)&&(oe=!0,$=["[","]"]),M(te)){var Z=te.name?": "+te.name:"";Q=" [Function"+Z+"]"}if(E(te)&&(Q=" "+RegExp.prototype.toString.call(te)),s(te)&&(Q=" "+Date.prototype.toUTCString.call(te)),L(te)&&(Q=" "+c(te)),X.length===0&&(!oe||te.length==0))return $[0]+Q+$[1];if(ie<0)return E(te)?j.stylize(RegExp.prototype.toString.call(te),"regexp"):j.stylize("[Object]","special");j.seen.push(te);var se;return oe?se=l(j,te,ie,ee,X):se=X.map(function(ne){return m(j,te,ie,ee,ne,oe)}),j.seen.pop(),h(se,Q,$)}function f(j,te){if(y(te))return j.stylize("undefined","undefined");if(A(te)){var ie="'"+JSON.stringify(te).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return j.stylize(ie,"string")}if(w(te))return j.stylize(""+te,"number");if(u(te))return j.stylize(""+te,"boolean");if(o(te))return j.stylize("null","null")}function c(j){return"["+Error.prototype.toString.call(j)+"]"}function l(j,te,ie,ue,J){for(var X=[],ee=0,G=te.length;ee-1&&(X?G=G.split(` -`).map(function(oe){return" "+oe}).join(` -`).slice(2):G=` -`+G.split(` -`).map(function(oe){return" "+oe}).join(` -`))):G=j.stylize("[Circular]","special")),y(ee)){if(X&&J.match(/^\d+$/))return G;ee=JSON.stringify(""+J),ee.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(ee=ee.slice(1,-1),ee=j.stylize(ee,"name")):(ee=ee.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),ee=j.stylize(ee,"string"))}return ee+": "+G}function h(j,te,ie){var ue=j.reduce(function(J,X){return X.indexOf(` -`)>=0,J+X.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ue>60?ie[0]+(te===""?"":te+` +`),Ve;return or&&(Ve=H(O(Y(ke))),or[Ve])?or[Ve].apply(null,se):(ke=Function.apply(null,ge.concat(ke)),or&&(or[Ve]=ke),ke.apply(null,se))}}}function X(pe){return Array.isArray(pe)||At(pe)||c(pe)}function tt(pe){return pe.sort(function(Xe,Ke){return Xe==="viewport"?-1:Ke==="viewport"?1:Xe"+pi+"?"+Hr+".constant["+pi+"]:0;"}).join(""),"}}else{","if(",wn,"(",Hr,".buffer)){",On,"=",Ln,".createStream(",34962,",",Hr,".buffer);","}else{",On,"=",Ln,".getBuffer(",Hr,".buffer);","}",mi,'="type" in ',Hr,"?",Qr.glTypes,"[",Hr,".type]:",On,".dtype;",Pn.normalized,"=!!",Hr,".normalized;"),Zr("size"),Zr("offset"),Zr("stride"),Zr("divisor"),Er("}}"),Er.exit("if(",Pn.isStream,"){",Ln,".destroyStream(",On,");","}"),Pn})}),xn}function pr(Sr){var kr=Sr.static,Ar=Sr.dynamic,Or={};return Object.keys(kr).forEach(function(xn){var In=kr[xn];Or[xn]=ot(function(hn,sn){return typeof In=="number"||typeof In=="boolean"?""+In:hn.link(In)})}),Object.keys(Ar).forEach(function(xn){var In=Ar[xn];Or[xn]=$(In,function(hn,sn){return hn.invoke(sn,In)})}),Or}function Gr(Sr,kr,Ar,Or,xn){function In(Un){var On=sn[Un];On&&(Zr[Un]=On)}var hn=fr(Sr,kr),wn=Qe(Sr),sn=er(Sr,wn),Er=He(Sr),Zr=dr(Sr),Hr=rr(Sr,xn,hn);In("viewport"),In(vr("scissor.box"));var Qr=0"u"?"Date.now()":"performance.now()"}function hn(Un){Ln=kr.def(),Un(Ln,"=",In(),";"),typeof xn=="string"?Un(Hr,".count+=",xn,";"):Un(Hr,".count++;"),Je&&(Or?(Pn=kr.def(),Un(Pn,"=",wn,".getNumPendingQueries();")):Un(wn,".beginQuery(",Hr,");"))}function sn(Un){Un(Hr,".cpuTime+=",In(),"-",Ln,";"),Je&&(Or?Un(wn,".pushScopeStats(",Pn,",",wn,".getNumPendingQueries(),",Hr,");"):Un(wn,".endQuery();"))}function Er(Un){var On=kr.def(Qr,".profile");kr(Qr,".profile=",Un,";"),kr.exit(Qr,".profile=",On,";")}var Zr=Sr.shared,Hr=Sr.stats,Qr=Zr.current,wn=Zr.timer;Ar=Ar.profile;var Ln,Pn;if(Ar){if(Q(Ar)){Ar.enable?(hn(kr),sn(kr.exit),Er("true")):Er("false");return}Ar=Ar.append(Sr,kr),Er(Ar)}else Ar=kr.def(Qr,".profile");Zr=Sr.block(),hn(Zr),kr("if(",Ar,"){",Zr,"}"),Sr=Sr.block(),sn(Sr),kr.exit("if(",Ar,"){",Sr,"}")}function Tr(Sr,kr,Ar,Or,xn){function In(Er){switch(Er){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}function hn(Er,Zr,Hr){function Qr(){kr("if(!",Un,".buffer){",Ln,".enableVertexAttribArray(",Pn,");}");var pi=Hr.type,Ci;Ci=Hr.size?kr.def(Hr.size,"||",Zr):Zr,kr("if(",Un,".type!==",pi,"||",Un,".size!==",Ci,"||",ai.map(function(pa){return Un+"."+pa+"!=="+Hr[pa]}).join("||"),"){",Ln,".bindBuffer(",34962,",",On,".buffer);",Ln,".vertexAttribPointer(",[Pn,Ci,pi,Hr.normalized,Hr.stride,Hr.offset],");",Un,".type=",pi,";",Un,".size=",Ci,";",ai.map(function(pa){return Un+"."+pa+"="+Hr[pa]+";"}).join(""),"}"),wr&&(pi=Hr.divisor,kr("if(",Un,".divisor!==",pi,"){",Sr.instancing,".vertexAttribDivisorANGLE(",[Pn,pi],");",Un,".divisor=",pi,";}"))}function wn(){kr("if(",Un,".buffer){",Ln,".disableVertexAttribArray(",Pn,");",Un,".buffer=null;","}if(",me.map(function(pi,Ci){return Un+"."+pi+"!=="+mi[Ci]}).join("||"),"){",Ln,".vertexAttrib4f(",Pn,",",mi,");",me.map(function(pi,Ci){return Un+"."+pi+"="+mi[Ci]+";"}).join(""),"}")}var Ln=sn.gl,Pn=kr.def(Er,".location"),Un=kr.def(sn.attributes,"[",Pn,"]");Er=Hr.state;var On=Hr.buffer,mi=[Hr.x,Hr.y,Hr.z,Hr.w],ai=["buffer","normalized","offset","stride"];Er===1?Qr():Er===2?wn():(kr("if(",Er,"===",1,"){"),Qr(),kr("}else{"),wn(),kr("}"))}var sn=Sr.shared;Or.forEach(function(Er){var Zr=Er.name,Hr=Ar.attributes[Zr],Qr;if(Hr){if(!xn(Hr))return;Qr=Hr.append(Sr,kr)}else{if(!xn(Be))return;var wn=Sr.scopeAttrib(Zr);Qr={},Object.keys(new li).forEach(function(Ln){Qr[Ln]=kr.def(wn,".",Ln)})}hn(Sr.link(Er),In(Er.info.type),Qr)})}function Cr(Sr,kr,Ar,Or,xn,In){for(var hn=Sr.shared,sn=hn.gl,Er,Zr=0;Zr>1)",Un],");")}function Ci(){Ar(On,".drawArraysInstancedANGLE(",[wn,Ln,Pn,Un],");")}Qr&&Qr!=="null"?ai?pi():(Ar("if(",Qr,"){"),pi(),Ar("}else{"),Ci(),Ar("}")):Ci()}function hn(){function pi(){Ar(Er+".drawElements("+[wn,Pn,mi,Ln+"<<(("+mi+"-5121)>>1)"]+");")}function Ci(){Ar(Er+".drawArrays("+[wn,Ln,Pn]+");")}Qr&&Qr!=="null"?ai?pi():(Ar("if(",Qr,"){"),pi(),Ar("}else{"),Ci(),Ar("}")):Ci()}var sn=Sr.shared,Er=sn.gl,Zr=sn.draw,Hr=Or.draw,Qr=function(){var pi=Hr.elements,Ci=kr;return pi?((pi.contextDep&&Or.contextDynamic||pi.propDep)&&(Ci=Ar),pi=pi.append(Sr,Ci),Hr.elementsActive&&Ci("if("+pi+")"+Er+".bindBuffer(34963,"+pi+".buffer.buffer);")):(pi=Ci.def(),Ci(pi,"=",Zr,".","elements",";","if(",pi,"){",Er,".bindBuffer(",34963,",",pi,".buffer.buffer);}","else if(",sn.vao,".currentVAO){",pi,"=",Sr.shared.elements+".getElements("+sn.vao,".currentVAO.elements);",$r?"":"if("+pi+")"+Er+".bindBuffer(34963,"+pi+".buffer.buffer);","}")),pi}(),wn=xn("primitive"),Ln=xn("offset"),Pn=function(){var pi=Hr.count,Ci=kr;return pi?((pi.contextDep&&Or.contextDynamic||pi.propDep)&&(Ci=Ar),pi=pi.append(Sr,Ci)):pi=Ci.def(Zr,".","count"),pi}();if(typeof Pn=="number"){if(Pn===0)return}else Ar("if(",Pn,"){"),Ar.exit("}");var Un,On;wr&&(Un=xn("instances"),On=Sr.instancing);var mi=Qr+".type",ai=Hr.elements&&Q(Hr.elements)&&!Hr.vaoActive;wr&&(typeof Un!="number"||0<=Un)?typeof Un=="string"?(Ar("if(",Un,">0){"),In(),Ar("}else if(",Un,"<0){"),hn(),Ar("}")):In():hn()}function Ur(Sr,kr,Ar,Or,xn){return kr=Ne(),xn=kr.proc("body",xn),wr&&(kr.instancing=xn.def(kr.shared.extensions,".angle_instanced_arrays")),Sr(kr,xn,Ar,Or),kr.compile().body}function an(Sr,kr,Ar,Or){Cn(Sr,kr),Ar.useVAO?Ar.drawVAO?kr(Sr.shared.vao,".setVAO(",Ar.drawVAO.append(Sr,kr),");"):kr(Sr.shared.vao,".setVAO(",Sr.shared.vao,".targetVAO);"):(kr(Sr.shared.vao,".setVAO(null);"),Tr(Sr,kr,Ar,Or.attributes,function(){return!0})),Cr(Sr,kr,Ar,Or.uniforms,function(){return!0},!1),Wr(Sr,kr,kr,Ar)}function pn(Sr,kr){var Ar=Sr.proc("draw",1);Cn(Sr,Ar),Pr(Sr,Ar,kr.context),Dr(Sr,Ar,kr.framebuffer),cn(Sr,Ar,kr),rn(Sr,Ar,kr.state),En(Sr,Ar,kr,!1,!0);var Or=kr.shader.progVar.append(Sr,Ar);if(Ar(Sr.shared.gl,".useProgram(",Or,".program);"),kr.shader.program)an(Sr,Ar,kr,kr.shader.program);else{Ar(Sr.shared.vao,".setVAO(null);");var xn=Sr.global.def("{}"),In=Ar.def(Or,".id"),hn=Ar.def(xn,"[",In,"]");Ar(Sr.cond(hn).then(hn,".call(this,a0);").else(hn,"=",xn,"[",In,"]=",Sr.link(function(sn){return Ur(an,Sr,kr,sn,1)}),"(",Or,");",hn,".call(this,a0);"))}0=--this.refCount&&se(this)},$e.profile&&(or.getTotalRenderbufferSize=function(){var ke=0;return Object.keys(Pe).forEach(function(Ve){ke+=Pe[Ve].stats.size}),ke}),{create:function(ke,Ve){function Je(hr,vr){var Yt=0,Gt=0,Ne=32854;if(typeof hr=="object"&&hr?("shape"in hr?(Gt=hr.shape,Yt=Gt[0]|0,Gt=Gt[1]|0):("radius"in hr&&(Yt=Gt=hr.radius|0),"width"in hr&&(Yt=hr.width|0),"height"in hr&&(Gt=hr.height|0)),"format"in hr&&(Ne=Ae[hr.format])):typeof hr=="number"?(Yt=hr|0,Gt=typeof vr=="number"?vr|0:Yt):hr||(Yt=Gt=1),Yt!==ur.width||Gt!==ur.height||Ne!==ur.format)return Je.width=ur.width=Yt,Je.height=ur.height=Gt,ur.format=Ne,pe.bindRenderbuffer(36161,ur.renderbuffer),pe.renderbufferStorage(36161,Ne,Yt,Gt),$e.profile&&(ur.stats.size=Et[ur.format]*ur.width*ur.height),Je.format=Ce[ur.format],Je}var ur=new ge(pe.createRenderbuffer());return Pe[ur.id]=ur,or.renderbufferCount++,Je(ke,Ve),Je.resize=function(hr,vr){var Yt=hr|0,Gt=vr|0||Yt;return Yt===ur.width&&Gt===ur.height||(Je.width=ur.width=Yt,Je.height=ur.height=Gt,pe.bindRenderbuffer(36161,ur.renderbuffer),pe.renderbufferStorage(36161,ur.format,Yt,Gt),$e.profile&&(ur.stats.size=Et[ur.format]*ur.width*ur.height)),Je},Je._reglType="renderbuffer",Je._renderbuffer=ur,$e.profile&&(Je.stats=ur.stats),Je.destroy=function(){ur.decRef()},Je},clear:function(){mt(Pe).forEach(se)},restore:function(){mt(Pe).forEach(function(ke){ke.renderbuffer=pe.createRenderbuffer(),pe.bindRenderbuffer(36161,ke.renderbuffer),pe.renderbufferStorage(36161,ke.format,ke.width,ke.height)}),pe.bindRenderbuffer(36161,null)}}},Nt=[];Nt[6408]=4,Nt[6407]=3;var jt=[];jt[5121]=1,jt[5126]=4,jt[36193]=2;var ie=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],me=["x","y","z","w"],be="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),ve={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Le={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ce={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Te={cw:2304,ccw:2305},Be=new V(!1,!1,!1,function(){}),ir=function(pe,Xe){function Ke(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function or(Pe,ke,Ve){var Je=se.pop()||new Ke;Je.startQueryIndex=Pe,Je.endQueryIndex=ke,Je.sum=0,Je.stats=Ve,Ae.push(Je)}if(!Xe.ext_disjoint_timer_query)return null;var $e=[],ge=[],se=[],Ae=[],Ce=[],Ie=[];return{beginQuery:function(Pe){var ke=$e.pop()||Xe.ext_disjoint_timer_query.createQueryEXT();Xe.ext_disjoint_timer_query.beginQueryEXT(35007,ke),ge.push(ke),or(ge.length-1,ge.length,Pe)},endQuery:function(){Xe.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:or,update:function(){var Pe,ke;if(Pe=ge.length,Pe!==0){Ie.length=Math.max(Ie.length,Pe+1),Ce.length=Math.max(Ce.length,Pe+1),Ce[0]=0;var Ve=Ie[0]=0;for(ke=Pe=0;ke=En.length&&or()}var _n=st(En,pn);En[_n]=gn}}}function Ie(){var pn=rn.viewport,gn=rn.scissor_box;pn[0]=pn[1]=gn[0]=gn[1]=0,er.viewportWidth=er.framebufferWidth=er.drawingBufferWidth=pn[2]=gn[2]=Je.drawingBufferWidth,er.viewportHeight=er.framebufferHeight=er.drawingBufferHeight=pn[3]=gn[3]=Je.drawingBufferHeight}function Pe(){er.tick+=1,er.time=Ve(),Ie(),Dr.procs.poll()}function ke(){pr.refresh(),Ie(),Dr.procs.refresh(),Ne&&Ne.update()}function Ve(){return(wt()-Oe)/1e3}if(pe=r(pe),!pe)return null;var Je=pe.gl,ur=Je.getContextAttributes();Je.isContextLost();var hr=e(Je,pe);if(!hr)return null;var cn=i(),vr={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Yt=pe.cachedCode||{},Gt=hr.extensions,Ne=ir(Je,Gt),Oe=wt(),fr=Je.drawingBufferWidth,Qe=Je.drawingBufferHeight,er={tick:0,time:0,viewportWidth:fr,viewportHeight:Qe,framebufferWidth:fr,framebufferHeight:Qe,drawingBufferWidth:fr,drawingBufferHeight:Qe,pixelRatio:pe.pixelRatio},fr={elements:null,primitive:4,count:-1,offset:0,instances:-1},rr=bt(Je,Gt),He=o(Je,vr,pe,function(pn){return mr.destroyBuffer(pn)}),dr=d(Je,Gt,He,vr),mr=I(Je,Gt,rr,vr,He,dr,fr),xr=k(Je,cn,vr,pe),pr=z(Je,Gt,rr,function(){Dr.procs.poll()},er,vr,pe),Gr=Mt(Je,Gt,rr,vr,pe),Pr=D(Je,Gt,rr,pr,Gr,vr),Dr=Z(Je,cn,Gt,rr,He,dr,pr,Pr,{},mr,xr,fr,er,Ne,Yt,pe),cn=B(Je,Pr,Dr.procs.poll,er),rn=Dr.next,Cn=Je.canvas,En=[],Tr=[],Cr=[],Wr=[pe.onDestroy],Ur=null;Cn&&(Cn.addEventListener("webglcontextlost",$e,!1),Cn.addEventListener("webglcontextrestored",ge,!1));var an=Pr.setFBO=se({framebuffer:gt.define.call(null,1,"framebuffer")});return ke(),ur=nt(se,{clear:function(pn){if("framebuffer"in pn)if(pn.framebuffer&&pn.framebuffer_reglType==="framebufferCube")for(var gn=0;6>gn;++gn)an(nt({framebuffer:pn.framebuffer.faces[gn]},pn),Ae);else an(pn,Ae);else Ae(null,pn)},prop:gt.define.bind(null,1),context:gt.define.bind(null,2),this:gt.define.bind(null,3),draw:se({}),buffer:function(pn){return He.create(pn,34962,!1,!1)},elements:function(pn){return dr.create(pn,!1)},texture:pr.create2D,cube:pr.createCube,renderbuffer:Gr.create,framebuffer:Pr.create,framebufferCube:Pr.createCube,vao:mr.createVAO,attributes:ur,frame:Ce,on:function(pn,gn){var _n;switch(pn){case"frame":return Ce(gn);case"lost":_n=Tr;break;case"restore":_n=Cr;break;case"destroy":_n=Wr}return _n.push(gn),{cancel:function(){for(var kn=0;kn<_n.length;++kn)if(_n[kn]===gn){_n[kn]=_n[_n.length-1],_n.pop();break}}}},limits:rr,hasExtension:function(pn){return 0<=rr.extensions.indexOf(pn.toLowerCase())},read:cn,destroy:function(){En.length=0,or(),Cn&&(Cn.removeEventListener("webglcontextlost",$e),Cn.removeEventListener("webglcontextrestored",ge)),xr.clear(),Pr.clear(),Gr.clear(),mr.clear(),pr.clear(),dr.clear(),He.clear(),Ne&&Ne.clear(),Wr.forEach(function(pn){pn()})},_gl:Je,_refresh:ke,poll:function(){Pe(),Ne&&Ne.update()},now:Ve,stats:vr,getCachedCode:function(){return Yt},preloadCachedCode:function(pn){Object.entries(pn).forEach(function(gn){Yt[gn[0]]=gn[1]})}}),pe.onDone(null,ur),ur}})},30456:function(G,U,t){/*! safe-buffer. MIT License. Feross Aboukhadijeh */var g=t(33576),C=g.Buffer;function i(x,v){for(var p in x)v[p]=x[p]}C.from&&C.alloc&&C.allocUnsafe&&C.allocUnsafeSlow?G.exports=g:(i(g,U),U.Buffer=S);function S(x,v,p){return C(x,v,p)}S.prototype=Object.create(C.prototype),i(C,S),S.from=function(x,v,p){if(typeof x=="number")throw new TypeError("Argument must not be a number");return C(x,v,p)},S.alloc=function(x,v,p){if(typeof x!="number")throw new TypeError("Argument must be a number");var r=C(x);return v!==void 0?typeof p=="string"?r.fill(v,p):r.fill(v):r.fill(0),r},S.allocUnsafe=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return C(x)},S.allocUnsafeSlow=function(x){if(typeof x!="number")throw new TypeError("Argument must be a number");return g.SlowBuffer(x)}},14500:function(G,U,t){var g=t(53664),C=t(64348),i=t(39640)(),S=t(2304),x=g("%TypeError%"),v=g("%Math.floor%");G.exports=function(r,e){if(typeof r!="function")throw new x("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||v(e)!==e)throw new x("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],n=!0,f=!0;if("length"in r&&S){var c=S(r,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(f=!1)}return(n||f||!a)&&(i?C(r,"length",e,!0,!0):C(r,"length",e)),r}},29936:function(G,U,t){G.exports=i;var g=t(61252).EventEmitter,C=t(6768);C(i,g),i.Readable=t(12348),i.Writable=t(11288),i.Duplex=t(15316),i.Transform=t(22477),i.PassThrough=t(27136),i.finished=t(15932),i.pipeline=t(38180),i.Stream=i;function i(){g.call(this)}i.prototype.pipe=function(S,x){var v=this;function p(l){S.writable&&S.write(l)===!1&&v.pause&&v.pause()}v.on("data",p);function r(){v.readable&&v.resume&&v.resume()}S.on("drain",r),!S._isStdio&&(!x||x.end!==!1)&&(v.on("end",a),v.on("close",n));var e=!1;function a(){e||(e=!0,S.end())}function n(){e||(e=!0,typeof S.destroy=="function"&&S.destroy())}function f(l){if(c(),g.listenerCount(this,"error")===0)throw l}v.on("error",f),S.on("error",f);function c(){v.removeListener("data",p),S.removeListener("drain",r),v.removeListener("end",a),v.removeListener("close",n),v.removeListener("error",f),S.removeListener("error",f),v.removeListener("end",c),v.removeListener("close",c),S.removeListener("close",c)}return v.on("end",c),v.on("close",c),S.on("close",c),S.emit("pipe",v),S}},92784:function(G){function U(v,p){v.prototype=Object.create(p.prototype),v.prototype.constructor=v,v.__proto__=p}var t={};function g(v,p,r){r||(r=Error);function e(n,f,c){return typeof p=="string"?p:p(n,f,c)}var a=function(n){U(f,n);function f(c,l,m){return n.call(this,e(c,l,m))||this}return f}(r);a.prototype.name=r.name,a.prototype.code=v,t[v]=a}function C(v,p){if(Array.isArray(v)){var r=v.length;return v=v.map(function(e){return String(e)}),r>2?"one of ".concat(p," ").concat(v.slice(0,r-1).join(", "),", or ")+v[r-1]:r===2?"one of ".concat(p," ").concat(v[0]," or ").concat(v[1]):"of ".concat(p," ").concat(v[0])}else return"of ".concat(p," ").concat(String(v))}function i(v,p,r){return v.substr(!r||r<0?0:+r,p.length)===p}function S(v,p,r){return(r===void 0||r>v.length)&&(r=v.length),v.substring(r-p.length,r)===p}function x(v,p,r){return typeof r!="number"&&(r=0),r+p.length>v.length?!1:v.indexOf(p,r)!==-1}g("ERR_INVALID_OPT_VALUE",function(v,p){return'The value "'+p+'" is invalid for option "'+v+'"'},TypeError),g("ERR_INVALID_ARG_TYPE",function(v,p,r){var e;typeof p=="string"&&i(p,"not ")?(e="must not be",p=p.replace(/^not /,"")):e="must be";var a;if(S(v," argument"))a="The ".concat(v," ").concat(e," ").concat(C(p,"type"));else{var n=x(v,".")?"property":"argument";a='The "'.concat(v,'" ').concat(n," ").concat(e," ").concat(C(p,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError),g("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),g("ERR_METHOD_NOT_IMPLEMENTED",function(v){return"The "+v+" method is not implemented"}),g("ERR_STREAM_PREMATURE_CLOSE","Premature close"),g("ERR_STREAM_DESTROYED",function(v){return"Cannot call "+v+" after a stream was destroyed"}),g("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),g("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),g("ERR_STREAM_WRITE_AFTER_END","write after end"),g("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),g("ERR_UNKNOWN_ENCODING",function(v){return"Unknown encoding: "+v},TypeError),g("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),G.exports.i=t},15316:function(G,U,t){var g=t(4168),C=Object.keys||function(n){var f=[];for(var c in n)f.push(c);return f};G.exports=r;var i=t(12348),S=t(11288);t(6768)(r,i);for(var x=C(S.prototype),v=0;v0)if(typeof Z!="string"&&!gt.objectMode&&Object.getPrototypeOf(Z)!==x.prototype&&(Z=p(Z)),nt)gt.endEmitted?_($,new o):M($,gt,Z,!0);else if(gt.ended)_($,new b);else{if(gt.destroyed)return!1;gt.reading=!1,gt.decoder&&!st?(Z=gt.decoder.write(Z),gt.objectMode||Z.length!==0?M($,gt,Z,!1):H($,gt)):M($,gt,Z,!1)}else nt||(gt.reading=!1,H($,gt))}return!gt.ended&&(gt.length=D?$=D:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function I($,Z){return $<=0||Z.length===0&&Z.ended?0:Z.objectMode?1:$!==$?Z.flowing&&Z.length?Z.buffer.head.data.length:Z.length:($>Z.highWaterMark&&(Z.highWaterMark=N($)),$<=Z.length?$:Z.ended?Z.length:(Z.needReadable=!0,0))}s.prototype.read=function($){a("read",$),$=parseInt($,10);var Z=this._readableState,st=$;if($!==0&&(Z.emittedReadable=!1),$===0&&Z.needReadable&&((Z.highWaterMark!==0?Z.length>=Z.highWaterMark:Z.length>0)||Z.ended))return a("read: emitReadable",Z.length,Z.ended),Z.length===0&&Z.ended?V(this):B(this),null;if($=I($,Z),$===0&&Z.ended)return Z.length===0&&V(this),null;var nt=Z.needReadable;a("need readable",nt),(Z.length===0||Z.length-$0?ct=tt($,Z):ct=null,ct===null?(Z.needReadable=Z.length<=Z.highWaterMark,$=0):(Z.length-=$,Z.awaitDrain=0),Z.length===0&&(Z.ended||(Z.needReadable=!0),st!==$&&Z.ended&&V(this)),ct!==null&&this.emit("data",ct),ct};function k($,Z){if(a("onEofChunk"),!Z.ended){if(Z.decoder){var st=Z.decoder.end();st&&st.length&&(Z.buffer.push(st),Z.length+=Z.objectMode?1:st.length)}Z.ended=!0,Z.sync?B($):(Z.needReadable=!1,Z.emittedReadable||(Z.emittedReadable=!0,O($)))}}function B($){var Z=$._readableState;a("emitReadable",Z.needReadable,Z.emittedReadable),Z.needReadable=!1,Z.emittedReadable||(a("emitReadable",Z.flowing),Z.emittedReadable=!0,g.nextTick(O,$))}function O($){var Z=$._readableState;a("emitReadable_",Z.destroyed,Z.length,Z.ended),!Z.destroyed&&(Z.length||Z.ended)&&($.emit("readable"),Z.emittedReadable=!1),Z.needReadable=!Z.flowing&&!Z.ended&&Z.length<=Z.highWaterMark,X($)}function H($,Z){Z.readingMore||(Z.readingMore=!0,g.nextTick(Y,$,Z))}function Y($,Z){for(;!Z.reading&&!Z.ended&&(Z.length1&&ot(nt.pipes,$)!==-1)&&!bt&&(a("false write response, pause",nt.awaitDrain),nt.awaitDrain++),st.pause())}function Lt(Vt){a("onerror",Vt),kt(),$.removeListener("error",Lt),i($,"error")===0&&_($,Vt)}E($,"error",Lt);function Ht(){$.removeListener("finish",Ut),kt()}$.once("close",Ht);function Ut(){a("onfinish"),$.removeListener("close",Ht),kt()}$.once("finish",Ut);function kt(){a("unpipe"),st.unpipe($)}return $.emit("pipe",st),nt.flowing||(a("pipe resume"),st.resume()),$};function j($){return function(){var st=$._readableState;a("pipeOnDrain",st.awaitDrain),st.awaitDrain&&st.awaitDrain--,st.awaitDrain===0&&i($,"data")&&(st.flowing=!0,X($))}}s.prototype.unpipe=function($){var Z=this._readableState,st={hasUnpiped:!1};if(Z.pipesCount===0)return this;if(Z.pipesCount===1)return $&&$!==Z.pipes?this:($||($=Z.pipes),Z.pipes=null,Z.pipesCount=0,Z.flowing=!1,$&&$.emit("unpipe",this,st),this);if(!$){var nt=Z.pipes,ct=Z.pipesCount;Z.pipes=null,Z.pipesCount=0,Z.flowing=!1;for(var gt=0;gt0,nt.flowing!==!1&&this.resume()):$==="readable"&&!nt.endEmitted&&!nt.readableListening&&(nt.readableListening=nt.needReadable=!0,nt.flowing=!1,nt.emittedReadable=!1,a("on readable",nt.length,nt.reading),nt.length?B(this):nt.reading||g.nextTick(it,this)),st},s.prototype.addListener=s.prototype.on,s.prototype.removeListener=function($,Z){var st=S.prototype.removeListener.call(this,$,Z);return $==="readable"&&g.nextTick(et,this),st},s.prototype.removeAllListeners=function($){var Z=S.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&g.nextTick(et,this),Z};function et($){var Z=$._readableState;Z.readableListening=$.listenerCount("readable")>0,Z.resumeScheduled&&!Z.paused?Z.flowing=!0:$.listenerCount("data")>0&&$.resume()}function it($){a("readable nexttick read 0"),$.read(0)}s.prototype.resume=function(){var $=this._readableState;return $.flowing||(a("resume"),$.flowing=!$.readableListening,ut(this,$)),$.paused=!1,this};function ut($,Z){Z.resumeScheduled||(Z.resumeScheduled=!0,g.nextTick(J,$,Z))}function J($,Z){a("resume",Z.reading),Z.reading||$.read(0),Z.resumeScheduled=!1,$.emit("resume"),X($),Z.flowing&&!Z.reading&&$.read(0)}s.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function X($){var Z=$._readableState;for(a("flow",Z.flowing);Z.flowing&&$.read()!==null;);}s.prototype.wrap=function($){var Z=this,st=this._readableState,nt=!1;$.on("end",function(){if(a("wrapped end"),st.decoder&&!st.ended){var Tt=st.decoder.end();Tt&&Tt.length&&Z.push(Tt)}Z.push(null)}),$.on("data",function(Tt){if(a("wrapped data"),st.decoder&&(Tt=st.decoder.write(Tt)),!(st.objectMode&&Tt==null)&&!(!st.objectMode&&(!Tt||!Tt.length))){var wt=Z.push(Tt);wt||(nt=!0,$.pause())}});for(var ct in $)this[ct]===void 0&&typeof $[ct]=="function"&&(this[ct]=function(wt){return function(){return $[wt].apply($,arguments)}}(ct));for(var gt=0;gt=Z.length?(Z.decoder?st=Z.buffer.join(""):Z.buffer.length===1?st=Z.buffer.first():st=Z.buffer.concat(Z.length),Z.buffer.clear()):st=Z.buffer.consume($,Z.decoder),st}function V($){var Z=$._readableState;a("endReadable",Z.endEmitted),Z.endEmitted||(Z.ended=!0,g.nextTick(Q,Z,$))}function Q($,Z){if(a("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,Z.readable=!1,Z.emit("end"),$.autoDestroy)){var st=Z._writableState;(!st||st.autoDestroy&&st.finished)&&Z.destroy()}}typeof Symbol=="function"&&(s.from=function($,Z){return A===void 0&&(A=t(90555)),A(s,$,Z)});function ot($,Z){for(var st=0,nt=$.length;st-1))throw new w(tt);return this._writableState.defaultEncoding=tt,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function M(X,tt,V){return!X.objectMode&&X.decodeStrings!==!1&&typeof tt=="string"&&(tt=v.from(tt,V)),tt}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(X,tt,V,Q,ot,$){if(!V){var Z=M(tt,Q,ot);Q!==Z&&(V=!0,ot="buffer",Q=Z)}var st=tt.objectMode?1:Q.length;tt.length+=st;var nt=tt.length0?this.tail.next=h:this.head=h,this.tail=h,++this.length}},{key:"unshift",value:function(m){var h={data:m,next:this.head};this.length===0&&(this.tail=h),this.head=h,++this.length}},{key:"shift",value:function(){if(this.length!==0){var m=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,m}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(m){if(this.length===0)return"";for(var h=this.head,b=""+h.data;h=h.next;)b+=m+h.data;return b}},{key:"concat",value:function(m){if(this.length===0)return r.alloc(0);for(var h=r.allocUnsafe(m>>>0),b=this.head,u=0;b;)f(b.data,h,u),u+=b.data.length,b=b.next;return h}},{key:"consume",value:function(m,h){var b;return mo.length?o.length:m;if(d===o.length?u+=o:u+=o.slice(0,m),m-=d,m===0){d===o.length?(++b,h.next?this.head=h.next:this.head=this.tail=null):(this.head=h,h.data=o.slice(d));break}++b}return this.length-=b,u}},{key:"_getBuffer",value:function(m){var h=r.allocUnsafe(m),b=this.head,u=1;for(b.data.copy(h),m-=b.data.length;b=b.next;){var o=b.data,d=m>o.length?o.length:m;if(o.copy(h,h.length-m,0,d),m-=d,m===0){d===o.length?(++u,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=o.slice(d));break}++u}return this.length-=u,h}},{key:n,value:function(m,h){return a(this,C({},h,{depth:0,customInspect:!1}))}}]),c}()},55324:function(G,U,t){var g=t(4168);function C(r,e){var a=this,n=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return n||f?(e?e(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,g.nextTick(v,this,r)):g.nextTick(v,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(c){!e&&c?a._writableState?a._writableState.errorEmitted?g.nextTick(S,a):(a._writableState.errorEmitted=!0,g.nextTick(i,a,c)):g.nextTick(i,a,c):e?(g.nextTick(S,a),e(c)):g.nextTick(S,a)}),this)}function i(r,e){v(r,e),S(r)}function S(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function x(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function v(r,e){r.emit("error",e)}function p(r,e){var a=r._readableState,n=r._writableState;a&&a.autoDestroy||n&&n.autoDestroy?r.destroy(e):r.emit("error",e)}G.exports={destroy:C,undestroy:x,errorOrDestroy:p}},15932:function(G,U,t){var g=t(92784).i.ERR_STREAM_PREMATURE_CLOSE;function C(v){var p=!1;return function(){if(!p){p=!0;for(var r=arguments.length,e=new Array(r),a=0;a0;return r(o,w,A,function(_){b||(b=_),_&&u.forEach(e),!w&&(u.forEach(e),h(b))})});return l.reduce(a)}G.exports=f},24888:function(G,U,t){var g=t(92784).i.ERR_INVALID_OPT_VALUE;function C(S,x,v){return S.highWaterMark!=null?S.highWaterMark:x?S[v]:null}function i(S,x,v,p){var r=C(x,p,v);if(r!=null){if(!(isFinite(r)&&Math.floor(r)===r)||r<0){var e=p?v:"highWaterMark";throw new g(e,r)}return Math.floor(r)}return S.objectMode?16:16384}G.exports={getHighWaterMark:i}},4776:function(G,U,t){G.exports=t(61252).EventEmitter},86032:function(G,U,t){var g=t(30456).Buffer,C=g.isEncoding||function(u){switch(u=""+u,u&&u.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(u){if(!u)return"utf8";for(var o;;)switch(u){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return u;default:if(o)return;u=(""+u).toLowerCase(),o=!0}}function S(u){var o=i(u);if(typeof o!="string"&&(g.isEncoding===C||!C(u)))throw new Error("Unknown encoding: "+u);return o||u}U.o=x;function x(u){this.encoding=S(u);var o;switch(this.encoding){case"utf16le":this.text=f,this.end=c,o=4;break;case"utf8":this.fillLast=e,o=4;break;case"base64":this.text=l,this.end=m,o=3;break;default:this.write=h,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(o)}x.prototype.write=function(u){if(u.length===0)return"";var o,d;if(this.lastNeed){if(o=this.fillLast(u),o===void 0)return"";d=this.lastNeed,this.lastNeed=0}else d=0;return d>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function p(u,o,d){var w=o.length-1;if(w=0?(A>0&&(u.lastNeed=A-1),A):--w=0?(A>0&&(u.lastNeed=A-2),A):--w=0?(A>0&&(A===2?A=0:u.lastNeed=A-3),A):0))}function r(u,o,d){if((o[0]&192)!==128)return u.lastNeed=0,"�";if(u.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return u.lastNeed=1,"�";if(u.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return u.lastNeed=2,"�"}}function e(u){var o=this.lastTotal-this.lastNeed,d=r(this,u);if(d!==void 0)return d;if(this.lastNeed<=u.length)return u.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,o,0,u.length),this.lastNeed-=u.length}function a(u,o){var d=p(this,u,o);if(!this.lastNeed)return u.toString("utf8",o);this.lastTotal=d;var w=u.length-(d-this.lastNeed);return u.copy(this.lastChar,0,w),u.toString("utf8",o,w)}function n(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+"�":o}function f(u,o){if((u.length-o)%2===0){var d=u.toString("utf16le",o);if(d){var w=d.charCodeAt(d.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],d.slice(0,-1)}return d}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",o,u.length-1)}function c(u){var o=u&&u.length?this.write(u):"";if(this.lastNeed){var d=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,d)}return o}function l(u,o){var d=(u.length-o)%3;return d===0?u.toString("base64",o):(this.lastNeed=3-d,this.lastTotal=3,d===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",o,u.length-d))}function m(u){var o=u&&u.length?this.write(u):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function h(u){return u.toString(this.encoding)}function b(u){return u&&u.length?this.write(u):""}},55619:function(G,U,t){var g=t(45408),C=t(86844)("stream-parser");G.exports=p;var i=-1,S=0,x=1,v=2;function p(u){var o=u&&typeof u._transform=="function",d=u&&typeof u._write=="function";if(!o&&!d)throw new Error("must pass a Writable or Transform stream in");C("extending Parser into stream"),u._bytes=e,u._skipBytes=a,o&&(u._passthrough=n),o?u._transform=c:u._write=f}function r(u){C("initializing parser stream"),u._parserBytesLeft=0,u._parserBuffers=[],u._parserBuffered=0,u._parserState=i,u._parserCallback=null,typeof u.push=="function"&&(u._parserOutput=u.push.bind(u)),u._parserInit=!0}function e(u,o){g(!this._parserCallback,'there is already a "callback" set!'),g(isFinite(u)&&u>0,'can only buffer a finite number of bytes > 0, got "'+u+'"'),this._parserInit||r(this),C("buffering %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=S}function a(u,o){g(!this._parserCallback,'there is already a "callback" set!'),g(u>0,'can only skip > 0 bytes, got "'+u+'"'),this._parserInit||r(this),C("skipping %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=x}function n(u,o){g(!this._parserCallback,'There is already a "callback" set!'),g(u>0,'can only pass through > 0 bytes, got "'+u+'"'),this._parserInit||r(this),C("passing through %o bytes",u),this._parserBytesLeft=u,this._parserCallback=o,this._parserState=v}function f(u,o,d){this._parserInit||r(this),C("write(%o bytes)",u.length),typeof o=="function"&&(d=o),h(this,u,null,d)}function c(u,o,d){this._parserInit||r(this),C("transform(%o bytes)",u.length),typeof o!="function"&&(o=this._parserOutput),h(this,u,o,d)}function l(u,o,d,w){return u._parserBytesLeft<=0?w(new Error("got data but not currently parsing anything")):o.length<=u._parserBytesLeft?function(){return m(u,o,d,w)}:function(){var A=o.slice(0,u._parserBytesLeft);return m(u,A,d,function(_){if(_)return w(_);if(o.length>A.length)return function(){return l(u,o.slice(A.length),d,w)}})}}function m(u,o,d,w){if(u._parserBytesLeft-=o.length,C("%o bytes left for stream piece",u._parserBytesLeft),u._parserState===S?(u._parserBuffers.push(o),u._parserBuffered+=o.length):u._parserState===v&&d(o),u._parserBytesLeft===0){var A=u._parserCallback;if(A&&u._parserState===S&&u._parserBuffers.length>1&&(o=Buffer.concat(u._parserBuffers,u._parserBuffered)),u._parserState!==S&&(o=null),u._parserCallback=null,u._parserBuffered=0,u._parserState=i,u._parserBuffers.splice(0),A){var _=[];o&&_.push(o),d&&_.push(d);var y=A.length>_.length;y&&_.push(b(w));var E=A.apply(u,_);if(!y||w===E)return w}}else return w}var h=b(l);function b(u){return function(){for(var o=u.apply(this,arguments);typeof o=="function";)o=o();return o}}},86844:function(G,U,t){var g=t(4168);U=G.exports=t(89416),U.log=S,U.formatArgs=i,U.save=x,U.load=v,U.useColors=C,U.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:p(),U.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function C(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}U.formatters.j=function(r){try{return JSON.stringify(r)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}};function i(r){var e=this.useColors;if(r[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+r[0]+(e?"%c ":" ")+"+"+U.humanize(this.diff),!!e){var a="color: "+this.color;r.splice(1,0,a,"color: inherit");var n=0,f=0;r[0].replace(/%[a-zA-Z%]/g,function(c){c!=="%%"&&(n++,c==="%c"&&(f=n))}),r.splice(f,0,a)}}function S(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function x(r){try{r==null?U.storage.removeItem("debug"):U.storage.debug=r}catch{}}function v(){var r;try{r=U.storage.debug}catch{}return!r&&typeof g<"u"&&"env"in g&&(r=g.env.DEBUG),r}U.enable(v());function p(){try{return window.localStorage}catch{}}},89416:function(G,U,t){U=G.exports=i.debug=i.default=i,U.coerce=p,U.disable=x,U.enable=S,U.enabled=v,U.humanize=t(93744),U.names=[],U.skips=[],U.formatters={};var g;function C(r){var e=0,a;for(a in r)e=(e<<5)-e+r.charCodeAt(a),e|=0;return U.colors[Math.abs(e)%U.colors.length]}function i(r){function e(){if(e.enabled){var a=e,n=+new Date,f=n-(g||n);a.diff=f,a.prev=g,a.curr=n,g=n;for(var c=new Array(arguments.length),l=0;l0)return S(r);if(a==="number"&&isNaN(r)===!1)return e.long?v(r):x(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function S(r){if(r=String(r),!(r.length>100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(e){var a=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return a*i;case"days":case"day":case"d":return a*C;case"hours":case"hour":case"hrs":case"hr":case"h":return a*g;case"minutes":case"minute":case"mins":case"min":case"m":return a*t;case"seconds":case"second":case"secs":case"sec":case"s":return a*U;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function x(r){return r>=C?Math.round(r/C)+"d":r>=g?Math.round(r/g)+"h":r>=t?Math.round(r/t)+"m":r>=U?Math.round(r/U)+"s":r+"ms"}function v(r){return p(r,C,"day")||p(r,g,"hour")||p(r,t,"minute")||p(r,U,"second")||r+" ms"}function p(r,e,a){if(!(r",'""',"''","``","“”","«»"]:(typeof x.ignore=="string"&&(x.ignore=[x.ignore]),x.ignore=x.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var v=g.parse(i,{flat:!0,brackets:x.ignore}),p=v[0],r=p.split(S);if(x.escape){for(var e=[],a=0;a0;){h=u[u.length-1];var o=t[h];if(x[h]=0&&p[h].push(v[w])}x[h]=d}else{if(i[h]===C[h]){for(var A=[],_=[],y=0,d=b.length-1;d>=0;--d){var E=b[d];if(S[E]=!1,A.push(E),_.push(p[E]),y+=p[E].length,v[E]=a.length,E===h){b.length=d;break}}a.push(A);for(var T=new Array(y),d=0;d<_.length;d++)for(var s=0;s<_[d].length;s++)T[--y]=_[d][s];n.push(T)}u.pop()}}}for(var r=0;r1&&(l=1),l<-1&&(l=-1),c*Math.acos(l)},v=function(e,a,n,f,c,l,m,h,b,u,o,d){var w=Math.pow(c,2),A=Math.pow(l,2),_=Math.pow(o,2),y=Math.pow(d,2),E=w*A-w*y-A*_;E<0&&(E=0),E/=w*y+A*_,E=Math.sqrt(E)*(m===h?-1:1);var T=E*c/l*d,s=E*-l/c*o,L=u*T-b*s+(e+n)/2,M=b*T+u*s+(a+f)/2,z=(o-T)/c,D=(d-s)/l,N=(-o-T)/c,I=(-d-s)/l,k=x(1,0,z,D),B=x(z,D,N,I);return h===0&&B>0&&(B-=C),h===1&&B<0&&(B+=C),[L,M,k,B]},p=function(e){var a=e.px,n=e.py,f=e.cx,c=e.cy,l=e.rx,m=e.ry,h=e.xAxisRotation,b=h===void 0?0:h,u=e.largeArcFlag,o=u===void 0?0:u,d=e.sweepFlag,w=d===void 0?0:d,A=[];if(l===0||m===0)return[];var _=Math.sin(b*C/360),y=Math.cos(b*C/360),E=y*(a-f)/2+_*(n-c)/2,T=-_*(a-f)/2+y*(n-c)/2;if(E===0&&T===0)return[];l=Math.abs(l),m=Math.abs(m);var s=Math.pow(E,2)/Math.pow(l,2)+Math.pow(T,2)/Math.pow(m,2);s>1&&(l*=Math.sqrt(s),m*=Math.sqrt(s));var L=v(a,n,f,c,l,m,o,w,_,y,E,T),M=g(L,4),z=M[0],D=M[1],N=M[2],I=M[3],k=Math.abs(I)/(C/4);Math.abs(1-k)<1e-7&&(k=1);var B=Math.max(Math.ceil(k),1);I/=B;for(var O=0;Or[2]&&(r[2]=n[f+0]),n[f+1]>r[3]&&(r[3]=n[f+1]);return r}},41976:function(G,U,t){G.exports=C;var g=t(92848);function C(x){for(var v,p=[],r=0,e=0,a=0,n=0,f=null,c=null,l=0,m=0,h=0,b=x.length;h4?(r=u[u.length-4],e=u[u.length-3]):(r=l,e=m),p.push(u)}return p}function i(x,v,p,r){return["C",x,v,p,r,p,r]}function S(x,v,p,r,e,a){return["C",x/3+.6666666666666666*p,v/3+.6666666666666666*r,e/3+.6666666666666666*p,a/3+.6666666666666666*r,e,a]}},20472:function(G,U,t){var g=t(74840),C=t(21984),i=t(22235),S=t(53520),x=t(29620),v=document.createElement("canvas"),p=v.getContext("2d");G.exports=r;function r(n,f){if(!S(n))throw Error("Argument should be valid svg path string");f||(f={});var c,l;f.shape?(c=f.shape[0],l=f.shape[1]):(c=v.width=f.w||f.width||200,l=v.height=f.h||f.height||200);var m=Math.min(c,l),h=f.stroke||0,b=f.viewbox||f.viewBox||g(n),u=[c/(b[2]-b[0]),l/(b[3]-b[1])],o=Math.min(u[0]||0,u[1]||0)/2;if(p.fillStyle="black",p.fillRect(0,0,c,l),p.fillStyle="white",h&&(typeof h!="number"&&(h=1),h>0?p.strokeStyle="white":p.strokeStyle="black",p.lineWidth=Math.abs(h)),p.translate(c*.5,l*.5),p.scale(o,o),a()){var d=new Path2D(n);p.fill(d),h&&p.stroke(d)}else{var w=C(n);i(p,w),p.fill(),h&&p.stroke()}p.setTransform(1,0,0,1,0,0);var A=x(p,{cutoff:f.cutoff!=null?f.cutoff:.5,radius:f.radius!=null?f.radius:m*.5});return A}var e;function a(){if(e!=null)return e;var n=document.createElement("canvas").getContext("2d");if(n.canvas.width=n.canvas.height=1,!window.Path2D)return e=!1;var f=new Path2D("M0,0h1v1h-1v-1Z");n.fillStyle="black",n.fill(f);var c=n.getImageData(0,0,1,1);return e=c&&c.data&&c.data[3]===255}},49760:function(G,U,t){var g;(function(C){var i=/^\s+/,S=/\s+$/,x=0,v=C.round,p=C.min,r=C.max,e=C.random;function a(Z,st){if(Z=Z||"",st=st||{},Z instanceof a)return Z;if(!(this instanceof a))return new a(Z,st);var nt=n(Z);this._originalInput=Z,this._r=nt.r,this._g=nt.g,this._b=nt.b,this._a=nt.a,this._roundA=v(100*this._a)/100,this._format=st.format||nt.format,this._gradientType=st.gradientType,this._r<1&&(this._r=v(this._r)),this._g<1&&(this._g=v(this._g)),this._b<1&&(this._b=v(this._b)),this._ok=nt.ok,this._tc_id=x++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Z=this.toRgb();return(Z.r*299+Z.g*587+Z.b*114)/1e3},getLuminance:function(){var Z=this.toRgb(),st,nt,ct,gt,Tt,wt;return st=Z.r/255,nt=Z.g/255,ct=Z.b/255,st<=.03928?gt=st/12.92:gt=C.pow((st+.055)/1.055,2.4),nt<=.03928?Tt=nt/12.92:Tt=C.pow((nt+.055)/1.055,2.4),ct<=.03928?wt=ct/12.92:wt=C.pow((ct+.055)/1.055,2.4),.2126*gt+.7152*Tt+.0722*wt},setAlpha:function(Z){return this._a=O(Z),this._roundA=v(100*this._a)/100,this},toHsv:function(){var Z=m(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,v:Z.v,a:this._a}},toHsvString:function(){var Z=m(this._r,this._g,this._b),st=v(Z.h*360),nt=v(Z.s*100),ct=v(Z.v*100);return this._a==1?"hsv("+st+", "+nt+"%, "+ct+"%)":"hsva("+st+", "+nt+"%, "+ct+"%, "+this._roundA+")"},toHsl:function(){var Z=c(this._r,this._g,this._b);return{h:Z.h*360,s:Z.s,l:Z.l,a:this._a}},toHslString:function(){var Z=c(this._r,this._g,this._b),st=v(Z.h*360),nt=v(Z.s*100),ct=v(Z.l*100);return this._a==1?"hsl("+st+", "+nt+"%, "+ct+"%)":"hsla("+st+", "+nt+"%, "+ct+"%, "+this._roundA+")"},toHex:function(Z){return b(this._r,this._g,this._b,Z)},toHexString:function(Z){return"#"+this.toHex(Z)},toHex8:function(Z){return u(this._r,this._g,this._b,this._a,Z)},toHex8String:function(Z){return"#"+this.toHex8(Z)},toRgb:function(){return{r:v(this._r),g:v(this._g),b:v(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+v(this._r)+", "+v(this._g)+", "+v(this._b)+")":"rgba("+v(this._r)+", "+v(this._g)+", "+v(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:v(H(this._r,255)*100)+"%",g:v(H(this._g,255)*100)+"%",b:v(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+v(H(this._r,255)*100)+"%, "+v(H(this._g,255)*100)+"%, "+v(H(this._b,255)*100)+"%)":"rgba("+v(H(this._r,255)*100)+"%, "+v(H(this._g,255)*100)+"%, "+v(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:k[b(this._r,this._g,this._b,!0)]||!1},toFilter:function(Z){var st="#"+o(this._r,this._g,this._b,this._a),nt=st,ct=this._gradientType?"GradientType = 1, ":"";if(Z){var gt=a(Z);nt="#"+o(gt._r,gt._g,gt._b,gt._a)}return"progid:DXImageTransform.Microsoft.gradient("+ct+"startColorstr="+st+",endColorstr="+nt+")"},toString:function(Z){var st=!!Z;Z=Z||this._format;var nt=!1,ct=this._a<1&&this._a>=0,gt=!st&&ct&&(Z==="hex"||Z==="hex6"||Z==="hex3"||Z==="hex4"||Z==="hex8"||Z==="name");return gt?Z==="name"&&this._a===0?this.toName():this.toRgbString():(Z==="rgb"&&(nt=this.toRgbString()),Z==="prgb"&&(nt=this.toPercentageRgbString()),(Z==="hex"||Z==="hex6")&&(nt=this.toHexString()),Z==="hex3"&&(nt=this.toHexString(!0)),Z==="hex4"&&(nt=this.toHex8String(!0)),Z==="hex8"&&(nt=this.toHex8String()),Z==="name"&&(nt=this.toName()),Z==="hsl"&&(nt=this.toHslString()),Z==="hsv"&&(nt=this.toHsvString()),nt||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(Z,st){var nt=Z.apply(null,[this].concat([].slice.call(st)));return this._r=nt._r,this._g=nt._g,this._b=nt._b,this.setAlpha(nt._a),this},lighten:function(){return this._applyModification(_,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(w,arguments)},greyscale:function(){return this._applyModification(A,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(Z,st){return Z.apply(null,[this].concat([].slice.call(st)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(s,arguments)},monochromatic:function(){return this._applyCombination(N,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(L,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},a.fromRatio=function(Z,st){if(typeof Z=="object"){var nt={};for(var ct in Z)Z.hasOwnProperty(ct)&&(ct==="a"?nt[ct]=Z[ct]:nt[ct]=J(Z[ct]));Z=nt}return a(Z,st)};function n(Z){var st={r:0,g:0,b:0},nt=1,ct=null,gt=null,Tt=null,wt=!1,Rt=!1;return typeof Z=="string"&&(Z=ot(Z)),typeof Z=="object"&&(Q(Z.r)&&Q(Z.g)&&Q(Z.b)?(st=f(Z.r,Z.g,Z.b),wt=!0,Rt=String(Z.r).substr(-1)==="%"?"prgb":"rgb"):Q(Z.h)&&Q(Z.s)&&Q(Z.v)?(ct=J(Z.s),gt=J(Z.v),st=h(Z.h,ct,gt),wt=!0,Rt="hsv"):Q(Z.h)&&Q(Z.s)&&Q(Z.l)&&(ct=J(Z.s),Tt=J(Z.l),st=l(Z.h,ct,Tt),wt=!0,Rt="hsl"),Z.hasOwnProperty("a")&&(nt=Z.a)),nt=O(nt),{ok:wt,format:Z.format||Rt,r:p(255,r(st.r,0)),g:p(255,r(st.g,0)),b:p(255,r(st.b,0)),a:nt}}function f(Z,st,nt){return{r:H(Z,255)*255,g:H(st,255)*255,b:H(nt,255)*255}}function c(Z,st,nt){Z=H(Z,255),st=H(st,255),nt=H(nt,255);var ct=r(Z,st,nt),gt=p(Z,st,nt),Tt,wt,Rt=(ct+gt)/2;if(ct==gt)Tt=wt=0;else{var bt=ct-gt;switch(wt=Rt>.5?bt/(2-ct-gt):bt/(ct+gt),ct){case Z:Tt=(st-nt)/bt+(st1&&(Lt-=1),Lt<.16666666666666666?At+(mt-At)*6*Lt:Lt<.5?mt:Lt<.6666666666666666?At+(mt-At)*(.6666666666666666-Lt)*6:At}if(st===0)ct=gt=Tt=nt;else{var Rt=nt<.5?nt*(1+st):nt+st-nt*st,bt=2*nt-Rt;ct=wt(bt,Rt,Z+.3333333333333333),gt=wt(bt,Rt,Z),Tt=wt(bt,Rt,Z-.3333333333333333)}return{r:ct*255,g:gt*255,b:Tt*255}}function m(Z,st,nt){Z=H(Z,255),st=H(st,255),nt=H(nt,255);var ct=r(Z,st,nt),gt=p(Z,st,nt),Tt,wt,Rt=ct,bt=ct-gt;if(wt=ct===0?0:bt/ct,ct==gt)Tt=0;else{switch(ct){case Z:Tt=(st-nt)/bt+(st>1)+720)%360;--st;)ct.h=(ct.h+gt)%360,Tt.push(a(ct));return Tt}function N(Z,st){st=st||6;for(var nt=a(Z).toHsv(),ct=nt.h,gt=nt.s,Tt=nt.v,wt=[],Rt=1/st;st--;)wt.push(a({h:ct,s:gt,v:Tt})),Tt=(Tt+Rt)%1;return wt}a.mix=function(Z,st,nt){nt=nt===0?0:nt||50;var ct=a(Z).toRgb(),gt=a(st).toRgb(),Tt=nt/100,wt={r:(gt.r-ct.r)*Tt+ct.r,g:(gt.g-ct.g)*Tt+ct.g,b:(gt.b-ct.b)*Tt+ct.b,a:(gt.a-ct.a)*Tt+ct.a};return a(wt)},a.readability=function(Z,st){var nt=a(Z),ct=a(st);return(C.max(nt.getLuminance(),ct.getLuminance())+.05)/(C.min(nt.getLuminance(),ct.getLuminance())+.05)},a.isReadable=function(Z,st,nt){var ct=a.readability(Z,st),gt,Tt;switch(Tt=!1,gt=$(nt),gt.level+gt.size){case"AAsmall":case"AAAlarge":Tt=ct>=4.5;break;case"AAlarge":Tt=ct>=3;break;case"AAAsmall":Tt=ct>=7;break}return Tt},a.mostReadable=function(Z,st,nt){var ct=null,gt=0,Tt,wt,Rt,bt;nt=nt||{},wt=nt.includeFallbackColors,Rt=nt.level,bt=nt.size;for(var At=0;Atgt&&(gt=Tt,ct=a(st[At]));return a.isReadable(Z,ct,{level:Rt,size:bt})||!wt?ct:(nt.includeFallbackColors=!1,a.mostReadable(Z,["#fff","#000"],nt))};var I=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=a.hexNames=B(I);function B(Z){var st={};for(var nt in Z)Z.hasOwnProperty(nt)&&(st[Z[nt]]=nt);return st}function O(Z){return Z=parseFloat(Z),(isNaN(Z)||Z<0||Z>1)&&(Z=1),Z}function H(Z,st){et(Z)&&(Z="100%");var nt=it(Z);return Z=p(st,r(0,parseFloat(Z))),nt&&(Z=parseInt(Z*st,10)/100),C.abs(Z-st)<1e-6?1:Z%st/parseFloat(st)}function Y(Z){return p(1,r(0,Z))}function j(Z){return parseInt(Z,16)}function et(Z){return typeof Z=="string"&&Z.indexOf(".")!=-1&&parseFloat(Z)===1}function it(Z){return typeof Z=="string"&&Z.indexOf("%")!=-1}function ut(Z){return Z.length==1?"0"+Z:""+Z}function J(Z){return Z<=1&&(Z=Z*100+"%"),Z}function X(Z){return C.round(parseFloat(Z)*255).toString(16)}function tt(Z){return j(Z)/255}var V=function(){var Z="[-\\+]?\\d+%?",st="[-\\+]?\\d*\\.\\d+%?",nt="(?:"+st+")|(?:"+Z+")",ct="[\\s|\\(]+("+nt+")[,|\\s]+("+nt+")[,|\\s]+("+nt+")\\s*\\)?",gt="[\\s|\\(]+("+nt+")[,|\\s]+("+nt+")[,|\\s]+("+nt+")[,|\\s]+("+nt+")\\s*\\)?";return{CSS_UNIT:new RegExp(nt),rgb:new RegExp("rgb"+ct),rgba:new RegExp("rgba"+gt),hsl:new RegExp("hsl"+ct),hsla:new RegExp("hsla"+gt),hsv:new RegExp("hsv"+ct),hsva:new RegExp("hsva"+gt),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Q(Z){return!!V.CSS_UNIT.exec(Z)}function ot(Z){Z=Z.replace(i,"").replace(S,"").toLowerCase();var st=!1;if(I[Z])Z=I[Z],st=!0;else if(Z=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var nt;return(nt=V.rgb.exec(Z))?{r:nt[1],g:nt[2],b:nt[3]}:(nt=V.rgba.exec(Z))?{r:nt[1],g:nt[2],b:nt[3],a:nt[4]}:(nt=V.hsl.exec(Z))?{h:nt[1],s:nt[2],l:nt[3]}:(nt=V.hsla.exec(Z))?{h:nt[1],s:nt[2],l:nt[3],a:nt[4]}:(nt=V.hsv.exec(Z))?{h:nt[1],s:nt[2],v:nt[3]}:(nt=V.hsva.exec(Z))?{h:nt[1],s:nt[2],v:nt[3],a:nt[4]}:(nt=V.hex8.exec(Z))?{r:j(nt[1]),g:j(nt[2]),b:j(nt[3]),a:tt(nt[4]),format:st?"name":"hex8"}:(nt=V.hex6.exec(Z))?{r:j(nt[1]),g:j(nt[2]),b:j(nt[3]),format:st?"name":"hex"}:(nt=V.hex4.exec(Z))?{r:j(nt[1]+""+nt[1]),g:j(nt[2]+""+nt[2]),b:j(nt[3]+""+nt[3]),a:tt(nt[4]+""+nt[4]),format:st?"name":"hex8"}:(nt=V.hex3.exec(Z))?{r:j(nt[1]+""+nt[1]),g:j(nt[2]+""+nt[2]),b:j(nt[3]+""+nt[3]),format:st?"name":"hex"}:!1}function $(Z){var st,nt;return Z=Z||{level:"AA",size:"small"},st=(Z.level||"AA").toUpperCase(),nt=(Z.size||"small").toLowerCase(),st!=="AA"&&st!=="AAA"&&(st="AA"),nt!=="small"&&nt!=="large"&&(nt="small"),{level:st,size:nt}}G.exports?G.exports=a:(g=(function(){return a}).call(U,t,U,G),g!==void 0&&(G.exports=g))})(Math)},37816:function(G){G.exports=g,G.exports.float32=G.exports.float=g,G.exports.fract32=G.exports.fract=t;var U=new Float32Array(1);function t(C,i){if(C.length){if(C instanceof Float32Array)return new Float32Array(C.length);i instanceof Float32Array||(i=g(C));for(var S=0,x=i.length;S":(S.length>100&&(S=S.slice(0,99)+"…"),S=S.replace(C,function(x){switch(x){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}},7328:function(G,U,t){var g=t(81680),C={object:!0,function:!0,undefined:!0};G.exports=function(i){return g(i)?hasOwnProperty.call(C,typeof i):!1}},87396:function(G,U,t){var g=t(57980),C=t(85488);G.exports=function(i){return C(i)?i:g(i,"%v is not a plain function",arguments[1])}},85488:function(G,U,t){var g=t(73384),C=/^\s*class[\s{/}]/,i=Function.prototype.toString;G.exports=function(S){return!(!g(S)||C.test(i.call(S)))}},54612:function(G,U,t){var g=t(7328);G.exports=function(C){if(!g(C))return!1;try{return C.constructor?C.constructor.prototype===C:!1}catch{return!1}}},33940:function(G,U,t){var g=t(81680),C=t(7328),i=Object.prototype.toString;G.exports=function(S){if(!g(S))return null;if(C(S)){var x=S.toString;if(typeof x!="function"||x===i)return null}try{return""+S}catch{return null}}},18496:function(G,U,t){var g=t(57980),C=t(81680);G.exports=function(i){return C(i)?i:g(i,"Cannot use %v",arguments[1])}},81680:function(G){var U=void 0;G.exports=function(t){return t!==U&&t!==null}},14144:function(G,U,t){var g=t(308),C=t(10352),i=t(33576).Buffer;t.g.__TYPEDARRAY_POOL||(t.g.__TYPEDARRAY_POOL={UINT8:C([32,0]),UINT16:C([32,0]),UINT32:C([32,0]),BIGUINT64:C([32,0]),INT8:C([32,0]),INT16:C([32,0]),INT32:C([32,0]),BIGINT64:C([32,0]),FLOAT:C([32,0]),DOUBLE:C([32,0]),DATA:C([32,0]),UINT8C:C([32,0]),BUFFER:C([32,0])});var S=typeof Uint8ClampedArray<"u",x=typeof BigUint64Array<"u",v=typeof BigInt64Array<"u",p=t.g.__TYPEDARRAY_POOL;p.UINT8C||(p.UINT8C=C([32,0])),p.BIGUINT64||(p.BIGUINT64=C([32,0])),p.BIGINT64||(p.BIGINT64=C([32,0])),p.BUFFER||(p.BUFFER=C([32,0]));var r=p.DATA,e=p.BUFFER;U.free=function(s){if(i.isBuffer(s))e[g.log2(s.length)].push(s);else{if(Object.prototype.toString.call(s)!=="[object ArrayBuffer]"&&(s=s.buffer),!s)return;var L=s.length||s.byteLength,M=g.log2(L)|0;r[M].push(s)}};function a(T){if(T){var s=T.length||T.byteLength,L=g.log2(s);r[L].push(T)}}function n(T){a(T.buffer)}U.freeUint8=U.freeUint16=U.freeUint32=U.freeBigUint64=U.freeInt8=U.freeInt16=U.freeInt32=U.freeBigInt64=U.freeFloat32=U.freeFloat=U.freeFloat64=U.freeDouble=U.freeUint8Clamped=U.freeDataView=n,U.freeArrayBuffer=a,U.freeBuffer=function(s){e[g.log2(s.length)].push(s)},U.malloc=function(s,L){if(L===void 0||L==="arraybuffer")return f(s);switch(L){case"uint8":return c(s);case"uint16":return l(s);case"uint32":return m(s);case"int8":return h(s);case"int16":return b(s);case"int32":return u(s);case"float":case"float32":return o(s);case"double":case"float64":return d(s);case"uint8_clamped":return w(s);case"bigint64":return _(s);case"biguint64":return A(s);case"buffer":return E(s);case"data":case"dataview":return y(s);default:return null}return null};function f(s){var s=g.nextPow2(s),L=g.log2(s),M=r[L];return M.length>0?M.pop():new ArrayBuffer(s)}U.mallocArrayBuffer=f;function c(T){return new Uint8Array(f(T),0,T)}U.mallocUint8=c;function l(T){return new Uint16Array(f(2*T),0,T)}U.mallocUint16=l;function m(T){return new Uint32Array(f(4*T),0,T)}U.mallocUint32=m;function h(T){return new Int8Array(f(T),0,T)}U.mallocInt8=h;function b(T){return new Int16Array(f(2*T),0,T)}U.mallocInt16=b;function u(T){return new Int32Array(f(4*T),0,T)}U.mallocInt32=u;function o(T){return new Float32Array(f(4*T),0,T)}U.mallocFloat32=U.mallocFloat=o;function d(T){return new Float64Array(f(8*T),0,T)}U.mallocFloat64=U.mallocDouble=d;function w(T){return S?new Uint8ClampedArray(f(T),0,T):c(T)}U.mallocUint8Clamped=w;function A(T){return x?new BigUint64Array(f(8*T),0,T):null}U.mallocBigUint64=A;function _(T){return v?new BigInt64Array(f(8*T),0,T):null}U.mallocBigInt64=_;function y(T){return new DataView(f(T),0,T)}U.mallocDataView=y;function E(T){T=g.nextPow2(T);var s=g.log2(T),L=e[s];return L.length>0?L.pop():new i(T)}U.mallocBuffer=E,U.clearCache=function(){for(var s=0;s<32;++s)p.UINT8[s].length=0,p.UINT16[s].length=0,p.UINT32[s].length=0,p.INT8[s].length=0,p.INT16[s].length=0,p.INT32[s].length=0,p.FLOAT[s].length=0,p.DOUBLE[s].length=0,p.BIGUINT64[s].length=0,p.BIGINT64[s].length=0,p.UINT8C[s].length=0,r[s].length=0,e[s].length=0}},92384:function(G){var U=/[\'\"]/;G.exports=function(g){return g?(U.test(g.charAt(0))&&(g=g.substr(1)),U.test(g.charAt(g.length-1))&&(g=g.substr(0,g.length-1)),g):""}},45223:function(G){G.exports=function(t,g,C){Array.isArray(C)||(C=[].slice.call(arguments,2));for(var i=0,S=C.length;i"u"?!1:L.working?L(Tt):Tt instanceof Map}U.isMap=M;function z(Tt){return r(Tt)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function D(Tt){return typeof Set>"u"?!1:z.working?z(Tt):Tt instanceof Set}U.isSet=D;function N(Tt){return r(Tt)==="[object WeakMap]"}N.working=typeof WeakMap<"u"&&N(new WeakMap);function I(Tt){return typeof WeakMap>"u"?!1:N.working?N(Tt):Tt instanceof WeakMap}U.isWeakMap=I;function k(Tt){return r(Tt)==="[object WeakSet]"}k.working=typeof WeakSet<"u"&&k(new WeakSet);function B(Tt){return k(Tt)}U.isWeakSet=B;function O(Tt){return r(Tt)==="[object ArrayBuffer]"}O.working=typeof ArrayBuffer<"u"&&O(new ArrayBuffer);function H(Tt){return typeof ArrayBuffer>"u"?!1:O.working?O(Tt):Tt instanceof ArrayBuffer}U.isArrayBuffer=H;function Y(Tt){return r(Tt)==="[object DataView]"}Y.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Y(new DataView(new ArrayBuffer(1),0,1));function j(Tt){return typeof DataView>"u"?!1:Y.working?Y(Tt):Tt instanceof DataView}U.isDataView=j;var et=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function it(Tt){return r(Tt)==="[object SharedArrayBuffer]"}function ut(Tt){return typeof et>"u"?!1:(typeof it.working>"u"&&(it.working=it(new et)),it.working?it(Tt):Tt instanceof et)}U.isSharedArrayBuffer=ut;function J(Tt){return r(Tt)==="[object AsyncFunction]"}U.isAsyncFunction=J;function X(Tt){return r(Tt)==="[object Map Iterator]"}U.isMapIterator=X;function tt(Tt){return r(Tt)==="[object Set Iterator]"}U.isSetIterator=tt;function V(Tt){return r(Tt)==="[object Generator]"}U.isGeneratorObject=V;function Q(Tt){return r(Tt)==="[object WebAssembly.Module]"}U.isWebAssemblyCompiledModule=Q;function ot(Tt){return l(Tt,e)}U.isNumberObject=ot;function $(Tt){return l(Tt,a)}U.isStringObject=$;function Z(Tt){return l(Tt,n)}U.isBooleanObject=Z;function st(Tt){return v&&l(Tt,f)}U.isBigIntObject=st;function nt(Tt){return p&&l(Tt,c)}U.isSymbolObject=nt;function ct(Tt){return ot(Tt)||$(Tt)||Z(Tt)||st(Tt)||nt(Tt)}U.isBoxedPrimitive=ct;function gt(Tt){return typeof Uint8Array<"u"&&(H(Tt)||ut(Tt))}U.isAnyArrayBuffer=gt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(Tt){Object.defineProperty(U,Tt,{enumerable:!1,value:function(){throw new Error(Tt+" is not supported in userland")}})})},35840:function(G,U,t){var g=t(4168),C=Object.getOwnPropertyDescriptors||function(et){for(var it=Object.keys(et),ut={},J=0;J=J)return V;switch(V){case"%s":return String(ut[it++]);case"%d":return Number(ut[it++]);case"%j":try{return JSON.stringify(ut[it++])}catch{return"[Circular]"}default:return V}}),tt=ut[it];it"u")return function(){return U.deprecate(j,et).apply(this,arguments)};var it=!1;function ut(){if(!it){if(g.throwDeprecation)throw new Error(et);g.traceDeprecation?console.trace(et):console.error(et),it=!0}return j.apply(this,arguments)}return ut};var S={},x=/^$/;if(g.env.NODE_DEBUG){var v=g.env.NODE_DEBUG;v=v.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),x=new RegExp("^"+v+"$","i")}U.debuglog=function(j){if(j=j.toUpperCase(),!S[j])if(x.test(j)){var et=g.pid;S[j]=function(){var it=U.format.apply(U,arguments);console.error("%s %d: %s",j,et,it)}}else S[j]=function(){};return S[j]};function p(j,et){var it={seen:[],stylize:e};return arguments.length>=3&&(it.depth=arguments[2]),arguments.length>=4&&(it.colors=arguments[3]),u(et)?it.showHidden=et:et&&U._extend(it,et),y(it.showHidden)&&(it.showHidden=!1),y(it.depth)&&(it.depth=2),y(it.colors)&&(it.colors=!1),y(it.customInspect)&&(it.customInspect=!0),it.colors&&(it.stylize=r),n(it,j,it.depth)}U.inspect=p,p.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},p.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(j,et){var it=p.styles[et];return it?"\x1B["+p.colors[it][0]+"m"+j+"\x1B["+p.colors[it][1]+"m":j}function e(j,et){return j}function a(j){var et={};return j.forEach(function(it,ut){et[it]=!0}),et}function n(j,et,it){if(j.customInspect&&et&&M(et.inspect)&&et.inspect!==U.inspect&&!(et.constructor&&et.constructor.prototype===et)){var ut=et.inspect(it,j);return A(ut)||(ut=n(j,ut,it)),ut}var J=f(j,et);if(J)return J;var X=Object.keys(et),tt=a(X);if(j.showHidden&&(X=Object.getOwnPropertyNames(et)),L(et)&&(X.indexOf("message")>=0||X.indexOf("description")>=0))return c(et);if(X.length===0){if(M(et)){var V=et.name?": "+et.name:"";return j.stylize("[Function"+V+"]","special")}if(E(et))return j.stylize(RegExp.prototype.toString.call(et),"regexp");if(s(et))return j.stylize(Date.prototype.toString.call(et),"date");if(L(et))return c(et)}var Q="",ot=!1,$=["{","}"];if(b(et)&&(ot=!0,$=["[","]"]),M(et)){var Z=et.name?": "+et.name:"";Q=" [Function"+Z+"]"}if(E(et)&&(Q=" "+RegExp.prototype.toString.call(et)),s(et)&&(Q=" "+Date.prototype.toUTCString.call(et)),L(et)&&(Q=" "+c(et)),X.length===0&&(!ot||et.length==0))return $[0]+Q+$[1];if(it<0)return E(et)?j.stylize(RegExp.prototype.toString.call(et),"regexp"):j.stylize("[Object]","special");j.seen.push(et);var st;return ot?st=l(j,et,it,tt,X):st=X.map(function(nt){return m(j,et,it,tt,nt,ot)}),j.seen.pop(),h(st,Q,$)}function f(j,et){if(y(et))return j.stylize("undefined","undefined");if(A(et)){var it="'"+JSON.stringify(et).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return j.stylize(it,"string")}if(w(et))return j.stylize(""+et,"number");if(u(et))return j.stylize(""+et,"boolean");if(o(et))return j.stylize("null","null")}function c(j){return"["+Error.prototype.toString.call(j)+"]"}function l(j,et,it,ut,J){for(var X=[],tt=0,V=et.length;tt-1&&(X?V=V.split(` +`).map(function(ot){return" "+ot}).join(` +`).slice(2):V=` +`+V.split(` +`).map(function(ot){return" "+ot}).join(` +`))):V=j.stylize("[Circular]","special")),y(tt)){if(X&&J.match(/^\d+$/))return V;tt=JSON.stringify(""+J),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=j.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=j.stylize(tt,"string"))}return tt+": "+V}function h(j,et,it){var ut=j.reduce(function(J,X){return X.indexOf(` +`)>=0,J+X.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ut>60?it[0]+(et===""?"":et+` `)+" "+j.join(`, - `)+" "+ie[1]:ie[0]+te+" "+j.join(", ")+" "+ie[1]}U.types=e(41088);function b(j){return Array.isArray(j)}U.isArray=b;function u(j){return typeof j=="boolean"}U.isBoolean=u;function o(j){return j===null}U.isNull=o;function d(j){return j==null}U.isNullOrUndefined=d;function w(j){return typeof j=="number"}U.isNumber=w;function A(j){return typeof j=="string"}U.isString=A;function _(j){return typeof j=="symbol"}U.isSymbol=_;function y(j){return j===void 0}U.isUndefined=y;function E(j){return T(j)&&D(j)==="[object RegExp]"}U.isRegExp=E,U.types.isRegExp=E;function T(j){return typeof j=="object"&&j!==null}U.isObject=T;function s(j){return T(j)&&D(j)==="[object Date]"}U.isDate=s,U.types.isDate=s;function L(j){return T(j)&&(D(j)==="[object Error]"||j instanceof Error)}U.isError=L,U.types.isNativeError=L;function M(j){return typeof j=="function"}U.isFunction=M;function z(j){return j===null||typeof j=="boolean"||typeof j=="number"||typeof j=="string"||typeof j=="symbol"||typeof j>"u"}U.isPrimitive=z,U.isBuffer=e(75272);function D(j){return Object.prototype.toString.call(j)}function N(j){return j<10?"0"+j.toString(10):j.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var j=new Date,te=[N(j.getHours()),N(j.getMinutes()),N(j.getSeconds())].join(":");return[j.getDate(),I[j.getMonth()],te].join(" ")}U.log=function(){console.log("%s - %s",k(),U.format.apply(U,arguments))},U.inherits=e(6768),U._extend=function(j,te){if(!te||!T(te))return j;for(var ie=Object.keys(te),ue=ie.length;ue--;)j[ie[ue]]=te[ie[ue]];return j};function B(j,te){return Object.prototype.hasOwnProperty.call(j,te)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;U.promisify=function(te){if(typeof te!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&te[O]){var ie=te[O];if(typeof ie!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ie,O,{value:ie,enumerable:!1,writable:!1,configurable:!0}),ie}function ie(){for(var ue,J,X=new Promise(function(Q,oe){ue=Q,J=oe}),ee=[],G=0;G"u"?e.g:globalThis,t=C(),a=S("String.prototype.slice"),n=Object.getPrototypeOf,f=S("Array.prototype.indexOf",!0)||function(b,u){for(var o=0;o-1?u:u!=="Object"?!1:m(b)}return x?l(b):null}},67020:function(H,U,e){var g=e(38700),C=e(50896),i=g.instance();function S(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(c,l){if(typeof c=="string"){var m=c.match(v);return m?m[0]:""}var h=this._validateYear(c),b=c.month(),u=""+this.toChineseMonth(h,b);return l&&u.length<2&&(u="0"+u),this.isIntercalaryMonth(h,b)&&(u+="i"),u},monthNames:function(c){if(typeof c=="string"){var l=c.match(p);return l?l[0]:""}var m=this._validateYear(c),h=c.month(),b=this.toChineseMonth(m,h),u=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][b-1];return this.isIntercalaryMonth(m,h)&&(u="闰"+u),u},monthNamesShort:function(c){if(typeof c=="string"){var l=c.match(r);return l?l[0]:""}var m=this._validateYear(c),h=c.month(),b=this.toChineseMonth(m,h),u=["一","二","三","四","五","六","七","八","九","十","十一","十二"][b-1];return this.isIntercalaryMonth(m,h)&&(u="闰"+u),u},parseMonth:function(c,l){c=this._validateYear(c);var m=parseInt(l),h;if(isNaN(m))l[0]==="闰"&&(h=!0,l=l.substring(1)),l[l.length-1]==="月"&&(l=l.substring(0,l.length-1)),m=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(l);else{var b=l[l.length-1];h=b==="i"||b==="I"}var u=this.toMonthIndex(c,m,h);return u},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(c,l){if(c.year&&(c=c.year()),typeof c!="number"||c<1888||c>2111)throw l.replace(/\{0\}/,this.local.name);return c},toMonthIndex:function(c,l,m){var h=this.intercalaryMonth(c),b=m&&l!==h;if(b||l<1||l>12)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var u;return h?!m&&l<=h?u=l-1:u=l:u=l-1,u},toChineseMonth:function(c,l){c.year&&(c=c.year(),l=c.month());var m=this.intercalaryMonth(c),h=m?12:11;if(l<0||l>h)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var b;return m?l>13;return m},isIntercalaryMonth:function(c,l){c.year&&(c=c.year(),l=c.month());var m=this.intercalaryMonth(c);return!!m&&m===l},leapYear:function(c){return this.intercalaryMonth(c)!==0},weekOfYear:function(c,l,m){var h=this._validateYear(c,g.local.invalidyear),b=a[h-a[0]],u=b>>9&4095,o=b>>5&15,d=b&31,w;w=i.newDate(u,o,d),w.add(4-(w.dayOfWeek()||7),"d");var A=this.toJD(c,l,m)-w.toJD();return 1+Math.floor(A/7)},monthsInYear:function(c){return this.leapYear(c)?13:12},daysInMonth:function(c,l){c.year&&(l=c.month(),c=c.year()),c=this._validateYear(c);var m=t[c-t[0]],h=m>>13,b=h?12:11;if(l>b)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var u=m&1<<12-l?30:29;return u},weekDay:function(c,l,m){return(this.dayOfWeek(c,l,m)||7)<6},toJD:function(c,l,m){var h=this._validate(c,u,m,g.local.invalidDate);c=this._validateYear(h.year()),l=h.month(),m=h.day();var b=this.isIntercalaryMonth(c,l),u=this.toChineseMonth(c,l),o=f(c,u,m,b);return i.toJD(o.year,o.month,o.day)},fromJD:function(c){var l=i.fromJD(c),m=n(l.year(),l.month(),l.day()),h=this.toMonthIndex(m.year,m.month,m.isIntercalary);return this.newDate(m.year,h,m.day)},fromString:function(c){var l=c.match(x),m=this._validateYear(+l[1]),h=+l[2],b=!!l[3],u=this.toMonthIndex(m,h,b),o=+l[4];return this.newDate(m,u,o)},add:function(c,l,m){var h=c.year(),b=c.month(),u=this.isIntercalaryMonth(h,b),o=this.toChineseMonth(h,b),d=Object.getPrototypeOf(S.prototype).add.call(this,c,l,m);if(m==="y"){var w=d.year(),A=d.month(),_=this.isIntercalaryMonth(w,o),y=u&&_?this.toMonthIndex(w,o,!0):this.toMonthIndex(w,o,!1);y!==A&&d.month(y)}return d}});var x=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,v=/^\d?\d[iI]?/m,p=/^闰?十?[一二三四五六七八九]?月/m,r=/^闰?十?[一二三四五六七八九]?/m;g.calendars.chinese=S;var t=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function n(c,l,m,h){var b,u;if(typeof c=="object")b=c,u=l||{};else{var o=typeof c=="number"&&c>=1888&&c<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var d=typeof l=="number"&&l>=1&&l<=12;if(!d)throw new Error("Solar month outside range 1 - 12");var w=typeof m=="number"&&m>=1&&m<=31;if(!w)throw new Error("Solar day outside range 1 - 31");b={year:c,month:l,day:m},u=h||{}}var A=a[b.year-a[0]],_=b.year<<9|b.month<<5|b.day;u.year=_>=A?b.year:b.year-1,A=a[u.year-a[0]];var y=A>>9&4095,E=A>>5&15,T=A&31,s,L=new Date(y,E-1,T),M=new Date(b.year,b.month-1,b.day);s=Math.round((M-L)/864e5);var z=t[u.year-t[0]],D;for(D=0;D<13;D++){var N=z&1<<12-D?30:29;if(s>13;return!I||D=1888&&c<=2111;if(!d)throw new Error("Lunar year outside range 1888-2111");var w=typeof l=="number"&&l>=1&&l<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var A=typeof m=="number"&&m>=1&&m<=30;if(!A)throw new Error("Lunar day outside range 1 - 30");var _;typeof h=="object"?(_=!1,u=h):(_=!!h,u=b||{}),o={year:c,month:l,day:m,isIntercalary:_}}var y;y=o.day-1;var E=t[o.year-t[0]],T=E>>13,s;T&&(o.month>T||o.isIntercalary)?s=o.month:s=o.month-1;for(var L=0;L>9&4095,N=z>>5&15,I=z&31,k=new Date(D,N-1,I+y);return u.year=k.getFullYear(),u.month=1+k.getMonth(),u.day=k.getDate(),u}},89792:function(H,U,e){var g=e(38700),C=e(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var x=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),v=x.year()+(x.year()<0?1:0);return v%4===3||v%4===-1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),13},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===13&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return(this.dayOfWeek(S,x,v)||7)<6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),S<0&&S++,p.day()+(p.month()-1)*30+(S-1)*365+Math.floor(S/4)+this.jdEpoch-1},fromJD:function(S){var x=Math.floor(S)+.5-this.jdEpoch,v=Math.floor((x-Math.floor((x+366)/1461))/365)+1;v<=0&&v--,x=Math.floor(S)+.5-this.newDate(v,1,1).toJD();var p=Math.floor(x/30)+1,r=x-(p-1)*30+1;return this.newDate(v,p,r)}}),g.calendars.coptic=i},55668:function(H,U,e){var g=e(38700),C=e(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),!1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),13},daysInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),400},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return(r.day()+1)%8},weekDay:function(x,v,p){var r=this.dayOfWeek(x,v,p);return r>=2&&r<=6},extraInfo:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return{century:S[Math.floor((r.year()-1)/100)+1]||""}},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return x=r.year()+(r.year()<0?1:0),v=r.month(),p=r.day(),p+(v>1?16:0)+(v>2?(v-2)*32:0)+(x-1)*400+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x+.5)-Math.floor(this.jdEpoch)-1;var v=Math.floor(x/400)+1;x-=(v-1)*400,x+=x>15?16:0;var p=Math.floor(x/32)+1,r=x-(p-1)*32+1;return this.newDate(v<=0?v-1:v,p,r)}});var S={20:"Fruitbat",21:"Anchovy"};g.calendars.discworld=i},65168:function(H,U,e){var g=e(38700),C=e(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var x=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),v=x.year()+(x.year()<0?1:0);return v%4===3||v%4===-1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),13},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===13&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return(this.dayOfWeek(S,x,v)||7)<6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),S<0&&S++,p.day()+(p.month()-1)*30+(S-1)*365+Math.floor(S/4)+this.jdEpoch-1},fromJD:function(S){var x=Math.floor(S)+.5-this.jdEpoch,v=Math.floor((x-Math.floor((x+366)/1461))/365)+1;v<=0&&v--,x=Math.floor(S)+.5-this.newDate(v,1,1).toJD();var p=Math.floor(x/30)+1,r=x-(p-1)*30+1;return this.newDate(v,p,r)}}),g.calendars.ethiopian=i},2084:function(H,U,e){var g=e(38700),C=e(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return this._leapYear(v.year())},_leapYear:function(x){return x=x<0?x+1:x,S(x*7+1,19)<7},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),this._leapYear(x.year?x.year():x)?13:12},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return x=v.year(),this.toJD(x===-1?1:x+1,7,1)-this.toJD(x,7,1)},daysInMonth:function(x,v){return x.year&&(v=x.month(),x=x.year()),this._validate(x,v,this.minDay,g.local.invalidMonth),v===12&&this.leapYear(x)||v===8&&S(this.daysInYear(x),10)===5?30:v===9&&S(this.daysInYear(x),10)===3?29:this.daysPerMonth[v-1]},weekDay:function(x,v,p){return this.dayOfWeek(x,v,p)!==6},extraInfo:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return{yearType:(this.leapYear(r)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(r)%10-3]}},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);x=r.year(),v=r.month(),p=r.day();var t=x<=0?x+1:x,a=this.jdEpoch+this._delay1(t)+this._delay2(t)+p+1;if(v<7){for(var n=7;n<=this.monthsInYear(x);n++)a+=this.daysInMonth(x,n);for(var n=1;n=this.toJD(v===-1?1:v+1,7,1);)v++;for(var p=xthis.toJD(v,p,this.daysInMonth(v,p));)p++;var r=x-this.toJD(v,p,1)+1;return this.newDate(v,p,r)}});function S(x,v){return x-v*Math.floor(x/v)}g.calendars.hebrew=i},26368:function(H,U,e){var g=e(38700),C=e(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(S){var x=this._validate(S,this.minMonth,this.minDay,g.local.invalidYear);return(x.year()*11+14)%30<11},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInYear:function(S){return this.leapYear(S)?355:354},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===12&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return this.dayOfWeek(S,x,v)!==5},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),x=p.month(),v=p.day(),S=S<=0?S+1:S,v+Math.ceil(29.5*(x-1))+(S-1)*354+Math.floor((3+11*S)/30)+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var x=Math.floor((30*(S-this.jdEpoch)+10646)/10631);x=x<=0?x-1:x;var v=Math.min(12,Math.ceil((S-29-this.toJD(x,1,1))/29.5)+1),p=S-this.toJD(x,v,1)+1;return this.newDate(x,v,p)}}),g.calendars.islamic=i},24747:function(H,U,e){var g=e(38700),C=e(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var x=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),v=x.year()<0?x.year()+1:x.year();return v%4===0},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(4-(p.dayOfWeek()||7),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===2&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return(this.dayOfWeek(S,x,v)||7)<6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),x=p.month(),v=p.day(),S<0&&S++,x<=2&&(S--,x+=12),Math.floor(365.25*(S+4716))+Math.floor(30.6001*(x+1))+v-1524.5},fromJD:function(S){var x=Math.floor(S+.5),v=x+1524,p=Math.floor((v-122.1)/365.25),r=Math.floor(365.25*p),t=Math.floor((v-r)/30.6001),a=t-Math.floor(t<14?1:13),n=p-Math.floor(a>2?4716:4715),f=v-r-Math.floor(30.6001*t);return n<=0&&n--,this.newDate(n,a,f)}}),g.calendars.julian=i},65616:function(H,U,e){var g=e(38700),C=e(50896);function i(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),!1},formatYear:function(v){var p=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear);v=p.year();var r=Math.floor(v/400);v=v%400,v+=v<0?400:0;var t=Math.floor(v/20);return r+"."+t+"."+v%20},forYear:function(v){if(v=v.split("."),v.length<3)throw"Invalid Mayan year";for(var p=0,r=0;r19||r>0&&t<0)throw"Invalid Mayan year";p=p*20+t}return p},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),18},weekOfYear:function(v,p,r){return this._validate(v,p,r,g.local.invalidDate),0},daysInYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),360},daysInMonth:function(v,p){return this._validate(v,p,this.minDay,g.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(v,p,r){var t=this._validate(v,p,r,g.local.invalidDate);return t.day()},weekDay:function(v,p,r){return this._validate(v,p,r,g.local.invalidDate),!0},extraInfo:function(v,p,r){var t=this._validate(v,p,r,g.local.invalidDate),a=t.toJD(),n=this._toHaab(a),f=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[n[0]-1],haabMonth:n[0],haabDay:n[1],tzolkinDayName:this.local.tzolkinMonths[f[0]-1],tzolkinDay:f[0],tzolkinTrecena:f[1]}},_toHaab:function(v){v-=this.jdEpoch;var p=S(v+8+17*20,365);return[Math.floor(p/20)+1,S(p,20)]},_toTzolkin:function(v){return v-=this.jdEpoch,[x(v+20,20),x(v+4,13)]},toJD:function(v,p,r){var t=this._validate(v,p,r,g.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(v){v=Math.floor(v)+.5-this.jdEpoch;var p=Math.floor(v/360);v=v%360,v+=v<0?360:0;var r=Math.floor(v/20),t=v%20;return this.newDate(p,r,t)}});function S(v,p){return v-p*Math.floor(v/p)}function x(v,p){return S(v-1,p)+1}g.calendars.mayan=i},30632:function(H,U,e){var g=e(38700),C=e(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar;var S=g.instance("gregorian");C(i.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return S.leapYear(v.year()+(v.year()<1?1:0)+1469)},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===12&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return(this.dayOfWeek(x,v,p)||7)<6},toJD:function(t,v,p){var r=this._validate(t,v,p,g.local.invalidMonth),t=r.year();t<0&&t++;for(var a=r.day(),n=1;n=this.toJD(v+1,1,1);)v++;for(var p=x-Math.floor(this.toJD(v,1,1)+.5)+1,r=1;p>this.daysInMonth(v,r);)p-=this.daysInMonth(v,r),r++;return this.newDate(v,r,p)}}),g.calendars.nanakshahi=i},73040:function(H,U,e){var g=e(38700),C=e(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(S){return this.daysInYear(S)!==this.daysPerYear},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInYear:function(S){var x=this._validate(S,this.minMonth,this.minDay,g.local.invalidYear);if(S=x.year(),typeof this.NEPALI_CALENDAR_DATA[S]>"u")return this.daysPerYear;for(var v=0,p=this.minMonth;p<=12;p++)v+=this.NEPALI_CALENDAR_DATA[S][p];return v},daysInMonth:function(S,x){return S.year&&(x=S.month(),S=S.year()),this._validate(S,x,this.minDay,g.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[S]>"u"?this.daysPerMonth[x-1]:this.NEPALI_CALENDAR_DATA[S][x]},weekDay:function(S,x,v){return this.dayOfWeek(S,x,v)!==6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);S=p.year(),x=p.month(),v=p.day();var r=g.instance(),t=0,a=x,n=S;this._createMissingCalendarData(S);var f=S-(a>9||a===9&&v>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(x!==9&&(t=v,a--);a!==9;)a<=0&&(a=12,n--),t+=this.NEPALI_CALENDAR_DATA[n][a],a--;return x===9?(t+=v-this.NEPALI_CALENDAR_DATA[n][0],t<0&&(t+=r.daysInYear(f))):t+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],r.newDate(f,1,1).add(t,"d").toJD()},fromJD:function(S){var x=g.instance(),v=x.fromJD(S),p=v.year(),r=v.dayOfYear(),t=p+56;this._createMissingCalendarData(t);for(var a=9,n=this.NEPALI_CALENDAR_DATA[t][0],f=this.NEPALI_CALENDAR_DATA[t][a]-n+1;r>f;)a++,a>12&&(a=1,t++),f+=this.NEPALI_CALENDAR_DATA[t][a];var c=this.NEPALI_CALENDAR_DATA[t][a]-(f-r);return this.newDate(t,a,c)},_createMissingCalendarData:function(S){var x=this.daysPerMonth.slice(0);x.unshift(17);for(var v=S-1;v"u"&&(this.NEPALI_CALENDAR_DATA[v]=x)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),g.calendars.nepali=i},1104:function(H,U,e){var g=e(38700),C=e(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return((v.year()-(v.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-((r.dayOfWeek()+1)%7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===12&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return this.dayOfWeek(x,v,p)!==5},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);x=r.year(),v=r.month(),p=r.day();var t=x-(x>=0?474:473),a=474+S(t,2820);return p+(v<=7?(v-1)*31:(v-1)*30+6)+Math.floor((a*682-110)/2816)+(a-1)*365+Math.floor(t/2820)*1029983+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var v=x-this.toJD(475,1,1),p=Math.floor(v/1029983),r=S(v,1029983),t=2820;if(r!==1029982){var a=Math.floor(r/366),n=S(r,366);t=Math.floor((2134*a+2816*n+2815)/1028522)+a+1}var f=t+2820*p+474;f=f<=0?f-1:f;var c=x-this.toJD(f,1,1)+1,l=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),m=x-this.toJD(f,l,1)+1;return this.newDate(f,l,m)}});function S(x,v){return x-v*Math.floor(x/v)}g.calendars.persian=i,g.calendars.jalali=i},51456:function(H,U,e){var g=e(38700),C=e(50896),i=g.instance();function S(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(p){var v=this._validate(p,this.minMonth,this.minDay,g.local.invalidYear),p=this._t2gYear(v.year());return i.leapYear(p)},weekOfYear:function(t,v,p){var r=this._validate(t,this.minMonth,this.minDay,g.local.invalidYear),t=this._t2gYear(r.year());return i.weekOfYear(t,r.month(),r.day())},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===2&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return(this.dayOfWeek(x,v,p)||7)<6},toJD:function(t,v,p){var r=this._validate(t,v,p,g.local.invalidDate),t=this._t2gYear(r.year());return i.toJD(t,r.month(),r.day())},fromJD:function(x){var v=i.fromJD(x),p=this._g2tYear(v.year());return this.newDate(p,v.month(),v.day())},_t2gYear:function(x){return x+this.yearsOffset+(x>=-this.yearsOffset&&x<=-1?1:0)},_g2tYear:function(x){return x-this.yearsOffset-(x>=1&&x<=this.yearsOffset?1:0)}}),g.calendars.taiwan=S},4592:function(H,U,e){var g=e(38700),C=e(50896),i=g.instance();function S(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(p){var v=this._validate(p,this.minMonth,this.minDay,g.local.invalidYear),p=this._t2gYear(v.year());return i.leapYear(p)},weekOfYear:function(t,v,p){var r=this._validate(t,this.minMonth,this.minDay,g.local.invalidYear),t=this._t2gYear(r.year());return i.weekOfYear(t,r.month(),r.day())},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===2&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return(this.dayOfWeek(x,v,p)||7)<6},toJD:function(t,v,p){var r=this._validate(t,v,p,g.local.invalidDate),t=this._t2gYear(r.year());return i.toJD(t,r.month(),r.day())},fromJD:function(x){var v=i.fromJD(x),p=this._g2tYear(v.year());return this.newDate(p,v.month(),v.day())},_t2gYear:function(x){return x-this.yearsOffset-(x>=1&&x<=this.yearsOffset?1:0)},_g2tYear:function(x){return x+this.yearsOffset+(x>=-this.yearsOffset&&x<=-1?1:0)}}),g.calendars.thai=S},45348:function(H,U,e){var g=e(38700),C=e(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return this.daysInYear(v.year())===355},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(x){for(var v=0,p=1;p<=12;p++)v+=this.daysInMonth(x,p);return v},daysInMonth:function(x,v){for(var p=this._validate(x,v,this.minDay,g.local.invalidMonth),r=p.toJD()-24e5+.5,t=0,a=0;ar)return S[t]-S[t-1];t++}return 30},weekDay:function(x,v,p){return this.dayOfWeek(x,v,p)!==5},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate),t=12*(r.year()-1)+r.month()-15292,a=r.day()+S[t-1]-1;return a+24e5-.5},fromJD:function(x){for(var v=x-24e5+.5,p=0,r=0;rv);r++)p++;var t=p+15292,a=Math.floor((t-1)/12),n=a+1,f=t-12*a,c=v-S[p-1]+1;return this.newDate(n,f,c)},isValid:function(x,v,p){var r=g.baseCalendar.prototype.isValid.apply(this,arguments);return r&&(x=x.year!=null?x.year:x,r=x>=1276&&x<=1500),r},_validate:function(x,v,p,r){var t=g.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw r.replace(/\{0\}/,this.local.name);return t}}),g.calendars.ummalqura=i;var S=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},38700:function(H,U,e){var g=e(50896);function C(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}g(C.prototype,{instance:function(r,t){r=(r||"gregorian").toLowerCase(),t=t||"";var a=this._localCals[r+"-"+t];if(!a&&this.calendars[r]&&(a=new this.calendars[r](t),this._localCals[r+"-"+t]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,r);return a},newDate:function(r,t,a,n,f){return n=(r!=null&&r.year?r.calendar():typeof n=="string"?this.instance(n,f):n)||this.instance(),n.newDate(r,t,a)},substituteDigits:function(r){return function(t){return(t+"").replace(/[0-9]/g,function(a){return r[a]})}},substituteChineseDigits:function(r,t){return function(a){for(var n="",f=0;a>0;){var c=a%10;n=(c===0?"":r[c]+t[f])+n,f++,a=Math.floor(a/10)}return n.indexOf(r[1]+t[1])===0&&(n=n.substr(1)),n||r[0]}}});function i(r,t,a,n){if(this._calendar=r,this._year=t,this._month=a,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(p.local.invalidDate||p.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(r,t){return r=""+r,"000000".substring(0,t-r.length)+r}g(i.prototype,{newDate:function(r,t,a){return this._calendar.newDate(r??this,t,a)},year:function(r){return arguments.length===0?this._year:this.set(r,"y")},month:function(r){return arguments.length===0?this._month:this.set(r,"m")},day:function(r){return arguments.length===0?this._day:this.set(r,"d")},date:function(r,t,a){if(!this._calendar.isValid(r,t,a))throw(p.local.invalidDate||p.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=r,this._month=t,this._day=a,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(r,t){return this._calendar.add(this,r,t)},set:function(r,t){return this._calendar.set(this,r,t)},compareTo:function(r){if(this._calendar.name!==r._calendar.name)throw(p.local.differentCalendars||p.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,r._calendar.local.name);var t=this._year!==r._year?this._year-r._year:this._month!==r._month?this.monthOfYear()-r.monthOfYear():this._day-r._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(r){return this._calendar.fromJD(r)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(r){return this._calendar.fromJSDate(r)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function x(){this.shortYearCutoff="+10"}g(x.prototype,{_validateLevel:0,newDate:function(r,t,a){return r==null?this.today():(r.year&&(this._validate(r,t,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),a=r.day(),t=r.month(),r=r.year()),new i(this,r,t,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(r){var t=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+S(Math.abs(t.year()),4)},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear),12},monthOfYear:function(r,t){var a=this._validate(r,t,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(r,t){var a=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(r)+this.minMonth;return this._validate(r,a,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth),a},daysInYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(r,t,a){var n=this._validate(r,t,a,p.local.invalidDate||p.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(r,t,a){var n=this._validate(r,t,a,p.local.invalidDate||p.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(r,t,a){return this._validate(r,t,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),{}},add:function(r,t,a){return this._validate(r,this.minMonth,this.minDay,p.local.invalidDate||p.regionalOptions[""].invalidDate),this._correctAdd(r,this._add(r,t,a),t,a)},_add:function(r,t,a){if(this._validateLevel++,a==="d"||a==="w"){var n=r.toJD()+t*(a==="w"?this.daysInWeek():1),f=r.calendar().fromJD(n);return this._validateLevel--,[f.year(),f.month(),f.day()]}try{var c=r.year()+(a==="y"?t:0),l=r.monthOfYear()+(a==="m"?t:0),f=r.day(),m=function(u){for(;lo-1+u.minMonth;)c++,l-=o,o=u.monthsInYear(c)};a==="y"?(r.month()!==this.fromMonthOfYear(c,l)&&(l=this.newDate(c,r.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(c)),f=Math.min(f,this.daysInMonth(c,this.fromMonthOfYear(c,l)))):a==="m"&&(m(this),f=Math.min(f,this.daysInMonth(c,this.fromMonthOfYear(c,l))));var h=[c,this.fromMonthOfYear(c,l),f];return this._validateLevel--,h}catch(b){throw this._validateLevel--,b}},_correctAdd:function(r,t,a,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||r.year()>0!=t[0]>0)){var f={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],c=a<0?-1:1;t=this._add(r,a*f[0]+c*f[1],f[2])}return r.date(t[0],t[1],t[2])},set:function(r,t,a){this._validate(r,this.minMonth,this.minDay,p.local.invalidDate||p.regionalOptions[""].invalidDate);var n=a==="y"?t:r.year(),f=a==="m"?t:r.month(),c=a==="d"?t:r.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(n,f))),r.date(n,f,c)},isValid:function(r,t,a){this._validateLevel++;var n=this.hasYearZero||r!==0;if(n){var f=this.newDate(r,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),b=f-(h>2.5?4716:4715);return b<=0&&b--,this.newDate(b,h,m)},toJSDate:function(r,t,a){var n=this._validate(r,t,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),f=new Date(n.year(),n.month()-1,n.day());return f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0),f.setHours(f.getHours()>12?f.getHours()+2:0),f},fromJSDate:function(r){return this.newDate(r.getFullYear(),r.getMonth()+1,r.getDate())}});var p=H.exports=new C;p.cdate=i,p.baseCalendar=x,p.calendars.gregorian=v},15168:function(H,U,e){var g=e(50896),C=e(38700);g(C.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),C.local=C.regionalOptions[""],g(C.cdate.prototype,{formatDate:function(i,S){return typeof i!="string"&&(S=i,i=""),this._calendar.formatDate(i||"",this,S)}}),g(C.baseCalendar.prototype,{UNIX_EPOCH:C.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:C.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(i,S,x){if(typeof i!="string"&&(x=S,S=i,i=""),!S)return"";if(S.calendar()!==this)throw C.local.invalidFormat||C.regionalOptions[""].invalidFormat;i=i||this.local.dateFormat,x=x||{};var v=x.dayNamesShort||this.local.dayNamesShort,p=x.dayNames||this.local.dayNames,r=x.monthNumbers||this.local.monthNumbers,t=x.monthNamesShort||this.local.monthNamesShort,a=x.monthNames||this.local.monthNames;x.calculateWeek||this.local.calculateWeek;for(var n=function(A,_){for(var y=1;w+y1},f=function(A,_,y,E){var T=""+_;if(n(A,E))for(;T.length1},w=function(D,N){var I=d(D,N),k=[2,3,I?4:2,I?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],B=new RegExp("^-?\\d{1,"+k+"}"),O=S.substring(s).match(B);if(!O)throw(C.local.missingNumberAt||C.regionalOptions[""].missingNumberAt).replace(/\{0\}/,s);return s+=O[0].length,parseInt(O[0],10)},A=this,_=function(){if(typeof a=="function"){d("m");var D=a.call(A,S.substring(s));return s+=D.length,D}return w("m")},y=function(D,N,I,k){for(var B=d(D,k)?I:N,O=0;O-1){m=1,h=b;for(var z=this.daysInMonth(l,m);h>z;z=this.daysInMonth(l,m))m++,h-=z}return c>-1?this.fromJD(c):this.newDate(l,m,h)},determineDate:function(i,S,x,v,p){x&&typeof x!="object"&&(p=v,v=x,x=null),typeof v!="string"&&(p=v,v="");var r=this,t=function(a){try{return r.parseDate(v,a,p)}catch{}a=a.toLowerCase();for(var n=(a.match(/^c/)&&x?x.newDate():null)||r.today(),f=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=f.exec(a);c;)n.add(parseInt(c[1],10),c[2]||"d"),c=f.exec(a);return n};return S=S?S.newDate():null,i=i==null?S:typeof i=="string"?t(i):typeof i=="number"?isNaN(i)||i===1/0||i===-1/0?S:r.today().add(i,"d"):r.newDate(i),i}})},21576:function(){},19768:function(){},63436:function(H,U,e){var g=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],C=typeof globalThis>"u"?e.g:globalThis;H.exports=function(){for(var S=[],x=0;x>8&15|Le>>4&240,Le>>4&15|Le&240,(Le&15)<<4|Le&15,1):Ve===8?_(Le>>24&255,Le>>16&255,Le>>8&255,(Le&255)/255):Ve===4?_(Le>>12&15|Le>>8&240,Le>>8&15|Le>>4&240,Le>>4&15|Le&240,((Le&15)<<4|Le&15)/255):null):(Le=a.exec(me))?new T(Le[1],Le[2],Le[3],1):(Le=n.exec(me))?new T(Le[1]*255/100,Le[2]*255/100,Le[3]*255/100,1):(Le=f.exec(me))?_(Le[1],Le[2],Le[3],Le[4]):(Le=c.exec(me))?_(Le[1]*255/100,Le[2]*255/100,Le[3]*255/100,Le[4]):(Le=l.exec(me))?I(Le[1],Le[2]/100,Le[3]/100,1):(Le=m.exec(me))?I(Le[1],Le[2]/100,Le[3]/100,Le[4]):h.hasOwnProperty(me)?A(h[me]):me==="transparent"?new T(NaN,NaN,NaN,0):null}function A(me){return new T(me>>16&255,me>>8&255,me&255,1)}function _(me,Le,Ve,Ue){return Ue<=0&&(me=Le=Ve=NaN),new T(me,Le,Ve,Ue)}function y(me){return me instanceof i||(me=w(me)),me?(me=me.rgb(),new T(me.r,me.g,me.b,me.opacity)):new T}function E(me,Le,Ve,Ue){return arguments.length===1?y(me):new T(me,Le,Ve,Ue??1)}function T(me,Le,Ve,Ue){this.r=+me,this.g=+Le,this.b=+Ve,this.opacity=+Ue}g(T,E,C(i,{brighter:function(Le){return Le=Le==null?x:Math.pow(x,Le),new T(this.r*Le,this.g*Le,this.b*Le,this.opacity)},darker:function(Le){return Le=Le==null?S:Math.pow(S,Le),new T(this.r*Le,this.g*Le,this.b*Le,this.opacity)},rgb:function(){return this},clamp:function(){return new T(D(this.r),D(this.g),D(this.b),z(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:s,formatHex:s,formatHex8:L,formatRgb:M,toString:M}));function s(){return"#".concat(N(this.r)).concat(N(this.g)).concat(N(this.b))}function L(){return"#".concat(N(this.r)).concat(N(this.g)).concat(N(this.b)).concat(N((isNaN(this.opacity)?1:this.opacity)*255))}function M(){var me=z(this.opacity);return"".concat(me===1?"rgb(":"rgba(").concat(D(this.r),", ").concat(D(this.g),", ").concat(D(this.b)).concat(me===1?")":", ".concat(me,")"))}function z(me){return isNaN(me)?1:Math.max(0,Math.min(1,me))}function D(me){return Math.max(0,Math.min(255,Math.round(me)||0))}function N(me){return me=D(me),(me<16?"0":"")+me.toString(16)}function I(me,Le,Ve,Ue){return Ue<=0?me=Le=Ve=NaN:Ve<=0||Ve>=1?me=Le=NaN:Le<=0&&(me=NaN),new O(me,Le,Ve,Ue)}function k(me){if(me instanceof O)return new O(me.h,me.s,me.l,me.opacity);if(me instanceof i||(me=w(me)),!me)return new O;if(me instanceof O)return me;me=me.rgb();var Le=me.r/255,Ve=me.g/255,Ue=me.b/255,ke=Math.min(Le,Ve,Ue),He=Math.max(Le,Ve,Ue),Ie=NaN,rt=He-ke,Ke=(He+ke)/2;return rt?(Le===He?Ie=(Ve-Ue)/rt+(Ve0&&Ke<1?0:Ie,new O(Ie,rt,Ke,me.opacity)}function B(me,Le,Ve,Ue){return arguments.length===1?k(me):new O(me,Le,Ve,Ue??1)}function O(me,Le,Ve,Ue){this.h=+me,this.s=+Le,this.l=+Ve,this.opacity=+Ue}g(O,B,C(i,{brighter:function(Le){return Le=Le==null?x:Math.pow(x,Le),new O(this.h,this.s,this.l*Le,this.opacity)},darker:function(Le){return Le=Le==null?S:Math.pow(S,Le),new O(this.h,this.s,this.l*Le,this.opacity)},rgb:function(){var Le=this.h%360+(this.h<0)*360,Ve=isNaN(Le)||isNaN(this.s)?0:this.s,Ue=this.l,ke=Ue+(Ue<.5?Ue:1-Ue)*Ve,He=2*Ue-ke;return new T(j(Le>=240?Le-240:Le+120,He,ke),j(Le,He,ke),j(Le<120?Le+240:Le-120,He,ke),this.opacity)},clamp:function(){return new O(V(this.h),Y(this.s),Y(this.l),z(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var Le=z(this.opacity);return"".concat(Le===1?"hsl(":"hsla(").concat(V(this.h),", ").concat(Y(this.s)*100,"%, ").concat(Y(this.l)*100,"%").concat(Le===1?")":", ".concat(Le,")"))}}));function V(me){return me=(me||0)%360,me<0?me+360:me}function Y(me){return Math.max(0,Math.min(1,me||0))}function j(me,Le,Ve){return(me<60?Le+(Ve-Le)*me/60:me<180?Ve:me<240?Le+(Ve-Le)*(240-me)/60:Le)*255}var te=function(me){return function(){return me}};function ie(me,Le){return function(Ve){return me+Ve*Le}}function ue(me,Le,Ve){return me=Math.pow(me,Ve),Le=Math.pow(Le,Ve)-me,Ve=1/Ve,function(Ue){return Math.pow(me+Ue*Le,Ve)}}function J(me){return(me=+me)==1?X:function(Le,Ve){return Ve-Le?ue(Le,Ve,me):te(isNaN(Le)?Ve:Le)}}function X(me,Le){var Ve=Le-me;return Ve?ie(me,Ve):te(isNaN(me)?Le:me)}var ee=function me(Le){var Ve=J(Le);function Ue(ke,He){var Ie=Ve((ke=E(ke)).r,(He=E(He)).r),rt=Ve(ke.g,He.g),Ke=Ve(ke.b,He.b),$e=X(ke.opacity,He.opacity);return function(lt){return ke.r=Ie(lt),ke.g=rt(lt),ke.b=Ke(lt),ke.opacity=$e(lt),ke+""}}return Ue.gamma=me,Ue}(1);function G(me,Le){var Ve=Le?Le.length:0,Ue=me?Math.min(Ve,me.length):0,ke=new Array(Ue),He=new Array(Ve),Ie;for(Ie=0;IeVe&&(He=Le.slice(Ve,He),rt[Ie]?rt[Ie]+=He:rt[++Ie]=He),(Ue=Ue[0])===(ke=ke[0])?rt[Ie]?rt[Ie]+=ke:rt[++Ie]=ke:(rt[++Ie]=null,Ke.push({i:Ie,x:oe(Ue,ke)})),Ve=ne.lastIndex;return VeMath.PI&&(ze-=dt),Ze<-Math.PI?Ze+=dt:Ze>Math.PI&&(Ze-=dt),ze<=Ze?U.theta=Math.max(ze,Math.min(Ze,U.theta)):U.theta=U.theta>(ze+Ze)/2?Math.max(ze,U.theta):Math.min(Ze,U.theta)),U.phi=Math.max(le.minPolarAngle,Math.min(le.maxPolarAngle,U.phi)),U.makeSafe(),le.enableDamping===!0?le.target.addScaledVector(C,le.dampingFactor):le.target.add(C),le.target.sub(le.cursor),le.target.clampLength(le.minTargetRadius,le.maxTargetRadius),le.target.add(le.cursor);let Je=!1;if(le.zoomToCursor&&l||le.object.isOrthographicCamera)U.radius=L(U.radius);else{const We=U.radius;U.radius=L(U.radius*g),Je=We!=U.radius}if(Ie.setFromSpherical(U),Ie.applyQuaternion(Ke),nt.copy(le.target).add(Ie),le.object.lookAt(le.target),le.enableDamping===!0?(e.theta*=1-le.dampingFactor,e.phi*=1-le.dampingFactor,C.multiplyScalar(1-le.dampingFactor)):(e.set(0,0,0),C.set(0,0,0)),le.zoomToCursor&&l){let We=null;if(le.object.isPerspectiveCamera){const Fe=Ie.length();We=L(Fe*g);const xe=Fe-We;le.object.position.addScaledVector(f,xe),le.object.updateMatrixWorld(),Je=!!xe}else if(le.object.isOrthographicCamera){const Fe=new bn(c.x,c.y,0);Fe.unproject(le.object);const xe=le.object.zoom;le.object.zoom=Math.max(le.minZoom,Math.min(le.maxZoom,le.object.zoom/g)),le.object.updateProjectionMatrix(),Je=xe!==le.object.zoom;const ye=new bn(c.x,c.y,0);ye.unproject(le.object),le.object.position.sub(ye).add(Fe),le.object.updateMatrixWorld(),We=Ie.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),le.zoomToCursor=!1;We!==null&&(this.screenSpacePanning?le.target.set(0,0,-1).transformDirection(le.object.matrix).multiplyScalar(We).add(le.object.position):(rp.origin.copy(le.object.position),rp.direction.set(0,0,-1).transformDirection(le.object.matrix),Math.abs(le.object.up.dot(rp.direction))<_S?F.lookAt(le.target):(Ny.setFromNormalAndCoplanarPoint(le.object.up,le.target),rp.intersectPlane(Ny,le.target))))}else if(le.object.isOrthographicCamera){const We=le.object.zoom;le.object.zoom=Math.max(le.minZoom,Math.min(le.maxZoom,le.object.zoom/g)),We!==le.object.zoom&&(le.object.updateProjectionMatrix(),Je=!0)}return g=1,l=!1,Je||$e.distanceToSquared(le.object.position)>H||8*(1-lt.dot(le.object.quaternion))>H||ht.distanceToSquared(le.target)>H?(le.dispatchEvent(ky),$e.copy(le.object.position),lt.copy(le.object.quaternion),ht.copy(le.target),!0):!1}}(),this.dispose=function(){le.domElement.removeEventListener("contextmenu",Ae),le.domElement.removeEventListener("pointerdown",Q),le.domElement.removeEventListener("pointercancel",$),le.domElement.removeEventListener("wheel",ne),le.domElement.removeEventListener("pointermove",oe),le.domElement.removeEventListener("pointerup",$),le.domElement.getRootNode().removeEventListener("keydown",ge,{capture:!0}),le._domElementKeyEvents!==null&&(le._domElementKeyEvents.removeEventListener("keydown",we),le._domElementKeyEvents=null)};const le=this,De={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let Xe=De.NONE;const H=1e-6,U=new Fy,e=new Fy;let g=1;const C=new bn,i=new Wi,S=new Wi,x=new Wi,v=new Wi,p=new Wi,r=new Wi,t=new Wi,a=new Wi,n=new Wi,f=new bn,c=new Wi;let l=!1;const m=[],h={};let b=!1;function u(Ie){return Ie!==null?2*Math.PI/60*le.autoRotateSpeed*Ie:2*Math.PI/60/60*le.autoRotateSpeed}function o(Ie){const rt=Math.abs(Ie*.01);return Math.pow(.95,le.zoomSpeed*rt)}function d(Ie){e.theta-=Ie}function w(Ie){e.phi-=Ie}const A=function(){const Ie=new bn;return function(Ke,$e){Ie.setFromMatrixColumn($e,0),Ie.multiplyScalar(-Ke),C.add(Ie)}}(),_=function(){const Ie=new bn;return function(Ke,$e){le.screenSpacePanning===!0?Ie.setFromMatrixColumn($e,1):(Ie.setFromMatrixColumn($e,0),Ie.crossVectors(le.object.up,Ie)),Ie.multiplyScalar(Ke),C.add(Ie)}}(),y=function(){const Ie=new bn;return function(Ke,$e){const lt=le.domElement;if(le.object.isPerspectiveCamera){const ht=le.object.position;Ie.copy(ht).sub(le.target);let dt=Ie.length();dt*=Math.tan(le.object.fov/2*Math.PI/180),A(2*Ke*dt/lt.clientHeight,le.object.matrix),_(2*$e*dt/lt.clientHeight,le.object.matrix)}else le.object.isOrthographicCamera?(A(Ke*(le.object.right-le.object.left)/le.object.zoom/lt.clientWidth,le.object.matrix),_($e*(le.object.top-le.object.bottom)/le.object.zoom/lt.clientHeight,le.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),le.enablePan=!1)}}();function E(Ie){le.object.isPerspectiveCamera||le.object.isOrthographicCamera?g/=Ie:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),le.enableZoom=!1)}function T(Ie){le.object.isPerspectiveCamera||le.object.isOrthographicCamera?g*=Ie:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),le.enableZoom=!1)}function s(Ie,rt){if(!le.zoomToCursor)return;l=!0;const Ke=le.domElement.getBoundingClientRect(),$e=Ie-Ke.left,lt=rt-Ke.top,ht=Ke.width,dt=Ke.height;c.x=$e/ht*2-1,c.y=-(lt/dt)*2+1,f.set(c.x,c.y,1).unproject(le.object).sub(le.object.position).normalize()}function L(Ie){return Math.max(le.minDistance,Math.min(le.maxDistance,Ie))}function M(Ie){i.set(Ie.clientX,Ie.clientY)}function z(Ie){s(Ie.clientX,Ie.clientX),t.set(Ie.clientX,Ie.clientY)}function D(Ie){v.set(Ie.clientX,Ie.clientY)}function N(Ie){S.set(Ie.clientX,Ie.clientY),x.subVectors(S,i).multiplyScalar(le.rotateSpeed);const rt=le.domElement;d(2*Math.PI*x.x/rt.clientHeight),w(2*Math.PI*x.y/rt.clientHeight),i.copy(S),le.update()}function I(Ie){a.set(Ie.clientX,Ie.clientY),n.subVectors(a,t),n.y>0?E(o(n.y)):n.y<0&&T(o(n.y)),t.copy(a),le.update()}function k(Ie){p.set(Ie.clientX,Ie.clientY),r.subVectors(p,v).multiplyScalar(le.panSpeed),y(r.x,r.y),v.copy(p),le.update()}function B(Ie){s(Ie.clientX,Ie.clientY),Ie.deltaY<0?T(o(Ie.deltaY)):Ie.deltaY>0&&E(o(Ie.deltaY)),le.update()}function O(Ie){let rt=!1;switch(Ie.code){case le.keys.UP:Ie.ctrlKey||Ie.metaKey||Ie.shiftKey?w(2*Math.PI*le.rotateSpeed/le.domElement.clientHeight):y(0,le.keyPanSpeed),rt=!0;break;case le.keys.BOTTOM:Ie.ctrlKey||Ie.metaKey||Ie.shiftKey?w(-2*Math.PI*le.rotateSpeed/le.domElement.clientHeight):y(0,-le.keyPanSpeed),rt=!0;break;case le.keys.LEFT:Ie.ctrlKey||Ie.metaKey||Ie.shiftKey?d(2*Math.PI*le.rotateSpeed/le.domElement.clientHeight):y(le.keyPanSpeed,0),rt=!0;break;case le.keys.RIGHT:Ie.ctrlKey||Ie.metaKey||Ie.shiftKey?d(-2*Math.PI*le.rotateSpeed/le.domElement.clientHeight):y(-le.keyPanSpeed,0),rt=!0;break}rt&&(Ie.preventDefault(),le.update())}function V(Ie){if(m.length===1)i.set(Ie.pageX,Ie.pageY);else{const rt=ke(Ie),Ke=.5*(Ie.pageX+rt.x),$e=.5*(Ie.pageY+rt.y);i.set(Ke,$e)}}function Y(Ie){if(m.length===1)v.set(Ie.pageX,Ie.pageY);else{const rt=ke(Ie),Ke=.5*(Ie.pageX+rt.x),$e=.5*(Ie.pageY+rt.y);v.set(Ke,$e)}}function j(Ie){const rt=ke(Ie),Ke=Ie.pageX-rt.x,$e=Ie.pageY-rt.y,lt=Math.sqrt(Ke*Ke+$e*$e);t.set(0,lt)}function te(Ie){le.enableZoom&&j(Ie),le.enablePan&&Y(Ie)}function ie(Ie){le.enableZoom&&j(Ie),le.enableRotate&&V(Ie)}function ue(Ie){if(m.length==1)S.set(Ie.pageX,Ie.pageY);else{const Ke=ke(Ie),$e=.5*(Ie.pageX+Ke.x),lt=.5*(Ie.pageY+Ke.y);S.set($e,lt)}x.subVectors(S,i).multiplyScalar(le.rotateSpeed);const rt=le.domElement;d(2*Math.PI*x.x/rt.clientHeight),w(2*Math.PI*x.y/rt.clientHeight),i.copy(S)}function J(Ie){if(m.length===1)p.set(Ie.pageX,Ie.pageY);else{const rt=ke(Ie),Ke=.5*(Ie.pageX+rt.x),$e=.5*(Ie.pageY+rt.y);p.set(Ke,$e)}r.subVectors(p,v).multiplyScalar(le.panSpeed),y(r.x,r.y),v.copy(p)}function X(Ie){const rt=ke(Ie),Ke=Ie.pageX-rt.x,$e=Ie.pageY-rt.y,lt=Math.sqrt(Ke*Ke+$e*$e);a.set(0,lt),n.set(0,Math.pow(a.y/t.y,le.zoomSpeed)),E(n.y),t.copy(a);const ht=(Ie.pageX+rt.x)*.5,dt=(Ie.pageY+rt.y)*.5;s(ht,dt)}function ee(Ie){le.enableZoom&&X(Ie),le.enablePan&&J(Ie)}function G(Ie){le.enableZoom&&X(Ie),le.enableRotate&&ue(Ie)}function Q(Ie){le.enabled!==!1&&(m.length===0&&(le.domElement.setPointerCapture(Ie.pointerId),le.domElement.addEventListener("pointermove",oe),le.domElement.addEventListener("pointerup",$)),!Ve(Ie)&&(me(Ie),Ie.pointerType==="touch"?Re(Ie):Z(Ie)))}function oe(Ie){le.enabled!==!1&&(Ie.pointerType==="touch"?be(Ie):se(Ie))}function $(Ie){switch(Le(Ie),m.length){case 0:le.domElement.releasePointerCapture(Ie.pointerId),le.domElement.removeEventListener("pointermove",oe),le.domElement.removeEventListener("pointerup",$),le.dispatchEvent(Oy),Xe=De.NONE;break;case 1:const rt=m[0],Ke=h[rt];Re({pointerId:rt,pageX:Ke.x,pageY:Ke.y});break}}function Z(Ie){let rt;switch(Ie.button){case 0:rt=le.mouseButtons.LEFT;break;case 1:rt=le.mouseButtons.MIDDLE;break;case 2:rt=le.mouseButtons.RIGHT;break;default:rt=-1}switch(rt){case Dh.DOLLY:if(le.enableZoom===!1)return;z(Ie),Xe=De.DOLLY;break;case Dh.ROTATE:if(Ie.ctrlKey||Ie.metaKey||Ie.shiftKey){if(le.enablePan===!1)return;D(Ie),Xe=De.PAN}else{if(le.enableRotate===!1)return;M(Ie),Xe=De.ROTATE}break;case Dh.PAN:if(Ie.ctrlKey||Ie.metaKey||Ie.shiftKey){if(le.enableRotate===!1)return;M(Ie),Xe=De.ROTATE}else{if(le.enablePan===!1)return;D(Ie),Xe=De.PAN}break;default:Xe=De.NONE}Xe!==De.NONE&&le.dispatchEvent(P0)}function se(Ie){switch(Xe){case De.ROTATE:if(le.enableRotate===!1)return;N(Ie);break;case De.DOLLY:if(le.enableZoom===!1)return;I(Ie);break;case De.PAN:if(le.enablePan===!1)return;k(Ie);break}}function ne(Ie){le.enabled===!1||le.enableZoom===!1||Xe!==De.NONE||(Ie.preventDefault(),le.dispatchEvent(P0),B(ce(Ie)),le.dispatchEvent(Oy))}function ce(Ie){const rt=Ie.deltaMode,Ke={clientX:Ie.clientX,clientY:Ie.clientY,deltaY:Ie.deltaY};switch(rt){case 1:Ke.deltaY*=16;break;case 2:Ke.deltaY*=100;break}return Ie.ctrlKey&&!b&&(Ke.deltaY*=10),Ke}function ge(Ie){Ie.key==="Control"&&(b=!0,le.domElement.getRootNode().addEventListener("keyup",Te,{passive:!0,capture:!0}))}function Te(Ie){Ie.key==="Control"&&(b=!1,le.domElement.getRootNode().removeEventListener("keyup",Te,{passive:!0,capture:!0}))}function we(Ie){le.enabled===!1||le.enablePan===!1||O(Ie)}function Re(Ie){switch(Ue(Ie),m.length){case 1:switch(le.touches.ONE){case Ih.ROTATE:if(le.enableRotate===!1)return;V(Ie),Xe=De.TOUCH_ROTATE;break;case Ih.PAN:if(le.enablePan===!1)return;Y(Ie),Xe=De.TOUCH_PAN;break;default:Xe=De.NONE}break;case 2:switch(le.touches.TWO){case Ih.DOLLY_PAN:if(le.enableZoom===!1&&le.enablePan===!1)return;te(Ie),Xe=De.TOUCH_DOLLY_PAN;break;case Ih.DOLLY_ROTATE:if(le.enableZoom===!1&&le.enableRotate===!1)return;ie(Ie),Xe=De.TOUCH_DOLLY_ROTATE;break;default:Xe=De.NONE}break;default:Xe=De.NONE}Xe!==De.NONE&&le.dispatchEvent(P0)}function be(Ie){switch(Ue(Ie),Xe){case De.TOUCH_ROTATE:if(le.enableRotate===!1)return;ue(Ie),le.update();break;case De.TOUCH_PAN:if(le.enablePan===!1)return;J(Ie),le.update();break;case De.TOUCH_DOLLY_PAN:if(le.enableZoom===!1&&le.enablePan===!1)return;ee(Ie),le.update();break;case De.TOUCH_DOLLY_ROTATE:if(le.enableZoom===!1&&le.enableRotate===!1)return;G(Ie),le.update();break;default:Xe=De.NONE}}function Ae(Ie){le.enabled!==!1&&Ie.preventDefault()}function me(Ie){m.push(Ie.pointerId)}function Le(Ie){delete h[Ie.pointerId];for(let rt=0;rt=0?(p.material.opacity=1,a.material.opacity=.5):(p.material.opacity=.5,a.material.opacity=1),c.y>=0?(r.material.opacity=1,n.material.opacity=.5):(r.material.opacity=.5,n.material.opacity=1),c.z>=0?(t.material.opacity=1,f.material.opacity=.5):(t.material.opacity=.5,f.material.opacity=1);const T=q.offsetWidth-l;E.clearDepth(),E.getViewport(d),E.setViewport(T,0,l,l),E.render(this,C),E.setViewport(d.x,d.y,d.z,d.w)};const h=new bn,b=new ku,u=new ku,o=new ku,d=new No;let w=0;this.handleClick=function(E){if(this.animating===!0)return!1;const T=q.getBoundingClientRect(),s=T.left+(q.offsetWidth-l),L=T.top+(q.offsetHeight-l);e.x=(E.clientX-s)/(T.right-s)*2-1,e.y=-((E.clientY-L)/(T.bottom-L))*2+1,U.setFromCamera(e,C);const M=U.intersectObjects(H);if(M.length>0){const D=M[0].object;return A(D,this.center),this.animating=!0,!0}else return!1},this.update=function(E){const T=E*m;u.rotateTowards(o,T),F.position.set(0,0,1).applyQuaternion(u).multiplyScalar(w).add(this.center),F.quaternion.rotateTowards(b,T),u.angleTo(o)===0&&(this.animating=!1)},this.dispose=function(){i.dispose(),S.material.dispose(),x.material.dispose(),v.material.dispose(),p.material.map.dispose(),r.material.map.dispose(),t.material.map.dispose(),a.material.map.dispose(),n.material.map.dispose(),f.material.map.dispose(),p.material.dispose(),r.material.dispose(),t.material.dispose(),a.material.dispose(),n.material.dispose(),f.material.dispose()};function A(E,T){switch(E.userData.type){case"posX":h.set(1,0,0),b.setFromEuler(new Ss(0,Math.PI*.5,0));break;case"posY":h.set(0,1,0),b.setFromEuler(new Ss(-Math.PI*.5,0,0));break;case"posZ":h.set(0,0,1),b.setFromEuler(new Ss);break;case"negX":h.set(-1,0,0),b.setFromEuler(new Ss(0,-Math.PI*.5,0));break;case"negY":h.set(0,-1,0),b.setFromEuler(new Ss(Math.PI*.5,0,0));break;case"negZ":h.set(0,0,-1),b.setFromEuler(new Ss(0,Math.PI,0));break;default:console.error("ViewHelper: Invalid axis.")}w=F.position.distanceTo(T),h.multiplyScalar(w).add(T),g.position.copy(T),g.lookAt(F.position),u.copy(g.quaternion),g.lookAt(h),o.copy(g.quaternion)}function _(E){return new X0({color:E,toneMapped:!1})}function y(E,T=null){const s=document.createElement("canvas");s.width=64,s.height=64;const L=s.getContext("2d");L.beginPath(),L.arc(32,32,16,0,2*Math.PI),L.closePath(),L.fillStyle=E.getStyle(),L.fill(),T!==null&&(L.font="24px Arial",L.textAlign="center",L.fillStyle="#000000",L.fillText(T,32,41));const M=new hS(s);return new y1({map:M,toneMapped:!1})}}}var pc=function(){var _e=0,F=document.createElement("div");F.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",F.addEventListener("click",function(C){C.preventDefault(),le(++_e%F.children.length)},!1);function q(C){return F.appendChild(C.dom),C}function le(C){for(var i=0;i=Xe+1e3&&(U.update(H*1e3/(C-Xe),100),Xe=C,H=0,g)){var i=performance.memory;g.update(i.usedJSHeapSize/1048576,i.jsHeapSizeLimit/1048576)}return C},update:function(){De=this.end()},domElement:F,setMode:le}};pc.Panel=function(_e,F,q){var le=1/0,De=0,Xe=Math.round,H=Xe(window.devicePixelRatio||1),U=80*H,e=48*H,g=3*H,C=2*H,i=3*H,S=15*H,x=74*H,v=30*H,p=document.createElement("canvas");p.width=U,p.height=e,p.style.cssText="width:80px;height:48px";var r=p.getContext("2d");return r.font="bold "+9*H+"px Helvetica,Arial,sans-serif",r.textBaseline="top",r.fillStyle=q,r.fillRect(0,0,U,e),r.fillStyle=F,r.fillText(_e,g,C),r.fillRect(i,S,x,v),r.fillStyle=q,r.globalAlpha=.9,r.fillRect(i,S,x,v),{dom:p,update:function(t,a){le=Math.min(le,t),De=Math.max(De,t),r.fillStyle=q,r.globalAlpha=1,r.fillRect(0,0,U,S),r.fillStyle=F,r.fillText(Xe(t)+" "+_e+" ("+Xe(le)+"-"+Xe(De)+")",g,C),r.drawImage(p,i+H,S,x-H,v,i,S,x-H,v),r.fillRect(i+x-H,S,H,v),r.fillStyle=q,r.globalAlpha=.9,r.fillRect(i+x-H,S,H,Xe((1-t/a)*v))}}};function _1(_e,F,q){return _eq?q:_e}class C1{constructor(F,q){this.data={x:[],y:[],mode:"markers",marker:{size:1,color:"white"}},this.data.marker.color=q,this.trailLength=0,this.maxTrailLength=F,this.trailInd=0}addTrail(F,q){this.trailLength{Xe===!1&&this.universeTrails.forEach(H=>H.popAllTrails()),le.showTrails=Xe});const De=q.addFolder("Show Universe");De.open(!1),this.simulation.universes.forEach((Xe,H)=>{De.add(le.showUniverse,Xe.label).onChange(U=>{U===!1&&this.universeTrails[H].popAllTrails(),le.showUniverse[Xe.label]=U})})}start(F,q,le){if(this.divId!==""){console.error(F,"Simulation already playing. Stop the current playtime before initiating a new one.");return}this.divId=F;let De=document.getElementById(F);if(De===null)return;let Xe=0,H=0;this.simulation.universes.forEach(r=>r.currState.bodies.forEach(t=>{Xe=Math.max(Xe,Math.abs(t.position.x)),H=Math.max(H,Math.abs(t.position.y))}));const U=.5*Math.min(le/H,q/Xe),e={paper_bgcolor:"#000000",plot_bgcolor:"#000000",font:{color:"#bfbfbf"},xaxis:{autorange:!1,range:[-(q/2)/U,q/2/U]},yaxis:{autorange:!1,range:[-(le/2)/U,le/2/U]},showlegend:!1,width:q,height:le};this.simulation.controller==="ui"&&this.addControls(De);let g;this.simulation.showDebugInfo&&(g=new pc,g.dom.style.position="absolute",g.dom.style.bottom="0px",g.dom.style.removeProperty("top"),De.appendChild(g.dom));const C=this.simulation.universes.flatMap(r=>{const t=new C1(this.simulation.getMaxTrailLength(),typeof r.color=="string"?r.color:r.color[0]);this.universeTrails.push(t);const a={x:r.currState.bodies.map(n=>n.position.x),y:r.currState.bodies.map(n=>n.position.y),type:"scatter",mode:"markers",marker:{color:r.color,sizemin:6,size:r.currState.bodies.map(n=>Math.min(10,n.mass))}};return this.simulation.getShowTrails()?(r.currState.bodies.forEach(n=>{t.addTrail(n.position.x,n.position.y)}),[a,t.data]):[a,{x:[],y:[]}]});ov.newPlot(F,C,e,{scrollZoom:!0,modeBarButtonsToRemove:["lasso2d","select2d","toImage","resetScale2d"]});const i=1e3/this.simulation.maxFrameRate;let S=0,x=0;const v=r=>{this.simulation.simulateStep(this.simulation.controls.speed*Math.min(r-x,33.33)/1e3),x=r},p=r=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(p);return}if(v(r),i>0&&r-S{if(!this.simulation.getShowUniverse(a.label))return[{x:[],y:[]},{}];const f={x:a.currState.bodies.map(l=>l.position.x),y:a.currState.bodies.map(l=>l.position.y),hovertext:a.currState.bodies.map(l=>l.label),marker:{size:a.currState.bodies.map(l=>Math.min(10,l.mass)),color:a.color,sizemin:6},mode:"markers"};let c={};if(this.simulation.getShowTrails()){const l=this.universeTrails[n];a.currState.bodies.forEach(m=>{l.addTrail(m.position.x,m.position.y)}),c=l.data}return[f,c]});ov.react(F,t,e),this.simulation.showDebugInfo&&g&&g.update(),this.animationId=requestAnimationFrame(p)};this.animationId=requestAnimationFrame(p)}stop(){if(this.animationId!==null){cancelAnimationFrame(this.animationId),this.divId="",this.universeTrails.forEach(F=>{F.popAllTrails()}),this.universeTrails=[];try{ov.purge(this.divId)}catch{}}}}class L1{constructor(F,q,le,De){const Xe=new Ws;Xe.setAttribute("position",new Gs(new Float32Array(0),3)),this.trails=new cS(Xe,new b1({color:q,size:.005*De})),le.add(this.trails),this.trailInd=0,this.trailLength=0,this.maxTrailLength=F}addTrail(F){if(this.trailLength{},this.universeTrails=[],this.simulation=F}addControls(F){const q=new vv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const le=this.simulation.controls;q.add(le,"speed"),q.add(le,"showTrails").onChange(Xe=>{Xe===!1&&this.universeTrails.forEach(H=>{H.popAllTrails()}),le.showTrails=Xe});const De=q.addFolder("Show Universe");De.open(!1),this.simulation.universes.forEach((Xe,H)=>{De.add(le.showUniverse,Xe.label).onChange(U=>{U===!1&&this.universeTrails[H].popAllTrails(),le.showUniverse[Xe.label]=U})})}start(F,q,le){if(this.scene!==void 0){console.error(F,"Simulation already playing. Stop the current playtime before initiating a new one.");return}let De=document.getElementById(F);if(De===null)return;De.style.position="relative";let Xe=0,H=0;this.simulation.universes.forEach(f=>f.currState.bodies.forEach(c=>{Xe=Math.max(Xe,Math.abs(c.position.x)),H=Math.max(H,Math.abs(c.position.y))}));const U=.5*Math.min(le/H,q/Xe);this.scene=new m1;const e=new pp(q/-2,q/2,le/2,le/-2,0,1e10);e.position.set(0,0,Math.max(q,le));const g=new g1;g.setSize(q,le),g.autoClear=!1,De.appendChild(g.domElement);let C;this.simulation.showDebugInfo&&(C=new pc,C.dom.style.position="absolute",C.dom.style.right="0px",C.dom.style.removeProperty("left"),De.appendChild(C.dom)),this.simulation.controller==="ui"&&this.addControls(De);const i=new S1(e,g.domElement);i.listenToKeyEvents(window),i.update();const S=new T1(q);this.scene.add(S);const x=new E1(e,g.domElement);let v=[];this.simulation.universes.forEach(f=>{this.universeTrails.push(new L1(this.simulation.maxTrailLength,typeof f.color=="string"?f.color:f.color[0],this.scene,U)),f.currState.bodies.forEach((c,l)=>{const m=new yp(_1(Math.log2(c.mass)-70,10,40),8,8),h=new w1(m),b=new j0(h,new mp({color:new da(typeof f.color=="string"?f.color:f.color[l])}));this.scene.add(b),b.position.copy(c.position.clone().multiplyScalar(U)),v.push(b)})});const p=1e3/this.simulation.maxFrameRate;let r=performance.now(),t=performance.now();const a=f=>{this.simulation.simulateStep(this.simulation.controls.speed*Math.min(f-r,16.67)/1e3),r=f},n=f=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(n),g.clear(),g.render(this.scene,e),x.render(g),i.update();return}if(a(f),p>0&&f-t{this.simulation.controls.showUniverse[l.label]?l.currState.bodies.forEach(h=>{v[c].visible=!0,v[c].position.copy(h.position.clone().multiplyScalar(U)),this.simulation.controls.showTrails&&this.universeTrails[m].addTrail(v[c].position),c++}):l.currState.bodies.forEach(h=>{v[c].visible=!1,c++})}),this.animationId=requestAnimationFrame(n),g.clear(),g.render(this.scene,e),x.render(g),i.update()};this.clear=()=>{g.clear(),g.dispose(),v.forEach(f=>{Array.isArray(f.material)?f.material.forEach(c=>{c.dispose()}):f.material.dispose(),f.geometry.dispose()})},this.animationId=requestAnimationFrame(n)}stop(){var F;this.animationId!==null&&(cancelAnimationFrame(this.animationId),(F=this.scene)==null||F.clear(),this.scene=void 0,this.clear(),this.clear=()=>{},this.universeTrails.forEach(q=>{q.popAllTrails()}),this.universeTrails=[])}}class PS{constructor(F){this.animationId=null,this.divId="",this.universeTrails=[],this.simulation=F}addControls(F){const q=new vv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const le=this.simulation.controls;q.add(le,"speed"),q.add(le,"showTrails").onChange(Xe=>{Xe===!1&&this.universeTrails.forEach(H=>H.popAllTrails()),le.showTrails=Xe});const De=q.addFolder("Show Universe");De.open(!1),this.simulation.universes.forEach((Xe,H)=>{De.add(le.showUniverse,Xe.label).onChange(U=>{U===!1&&this.universeTrails[H].popAllTrails(),le.showUniverse[Xe.label]=U})})}start(F,q,le,De){if(this.divId!==""){console.error("Simulation already playing. Stop the current playtime before initiating a new one.");return}this.divId=F;let Xe=document.getElementById(F);if(Xe===null)return;let H=0,U=0;this.simulation.universes.forEach(r=>r.currState.bodies.forEach(t=>{H=Math.max(H,Math.abs(t.position.x)),U=Math.max(U,Math.abs(t.position.y))}));const e=.5*Math.min(le/U,q/H),g=[],C=this.simulation.maxFrameRate*De;let i=1;this.simulation.universes.forEach(r=>{g.push([r.currState.clone()])});for(let r=0;r{g[a].push(t.currState.clone())});const S={paper_bgcolor:"#000000",plot_bgcolor:"#000000",font:{color:"#bfbfbf"},xaxis:{autorange:!1,range:[-(q/2)/e,q/2/e]},yaxis:{autorange:!1,range:[-(le/2)/e,le/2/e]},showlegend:!1,width:q,height:le};this.simulation.controller==="ui"&&this.addControls(Xe);let x;this.simulation.showDebugInfo&&(x=new pc,x.dom.style.position="absolute",x.dom.style.bottom="0px",x.dom.style.removeProperty("top"),Xe.appendChild(x.dom));const v=this.simulation.universes.flatMap(r=>{const t=new C1(this.simulation.getMaxTrailLength(),typeof r.color=="string"?r.color:r.color[0]);this.universeTrails.push(t);const a={x:r.currState.bodies.map(n=>n.position.x),y:r.currState.bodies.map(n=>n.position.y),type:"scatter",mode:"markers",marker:{color:r.color,sizemin:6,size:r.currState.bodies.map(n=>Math.min(10,n.mass))}};return this.simulation.getShowTrails()?(r.currState.bodies.forEach(n=>{t.addTrail(n.position.x,n.position.y)}),[a,t.data]):[a,{x:[],y:[]}]});ov.newPlot(F,v,S,{scrollZoom:!0,modeBarButtonsToRemove:["zoom2d","lasso2d","select2d","toImage","resetScale2d"]});const p=r=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(p);return}const t=Math.round(i),a=this.simulation.universes.flatMap((n,f)=>{if(!this.simulation.getShowUniverse(n.label))return[{x:[],y:[]},{}];const c=g[f][t],l={x:c.bodies.map(h=>h.position.x),y:c.bodies.map(h=>h.position.y),hovertext:c.bodies.map(h=>h.label),marker:{size:c.bodies.map(h=>Math.min(10,h.mass)),color:n.color,sizemin:6},mode:"markers"};let m={};if(this.simulation.getShowTrails()){const h=this.universeTrails[f];c.bodies.forEach(b=>{h.addTrail(b.position.x,b.position.y)}),m=h.data}return[l,m]});ov.react(F,a,S),this.simulation.showDebugInfo&&x&&x.update(),i=Math.round(i+this.simulation.controls.speed),i<0?this.simulation.looped?i=(i%C+C)%C:i=0:i>=C&&(this.simulation.looped?i%=C:i=C-1),this.animationId=requestAnimationFrame(p)};this.animationId=requestAnimationFrame(p)}stop(){if(this.animationId!==null){cancelAnimationFrame(this.animationId),this.divId="",this.universeTrails=[];try{ov.purge(this.divId)}catch{}}}}class RS{constructor(F){this.animationId=null,this.clear=()=>{},this.universeTrails=[],this.simulation=F}addControls(F){const q=new vv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const le=this.simulation.controls;q.add(le,"speed"),q.add(le,"showTrails").onChange(Xe=>{Xe===!1&&this.universeTrails.forEach(H=>{H.popAllTrails()}),le.showTrails=Xe});const De=q.addFolder("Show Universe");De.open(!1),this.simulation.universes.forEach((Xe,H)=>{De.add(le.showUniverse,Xe.label).onChange(U=>{U===!1&&this.universeTrails[H].popAllTrails(),le.showUniverse[Xe.label]=U})})}start(F,q,le,De){if(this.scene!==void 0){console.error("Simulation already playing. Stop the current playtime before initiating a new one.");return}let Xe=document.getElementById(F);if(Xe===null)return;let H=0,U=0;this.simulation.universes.forEach(f=>f.currState.bodies.forEach(c=>{H=Math.max(H,Math.abs(c.position.x)),U=Math.max(U,Math.abs(c.position.y))}));const e=.5*Math.min(le/U,q/H);this.scene=new m1;const g=new pp(q/-2,q/2,le/2,le/-2,0,1e10);g.position.set(0,0,Math.max(q,le));const C=new g1;C.setSize(q,le),C.autoClear=!1,Xe.appendChild(C.domElement);let i;this.simulation.showDebugInfo&&(i=new pc,i.dom.style.position="absolute",i.dom.style.right="0px",i.dom.style.removeProperty("left"),Xe.appendChild(i.dom)),this.simulation.controller==="ui"&&this.addControls(Xe);const S=new S1(g,C.domElement);S.listenToKeyEvents(window),S.update();const x=new T1(q);this.scene.add(x);const v=new E1(g,C.domElement);let p=[];this.simulation.universes.forEach(f=>{this.universeTrails.push(new L1(this.simulation.maxTrailLength,typeof f.color=="string"?f.color:f.color[0],this.scene,e)),f.currState.bodies.forEach((c,l)=>{const m=new yp(_1(Math.log2(c.mass)-70,10,40),8,8),h=new w1(m),b=new j0(h,new mp({color:new da(typeof f.color=="string"?f.color:f.color[l])}));this.scene.add(b),b.position.copy(c.position.clone().multiplyScalar(e)),p.push(b)})});const r=[],t=this.simulation.maxFrameRate*De;let a=1;this.simulation.universes.forEach(f=>{r.push([f.currState.clone()])});for(let f=0;f{r[l].push(c.currState.clone())});const n=f=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(n),C.clear(),C.render(this.scene,g),v.render(C),S.update();return}let c=0;this.simulation.universes.forEach((l,m)=>{this.simulation.controls.showUniverse[l.label]?r[m][a].bodies.forEach(b=>{p[c].visible=!0,p[c].position.copy(b.position.clone().multiplyScalar(e)),this.simulation.controls.showTrails&&this.universeTrails[m].addTrail(p[c].position),c++}):l.currState.bodies.forEach(()=>{p[c].visible=!1,c++})}),this.simulation.showDebugInfo&&i&&i.update(),a=Math.round(a+this.simulation.controls.speed),a<0?this.simulation.looped?a=(a%t+t)%t:a=0:a>=t&&(this.simulation.looped?a%=t:a=t-1),this.animationId=requestAnimationFrame(n),C.clear(),C.render(this.scene,g),v.render(C),S.update()};this.clear=()=>{C.clear(),C.dispose(),p.forEach(f=>{Array.isArray(f.material)?f.material.forEach(c=>{c.dispose()}):f.material.dispose(),f.geometry.dispose()})},this.animationId=requestAnimationFrame(n)}stop(){var F;this.animationId!==null&&(cancelAnimationFrame(this.animationId),(F=this.scene)==null||F.clear(),this.scene=void 0,this.clear(),this.clear=()=>{},this.universeTrails.forEach(q=>{q.popAllTrails()}),this.universeTrails=[])}}let DS=class{constructor(F,{visType:q="2D",record:le=!1,looped:De=!0,controller:Xe="none",showTrails:H=!1,showDebugInfo:U=!1,maxFrameRate:e=-1,maxTrailLength:g=100}){if(this.controls={speed:1,paused:!0,showTrails:!1,showUniverse:{}},this.universes=Array.isArray(F)?F:[F],this.universes.length>10)throw new Error("Too many universes");if(new Set(this.universes.map(i=>i.label)).size!==this.universes.length)throw new Error("Duplicate label in universes");this.controller=Xe,this.universes.forEach(i=>{this.controls.showUniverse[i.label]=!0}),this.controls.showTrails=H,this.showDebugInfo=U,this.maxFrameRate=e,this.maxTrailLength=g,this.looped=De,le?(this.maxFrameRate=60,this.visualizer=q==="2D"?new PS(this):new RS(this)):this.visualizer=q==="2D"?new CS(this):new LS(this)}getSpeed(){return this.controls.speed}setSpeed(F){this.controller==="code"&&(this.controls.speed=F)}isPlaying(){return!this.controls.paused}pause(){this.controller==="code"&&(this.controls.paused=!0)}resume(){this.controller==="code"&&(this.controls.paused=!1)}getShowTrails(){return this.controls.showTrails}setShowTrails(F){this.controller==="code"&&(this.controls.showTrails=F)}getShowUniverse(F){return this.controls.showUniverse[F]}setShowUniverse(F,q){this.controller==="code"&&(this.controls.showUniverse[F]=q)}getMaxTrailLength(){return this.maxTrailLength}setMaxTrailLength(F){this.controller==="code"&&(this.maxTrailLength=F)}simulateStep(F){this.universes.forEach(q=>{q.simulateStep(F)})}start(F,q,le,De=1,Xe=!1,H=0){if(H===void 0)throw new Error("recordFor must be defined if record is true");this.controls.paused=Xe,this.controls.speed=De,this.visualizer.start(F,q,le,H)}stop(){this.visualizer.stop()}};class P1{constructor(F){if(F.currState===void 0)throw new Error("Missing Current State in Universe");if(F.simFunc===void 0)throw new Error("Missing Simulation Function in Universe");this.label=F.label===void 0?"Universe":F.label,this.prevState=F.prevState===void 0?F.currState:F.prevState,this.currState=F.currState,this.color=F.color===void 0?"rgba(255, 255, 255, 1)":F.color,this.simFunc=F.simFunc,this.transformations=F.transformations===void 0?[]:Array.isArray(F.transformations)?F.transformations:[F.transformations]}simulateStep(F){let q=this.simFunc.simulate(F,this.currState,this.prevState);this.prevState=this.currState,this.transformations.forEach(le=>{q=le.transform(q,F)}),this.currState=q}clone(){return new P1({prevState:this.prevState.clone(),currState:this.currState.clone(),color:this.color,label:this.label,simFunc:this.simFunc,transformations:this.transformations})}}const IS=({storyName:_e="default",universe:F=[],visType:q="2D",record:le=!1,looped:De=!0,controller:Xe="none",showTrails:H=!1,showDebugInfo:U=!1,maxFrameRate:e=-1,maxTrailLength:g=100,width:C=400,callback:i=r=>()=>{},speed:S=1,paused:x=!1,recordFor:v=5,...p})=>{const r="demo-"+_e,[t,a]=R3.useState(null);return t===null&&a(new DS(F.map(n=>n.clone()),{visType:q,record:le,looped:De,controller:Xe,showTrails:H,showDebugInfo:U,maxFrameRate:e,maxTrailLength:g})),D3.useEffect(()=>{t==null||t.start(r,C,C,S,x,v);let n=()=>{};return t&&(n=i(t)),()=>{n(),t==null||t.stop()}},[]),L3.jsx("div",{id:r,style:{width:C,height:C,position:"relative"}})};IS.__docgenInfo={description:"Primary UI component for user interaction",methods:[],displayName:"Simulation",props:{storyName:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'default'",computed:!1}},universe:{required:!1,tsType:{name:"Array",elements:[{name:"Universe"}],raw:"Universe[]"},description:"",defaultValue:{value:"[]",computed:!1}},visType:{required:!1,tsType:{name:"union",raw:"'2D' | '3D'",elements:[{name:"literal",value:"'2D'"},{name:"literal",value:"'3D'"}]},description:"",defaultValue:{value:"'2D'",computed:!1}},record:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},looped:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},controller:{required:!1,tsType:{name:"union",raw:"'ui' | 'code' | 'none'",elements:[{name:"literal",value:"'ui'"},{name:"literal",value:"'code'"},{name:"literal",value:"'none'"}]},description:"",defaultValue:{value:"'none'",computed:!1}},showTrails:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},showDebugInfo:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},maxFrameRate:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"-1",computed:!1}},maxTrailLength:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"100",computed:!1}},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}},callback:{required:!1,tsType:{name:"signature",type:"function",raw:"(simulation: NbodySimulation) => () => void",signature:{arguments:[{type:{name:"NbodySimulation"},name:"simulation"}],return:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}}}},description:"",defaultValue:{value:"(sim) => () => { }",computed:!1}},speed:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"1",computed:!1}},paused:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},recordFor:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"5",computed:!1}}}};export{By as C,A1 as G,OS as R,IS as S,P1 as U,bn as V,xp as a,kS as b}; + `)+" "+it[1]:it[0]+et+" "+j.join(", ")+" "+it[1]}U.types=t(41088);function b(j){return Array.isArray(j)}U.isArray=b;function u(j){return typeof j=="boolean"}U.isBoolean=u;function o(j){return j===null}U.isNull=o;function d(j){return j==null}U.isNullOrUndefined=d;function w(j){return typeof j=="number"}U.isNumber=w;function A(j){return typeof j=="string"}U.isString=A;function _(j){return typeof j=="symbol"}U.isSymbol=_;function y(j){return j===void 0}U.isUndefined=y;function E(j){return T(j)&&D(j)==="[object RegExp]"}U.isRegExp=E,U.types.isRegExp=E;function T(j){return typeof j=="object"&&j!==null}U.isObject=T;function s(j){return T(j)&&D(j)==="[object Date]"}U.isDate=s,U.types.isDate=s;function L(j){return T(j)&&(D(j)==="[object Error]"||j instanceof Error)}U.isError=L,U.types.isNativeError=L;function M(j){return typeof j=="function"}U.isFunction=M;function z(j){return j===null||typeof j=="boolean"||typeof j=="number"||typeof j=="string"||typeof j=="symbol"||typeof j>"u"}U.isPrimitive=z,U.isBuffer=t(75272);function D(j){return Object.prototype.toString.call(j)}function N(j){return j<10?"0"+j.toString(10):j.toString(10)}var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var j=new Date,et=[N(j.getHours()),N(j.getMinutes()),N(j.getSeconds())].join(":");return[j.getDate(),I[j.getMonth()],et].join(" ")}U.log=function(){console.log("%s - %s",k(),U.format.apply(U,arguments))},U.inherits=t(6768),U._extend=function(j,et){if(!et||!T(et))return j;for(var it=Object.keys(et),ut=it.length;ut--;)j[it[ut]]=et[it[ut]];return j};function B(j,et){return Object.prototype.hasOwnProperty.call(j,et)}var O=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;U.promisify=function(et){if(typeof et!="function")throw new TypeError('The "original" argument must be of type Function');if(O&&et[O]){var it=et[O];if(typeof it!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(it,O,{value:it,enumerable:!1,writable:!1,configurable:!0}),it}function it(){for(var ut,J,X=new Promise(function(Q,ot){ut=Q,J=ot}),tt=[],V=0;V"u"?t.g:globalThis,e=C(),a=S("String.prototype.slice"),n=Object.getPrototypeOf,f=S("Array.prototype.indexOf",!0)||function(b,u){for(var o=0;o-1?u:u!=="Object"?!1:m(b)}return x?l(b):null}},67020:function(G,U,t){var g=t(38700),C=t(50896),i=g.instance();function S(c){this.local=this.regionalOptions[c||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(c,l){if(typeof c=="string"){var m=c.match(v);return m?m[0]:""}var h=this._validateYear(c),b=c.month(),u=""+this.toChineseMonth(h,b);return l&&u.length<2&&(u="0"+u),this.isIntercalaryMonth(h,b)&&(u+="i"),u},monthNames:function(c){if(typeof c=="string"){var l=c.match(p);return l?l[0]:""}var m=this._validateYear(c),h=c.month(),b=this.toChineseMonth(m,h),u=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][b-1];return this.isIntercalaryMonth(m,h)&&(u="闰"+u),u},monthNamesShort:function(c){if(typeof c=="string"){var l=c.match(r);return l?l[0]:""}var m=this._validateYear(c),h=c.month(),b=this.toChineseMonth(m,h),u=["一","二","三","四","五","六","七","八","九","十","十一","十二"][b-1];return this.isIntercalaryMonth(m,h)&&(u="闰"+u),u},parseMonth:function(c,l){c=this._validateYear(c);var m=parseInt(l),h;if(isNaN(m))l[0]==="闰"&&(h=!0,l=l.substring(1)),l[l.length-1]==="月"&&(l=l.substring(0,l.length-1)),m=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(l);else{var b=l[l.length-1];h=b==="i"||b==="I"}var u=this.toMonthIndex(c,m,h);return u},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(c,l){if(c.year&&(c=c.year()),typeof c!="number"||c<1888||c>2111)throw l.replace(/\{0\}/,this.local.name);return c},toMonthIndex:function(c,l,m){var h=this.intercalaryMonth(c),b=m&&l!==h;if(b||l<1||l>12)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var u;return h?!m&&l<=h?u=l-1:u=l:u=l-1,u},toChineseMonth:function(c,l){c.year&&(c=c.year(),l=c.month());var m=this.intercalaryMonth(c),h=m?12:11;if(l<0||l>h)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var b;return m?l>13;return m},isIntercalaryMonth:function(c,l){c.year&&(c=c.year(),l=c.month());var m=this.intercalaryMonth(c);return!!m&&m===l},leapYear:function(c){return this.intercalaryMonth(c)!==0},weekOfYear:function(c,l,m){var h=this._validateYear(c,g.local.invalidyear),b=a[h-a[0]],u=b>>9&4095,o=b>>5&15,d=b&31,w;w=i.newDate(u,o,d),w.add(4-(w.dayOfWeek()||7),"d");var A=this.toJD(c,l,m)-w.toJD();return 1+Math.floor(A/7)},monthsInYear:function(c){return this.leapYear(c)?13:12},daysInMonth:function(c,l){c.year&&(l=c.month(),c=c.year()),c=this._validateYear(c);var m=e[c-e[0]],h=m>>13,b=h?12:11;if(l>b)throw g.local.invalidMonth.replace(/\{0\}/,this.local.name);var u=m&1<<12-l?30:29;return u},weekDay:function(c,l,m){return(this.dayOfWeek(c,l,m)||7)<6},toJD:function(c,l,m){var h=this._validate(c,u,m,g.local.invalidDate);c=this._validateYear(h.year()),l=h.month(),m=h.day();var b=this.isIntercalaryMonth(c,l),u=this.toChineseMonth(c,l),o=f(c,u,m,b);return i.toJD(o.year,o.month,o.day)},fromJD:function(c){var l=i.fromJD(c),m=n(l.year(),l.month(),l.day()),h=this.toMonthIndex(m.year,m.month,m.isIntercalary);return this.newDate(m.year,h,m.day)},fromString:function(c){var l=c.match(x),m=this._validateYear(+l[1]),h=+l[2],b=!!l[3],u=this.toMonthIndex(m,h,b),o=+l[4];return this.newDate(m,u,o)},add:function(c,l,m){var h=c.year(),b=c.month(),u=this.isIntercalaryMonth(h,b),o=this.toChineseMonth(h,b),d=Object.getPrototypeOf(S.prototype).add.call(this,c,l,m);if(m==="y"){var w=d.year(),A=d.month(),_=this.isIntercalaryMonth(w,o),y=u&&_?this.toMonthIndex(w,o,!0):this.toMonthIndex(w,o,!1);y!==A&&d.month(y)}return d}});var x=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,v=/^\d?\d[iI]?/m,p=/^闰?十?[一二三四五六七八九]?月/m,r=/^闰?十?[一二三四五六七八九]?/m;g.calendars.chinese=S;var e=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function n(c,l,m,h){var b,u;if(typeof c=="object")b=c,u=l||{};else{var o=typeof c=="number"&&c>=1888&&c<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var d=typeof l=="number"&&l>=1&&l<=12;if(!d)throw new Error("Solar month outside range 1 - 12");var w=typeof m=="number"&&m>=1&&m<=31;if(!w)throw new Error("Solar day outside range 1 - 31");b={year:c,month:l,day:m},u=h||{}}var A=a[b.year-a[0]],_=b.year<<9|b.month<<5|b.day;u.year=_>=A?b.year:b.year-1,A=a[u.year-a[0]];var y=A>>9&4095,E=A>>5&15,T=A&31,s,L=new Date(y,E-1,T),M=new Date(b.year,b.month-1,b.day);s=Math.round((M-L)/864e5);var z=e[u.year-e[0]],D;for(D=0;D<13;D++){var N=z&1<<12-D?30:29;if(s>13;return!I||D=1888&&c<=2111;if(!d)throw new Error("Lunar year outside range 1888-2111");var w=typeof l=="number"&&l>=1&&l<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var A=typeof m=="number"&&m>=1&&m<=30;if(!A)throw new Error("Lunar day outside range 1 - 30");var _;typeof h=="object"?(_=!1,u=h):(_=!!h,u=b||{}),o={year:c,month:l,day:m,isIntercalary:_}}var y;y=o.day-1;var E=e[o.year-e[0]],T=E>>13,s;T&&(o.month>T||o.isIntercalary)?s=o.month:s=o.month-1;for(var L=0;L>9&4095,N=z>>5&15,I=z&31,k=new Date(D,N-1,I+y);return u.year=k.getFullYear(),u.month=1+k.getMonth(),u.day=k.getDate(),u}},89792:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var x=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),v=x.year()+(x.year()<0?1:0);return v%4===3||v%4===-1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),13},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===13&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return(this.dayOfWeek(S,x,v)||7)<6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),S<0&&S++,p.day()+(p.month()-1)*30+(S-1)*365+Math.floor(S/4)+this.jdEpoch-1},fromJD:function(S){var x=Math.floor(S)+.5-this.jdEpoch,v=Math.floor((x-Math.floor((x+366)/1461))/365)+1;v<=0&&v--,x=Math.floor(S)+.5-this.newDate(v,1,1).toJD();var p=Math.floor(x/30)+1,r=x-(p-1)*30+1;return this.newDate(v,p,r)}}),g.calendars.coptic=i},55668:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),!1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),13},daysInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),400},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return(r.day()+1)%8},weekDay:function(x,v,p){var r=this.dayOfWeek(x,v,p);return r>=2&&r<=6},extraInfo:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return{century:S[Math.floor((r.year()-1)/100)+1]||""}},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return x=r.year()+(r.year()<0?1:0),v=r.month(),p=r.day(),p+(v>1?16:0)+(v>2?(v-2)*32:0)+(x-1)*400+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x+.5)-Math.floor(this.jdEpoch)-1;var v=Math.floor(x/400)+1;x-=(v-1)*400,x+=x>15?16:0;var p=Math.floor(x/32)+1,r=x-(p-1)*32+1;return this.newDate(v<=0?v-1:v,p,r)}});var S={20:"Fruitbat",21:"Anchovy"};g.calendars.discworld=i},65168:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var x=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),v=x.year()+(x.year()<0?1:0);return v%4===3||v%4===-1},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),13},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===13&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return(this.dayOfWeek(S,x,v)||7)<6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),S<0&&S++,p.day()+(p.month()-1)*30+(S-1)*365+Math.floor(S/4)+this.jdEpoch-1},fromJD:function(S){var x=Math.floor(S)+.5-this.jdEpoch,v=Math.floor((x-Math.floor((x+366)/1461))/365)+1;v<=0&&v--,x=Math.floor(S)+.5-this.newDate(v,1,1).toJD();var p=Math.floor(x/30)+1,r=x-(p-1)*30+1;return this.newDate(v,p,r)}}),g.calendars.ethiopian=i},2084:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return this._leapYear(v.year())},_leapYear:function(x){return x=x<0?x+1:x,S(x*7+1,19)<7},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,g.local.invalidYear),this._leapYear(x.year?x.year():x)?13:12},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return x=v.year(),this.toJD(x===-1?1:x+1,7,1)-this.toJD(x,7,1)},daysInMonth:function(x,v){return x.year&&(v=x.month(),x=x.year()),this._validate(x,v,this.minDay,g.local.invalidMonth),v===12&&this.leapYear(x)||v===8&&S(this.daysInYear(x),10)===5?30:v===9&&S(this.daysInYear(x),10)===3?29:this.daysPerMonth[v-1]},weekDay:function(x,v,p){return this.dayOfWeek(x,v,p)!==6},extraInfo:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);return{yearType:(this.leapYear(r)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(r)%10-3]}},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);x=r.year(),v=r.month(),p=r.day();var e=x<=0?x+1:x,a=this.jdEpoch+this._delay1(e)+this._delay2(e)+p+1;if(v<7){for(var n=7;n<=this.monthsInYear(x);n++)a+=this.daysInMonth(x,n);for(var n=1;n=this.toJD(v===-1?1:v+1,7,1);)v++;for(var p=xthis.toJD(v,p,this.daysInMonth(v,p));)p++;var r=x-this.toJD(v,p,1)+1;return this.newDate(v,p,r)}});function S(x,v){return x-v*Math.floor(x/v)}g.calendars.hebrew=i},26368:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(S){var x=this._validate(S,this.minMonth,this.minDay,g.local.invalidYear);return(x.year()*11+14)%30<11},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInYear:function(S){return this.leapYear(S)?355:354},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===12&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return this.dayOfWeek(S,x,v)!==5},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),x=p.month(),v=p.day(),S=S<=0?S+1:S,v+Math.ceil(29.5*(x-1))+(S-1)*354+Math.floor((3+11*S)/30)+this.jdEpoch-1},fromJD:function(S){S=Math.floor(S)+.5;var x=Math.floor((30*(S-this.jdEpoch)+10646)/10631);x=x<=0?x-1:x;var v=Math.min(12,Math.ceil((S-29-this.toJD(x,1,1))/29.5)+1),p=S-this.toJD(x,v,1)+1;return this.newDate(x,v,p)}}),g.calendars.islamic=i},24747:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(v){var x=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),v=x.year()<0?x.year()+1:x.year();return v%4===0},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(4-(p.dayOfWeek()||7),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInMonth:function(S,x){var v=this._validate(S,x,this.minDay,g.local.invalidMonth);return this.daysPerMonth[v.month()-1]+(v.month()===2&&this.leapYear(v.year())?1:0)},weekDay:function(S,x,v){return(this.dayOfWeek(S,x,v)||7)<6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);return S=p.year(),x=p.month(),v=p.day(),S<0&&S++,x<=2&&(S--,x+=12),Math.floor(365.25*(S+4716))+Math.floor(30.6001*(x+1))+v-1524.5},fromJD:function(S){var x=Math.floor(S+.5),v=x+1524,p=Math.floor((v-122.1)/365.25),r=Math.floor(365.25*p),e=Math.floor((v-r)/30.6001),a=e-Math.floor(e<14?1:13),n=p-Math.floor(a>2?4716:4715),f=v-r-Math.floor(30.6001*e);return n<=0&&n--,this.newDate(n,a,f)}}),g.calendars.julian=i},65616:function(G,U,t){var g=t(38700),C=t(50896);function i(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),!1},formatYear:function(v){var p=this._validate(v,this.minMonth,this.minDay,g.local.invalidYear);v=p.year();var r=Math.floor(v/400);v=v%400,v+=v<0?400:0;var e=Math.floor(v/20);return r+"."+e+"."+v%20},forYear:function(v){if(v=v.split("."),v.length<3)throw"Invalid Mayan year";for(var p=0,r=0;r19||r>0&&e<0)throw"Invalid Mayan year";p=p*20+e}return p},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),18},weekOfYear:function(v,p,r){return this._validate(v,p,r,g.local.invalidDate),0},daysInYear:function(v){return this._validate(v,this.minMonth,this.minDay,g.local.invalidYear),360},daysInMonth:function(v,p){return this._validate(v,p,this.minDay,g.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(v,p,r){var e=this._validate(v,p,r,g.local.invalidDate);return e.day()},weekDay:function(v,p,r){return this._validate(v,p,r,g.local.invalidDate),!0},extraInfo:function(v,p,r){var e=this._validate(v,p,r,g.local.invalidDate),a=e.toJD(),n=this._toHaab(a),f=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[n[0]-1],haabMonth:n[0],haabDay:n[1],tzolkinDayName:this.local.tzolkinMonths[f[0]-1],tzolkinDay:f[0],tzolkinTrecena:f[1]}},_toHaab:function(v){v-=this.jdEpoch;var p=S(v+8+17*20,365);return[Math.floor(p/20)+1,S(p,20)]},_toTzolkin:function(v){return v-=this.jdEpoch,[x(v+20,20),x(v+4,13)]},toJD:function(v,p,r){var e=this._validate(v,p,r,g.local.invalidDate);return e.day()+e.month()*20+e.year()*360+this.jdEpoch},fromJD:function(v){v=Math.floor(v)+.5-this.jdEpoch;var p=Math.floor(v/360);v=v%360,v+=v<0?360:0;var r=Math.floor(v/20),e=v%20;return this.newDate(p,r,e)}});function S(v,p){return v-p*Math.floor(v/p)}function x(v,p){return S(v-1,p)+1}g.calendars.mayan=i},30632:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar;var S=g.instance("gregorian");C(i.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return S.leapYear(v.year()+(v.year()<1?1:0)+1469)},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===12&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return(this.dayOfWeek(x,v,p)||7)<6},toJD:function(e,v,p){var r=this._validate(e,v,p,g.local.invalidMonth),e=r.year();e<0&&e++;for(var a=r.day(),n=1;n=this.toJD(v+1,1,1);)v++;for(var p=x-Math.floor(this.toJD(v,1,1)+.5)+1,r=1;p>this.daysInMonth(v,r);)p-=this.daysInMonth(v,r),r++;return this.newDate(v,r,p)}}),g.calendars.nanakshahi=i},73040:function(G,U,t){var g=t(38700),C=t(50896);function i(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(S){return this.daysInYear(S)!==this.daysPerYear},weekOfYear:function(S,x,v){var p=this.newDate(S,x,v);return p.add(-p.dayOfWeek(),"d"),Math.floor((p.dayOfYear()-1)/7)+1},daysInYear:function(S){var x=this._validate(S,this.minMonth,this.minDay,g.local.invalidYear);if(S=x.year(),typeof this.NEPALI_CALENDAR_DATA[S]>"u")return this.daysPerYear;for(var v=0,p=this.minMonth;p<=12;p++)v+=this.NEPALI_CALENDAR_DATA[S][p];return v},daysInMonth:function(S,x){return S.year&&(x=S.month(),S=S.year()),this._validate(S,x,this.minDay,g.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[S]>"u"?this.daysPerMonth[x-1]:this.NEPALI_CALENDAR_DATA[S][x]},weekDay:function(S,x,v){return this.dayOfWeek(S,x,v)!==6},toJD:function(S,x,v){var p=this._validate(S,x,v,g.local.invalidDate);S=p.year(),x=p.month(),v=p.day();var r=g.instance(),e=0,a=x,n=S;this._createMissingCalendarData(S);var f=S-(a>9||a===9&&v>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(x!==9&&(e=v,a--);a!==9;)a<=0&&(a=12,n--),e+=this.NEPALI_CALENDAR_DATA[n][a],a--;return x===9?(e+=v-this.NEPALI_CALENDAR_DATA[n][0],e<0&&(e+=r.daysInYear(f))):e+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],r.newDate(f,1,1).add(e,"d").toJD()},fromJD:function(S){var x=g.instance(),v=x.fromJD(S),p=v.year(),r=v.dayOfYear(),e=p+56;this._createMissingCalendarData(e);for(var a=9,n=this.NEPALI_CALENDAR_DATA[e][0],f=this.NEPALI_CALENDAR_DATA[e][a]-n+1;r>f;)a++,a>12&&(a=1,e++),f+=this.NEPALI_CALENDAR_DATA[e][a];var c=this.NEPALI_CALENDAR_DATA[e][a]-(f-r);return this.newDate(e,a,c)},_createMissingCalendarData:function(S){var x=this.daysPerMonth.slice(0);x.unshift(17);for(var v=S-1;v"u"&&(this.NEPALI_CALENDAR_DATA[v]=x)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),g.calendars.nepali=i},1104:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return((v.year()-(v.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-((r.dayOfWeek()+1)%7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===12&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return this.dayOfWeek(x,v,p)!==5},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate);x=r.year(),v=r.month(),p=r.day();var e=x-(x>=0?474:473),a=474+S(e,2820);return p+(v<=7?(v-1)*31:(v-1)*30+6)+Math.floor((a*682-110)/2816)+(a-1)*365+Math.floor(e/2820)*1029983+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var v=x-this.toJD(475,1,1),p=Math.floor(v/1029983),r=S(v,1029983),e=2820;if(r!==1029982){var a=Math.floor(r/366),n=S(r,366);e=Math.floor((2134*a+2816*n+2815)/1028522)+a+1}var f=e+2820*p+474;f=f<=0?f-1:f;var c=x-this.toJD(f,1,1)+1,l=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),m=x-this.toJD(f,l,1)+1;return this.newDate(f,l,m)}});function S(x,v){return x-v*Math.floor(x/v)}g.calendars.persian=i,g.calendars.jalali=i},51456:function(G,U,t){var g=t(38700),C=t(50896),i=g.instance();function S(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Taiwan",jdEpoch:24194025e-1,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(p){var v=this._validate(p,this.minMonth,this.minDay,g.local.invalidYear),p=this._t2gYear(v.year());return i.leapYear(p)},weekOfYear:function(e,v,p){var r=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear),e=this._t2gYear(r.year());return i.weekOfYear(e,r.month(),r.day())},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===2&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return(this.dayOfWeek(x,v,p)||7)<6},toJD:function(e,v,p){var r=this._validate(e,v,p,g.local.invalidDate),e=this._t2gYear(r.year());return i.toJD(e,r.month(),r.day())},fromJD:function(x){var v=i.fromJD(x),p=this._g2tYear(v.year());return this.newDate(p,v.month(),v.day())},_t2gYear:function(x){return x+this.yearsOffset+(x>=-this.yearsOffset&&x<=-1?1:0)},_g2tYear:function(x){return x-this.yearsOffset-(x>=1&&x<=this.yearsOffset?1:0)}}),g.calendars.taiwan=S},4592:function(G,U,t){var g=t(38700),C=t(50896),i=g.instance();function S(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}S.prototype=new g.baseCalendar,C(S.prototype,{name:"Thai",jdEpoch:15230985e-1,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(p){var v=this._validate(p,this.minMonth,this.minDay,g.local.invalidYear),p=this._t2gYear(v.year());return i.leapYear(p)},weekOfYear:function(e,v,p){var r=this._validate(e,this.minMonth,this.minDay,g.local.invalidYear),e=this._t2gYear(r.year());return i.weekOfYear(e,r.month(),r.day())},daysInMonth:function(x,v){var p=this._validate(x,v,this.minDay,g.local.invalidMonth);return this.daysPerMonth[p.month()-1]+(p.month()===2&&this.leapYear(p.year())?1:0)},weekDay:function(x,v,p){return(this.dayOfWeek(x,v,p)||7)<6},toJD:function(e,v,p){var r=this._validate(e,v,p,g.local.invalidDate),e=this._t2gYear(r.year());return i.toJD(e,r.month(),r.day())},fromJD:function(x){var v=i.fromJD(x),p=this._g2tYear(v.year());return this.newDate(p,v.month(),v.day())},_t2gYear:function(x){return x-this.yearsOffset-(x>=1&&x<=this.yearsOffset?1:0)},_g2tYear:function(x){return x+this.yearsOffset+(x>=-this.yearsOffset&&x<=-1?1:0)}}),g.calendars.thai=S},45348:function(G,U,t){var g=t(38700),C=t(50896);function i(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}i.prototype=new g.baseCalendar,C(i.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(x){var v=this._validate(x,this.minMonth,this.minDay,g.local.invalidYear);return this.daysInYear(v.year())===355},weekOfYear:function(x,v,p){var r=this.newDate(x,v,p);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(x){for(var v=0,p=1;p<=12;p++)v+=this.daysInMonth(x,p);return v},daysInMonth:function(x,v){for(var p=this._validate(x,v,this.minDay,g.local.invalidMonth),r=p.toJD()-24e5+.5,e=0,a=0;ar)return S[e]-S[e-1];e++}return 30},weekDay:function(x,v,p){return this.dayOfWeek(x,v,p)!==5},toJD:function(x,v,p){var r=this._validate(x,v,p,g.local.invalidDate),e=12*(r.year()-1)+r.month()-15292,a=r.day()+S[e-1]-1;return a+24e5-.5},fromJD:function(x){for(var v=x-24e5+.5,p=0,r=0;rv);r++)p++;var e=p+15292,a=Math.floor((e-1)/12),n=a+1,f=e-12*a,c=v-S[p-1]+1;return this.newDate(n,f,c)},isValid:function(x,v,p){var r=g.baseCalendar.prototype.isValid.apply(this,arguments);return r&&(x=x.year!=null?x.year:x,r=x>=1276&&x<=1500),r},_validate:function(x,v,p,r){var e=g.baseCalendar.prototype._validate.apply(this,arguments);if(e.year<1276||e.year>1500)throw r.replace(/\{0\}/,this.local.name);return e}}),g.calendars.ummalqura=i;var S=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},38700:function(G,U,t){var g=t(50896);function C(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}g(C.prototype,{instance:function(r,e){r=(r||"gregorian").toLowerCase(),e=e||"";var a=this._localCals[r+"-"+e];if(!a&&this.calendars[r]&&(a=new this.calendars[r](e),this._localCals[r+"-"+e]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,r);return a},newDate:function(r,e,a,n,f){return n=(r!=null&&r.year?r.calendar():typeof n=="string"?this.instance(n,f):n)||this.instance(),n.newDate(r,e,a)},substituteDigits:function(r){return function(e){return(e+"").replace(/[0-9]/g,function(a){return r[a]})}},substituteChineseDigits:function(r,e){return function(a){for(var n="",f=0;a>0;){var c=a%10;n=(c===0?"":r[c]+e[f])+n,f++,a=Math.floor(a/10)}return n.indexOf(r[1]+e[1])===0&&(n=n.substr(1)),n||r[0]}}});function i(r,e,a,n){if(this._calendar=r,this._year=e,this._month=a,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(p.local.invalidDate||p.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(r,e){return r=""+r,"000000".substring(0,e-r.length)+r}g(i.prototype,{newDate:function(r,e,a){return this._calendar.newDate(r??this,e,a)},year:function(r){return arguments.length===0?this._year:this.set(r,"y")},month:function(r){return arguments.length===0?this._month:this.set(r,"m")},day:function(r){return arguments.length===0?this._day:this.set(r,"d")},date:function(r,e,a){if(!this._calendar.isValid(r,e,a))throw(p.local.invalidDate||p.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=r,this._month=e,this._day=a,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(r,e){return this._calendar.add(this,r,e)},set:function(r,e){return this._calendar.set(this,r,e)},compareTo:function(r){if(this._calendar.name!==r._calendar.name)throw(p.local.differentCalendars||p.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,r._calendar.local.name);var e=this._year!==r._year?this._year-r._year:this._month!==r._month?this.monthOfYear()-r.monthOfYear():this._day-r._day;return e===0?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(r){return this._calendar.fromJD(r)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(r){return this._calendar.fromJSDate(r)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function x(){this.shortYearCutoff="+10"}g(x.prototype,{_validateLevel:0,newDate:function(r,e,a){return r==null?this.today():(r.year&&(this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),a=r.day(),e=r.month(),r=r.year()),new i(this,r,e,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(r){var e=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return e.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+S(Math.abs(e.year()),4)},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear),12},monthOfYear:function(r,e){var a=this._validate(r,e,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(r,e){var a=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(r)+this.minMonth;return this._validate(r,a,this.minDay,p.local.invalidMonth||p.regionalOptions[""].invalidMonth),a},daysInYear:function(r){var e=this._validate(r,this.minMonth,this.minDay,p.local.invalidYear||p.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(r,e,a){var n=this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(r,e,a){var n=this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(r,e,a){return this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),{}},add:function(r,e,a){return this._validate(r,this.minMonth,this.minDay,p.local.invalidDate||p.regionalOptions[""].invalidDate),this._correctAdd(r,this._add(r,e,a),e,a)},_add:function(r,e,a){if(this._validateLevel++,a==="d"||a==="w"){var n=r.toJD()+e*(a==="w"?this.daysInWeek():1),f=r.calendar().fromJD(n);return this._validateLevel--,[f.year(),f.month(),f.day()]}try{var c=r.year()+(a==="y"?e:0),l=r.monthOfYear()+(a==="m"?e:0),f=r.day(),m=function(u){for(;lo-1+u.minMonth;)c++,l-=o,o=u.monthsInYear(c)};a==="y"?(r.month()!==this.fromMonthOfYear(c,l)&&(l=this.newDate(c,r.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(c)),f=Math.min(f,this.daysInMonth(c,this.fromMonthOfYear(c,l)))):a==="m"&&(m(this),f=Math.min(f,this.daysInMonth(c,this.fromMonthOfYear(c,l))));var h=[c,this.fromMonthOfYear(c,l),f];return this._validateLevel--,h}catch(b){throw this._validateLevel--,b}},_correctAdd:function(r,e,a,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(e[0]===0||r.year()>0!=e[0]>0)){var f={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],c=a<0?-1:1;e=this._add(r,a*f[0]+c*f[1],f[2])}return r.date(e[0],e[1],e[2])},set:function(r,e,a){this._validate(r,this.minMonth,this.minDay,p.local.invalidDate||p.regionalOptions[""].invalidDate);var n=a==="y"?e:r.year(),f=a==="m"?e:r.month(),c=a==="d"?e:r.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(n,f))),r.date(n,f,c)},isValid:function(r,e,a){this._validateLevel++;var n=this.hasYearZero||r!==0;if(n){var f=this.newDate(r,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),b=f-(h>2.5?4716:4715);return b<=0&&b--,this.newDate(b,h,m)},toJSDate:function(r,e,a){var n=this._validate(r,e,a,p.local.invalidDate||p.regionalOptions[""].invalidDate),f=new Date(n.year(),n.month()-1,n.day());return f.setHours(0),f.setMinutes(0),f.setSeconds(0),f.setMilliseconds(0),f.setHours(f.getHours()>12?f.getHours()+2:0),f},fromJSDate:function(r){return this.newDate(r.getFullYear(),r.getMonth()+1,r.getDate())}});var p=G.exports=new C;p.cdate=i,p.baseCalendar=x,p.calendars.gregorian=v},15168:function(G,U,t){var g=t(50896),C=t(38700);g(C.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),C.local=C.regionalOptions[""],g(C.cdate.prototype,{formatDate:function(i,S){return typeof i!="string"&&(S=i,i=""),this._calendar.formatDate(i||"",this,S)}}),g(C.baseCalendar.prototype,{UNIX_EPOCH:C.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:C.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(i,S,x){if(typeof i!="string"&&(x=S,S=i,i=""),!S)return"";if(S.calendar()!==this)throw C.local.invalidFormat||C.regionalOptions[""].invalidFormat;i=i||this.local.dateFormat,x=x||{};var v=x.dayNamesShort||this.local.dayNamesShort,p=x.dayNames||this.local.dayNames,r=x.monthNumbers||this.local.monthNumbers,e=x.monthNamesShort||this.local.monthNamesShort,a=x.monthNames||this.local.monthNames;x.calculateWeek||this.local.calculateWeek;for(var n=function(A,_){for(var y=1;w+y1},f=function(A,_,y,E){var T=""+_;if(n(A,E))for(;T.length1},w=function(D,N){var I=d(D,N),k=[2,3,I?4:2,I?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],B=new RegExp("^-?\\d{1,"+k+"}"),O=S.substring(s).match(B);if(!O)throw(C.local.missingNumberAt||C.regionalOptions[""].missingNumberAt).replace(/\{0\}/,s);return s+=O[0].length,parseInt(O[0],10)},A=this,_=function(){if(typeof a=="function"){d("m");var D=a.call(A,S.substring(s));return s+=D.length,D}return w("m")},y=function(D,N,I,k){for(var B=d(D,k)?I:N,O=0;O-1){m=1,h=b;for(var z=this.daysInMonth(l,m);h>z;z=this.daysInMonth(l,m))m++,h-=z}return c>-1?this.fromJD(c):this.newDate(l,m,h)},determineDate:function(i,S,x,v,p){x&&typeof x!="object"&&(p=v,v=x,x=null),typeof v!="string"&&(p=v,v="");var r=this,e=function(a){try{return r.parseDate(v,a,p)}catch{}a=a.toLowerCase();for(var n=(a.match(/^c/)&&x?x.newDate():null)||r.today(),f=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=f.exec(a);c;)n.add(parseInt(c[1],10),c[2]||"d"),c=f.exec(a);return n};return S=S?S.newDate():null,i=i==null?S:typeof i=="string"?e(i):typeof i=="number"?isNaN(i)||i===1/0||i===-1/0?S:r.today().add(i,"d"):r.newDate(i),i}})},21576:function(){},19768:function(){},63436:function(G,U,t){var g=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],C=typeof globalThis>"u"?t.g:globalThis;G.exports=function(){for(var S=[],x=0;x>8&15|Lt>>4&240,Lt>>4&15|Lt&240,(Lt&15)<<4|Lt&15,1):Ht===8?_(Lt>>24&255,Lt>>16&255,Lt>>8&255,(Lt&255)/255):Ht===4?_(Lt>>12&15|Lt>>8&240,Lt>>8&15|Lt>>4&240,Lt>>4&15|Lt&240,((Lt&15)<<4|Lt&15)/255):null):(Lt=a.exec(mt))?new T(Lt[1],Lt[2],Lt[3],1):(Lt=n.exec(mt))?new T(Lt[1]*255/100,Lt[2]*255/100,Lt[3]*255/100,1):(Lt=f.exec(mt))?_(Lt[1],Lt[2],Lt[3],Lt[4]):(Lt=c.exec(mt))?_(Lt[1]*255/100,Lt[2]*255/100,Lt[3]*255/100,Lt[4]):(Lt=l.exec(mt))?I(Lt[1],Lt[2]/100,Lt[3]/100,1):(Lt=m.exec(mt))?I(Lt[1],Lt[2]/100,Lt[3]/100,Lt[4]):h.hasOwnProperty(mt)?A(h[mt]):mt==="transparent"?new T(NaN,NaN,NaN,0):null}function A(mt){return new T(mt>>16&255,mt>>8&255,mt&255,1)}function _(mt,Lt,Ht,Ut){return Ut<=0&&(mt=Lt=Ht=NaN),new T(mt,Lt,Ht,Ut)}function y(mt){return mt instanceof i||(mt=w(mt)),mt?(mt=mt.rgb(),new T(mt.r,mt.g,mt.b,mt.opacity)):new T}function E(mt,Lt,Ht,Ut){return arguments.length===1?y(mt):new T(mt,Lt,Ht,Ut??1)}function T(mt,Lt,Ht,Ut){this.r=+mt,this.g=+Lt,this.b=+Ht,this.opacity=+Ut}g(T,E,C(i,{brighter:function(Lt){return Lt=Lt==null?x:Math.pow(x,Lt),new T(this.r*Lt,this.g*Lt,this.b*Lt,this.opacity)},darker:function(Lt){return Lt=Lt==null?S:Math.pow(S,Lt),new T(this.r*Lt,this.g*Lt,this.b*Lt,this.opacity)},rgb:function(){return this},clamp:function(){return new T(D(this.r),D(this.g),D(this.b),z(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:s,formatHex:s,formatHex8:L,formatRgb:M,toString:M}));function s(){return"#".concat(N(this.r)).concat(N(this.g)).concat(N(this.b))}function L(){return"#".concat(N(this.r)).concat(N(this.g)).concat(N(this.b)).concat(N((isNaN(this.opacity)?1:this.opacity)*255))}function M(){var mt=z(this.opacity);return"".concat(mt===1?"rgb(":"rgba(").concat(D(this.r),", ").concat(D(this.g),", ").concat(D(this.b)).concat(mt===1?")":", ".concat(mt,")"))}function z(mt){return isNaN(mt)?1:Math.max(0,Math.min(1,mt))}function D(mt){return Math.max(0,Math.min(255,Math.round(mt)||0))}function N(mt){return mt=D(mt),(mt<16?"0":"")+mt.toString(16)}function I(mt,Lt,Ht,Ut){return Ut<=0?mt=Lt=Ht=NaN:Ht<=0||Ht>=1?mt=Lt=NaN:Lt<=0&&(mt=NaN),new O(mt,Lt,Ht,Ut)}function k(mt){if(mt instanceof O)return new O(mt.h,mt.s,mt.l,mt.opacity);if(mt instanceof i||(mt=w(mt)),!mt)return new O;if(mt instanceof O)return mt;mt=mt.rgb();var Lt=mt.r/255,Ht=mt.g/255,Ut=mt.b/255,kt=Math.min(Lt,Ht,Ut),Vt=Math.max(Lt,Ht,Ut),It=NaN,re=Vt-kt,Kt=(Vt+kt)/2;return re?(Lt===Vt?It=(Ht-Ut)/re+(Ht0&&Kt<1?0:It,new O(It,re,Kt,mt.opacity)}function B(mt,Lt,Ht,Ut){return arguments.length===1?k(mt):new O(mt,Lt,Ht,Ut??1)}function O(mt,Lt,Ht,Ut){this.h=+mt,this.s=+Lt,this.l=+Ht,this.opacity=+Ut}g(O,B,C(i,{brighter:function(Lt){return Lt=Lt==null?x:Math.pow(x,Lt),new O(this.h,this.s,this.l*Lt,this.opacity)},darker:function(Lt){return Lt=Lt==null?S:Math.pow(S,Lt),new O(this.h,this.s,this.l*Lt,this.opacity)},rgb:function(){var Lt=this.h%360+(this.h<0)*360,Ht=isNaN(Lt)||isNaN(this.s)?0:this.s,Ut=this.l,kt=Ut+(Ut<.5?Ut:1-Ut)*Ht,Vt=2*Ut-kt;return new T(j(Lt>=240?Lt-240:Lt+120,Vt,kt),j(Lt,Vt,kt),j(Lt<120?Lt+240:Lt-120,Vt,kt),this.opacity)},clamp:function(){return new O(H(this.h),Y(this.s),Y(this.l),z(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var Lt=z(this.opacity);return"".concat(Lt===1?"hsl(":"hsla(").concat(H(this.h),", ").concat(Y(this.s)*100,"%, ").concat(Y(this.l)*100,"%").concat(Lt===1?")":", ".concat(Lt,")"))}}));function H(mt){return mt=(mt||0)%360,mt<0?mt+360:mt}function Y(mt){return Math.max(0,Math.min(1,mt||0))}function j(mt,Lt,Ht){return(mt<60?Lt+(Ht-Lt)*mt/60:mt<180?Ht:mt<240?Lt+(Ht-Lt)*(240-mt)/60:Lt)*255}var et=function(mt){return function(){return mt}};function it(mt,Lt){return function(Ht){return mt+Ht*Lt}}function ut(mt,Lt,Ht){return mt=Math.pow(mt,Ht),Lt=Math.pow(Lt,Ht)-mt,Ht=1/Ht,function(Ut){return Math.pow(mt+Ut*Lt,Ht)}}function J(mt){return(mt=+mt)==1?X:function(Lt,Ht){return Ht-Lt?ut(Lt,Ht,mt):et(isNaN(Lt)?Ht:Lt)}}function X(mt,Lt){var Ht=Lt-mt;return Ht?it(mt,Ht):et(isNaN(mt)?Lt:mt)}var tt=function mt(Lt){var Ht=J(Lt);function Ut(kt,Vt){var It=Ht((kt=E(kt)).r,(Vt=E(Vt)).r),re=Ht(kt.g,Vt.g),Kt=Ht(kt.b,Vt.b),$t=X(kt.opacity,Vt.opacity);return function(le){return kt.r=It(le),kt.g=re(le),kt.b=Kt(le),kt.opacity=$t(le),kt+""}}return Ut.gamma=mt,Ut}(1);function V(mt,Lt){var Ht=Lt?Lt.length:0,Ut=mt?Math.min(Ht,mt.length):0,kt=new Array(Ut),Vt=new Array(Ht),It;for(It=0;ItHt&&(Vt=Lt.slice(Ht,Vt),re[It]?re[It]+=Vt:re[++It]=Vt),(Ut=Ut[0])===(kt=kt[0])?re[It]?re[It]+=kt:re[++It]=kt:(re[++It]=null,Kt.push({i:It,x:ot(Ut,kt)})),Ht=nt.lastIndex;return Htt+1e3&&(C.update(1e3*g/(x-t),100),t=x,g=0,S)){var v=performance.memory;S.update(v.usedJSHeapSize/1048576,v.jsHeapSizeLimit/1048576)}return x},update:function(){U=this.end()},domElement:G,setMode:Dt}};return q.Panel=function(lt,Dt,Zt){var G=1/0,U=0,t=Math.round,g=t(window.devicePixelRatio||1),C=80*g,i=48*g,S=3*g,x=2*g,v=3*g,p=15*g,r=74*g,e=30*g,a=document.createElement("canvas");a.width=C,a.height=i,a.style.cssText="width:80px;height:48px";var n=a.getContext("2d");return n.font="bold "+9*g+"px Helvetica,Arial,sans-serif",n.textBaseline="top",n.fillStyle=Zt,n.fillRect(0,0,C,i),n.fillStyle=Dt,n.fillText(lt,S,x),n.fillRect(v,p,r,e),n.fillStyle=Zt,n.globalAlpha=.9,n.fillRect(v,p,r,e),{dom:a,update:function(f,c){G=Math.min(G,f),U=Math.max(U,f),n.fillStyle=Zt,n.globalAlpha=1,n.fillRect(0,0,C,p),n.fillStyle=Dt,n.fillText(t(f)+" "+lt+" ("+t(G)+"-"+t(U)+")",S,x),n.drawImage(a,v+g,p,r-g,e,v,p,r-g,e),n.fillRect(v+r-g,p,g,e),n.fillStyle=Zt,n.globalAlpha=.9,n.fillRect(v+r-g,p,g,t((1-f/c)*e))}}},q})})(_1);var ES=_1.exports;const wp=Uy(ES),Oy={type:"change"},D0={type:"start"},Ny={type:"end"},np=new qv,By=new fc,_S=Math.cos(70*qw.DEG2RAD);class C1 extends nh{constructor(F,q){super(),this.object=F,this.domElement=q,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new bn,this.cursor=new bn,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Rh.ROTATE,MIDDLE:Rh.DOLLY,RIGHT:Rh.PAN},this.touches={ONE:Dh.ROTATE,TWO:Dh.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return U.phi},this.getAzimuthalAngle=function(){return U.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(It){It.addEventListener("keydown",wt),this._domElementKeyEvents=It},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",wt),this._domElementKeyEvents=null},this.saveState=function(){lt.target0.copy(lt.target),lt.position0.copy(lt.object.position),lt.zoom0=lt.object.zoom},this.reset=function(){lt.target.copy(lt.target0),lt.object.position.copy(lt.position0),lt.object.zoom=lt.zoom0,lt.object.updateProjectionMatrix(),lt.dispatchEvent(Oy),lt.update(),Zt=Dt.NONE},this.update=function(){const It=new bn,re=new ku().setFromUnitVectors(F.up,new bn(0,1,0)),Kt=re.clone().invert(),$t=new bn,le=new ku,he=new bn,de=2*Math.PI;return function(Se=null){const ne=lt.object.position;It.copy(ne).sub(lt.target),It.applyQuaternion(re),U.setFromVector3(It),lt.autoRotate&&Zt===Dt.NONE&&d(u(Se)),lt.enableDamping?(U.theta+=t.theta*lt.dampingFactor,U.phi+=t.phi*lt.dampingFactor):(U.theta+=t.theta,U.phi+=t.phi);let zt=lt.minAzimuthAngle,Xt=lt.maxAzimuthAngle;isFinite(zt)&&isFinite(Xt)&&(zt<-Math.PI?zt+=de:zt>Math.PI&&(zt-=de),Xt<-Math.PI?Xt+=de:Xt>Math.PI&&(Xt-=de),zt<=Xt?U.theta=Math.max(zt,Math.min(Xt,U.theta)):U.theta=U.theta>(zt+Xt)/2?Math.max(zt,U.theta):Math.min(Xt,U.theta)),U.phi=Math.max(lt.minPolarAngle,Math.min(lt.maxPolarAngle,U.phi)),U.makeSafe(),lt.enableDamping===!0?lt.target.addScaledVector(C,lt.dampingFactor):lt.target.add(C),lt.target.sub(lt.cursor),lt.target.clampLength(lt.minTargetRadius,lt.maxTargetRadius),lt.target.add(lt.cursor);let Jt=!1;if(lt.zoomToCursor&&l||lt.object.isOrthographicCamera)U.radius=L(U.radius);else{const Wt=U.radius;U.radius=L(U.radius*g),Jt=Wt!=U.radius}if(It.setFromSpherical(U),It.applyQuaternion(Kt),ne.copy(lt.target).add(It),lt.object.lookAt(lt.target),lt.enableDamping===!0?(t.theta*=1-lt.dampingFactor,t.phi*=1-lt.dampingFactor,C.multiplyScalar(1-lt.dampingFactor)):(t.set(0,0,0),C.set(0,0,0)),lt.zoomToCursor&&l){let Wt=null;if(lt.object.isPerspectiveCamera){const Ft=It.length();Wt=L(Ft*g);const xt=Ft-Wt;lt.object.position.addScaledVector(f,xt),lt.object.updateMatrixWorld(),Jt=!!xt}else if(lt.object.isOrthographicCamera){const Ft=new bn(c.x,c.y,0);Ft.unproject(lt.object);const xt=lt.object.zoom;lt.object.zoom=Math.max(lt.minZoom,Math.min(lt.maxZoom,lt.object.zoom/g)),lt.object.updateProjectionMatrix(),Jt=xt!==lt.object.zoom;const yt=new bn(c.x,c.y,0);yt.unproject(lt.object),lt.object.position.sub(yt).add(Ft),lt.object.updateMatrixWorld(),Wt=It.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),lt.zoomToCursor=!1;Wt!==null&&(this.screenSpacePanning?lt.target.set(0,0,-1).transformDirection(lt.object.matrix).multiplyScalar(Wt).add(lt.object.position):(np.origin.copy(lt.object.position),np.direction.set(0,0,-1).transformDirection(lt.object.matrix),Math.abs(lt.object.up.dot(np.direction))<_S?F.lookAt(lt.target):(By.setFromNormalAndCoplanarPoint(lt.object.up,lt.target),np.intersectPlane(By,lt.target))))}else if(lt.object.isOrthographicCamera){const Wt=lt.object.zoom;lt.object.zoom=Math.max(lt.minZoom,Math.min(lt.maxZoom,lt.object.zoom/g)),Wt!==lt.object.zoom&&(lt.object.updateProjectionMatrix(),Jt=!0)}return g=1,l=!1,Jt||$t.distanceToSquared(lt.object.position)>G||8*(1-le.dot(lt.object.quaternion))>G||he.distanceToSquared(lt.target)>G?(lt.dispatchEvent(Oy),$t.copy(lt.object.position),le.copy(lt.object.quaternion),he.copy(lt.target),!0):!1}}(),this.dispose=function(){lt.domElement.removeEventListener("contextmenu",At),lt.domElement.removeEventListener("pointerdown",Q),lt.domElement.removeEventListener("pointercancel",$),lt.domElement.removeEventListener("wheel",nt),lt.domElement.removeEventListener("pointermove",ot),lt.domElement.removeEventListener("pointerup",$),lt.domElement.getRootNode().removeEventListener("keydown",gt,{capture:!0}),lt._domElementKeyEvents!==null&&(lt._domElementKeyEvents.removeEventListener("keydown",wt),lt._domElementKeyEvents=null)};const lt=this,Dt={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let Zt=Dt.NONE;const G=1e-6,U=new zy,t=new zy;let g=1;const C=new bn,i=new Wi,S=new Wi,x=new Wi,v=new Wi,p=new Wi,r=new Wi,e=new Wi,a=new Wi,n=new Wi,f=new bn,c=new Wi;let l=!1;const m=[],h={};let b=!1;function u(It){return It!==null?2*Math.PI/60*lt.autoRotateSpeed*It:2*Math.PI/60/60*lt.autoRotateSpeed}function o(It){const re=Math.abs(It*.01);return Math.pow(.95,lt.zoomSpeed*re)}function d(It){t.theta-=It}function w(It){t.phi-=It}const A=function(){const It=new bn;return function(Kt,$t){It.setFromMatrixColumn($t,0),It.multiplyScalar(-Kt),C.add(It)}}(),_=function(){const It=new bn;return function(Kt,$t){lt.screenSpacePanning===!0?It.setFromMatrixColumn($t,1):(It.setFromMatrixColumn($t,0),It.crossVectors(lt.object.up,It)),It.multiplyScalar(Kt),C.add(It)}}(),y=function(){const It=new bn;return function(Kt,$t){const le=lt.domElement;if(lt.object.isPerspectiveCamera){const he=lt.object.position;It.copy(he).sub(lt.target);let de=It.length();de*=Math.tan(lt.object.fov/2*Math.PI/180),A(2*Kt*de/le.clientHeight,lt.object.matrix),_(2*$t*de/le.clientHeight,lt.object.matrix)}else lt.object.isOrthographicCamera?(A(Kt*(lt.object.right-lt.object.left)/lt.object.zoom/le.clientWidth,lt.object.matrix),_($t*(lt.object.top-lt.object.bottom)/lt.object.zoom/le.clientHeight,lt.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),lt.enablePan=!1)}}();function E(It){lt.object.isPerspectiveCamera||lt.object.isOrthographicCamera?g/=It:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),lt.enableZoom=!1)}function T(It){lt.object.isPerspectiveCamera||lt.object.isOrthographicCamera?g*=It:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),lt.enableZoom=!1)}function s(It,re){if(!lt.zoomToCursor)return;l=!0;const Kt=lt.domElement.getBoundingClientRect(),$t=It-Kt.left,le=re-Kt.top,he=Kt.width,de=Kt.height;c.x=$t/he*2-1,c.y=-(le/de)*2+1,f.set(c.x,c.y,1).unproject(lt.object).sub(lt.object.position).normalize()}function L(It){return Math.max(lt.minDistance,Math.min(lt.maxDistance,It))}function M(It){i.set(It.clientX,It.clientY)}function z(It){s(It.clientX,It.clientX),e.set(It.clientX,It.clientY)}function D(It){v.set(It.clientX,It.clientY)}function N(It){S.set(It.clientX,It.clientY),x.subVectors(S,i).multiplyScalar(lt.rotateSpeed);const re=lt.domElement;d(2*Math.PI*x.x/re.clientHeight),w(2*Math.PI*x.y/re.clientHeight),i.copy(S),lt.update()}function I(It){a.set(It.clientX,It.clientY),n.subVectors(a,e),n.y>0?E(o(n.y)):n.y<0&&T(o(n.y)),e.copy(a),lt.update()}function k(It){p.set(It.clientX,It.clientY),r.subVectors(p,v).multiplyScalar(lt.panSpeed),y(r.x,r.y),v.copy(p),lt.update()}function B(It){s(It.clientX,It.clientY),It.deltaY<0?T(o(It.deltaY)):It.deltaY>0&&E(o(It.deltaY)),lt.update()}function O(It){let re=!1;switch(It.code){case lt.keys.UP:It.ctrlKey||It.metaKey||It.shiftKey?w(2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(0,lt.keyPanSpeed),re=!0;break;case lt.keys.BOTTOM:It.ctrlKey||It.metaKey||It.shiftKey?w(-2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(0,-lt.keyPanSpeed),re=!0;break;case lt.keys.LEFT:It.ctrlKey||It.metaKey||It.shiftKey?d(2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(lt.keyPanSpeed,0),re=!0;break;case lt.keys.RIGHT:It.ctrlKey||It.metaKey||It.shiftKey?d(-2*Math.PI*lt.rotateSpeed/lt.domElement.clientHeight):y(-lt.keyPanSpeed,0),re=!0;break}re&&(It.preventDefault(),lt.update())}function H(It){if(m.length===1)i.set(It.pageX,It.pageY);else{const re=kt(It),Kt=.5*(It.pageX+re.x),$t=.5*(It.pageY+re.y);i.set(Kt,$t)}}function Y(It){if(m.length===1)v.set(It.pageX,It.pageY);else{const re=kt(It),Kt=.5*(It.pageX+re.x),$t=.5*(It.pageY+re.y);v.set(Kt,$t)}}function j(It){const re=kt(It),Kt=It.pageX-re.x,$t=It.pageY-re.y,le=Math.sqrt(Kt*Kt+$t*$t);e.set(0,le)}function et(It){lt.enableZoom&&j(It),lt.enablePan&&Y(It)}function it(It){lt.enableZoom&&j(It),lt.enableRotate&&H(It)}function ut(It){if(m.length==1)S.set(It.pageX,It.pageY);else{const Kt=kt(It),$t=.5*(It.pageX+Kt.x),le=.5*(It.pageY+Kt.y);S.set($t,le)}x.subVectors(S,i).multiplyScalar(lt.rotateSpeed);const re=lt.domElement;d(2*Math.PI*x.x/re.clientHeight),w(2*Math.PI*x.y/re.clientHeight),i.copy(S)}function J(It){if(m.length===1)p.set(It.pageX,It.pageY);else{const re=kt(It),Kt=.5*(It.pageX+re.x),$t=.5*(It.pageY+re.y);p.set(Kt,$t)}r.subVectors(p,v).multiplyScalar(lt.panSpeed),y(r.x,r.y),v.copy(p)}function X(It){const re=kt(It),Kt=It.pageX-re.x,$t=It.pageY-re.y,le=Math.sqrt(Kt*Kt+$t*$t);a.set(0,le),n.set(0,Math.pow(a.y/e.y,lt.zoomSpeed)),E(n.y),e.copy(a);const he=(It.pageX+re.x)*.5,de=(It.pageY+re.y)*.5;s(he,de)}function tt(It){lt.enableZoom&&X(It),lt.enablePan&&J(It)}function V(It){lt.enableZoom&&X(It),lt.enableRotate&&ut(It)}function Q(It){lt.enabled!==!1&&(m.length===0&&(lt.domElement.setPointerCapture(It.pointerId),lt.domElement.addEventListener("pointermove",ot),lt.domElement.addEventListener("pointerup",$)),!Ht(It)&&(mt(It),It.pointerType==="touch"?Rt(It):Z(It)))}function ot(It){lt.enabled!==!1&&(It.pointerType==="touch"?bt(It):st(It))}function $(It){switch(Lt(It),m.length){case 0:lt.domElement.releasePointerCapture(It.pointerId),lt.domElement.removeEventListener("pointermove",ot),lt.domElement.removeEventListener("pointerup",$),lt.dispatchEvent(Ny),Zt=Dt.NONE;break;case 1:const re=m[0],Kt=h[re];Rt({pointerId:re,pageX:Kt.x,pageY:Kt.y});break}}function Z(It){let re;switch(It.button){case 0:re=lt.mouseButtons.LEFT;break;case 1:re=lt.mouseButtons.MIDDLE;break;case 2:re=lt.mouseButtons.RIGHT;break;default:re=-1}switch(re){case Rh.DOLLY:if(lt.enableZoom===!1)return;z(It),Zt=Dt.DOLLY;break;case Rh.ROTATE:if(It.ctrlKey||It.metaKey||It.shiftKey){if(lt.enablePan===!1)return;D(It),Zt=Dt.PAN}else{if(lt.enableRotate===!1)return;M(It),Zt=Dt.ROTATE}break;case Rh.PAN:if(It.ctrlKey||It.metaKey||It.shiftKey){if(lt.enableRotate===!1)return;M(It),Zt=Dt.ROTATE}else{if(lt.enablePan===!1)return;D(It),Zt=Dt.PAN}break;default:Zt=Dt.NONE}Zt!==Dt.NONE&<.dispatchEvent(D0)}function st(It){switch(Zt){case Dt.ROTATE:if(lt.enableRotate===!1)return;N(It);break;case Dt.DOLLY:if(lt.enableZoom===!1)return;I(It);break;case Dt.PAN:if(lt.enablePan===!1)return;k(It);break}}function nt(It){lt.enabled===!1||lt.enableZoom===!1||Zt!==Dt.NONE||(It.preventDefault(),lt.dispatchEvent(D0),B(ct(It)),lt.dispatchEvent(Ny))}function ct(It){const re=It.deltaMode,Kt={clientX:It.clientX,clientY:It.clientY,deltaY:It.deltaY};switch(re){case 1:Kt.deltaY*=16;break;case 2:Kt.deltaY*=100;break}return It.ctrlKey&&!b&&(Kt.deltaY*=10),Kt}function gt(It){It.key==="Control"&&(b=!0,lt.domElement.getRootNode().addEventListener("keyup",Tt,{passive:!0,capture:!0}))}function Tt(It){It.key==="Control"&&(b=!1,lt.domElement.getRootNode().removeEventListener("keyup",Tt,{passive:!0,capture:!0}))}function wt(It){lt.enabled===!1||lt.enablePan===!1||O(It)}function Rt(It){switch(Ut(It),m.length){case 1:switch(lt.touches.ONE){case Dh.ROTATE:if(lt.enableRotate===!1)return;H(It),Zt=Dt.TOUCH_ROTATE;break;case Dh.PAN:if(lt.enablePan===!1)return;Y(It),Zt=Dt.TOUCH_PAN;break;default:Zt=Dt.NONE}break;case 2:switch(lt.touches.TWO){case Dh.DOLLY_PAN:if(lt.enableZoom===!1&<.enablePan===!1)return;et(It),Zt=Dt.TOUCH_DOLLY_PAN;break;case Dh.DOLLY_ROTATE:if(lt.enableZoom===!1&<.enableRotate===!1)return;it(It),Zt=Dt.TOUCH_DOLLY_ROTATE;break;default:Zt=Dt.NONE}break;default:Zt=Dt.NONE}Zt!==Dt.NONE&<.dispatchEvent(D0)}function bt(It){switch(Ut(It),Zt){case Dt.TOUCH_ROTATE:if(lt.enableRotate===!1)return;ut(It),lt.update();break;case Dt.TOUCH_PAN:if(lt.enablePan===!1)return;J(It),lt.update();break;case Dt.TOUCH_DOLLY_PAN:if(lt.enableZoom===!1&<.enablePan===!1)return;tt(It),lt.update();break;case Dt.TOUCH_DOLLY_ROTATE:if(lt.enableZoom===!1&<.enableRotate===!1)return;V(It),lt.update();break;default:Zt=Dt.NONE}}function At(It){lt.enabled!==!1&&It.preventDefault()}function mt(It){m.push(It.pointerId)}function Lt(It){delete h[It.pointerId];for(let re=0;re=0?(p.material.opacity=1,a.material.opacity=.5):(p.material.opacity=.5,a.material.opacity=1),c.y>=0?(r.material.opacity=1,n.material.opacity=.5):(r.material.opacity=.5,n.material.opacity=1),c.z>=0?(e.material.opacity=1,f.material.opacity=.5):(e.material.opacity=.5,f.material.opacity=1);const T=q.offsetWidth-l;E.clearDepth(),E.getViewport(d),E.setViewport(T,0,l,l),E.render(this,C),E.setViewport(d.x,d.y,d.z,d.w)};const h=new bn,b=new ku,u=new ku,o=new ku,d=new No;let w=0;this.handleClick=function(E){if(this.animating===!0)return!1;const T=q.getBoundingClientRect(),s=T.left+(q.offsetWidth-l),L=T.top+(q.offsetHeight-l);t.x=(E.clientX-s)/(T.right-s)*2-1,t.y=-((E.clientY-L)/(T.bottom-L))*2+1,U.setFromCamera(t,C);const M=U.intersectObjects(G);if(M.length>0){const D=M[0].object;return A(D,this.center),this.animating=!0,!0}else return!1},this.update=function(E){const T=E*m;u.rotateTowards(o,T),F.position.set(0,0,1).applyQuaternion(u).multiplyScalar(w).add(this.center),F.quaternion.rotateTowards(b,T),u.angleTo(o)===0&&(this.animating=!1)},this.dispose=function(){i.dispose(),S.material.dispose(),x.material.dispose(),v.material.dispose(),p.material.map.dispose(),r.material.map.dispose(),e.material.map.dispose(),a.material.map.dispose(),n.material.map.dispose(),f.material.map.dispose(),p.material.dispose(),r.material.dispose(),e.material.dispose(),a.material.dispose(),n.material.dispose(),f.material.dispose()};function A(E,T){switch(E.userData.type){case"posX":h.set(1,0,0),b.setFromEuler(new Ss(0,Math.PI*.5,0));break;case"posY":h.set(0,1,0),b.setFromEuler(new Ss(-Math.PI*.5,0,0));break;case"posZ":h.set(0,0,1),b.setFromEuler(new Ss);break;case"negX":h.set(-1,0,0),b.setFromEuler(new Ss(0,-Math.PI*.5,0));break;case"negY":h.set(0,-1,0),b.setFromEuler(new Ss(Math.PI*.5,0,0));break;case"negZ":h.set(0,0,-1),b.setFromEuler(new Ss(0,Math.PI,0));break;default:console.error("ViewHelper: Invalid axis.")}w=F.position.distanceTo(T),h.multiplyScalar(w).add(T),g.position.copy(T),g.lookAt(F.position),u.copy(g.quaternion),g.lookAt(h),o.copy(g.quaternion)}function _(E){return new td({color:E,toneMapped:!1})}function y(E,T=null){const s=document.createElement("canvas");s.width=64,s.height=64;const L=s.getContext("2d");L.beginPath(),L.arc(32,32,16,0,2*Math.PI),L.closePath(),L.fillStyle=E.getStyle(),L.fill(),T!==null&&(L.font="24px Arial",L.textAlign="center",L.fillStyle="#000000",L.fillText(T,32,41));const M=new cS(s);return new b1({map:M,toneMapped:!1})}}}function cv(_t,F,q,lt,Dt){return F===q?(lt+Dt)/2:lt+(_t-F)/(q-F)*(Dt-lt)}class P1{constructor(F,q){this.data={x:[],y:[],mode:"markers",marker:{size:1,color:"white"}},this.data.marker.color=q,this.trailLength=0,this.maxTrailLength=F,this.trailInd=0}addTrail(F,q){this.trailLength{Zt===!1&&this.universeTrails.forEach(G=>G.popAllTrails()),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt){if(this.divId!==""){console.error(F,"Simulation already playing. Stop the current playtime before initiating a new one.");return}this.divId=F;let Dt=document.getElementById(F);if(Dt===null)return;let Zt=0,G=0,U=0,t=1/0;this.simulation.universes.forEach(n=>n.currState.bodies.forEach(f=>{Zt=Math.max(Zt,Math.abs(f.position.x)),G=Math.max(G,Math.abs(f.position.y)),t=Math.min(t,f.radius),U=Math.max(U,f.radius)}));const g=.5*Math.min(lt/G,q/Zt),C=.01*Math.min(lt,q),i=.05*Math.min(lt,q),S={paper_bgcolor:"#000000",plot_bgcolor:"#000000",font:{color:"#bfbfbf"},xaxis:{autorange:!1,range:[-(q/2)/g,q/2/g]},yaxis:{autorange:!1,range:[-(lt/2)/g,lt/2/g]},showlegend:!1,width:q,height:lt};this.simulation.controller==="ui"&&this.addControls(Dt),this.simulation.showDebugInfo&&(this.stats=new wp,this.stats.dom.style.position="absolute",this.stats.dom.style.bottom="0px",this.stats.dom.style.removeProperty("top"),Dt.appendChild(this.stats.dom));const x=this.simulation.universes.flatMap(n=>{const f=new P1(this.simulation.getMaxTrailLength(),typeof n.color=="string"?n.color:n.color[0]);this.universeTrails.push(f);const c={x:n.currState.bodies.map(l=>l.position.x),y:n.currState.bodies.map(l=>l.position.y),type:"scatter",mode:"markers",marker:{color:n.color,sizemin:C,size:n.currState.bodies.map(l=>cv(l.radius,t,U,C,i))}};return this.simulation.getShowTrails()?(n.currState.bodies.forEach(l=>{f.addTrail(l.position.x,l.position.y)}),[c,f.data]):[c,{x:[],y:[]}]});ov.newPlot(F,x,S,{scrollZoom:!0,modeBarButtonsToRemove:["lasso2d","select2d","toImage","resetScale2d"]});const v=1e3/this.simulation.maxFrameRate;let p=0,r=0;const e=n=>{this.simulation.simulateStep(this.simulation.controls.speed*Math.min(n-r,33.33)/1e3),r=n},a=n=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(a);return}if(e(n),v>0&&n-p{if(!this.simulation.getShowUniverse(c.label))return[{x:[],y:[]},{}];const m={x:c.currState.bodies.map(b=>b.position.x),y:c.currState.bodies.map(b=>b.position.y),hovertext:c.currState.bodies.map(b=>b.label),marker:{color:c.color,sizemin:C,size:c.currState.bodies.map(b=>cv(b.radius,t,U,C,i))},mode:"markers"};let h={};if(this.simulation.getShowTrails()){const b=this.universeTrails[l];c.currState.bodies.forEach(u=>{b.addTrail(u.position.x,u.position.y)}),h=b.data}return[m,h]});ov.react(F,f,S),this.simulation.showDebugInfo&&this.stats&&this.stats.update(),this.animationId=requestAnimationFrame(a)};this.animationId=requestAnimationFrame(a)}stop(){var F;if(this.animationId!==null){cancelAnimationFrame(this.animationId),this.divId="",this.universeTrails.forEach(q=>{q.popAllTrails()}),this.universeTrails=[],this.removeControls(),(F=this.stats)==null||F.dom.remove();try{ov.purge(this.divId)}catch{}}}}class R1{constructor(F,q,lt,Dt){const Zt=new Ys;Zt.setAttribute("position",new Ws(new Float32Array(0),3)),this.trails=new fS(Zt,new T1({color:q,size:.005*Dt})),lt.add(this.trails),this.trailInd=0,this.trailLength=0,this.maxTrailLength=F}addTrail(F){if(this.trailLength{},this.universeTrails=[],this.simulation=F}addControls(F){const q=new dv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const lt=this.simulation.controls;q.add(lt,"speed"),q.add(lt,"showTrails").onChange(Zt=>{Zt===!1&&this.universeTrails.forEach(G=>{G.popAllTrails()}),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt){if(this.scene!==void 0){console.error(F,"Simulation already playing. Stop the current playtime before initiating a new one.");return}let Dt=document.getElementById(F);if(Dt===null)return;Dt.style.position="relative";let Zt=0,G=0,U=1/0;this.simulation.universes.forEach(l=>l.currState.bodies.forEach(m=>{for(let h=0;h<3;h++)Zt=Math.max(Zt,Math.abs(m.position.getComponent(h)));U=Math.min(U,m.radius),G=Math.max(G,m.radius)}));const t=.5*Math.min(lt,q)/Zt,g=.015*Math.min(lt,q),C=.04*Math.min(lt,q);this.scene=new x1;const i=new gp(q/-2,q/2,lt/2,lt/-2,0,1e10);i.position.set(0,0,Math.max(q,lt));const S=new y1;S.setSize(q,lt),S.autoClear=!1,Dt.appendChild(S.domElement),this.simulation.showDebugInfo&&(this.stats=new wp,this.stats.dom.style.position="absolute",this.stats.dom.style.right="0px",this.stats.dom.style.removeProperty("left"),Dt.appendChild(this.stats.dom)),this.simulation.controller==="ui"&&this.addControls(Dt);const x=new C1(i,S.domElement);x.listenToKeyEvents(window),x.update();const v=new M1(q);this.scene.add(v);const p=new L1(i,S.domElement);let r=[];this.simulation.universes.forEach(l=>{this.universeTrails.push(new R1(this.simulation.maxTrailLength,typeof l.color=="string"?l.color:l.color[0],this.scene,t)),l.currState.bodies.forEach((m,h)=>{const b=new xp(cv(m.radius,U,G,g,C),12,12),u=new rv;u.add(new K0(new A1(b),new yp({color:new ha(typeof l.color=="string"?l.color:l.color[h]),transparent:!0,opacity:.4}))),u.add(new Vs(b,new td({color:new ha(typeof l.color=="string"?l.color:l.color[h]),transparent:!0,opacity:.5,side:Nu}))),this.scene.add(u),u.position.copy(m.position.clone().multiplyScalar(t)),r.push(u)})});const e=1e3/this.simulation.maxFrameRate;let a=performance.now(),n=performance.now();const f=l=>{this.simulation.simulateStep(this.simulation.controls.speed*Math.min(l-a,16.67)/1e3),a=l},c=l=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(c),S.clear(),S.render(this.scene,i),p.render(S),x.update();return}if(f(l),e>0&&l-n{this.simulation.controls.showUniverse[h.label]?h.currState.bodies.forEach(u=>{r[m].visible=!0,r[m].position.copy(u.position.clone().multiplyScalar(t)),this.simulation.controls.showTrails&&this.universeTrails[b].addTrail(r[m].position.clone()),m++}):h.currState.bodies.forEach(u=>{r[m].visible=!1,m++})}),this.animationId=requestAnimationFrame(c),S.clear(),S.render(this.scene,i),p.render(S),x.update()};this.clear=()=>{S.clear(),S.dispose(),r.forEach(l=>{l.children.forEach(m=>{m.geometry.dispose(),m.material.dispose()})}),S.domElement.remove()},this.animationId=requestAnimationFrame(c)}stop(){var F,q;this.animationId!==null&&(cancelAnimationFrame(this.animationId),(F=this.scene)==null||F.clear(),this.scene=void 0,this.clear(),this.clear=()=>{},this.universeTrails.forEach(lt=>{lt.popAllTrails()}),this.universeTrails=[],this.removeControls(),(q=this.stats)==null||q.dom.remove())}}class PS{constructor(F){this.animationId=null,this.divId="",this.universeTrails=[],this.simulation=F}addControls(F){const q=new dv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const lt=this.simulation.controls;q.add(lt,"speed"),q.add(lt,"showTrails").onChange(Zt=>{Zt===!1&&this.universeTrails.forEach(G=>G.popAllTrails()),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt,Dt,Zt){if(this.divId!==""){console.error("Simulation already playing. Stop the current playtime before initiating a new one.");return}this.divId=F;let G=document.getElementById(F);if(G===null)return;let U=0,t=0,g=0,C=1/0;this.simulation.universes.forEach(f=>f.currState.bodies.forEach(c=>{U=Math.max(U,Math.abs(c.position.x)),t=Math.max(t,Math.abs(c.position.y)),C=Math.min(C,c.radius),g=Math.max(g,c.radius)}));const i=.5*Math.min(lt/t,q/U),S=.01*Math.min(lt,q),x=.05*Math.min(lt,q),v=[],p=this.simulation.maxFrameRate*Dt;let r=1;this.simulation.universes.forEach(f=>{v.push([f.currState.clone()])});for(let f=0;f{v[l].push(c.currState.clone())});const e={paper_bgcolor:"#000000",plot_bgcolor:"#000000",font:{color:"#bfbfbf"},xaxis:{autorange:!1,range:[-(q/2)/i,q/2/i]},yaxis:{autorange:!1,range:[-(lt/2)/i,lt/2/i]},showlegend:!1,width:q,height:lt};this.simulation.controller==="ui"&&this.addControls(G),this.simulation.showDebugInfo&&(this.stats=new wp,this.stats.dom.style.position="absolute",this.stats.dom.style.bottom="0px",this.stats.dom.style.removeProperty("top"),G.appendChild(this.stats.dom));const a=this.simulation.universes.flatMap(f=>{const c=new P1(this.simulation.getMaxTrailLength(),typeof f.color=="string"?f.color:f.color[0]);this.universeTrails.push(c);const l={x:f.currState.bodies.map(m=>m.position.x),y:f.currState.bodies.map(m=>m.position.y),type:"scatter",mode:"markers",marker:{color:f.color,sizemin:S,size:f.currState.bodies.map(m=>cv(m.radius,C,g,S,x))}};return this.simulation.getShowTrails()?(f.currState.bodies.forEach(m=>{c.addTrail(m.position.x,m.position.y)}),[l,c.data]):[l,{x:[],y:[]}]});ov.newPlot(F,a,e,{scrollZoom:!0,modeBarButtonsToRemove:["zoom2d","lasso2d","select2d","toImage","resetScale2d"]});const n=f=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(n);return}const c=Math.round(r),l=this.simulation.universes.flatMap((m,h)=>{if(!this.simulation.getShowUniverse(m.label))return[{x:[],y:[]},{}];const b=v[h][c],u={x:b.bodies.map(d=>d.position.x),y:b.bodies.map(d=>d.position.y),hovertext:b.bodies.map(d=>d.label),marker:{color:m.color,sizemin:S,size:m.currState.bodies.map(d=>cv(d.radius,C,g,S,x))},mode:"markers"};let o={};if(this.simulation.getShowTrails()){const d=this.universeTrails[h];b.bodies.forEach(w=>{d.addTrail(w.position.x,w.position.y)}),o=d.data}return[u,o]});ov.react(F,l,e),this.simulation.showDebugInfo&&this.stats&&this.stats.update(),r=Math.round(r+this.simulation.controls.speed),r<0?this.simulation.looped?r=(r%p+p)%p:r=0:r>=p&&(this.simulation.looped?r%=p:r=p-1),this.animationId=requestAnimationFrame(n)};this.animationId=requestAnimationFrame(n)}stop(){var F;if(this.animationId!==null){cancelAnimationFrame(this.animationId),this.divId="",this.universeTrails=[];try{ov.purge(this.divId)}catch{}this.removeControls(),(F=this.stats)==null||F.dom.remove()}}}class RS{constructor(F){this.animationId=null,this.clear=()=>{},this.universeTrails=[],this.simulation=F}addControls(F){const q=new dv({container:F});q.domElement.style.position="absolute",q.domElement.style.top="0",q.domElement.style.left="0",q.domElement.style.zIndex="1000";const lt=this.simulation.controls;q.add(lt,"speed"),q.add(lt,"showTrails").onChange(Zt=>{Zt===!1&&this.universeTrails.forEach(G=>{G.popAllTrails()}),lt.showTrails=Zt});const Dt=q.addFolder("Show Universe");Dt.open(!1),this.simulation.universes.forEach((Zt,G)=>{Dt.add(lt.showUniverse,Zt.label).onChange(U=>{U===!1&&this.universeTrails[G].popAllTrails(),lt.showUniverse[Zt.label]=U})}),this.gui=q}removeControls(){var F;(F=this.gui)==null||F.destroy()}start(F,q,lt,Dt,Zt){if(this.scene!==void 0){console.error("Simulation already playing. Stop the current playtime before initiating a new one.");return}let G=document.getElementById(F);if(G===null)return;let U=0,t=0,g=1/0;this.simulation.universes.forEach(m=>m.currState.bodies.forEach(h=>{for(let b=0;b<3;b++)U=Math.max(U,Math.abs(h.position.getComponent(b)));g=Math.min(g,h.radius),t=Math.max(t,h.radius)}));const C=.5*Math.min(lt,q)/U,i=.015*Math.min(lt,q),S=.04*Math.min(lt,q);this.scene=new x1;const x=new gp(q/-2,q/2,lt/2,lt/-2,0,1e10);x.position.set(0,0,Math.max(q,lt));const v=new y1;v.setSize(q,lt),v.autoClear=!1,G.appendChild(v.domElement);const p=new C1(x,v.domElement);p.listenToKeyEvents(window),p.update();const r=new M1(q);this.scene.add(r);const e=new L1(x,v.domElement);let a=[];this.simulation.universes.forEach(m=>{this.universeTrails.push(new R1(this.simulation.maxTrailLength,typeof m.color=="string"?m.color:m.color[0],this.scene,C)),m.currState.bodies.forEach((h,b)=>{const u=new xp(cv(h.radius,g,t,i,S),12,12),o=new rv;o.add(new K0(new A1(u),new yp({color:new ha(typeof m.color=="string"?m.color:m.color[b]),transparent:!0,opacity:.4}))),o.add(new Vs(u,new td({color:new ha(typeof m.color=="string"?m.color:m.color[b]),transparent:!0,opacity:.5,side:Nu}))),this.scene.add(o),o.position.copy(h.position.clone().multiplyScalar(C)),a.push(o)})}),this.simulation.showDebugInfo&&(this.stats=new wp,this.stats.dom.style.position="absolute",this.stats.dom.style.right="0px",this.stats.dom.style.removeProperty("left"),G.appendChild(this.stats.dom));const n=[],f=this.simulation.maxFrameRate*Dt;let c=1;this.simulation.universes.forEach(m=>{n.push([m.currState.clone()])});for(let m=0;m{n[b].push(h.currState.clone())});this.simulation.controller==="ui"&&this.addControls(G);const l=m=>{if(this.simulation.controls.speed===0||this.simulation.controls.paused){this.animationId=requestAnimationFrame(l),v.clear(),v.render(this.scene,x),e.render(v),p.update();return}let h=0;this.simulation.universes.forEach((b,u)=>{this.simulation.controls.showUniverse[b.label]?n[u][c].bodies.forEach(d=>{a[h].visible=!0,a[h].position.copy(d.position.clone().multiplyScalar(C)),this.simulation.controls.showTrails&&this.universeTrails[u].addTrail(a[h].position.clone()),h++}):b.currState.bodies.forEach(()=>{a[h].visible=!1,h++})}),this.simulation.showDebugInfo&&this.stats&&this.stats.update(),c=Math.round(c+this.simulation.controls.speed),c<0?this.simulation.looped?c=(c%f+f)%f:c=0:c>=f&&(this.simulation.looped?c%=f:c=f-1),this.animationId=requestAnimationFrame(l),v.clear(),v.render(this.scene,x),e.render(v),p.update()};this.clear=()=>{v.clear(),v.dispose(),a.forEach(m=>{m.children.forEach(h=>{h.geometry.dispose(),h.material.dispose()})})},this.animationId=requestAnimationFrame(l)}stop(){var F,q;this.animationId!==null&&(cancelAnimationFrame(this.animationId),(F=this.scene)==null||F.clear(),this.scene=void 0,this.clear(),this.clear=()=>{},this.universeTrails.forEach(lt=>{lt.popAllTrails()}),this.universeTrails=[],this.removeControls(),(q=this.stats)==null||q.dom.remove())}}class zS{constructor(F,{visType:q="2D",record:lt=!1,looped:Dt=!0,controller:Zt="none",showTrails:G=!1,showDebugInfo:U=!1,maxFrameRate:t=-1,maxTrailLength:g=100}){if(this.controls={speed:1,paused:!1,showTrails:!1,showUniverse:{}},this.universes=Array.isArray(F)?F:[F],this.universes.length>10)throw new Error("Too many universes");if(new Set(this.universes.map(i=>i.label)).size!==this.universes.length)throw new Error("Duplicate label in universes");this.controller=Zt,this.universes.forEach(i=>{this.controls.showUniverse[i.label]=!0}),this.controls.showTrails=G,this.showDebugInfo=U,this.maxFrameRate=t,this.maxTrailLength=g,this.looped=Dt,lt?(this.maxFrameRate=60,this.visualizer=q==="2D"?new PS(this):new RS(this)):this.visualizer=q==="2D"?new CS(this):new LS(this)}getSpeed(){return this.controls.speed}setSpeed(F){this.controller==="code"&&(this.controls.speed=F)}isPlaying(){return!this.controls.paused}pause(){this.controller==="code"&&(this.controls.paused=!0)}resume(){this.controller==="code"&&(this.controls.paused=!1)}getShowTrails(){return this.controls.showTrails}setShowTrails(F){this.controller==="code"&&(this.controls.showTrails=F)}getShowUniverse(F){return this.controls.showUniverse[F]}setShowUniverse(F,q){this.controller==="code"&&(this.controls.showUniverse[F]=q)}getMaxTrailLength(){return this.maxTrailLength}setMaxTrailLength(F){this.controller==="code"&&(this.maxTrailLength=F)}simulateStep(F){this.universes.forEach(q=>{q.simulateStep(F)})}start(F,q,lt,Dt=1,Zt=!1,G=1,U=1){if(G===void 0)throw new Error("recordFor must be defined if record is true");this.controls.paused=Zt,this.controls.speed=Dt,this.visualizer.start(F,q,lt,G,U)}stop(){this.visualizer.stop()}}class D1{constructor(F){if(F.currState===void 0)throw new Error("Missing Current State in Universe");if(F.simFunc===void 0)throw new Error("Missing Simulation Function in Universe");this.label=F.label===void 0?"Universe":F.label,this.prevState=F.prevState===void 0?F.currState:F.prevState,this.currState=F.currState,this.color=F.color===void 0?"rgba(255, 255, 255, 1)":F.color,this.simFunc=F.simFunc,this.transformations=F.transformations===void 0?[]:Array.isArray(F.transformations)?F.transformations:[F.transformations]}simulateStep(F){let q=this.simFunc.simulate(F,this.currState,this.prevState);this.prevState=this.currState,this.transformations.forEach(lt=>{q=lt.transform(q,F)}),this.currState=q}clone(){return new D1({prevState:this.prevState.clone(),currState:this.currState.clone(),color:this.color,label:this.label,simFunc:this.simFunc,transformations:this.transformations})}}export{Hy as C,S1 as G,FS as R,zS as S,D1 as U,bn as V,bp as a,IS as b}; diff --git a/docs/assets/WithTooltip-Y7J54OF7-gLBhxBwc.js b/docs/assets/WithTooltip-Y7J54OF7-C0NRGahW.js similarity index 56% rename from docs/assets/WithTooltip-Y7J54OF7-gLBhxBwc.js rename to docs/assets/WithTooltip-Y7J54OF7-C0NRGahW.js index e7160b5..1c1a69b 100644 --- a/docs/assets/WithTooltip-Y7J54OF7-gLBhxBwc.js +++ b/docs/assets/WithTooltip-Y7J54OF7-C0NRGahW.js @@ -1 +1 @@ -import{W as T,W as e,b as h}from"./index-iQvBBB1Z.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";export{T as WithToolTipState,e as WithTooltip,h as WithTooltipPure}; +import{W as T,W as e,b as h}from"./index-BLJ7OnYF.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";export{T as WithToolTipState,e as WithTooltip,h as WithTooltipPure}; diff --git a/docs/assets/formatter-B5HCVTEV-CN9GxRbj.js b/docs/assets/formatter-B5HCVTEV-rIjXEVKW.js similarity index 99% rename from docs/assets/formatter-B5HCVTEV-CN9GxRbj.js rename to docs/assets/formatter-B5HCVTEV-rIjXEVKW.js index 2dbe580..499126c 100644 --- a/docs/assets/formatter-B5HCVTEV-CN9GxRbj.js +++ b/docs/assets/formatter-B5HCVTEV-rIjXEVKW.js @@ -1,4 +1,4 @@ -var Qi=Object.defineProperty;var Zi=(e,t,r)=>t in e?Qi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _e=(e,t,r)=>(Zi(e,typeof t!="symbol"?t+"":t,r),r);import{m as ea}from"./index-iQvBBB1Z.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";var ta=Object.defineProperty,pu=(e,t)=>{for(var r in t)ta(e,r,{get:t[r],enumerable:!0})},hu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},se=(e,t,r)=>(hu(e,t,"read from private field"),r?r.call(e):t.get(e)),ra=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},na=(e,t,r,n)=>(hu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),du={};pu(du,{languages:()=>Vl,options:()=>zl,parsers:()=>Gu,printers:()=>Gl});var ua=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},O=ua,Br="string",xr="array",Tr="cursor",Bt="indent",xt="align",Lr="trim",Ye="group",Tt="fill",Lt="if-break",Nt="indent-if-break",Nr="line-suffix",qr="line-suffix-boundary",be="line",Pr="label",qt="break-parent",Du=new Set([Tr,Bt,xt,Lr,Ye,Tt,Lt,Nt,Nr,qr,be,Pr,qt]);function ia(e){if(typeof e=="string")return Br;if(Array.isArray(e))return xr;if(!e)return;let{type:t}=e;if(Du.has(t))return t}var Ir=ia,aa=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function sa(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', +var Qi=Object.defineProperty;var Zi=(e,t,r)=>t in e?Qi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _e=(e,t,r)=>(Zi(e,typeof t!="symbol"?t+"":t,r),r);import{m as ea}from"./index-BLJ7OnYF.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";var ta=Object.defineProperty,pu=(e,t)=>{for(var r in t)ta(e,r,{get:t[r],enumerable:!0})},hu=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},se=(e,t,r)=>(hu(e,t,"read from private field"),r?r.call(e):t.get(e)),ra=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},na=(e,t,r,n)=>(hu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),du={};pu(du,{languages:()=>Vl,options:()=>zl,parsers:()=>Gu,printers:()=>Gl});var ua=(e,t,r,n)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},O=ua,Br="string",xr="array",Tr="cursor",Bt="indent",xt="align",Lr="trim",Ye="group",Tt="fill",Lt="if-break",Nt="indent-if-break",Nr="line-suffix",qr="line-suffix-boundary",be="line",Pr="label",qt="break-parent",Du=new Set([Tr,Bt,xt,Lr,Ye,Tt,Lt,Nt,Nr,qr,be,Pr,qt]);function ia(e){if(typeof e=="string")return Br;if(Array.isArray(e))return xr;if(!e)return;let{type:t}=e;if(Du.has(t))return t}var Ir=ia,aa=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function sa(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}', Expected it to be 'string' or 'object'.`;if(Ir(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=aa([...Du].map(u=>`'${u}'`));return`Unexpected doc.type '${e.type}'. Expected it to be ${n}.`}var oa=class extends Error{constructor(t){super(sa(t));_e(this,"name","InvalidDocError");this.doc=t}},fu=oa,la=()=>{},ca=la;function we(e){return{type:Bt,contents:e}}function mu(e,t){return{type:xt,contents:t,n:e}}function q(e,t={}){return ca(t.expandedStates),{type:Ye,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function pa(e){return mu(Number.NEGATIVE_INFINITY,e)}function ha(e){return mu({type:"root"},e)}function gu(e){return{type:Tt,parts:e}}function bt(e,t="",r={}){return{type:Lt,breakContents:e,flatContents:t,groupId:r.groupId}}function da(e,t){return{type:Nt,contents:e,groupId:t.groupId,negate:t.negate}}var Ze={type:qt},Da={type:be,hard:!0},fa={type:be,hard:!0,literal:!0},L={type:be},I={type:be,soft:!0},A=[Da,Ze],ma=[fa,Ze];function et(e,t){let r=[];for(let n=0;n{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[r<0?t.length+r:r]:t.at(r)},Pt=ga;function Or(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let a=u(i);return r.set(i,a),a}function u(i){switch(Ir(i)){case xr:return t(i.map(n));case Tt:return t({...i,parts:i.parts.map(n)});case Lt:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case Ye:{let{expandedStates:a,contents:s}=i;return a?(a=a.map(n),s=a[0]):s=n(s),t({...i,contents:s,expandedStates:a})}case xt:case Bt:case Nt:case Pr:case Nr:return t({...i,contents:n(i.contents)});case Br:case Tr:case Lr:case qr:case be:case qt:return t(i);default:throw new fu(i)}}}function Ca(e){switch(Ir(e)){case Tt:if(e.parts.every(t=>t===""))return"";break;case Ye:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===Ye&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case xt:case Bt:case Nt:case Nr:if(!e.contents)return"";break;case Lt:if(!e.flatContents&&!e.breakContents)return"";break;case xr:{let t=[];for(let r of e){if(!r)continue;let[n,...u]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof Pt(!1,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...u)}return t.length===0?"":t.length===1?t[0]:t}case Br:case Tr:case Lr:case qr:case be:case Pr:case qt:break;default:throw new fu(e)}return e}function Fa(e){return Or(e,t=>Ca(t))}function G(e,t=ma){return Or(e,r=>typeof r=="string"?et(t,r.split(` `)):r)}var va=class extends Error{constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`);_e(this,"name","UnexpectedNodeError");this.node=t}},ya=va,lt="'",cn='"';function Ea(e,t){let r=t===!0||t===lt?lt:cn,n=r===lt?cn:lt,u=0,i=0;for(let a of e)a===r?u++:a===n&&i++;return u>i?n:r}var ba=Ea;function wa(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var U,Sa=class{constructor(e){ra(this,U,void 0),na(this,U,new Set(e))}getLeadingWhitespaceCount(e){let t=se(this,U),r=0;for(let n=0;n=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return se(this,U).has(e.charAt(0))}hasTrailingWhitespace(e){return se(this,U).has(Pt(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${wa([...se(this,U)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=se(this,U);return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=se(this,U);return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=se(this,U);return Array.prototype.every.call(e,r=>t.has(r))}};U=new WeakMap;var Aa=Sa,ka=[" ",` diff --git a/docs/assets/iframe-5rd2FdmP.js b/docs/assets/iframe-5rd2FdmP.js new file mode 100644 index 0000000..2cd94d2 --- /dev/null +++ b/docs/assets/iframe-5rd2FdmP.js @@ -0,0 +1,7 @@ +function __vite__mapDeps(indexes) { + if (!__vite__mapDeps.viteFileDeps) { + __vite__mapDeps.viteFileDeps = ["./Contribute-ByZEtrPP.js","./jsx-runtime-DRTy3Uxn.js","./index-BBkUAzwr.js","./index-z5U8iC57.js","./index-BLJ7OnYF.js","./index-PqR-_bA4.js","./index-DrlA5mbP.js","./index-DrFu-skq.js","./Force-CgPjTVej.js","./Intro-Z6LnQ2ID.js","./SimulateFunction-aqc1n8R8.js","./Transformation-Wi_BFfS_.js","./Install-BFyTOPa9.js","./Integration-HQa34VN9.js","./Nbody-L_Z_SugA.js","./QuickStart-VUvd4iNx.js","./Dimension.stories-DZuxSGLH.js","./Simulation-ChslY3aX.js","./Universe-PJ2jYdc8.js","./Universe-BHXwzv85.js","./Analemma.stories-AQ7QpHgD.js","./Transformation-D8slzxJF.js","./Intro-M1nOElhC.js","./Sun-Earth-BL7Vma6k.js","./Sun-Mars-CDIkeXEq.js","./54509 YORP-DLZ0e9ho.js","./HorseshoeOrbit.stories-CmfTDrnU.js","./HorseshoeOrbit-DyIihBPW.js","./Intro-d9UFjdxt.js","./SolarSystem-BfaEfycU.js","./SolarSystem.stories-CKTAJpEs.js","./Controller-Bx20WcyY.js","./Controller.stories-Cd5yycrz.js","./Debug-CuZDaDhW.js","./Debug.stories-Dvamq5az.js","./Dimension-B9GudtkL.js","./Intro-EjW6Vlu5.js","./Multiverse-AyMvfeqa.js","./Multiverse.stories-Vo2-9zik.js","./Record-B6rA6KjA.js","./Record.stories-Cn0MdLuR.js","./Trails-B4BB4YNG.js","./Trails.stories-BRC0C8d9.js","./entry-preview-kGuIN3g4.js","./react-18-B-OKcmzb.js","./entry-preview-docs-Db1JGYqY.js","./preview-CwqMn10d.js","./preview-BAz7FMXc.js"] + } + return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) +} +import"../sb-preview/runtime.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))a(t);new MutationObserver(t=>{for(const r of t)if(r.type==="childList")for(const e of r.addedNodes)e.tagName==="LINK"&&e.rel==="modulepreload"&&a(e)}).observe(document,{childList:!0,subtree:!0});function m(t){const r={};return t.integrity&&(r.integrity=t.integrity),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?r.credentials="include":t.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(t){if(t.ep)return;t.ep=!0;const r=m(t);fetch(t.href,r)}})();const y="modulepreload",R=function(_,n){return new URL(_,n).href},p={},o=function(n,m,a){let t=Promise.resolve();if(m&&m.length>0){const r=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),E=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));t=Promise.all(m.map(i=>{if(i=R(i,a),i in p)return;p[i]=!0;const u=i.endsWith(".css"),O=u?'[rel="stylesheet"]':"";if(!!a)for(let l=r.length-1;l>=0;l--){const c=r[l];if(c.href===i&&(!u||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${O}`))return;const s=document.createElement("link");if(s.rel=u?"stylesheet":y,u||(s.as="script",s.crossOrigin=""),s.href=i,E&&s.setAttribute("nonce",E),document.head.appendChild(s),u)return new Promise((l,c)=>{s.addEventListener("load",l),s.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${i}`)))})}))}return t.then(()=>n()).catch(r=>{const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r})},{createBrowserChannel:P}=__STORYBOOK_MODULE_CHANNELS__,{addons:T}=__STORYBOOK_MODULE_PREVIEW_API__,d=P({page:"preview"});T.setChannel(d);window.__STORYBOOK_ADDONS_CHANNEL__=d;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=d);const V={"./.storybook/stories/Contribute.mdx":async()=>o(()=>import("./Contribute-ByZEtrPP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Force.mdx":async()=>o(()=>import("./Force-CgPjTVej.js"),__vite__mapDeps([8,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Intro.mdx":async()=>o(()=>import("./Intro-Z6LnQ2ID.js"),__vite__mapDeps([9,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/SimulateFunction.mdx":async()=>o(()=>import("./SimulateFunction-aqc1n8R8.js"),__vite__mapDeps([10,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Transformation.mdx":async()=>o(()=>import("./Transformation-Wi_BFfS_.js"),__vite__mapDeps([11,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Install.mdx":async()=>o(()=>import("./Install-BFyTOPa9.js"),__vite__mapDeps([12,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Integration.mdx":async()=>o(()=>import("./Integration-HQa34VN9.js"),__vite__mapDeps([13,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Nbody.mdx":async()=>o(()=>import("./Nbody-L_Z_SugA.js"),__vite__mapDeps([14,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/QuickStart.mdx":async()=>o(()=>import("./QuickStart-VUvd4iNx.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,16,17,18,19]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Analemma.stories.tsx":async()=>o(()=>import("./Analemma.stories-AQ7QpHgD.js"),__vite__mapDeps([20,1,2,18,21]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Intro.mdx":async()=>o(()=>import("./Intro-M1nOElhC.js"),__vite__mapDeps([22,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Sun-Earth.mdx":async()=>o(()=>import("./Sun-Earth-BL7Vma6k.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,20,18,21]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Sun-Mars.mdx":async()=>o(()=>import("./Sun-Mars-CDIkeXEq.js"),__vite__mapDeps([24,1,2,3,4,5,6,7,20,18,21]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/54509 YORP.mdx":async()=>o(()=>import("./54509 YORP-DLZ0e9ho.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,26,17,18,21]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.mdx":async()=>o(()=>import("./HorseshoeOrbit-DyIihBPW.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,26,17,18,21]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx":async()=>o(()=>import("./HorseshoeOrbit.stories-CmfTDrnU.js"),__vite__mapDeps([26,17,1,2,18,21]),import.meta.url),"./.storybook/stories/Showcase/Intro.mdx":async()=>o(()=>import("./Intro-d9UFjdxt.js"),__vite__mapDeps([28,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Showcase/SolarSystem/SolarSystem.mdx":async()=>o(()=>import("./SolarSystem-BfaEfycU.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,30,17,18,19]),import.meta.url),"./.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx":async()=>o(()=>import("./SolarSystem.stories-CKTAJpEs.js"),__vite__mapDeps([30,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Controller/Controller.mdx":async()=>o(()=>import("./Controller-Bx20WcyY.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,32,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Controller/Controller.stories.tsx":async()=>o(()=>import("./Controller.stories-Cd5yycrz.js"),__vite__mapDeps([32,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Debug Info/Debug.mdx":async()=>o(()=>import("./Debug-CuZDaDhW.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,34,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx":async()=>o(()=>import("./Debug.stories-Dvamq5az.js"),__vite__mapDeps([34,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Dimension/Dimension.mdx":async()=>o(()=>import("./Dimension-B9GudtkL.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,16,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx":async()=>o(()=>import("./Dimension.stories-DZuxSGLH.js"),__vite__mapDeps([16,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Intro.mdx":async()=>o(()=>import("./Intro-EjW6Vlu5.js"),__vite__mapDeps([36,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Visualize/Multiverse/Multiverse.mdx":async()=>o(()=>import("./Multiverse-AyMvfeqa.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,38,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx":async()=>o(()=>import("./Multiverse.stories-Vo2-9zik.js"),__vite__mapDeps([38,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Record/Record.mdx":async()=>o(()=>import("./Record-B6rA6KjA.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,40,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Record/Record.stories.tsx":async()=>o(()=>import("./Record.stories-Cn0MdLuR.js"),__vite__mapDeps([40,17,1,2,18,19]),import.meta.url),"./.storybook/stories/Visualize/Trails/Trails.mdx":async()=>o(()=>import("./Trails-B4BB4YNG.js"),__vite__mapDeps([41,1,2,3,4,5,6,7,42,17,18,19]),import.meta.url),"./.storybook/stories/Visualize/Trails/Trails.stories.tsx":async()=>o(()=>import("./Trails.stories-BRC0C8d9.js"),__vite__mapDeps([42,17,1,2,18,19]),import.meta.url)};async function v(_){return V[_]()}const{composeConfigs:D,PreviewWeb:I,ClientApi:b}=__STORYBOOK_MODULE_PREVIEW_API__,A=async()=>{const _=await Promise.all([o(()=>import("./entry-preview-kGuIN3g4.js"),__vite__mapDeps([43,2,44,5]),import.meta.url),o(()=>import("./entry-preview-docs-Db1JGYqY.js"),__vite__mapDeps([45,6,2,7]),import.meta.url),o(()=>import("./preview-MHbL11ZG.js"),[],import.meta.url),o(()=>import("./preview-CwqMn10d.js"),__vite__mapDeps([46,7]),import.meta.url),o(()=>import("./preview-B4GcaC1c.js"),[],import.meta.url),o(()=>import("./preview-Db4Idchh.js"),[],import.meta.url),o(()=>import("./preview-BAz7FMXc.js"),__vite__mapDeps([47,7]),import.meta.url),o(()=>import("./preview-Cv3rAi2i.js"),[],import.meta.url),o(()=>import("./preview-m58XexFJ.js"),[],import.meta.url)]);return D(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new I(v,A);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{o as _}; diff --git a/docs/assets/iframe-C3OM9s_A.js b/docs/assets/iframe-C3OM9s_A.js deleted file mode 100644 index 1c92b2e..0000000 --- a/docs/assets/iframe-C3OM9s_A.js +++ /dev/null @@ -1,7 +0,0 @@ -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./Contribute-DyWf3n8a.js","./jsx-runtime-DRTy3Uxn.js","./index-BBkUAzwr.js","./index-z5U8iC57.js","./index-iQvBBB1Z.js","./index-PqR-_bA4.js","./index-DrlA5mbP.js","./index-DrFu-skq.js","./Force-DULVW8v9.js","./Intro-CLahxizt.js","./SimulateFunction-DCH_HW37.js","./Transformation-BDRML62g.js","./Install-BXrzk_ma.js","./Integration-AjHreSnD.js","./Nbody-CxxSf_jl.js","./QuickStart-D3GHxeRp.js","./Dimension.stories-BWmrmXNV.js","./Simulation-7H4WISkI.js","./Universe-DrO6ncQG.js","./Analemma-Iy1rkUoS.js","./Analemma.stories-CHKHhkqr.js","./Transformation-KUb0IKcR.js","./Sun-Earth-BKKYWkEY.js","./54509 YORP-OMNIj1fz.js","./HorseshoeOrbit.stories-BMFTqkxu.js","./HorseshoeOrbit-C7UQkWZK.js","./Intro-CImMAE62.js","./SolarSystem-Dp_t01xV.js","./SolarSystem.stories-CVC3sKTl.js","./Controller-DZoLtyi4.js","./Controller.stories-DG1QIQlB.js","./Debug-cu0XayVm.js","./Debug.stories-C9fkCxNd.js","./Dimension-q3qUdgUC.js","./Intro-NACn9ZVr.js","./Multiverse-CRf5xCsB.js","./Multiverse.stories-u1FjssdI.js","./Record-A_-7v384.js","./Record.stories-CIwO-28m.js","./Trails-CEoBnGe5.js","./Trails.stories-CqQYYREo.js","./entry-preview-kGuIN3g4.js","./react-18-B-OKcmzb.js","./entry-preview-docs-Db1JGYqY.js","./preview-CwqMn10d.js","./preview-BAz7FMXc.js"] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -} -import"../sb-preview/runtime.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))a(t);new MutationObserver(t=>{for(const r of t)if(r.type==="childList")for(const e of r.addedNodes)e.tagName==="LINK"&&e.rel==="modulepreload"&&a(e)}).observe(document,{childList:!0,subtree:!0});function m(t){const r={};return t.integrity&&(r.integrity=t.integrity),t.referrerPolicy&&(r.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?r.credentials="include":t.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(t){if(t.ep)return;t.ep=!0;const r=m(t);fetch(t.href,r)}})();const y="modulepreload",R=function(_,n){return new URL(_,n).href},p={},o=function(n,m,a){let t=Promise.resolve();if(m&&m.length>0){const r=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),E=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));t=Promise.all(m.map(i=>{if(i=R(i,a),i in p)return;p[i]=!0;const u=i.endsWith(".css"),O=u?'[rel="stylesheet"]':"";if(!!a)for(let l=r.length-1;l>=0;l--){const c=r[l];if(c.href===i&&(!u||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${O}`))return;const s=document.createElement("link");if(s.rel=u?"stylesheet":y,u||(s.as="script",s.crossOrigin=""),s.href=i,E&&s.setAttribute("nonce",E),document.head.appendChild(s),u)return new Promise((l,c)=>{s.addEventListener("load",l),s.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${i}`)))})}))}return t.then(()=>n()).catch(r=>{const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r})},{createBrowserChannel:P}=__STORYBOOK_MODULE_CHANNELS__,{addons:T}=__STORYBOOK_MODULE_PREVIEW_API__,d=P({page:"preview"});T.setChannel(d);window.__STORYBOOK_ADDONS_CHANNEL__=d;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=d);const V={"./.storybook/stories/Contribute.mdx":async()=>o(()=>import("./Contribute-DyWf3n8a.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Force.mdx":async()=>o(()=>import("./Force-DULVW8v9.js"),__vite__mapDeps([8,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Intro.mdx":async()=>o(()=>import("./Intro-CLahxizt.js"),__vite__mapDeps([9,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/SimulateFunction.mdx":async()=>o(()=>import("./SimulateFunction-DCH_HW37.js"),__vite__mapDeps([10,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Define/Transformation.mdx":async()=>o(()=>import("./Transformation-BDRML62g.js"),__vite__mapDeps([11,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Install.mdx":async()=>o(()=>import("./Install-BXrzk_ma.js"),__vite__mapDeps([12,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Integration.mdx":async()=>o(()=>import("./Integration-AjHreSnD.js"),__vite__mapDeps([13,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Nbody.mdx":async()=>o(()=>import("./Nbody-CxxSf_jl.js"),__vite__mapDeps([14,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/QuickStart.mdx":async()=>o(()=>import("./QuickStart-D3GHxeRp.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,16,17,18]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Analemma.mdx":async()=>o(()=>import("./Analemma-Iy1rkUoS.js"),__vite__mapDeps([19,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Analemma.stories.tsx":async()=>o(()=>import("./Analemma.stories-CHKHhkqr.js"),__vite__mapDeps([20,17,1,2,21]),import.meta.url),"./.storybook/stories/Showcase/Analemma/Sun-Earth.mdx":async()=>o(()=>import("./Sun-Earth-BKKYWkEY.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,20,17,21]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/54509 YORP.mdx":async()=>o(()=>import("./54509 YORP-OMNIj1fz.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,24,17,21]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.mdx":async()=>o(()=>import("./HorseshoeOrbit-C7UQkWZK.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,24,17,21]),import.meta.url),"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx":async()=>o(()=>import("./HorseshoeOrbit.stories-BMFTqkxu.js"),__vite__mapDeps([24,17,1,2,21]),import.meta.url),"./.storybook/stories/Showcase/Intro.mdx":async()=>o(()=>import("./Intro-CImMAE62.js"),__vite__mapDeps([26,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Showcase/SolarSystem/SolarSystem.mdx":async()=>o(()=>import("./SolarSystem-Dp_t01xV.js"),__vite__mapDeps([27,1,2,3,4,5,6,7,28,17,18]),import.meta.url),"./.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx":async()=>o(()=>import("./SolarSystem.stories-CVC3sKTl.js"),__vite__mapDeps([28,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Controller/Controller.mdx":async()=>o(()=>import("./Controller-DZoLtyi4.js"),__vite__mapDeps([29,1,2,3,4,5,6,7,30,17,18]),import.meta.url),"./.storybook/stories/Visualize/Controller/Controller.stories.tsx":async()=>o(()=>import("./Controller.stories-DG1QIQlB.js"),__vite__mapDeps([30,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Debug Info/Debug.mdx":async()=>o(()=>import("./Debug-cu0XayVm.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,32,17,18]),import.meta.url),"./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx":async()=>o(()=>import("./Debug.stories-C9fkCxNd.js"),__vite__mapDeps([32,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Dimension/Dimension.mdx":async()=>o(()=>import("./Dimension-q3qUdgUC.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,16,17,18]),import.meta.url),"./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx":async()=>o(()=>import("./Dimension.stories-BWmrmXNV.js"),__vite__mapDeps([16,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Intro.mdx":async()=>o(()=>import("./Intro-NACn9ZVr.js"),__vite__mapDeps([34,1,2,3,4,5,6,7]),import.meta.url),"./.storybook/stories/Visualize/Multiverse/Multiverse.mdx":async()=>o(()=>import("./Multiverse-CRf5xCsB.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,36,17,18]),import.meta.url),"./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx":async()=>o(()=>import("./Multiverse.stories-u1FjssdI.js"),__vite__mapDeps([36,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Record/Record.mdx":async()=>o(()=>import("./Record-A_-7v384.js"),__vite__mapDeps([37,1,2,3,4,5,6,7,38,17,18]),import.meta.url),"./.storybook/stories/Visualize/Record/Record.stories.tsx":async()=>o(()=>import("./Record.stories-CIwO-28m.js"),__vite__mapDeps([38,17,1,2,18]),import.meta.url),"./.storybook/stories/Visualize/Trails/Trails.mdx":async()=>o(()=>import("./Trails-CEoBnGe5.js"),__vite__mapDeps([39,1,2,3,4,5,6,7,40,17,18]),import.meta.url),"./.storybook/stories/Visualize/Trails/Trails.stories.tsx":async()=>o(()=>import("./Trails.stories-CqQYYREo.js"),__vite__mapDeps([40,17,1,2,18]),import.meta.url)};async function v(_){return V[_]()}const{composeConfigs:D,PreviewWeb:A,ClientApi:b}=__STORYBOOK_MODULE_PREVIEW_API__,I=async()=>{const _=await Promise.all([o(()=>import("./entry-preview-kGuIN3g4.js"),__vite__mapDeps([41,2,42,5]),import.meta.url),o(()=>import("./entry-preview-docs-Db1JGYqY.js"),__vite__mapDeps([43,6,2,7]),import.meta.url),o(()=>import("./preview-DClWTqGL.js"),[],import.meta.url),o(()=>import("./preview-CwqMn10d.js"),__vite__mapDeps([44,7]),import.meta.url),o(()=>import("./preview-B4GcaC1c.js"),[],import.meta.url),o(()=>import("./preview-Db4Idchh.js"),[],import.meta.url),o(()=>import("./preview-BAz7FMXc.js"),__vite__mapDeps([45,7]),import.meta.url),o(()=>import("./preview-Cv3rAi2i.js"),[],import.meta.url),o(()=>import("./preview-C7c1sqri.js"),[],import.meta.url)]);return D(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new A(v,I);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{o as _}; diff --git a/docs/assets/index-iQvBBB1Z.js b/docs/assets/index-BLJ7OnYF.js similarity index 99% rename from docs/assets/index-iQvBBB1Z.js rename to docs/assets/index-BLJ7OnYF.js index 8a2eced..d8e069a 100644 --- a/docs/assets/index-iQvBBB1Z.js +++ b/docs/assets/index-BLJ7OnYF.js @@ -1,10 +1,10 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./syntaxhighlighter-JOJW2KGS-DUP3RXnD.js","./iframe-C3OM9s_A.js","./index-BBkUAzwr.js","./index-PqR-_bA4.js","./index-DrlA5mbP.js","./index-DrFu-skq.js","./formatter-B5HCVTEV-CN9GxRbj.js","./WithTooltip-Y7J54OF7-gLBhxBwc.js","./Color-RQJUDNI5-roFcWcLK.js"] + __vite__mapDeps.viteFileDeps = ["./syntaxhighlighter-JOJW2KGS-psPRdUjt.js","./iframe-5rd2FdmP.js","./index-BBkUAzwr.js","./index-PqR-_bA4.js","./index-DrlA5mbP.js","./index-DrFu-skq.js","./formatter-B5HCVTEV-rIjXEVKW.js","./WithTooltip-Y7J54OF7-C0NRGahW.js","./Color-RQJUDNI5-DeQMaR6o.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -import{_ as Ft}from"./iframe-C3OM9s_A.js";import{r as o,b as Tl,g as On,R as p,c as ta}from"./index-BBkUAzwr.js";import{r as E0,R as ed}from"./index-PqR-_bA4.js";import{q as S0,r as td,s as C0,t as rd,i as Tn,v as nd,w as ad,x as od,c as R0,y as I0,z as ld,A as A0,B as id,C as sd,D as cd,E as dd,F as ud,G as pd,H as _0,I as fd,J as hd,K as k0,_ as gd,L as md,M as vd,N as ho,d as O0,O as T0,P as M0,Q as bd,R as yd,U as wd,e as xd,S as Ml,k as ra}from"./index-DrlA5mbP.js";import{d as Ed}from"./index-DrFu-skq.js";var Fe=e=>`control-${e.replace(/\s+/g,"-")}`,Mn=e=>`set-${e.replace(/\s+/g,"-")}`;const{global:Sd}=__STORYBOOK_MODULE_GLOBAL__,{logger:Cd}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var Rd=Object.create,$0=Object.defineProperty,Id=Object.getOwnPropertyDescriptor,L0=Object.getOwnPropertyNames,Ad=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty,go=(e,t)=>function(){return t||(0,e[L0(e)[0]])((t={exports:{}}).exports,t),t.exports},kd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of L0(t))!_d.call(e,a)&&a!==r&&$0(e,a,{get:()=>t[a],enumerable:!(n=Id(t,a))||n.enumerable});return e},z0=(e,t,r)=>(r=e!=null?Rd(Ad(e)):{},kd(t||!e||!e.__esModule?$0(r,"default",{value:e,enumerable:!0}):r,e));function vt(){return vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sn(e,t,r){return $d()?sn=Reflect.construct.bind():sn=function(n,a,l){var i=[null];i.push.apply(i,a);var c=Function.bind.apply(n,i),s=new c;return l&&Ar(s,l.prototype),s},sn.apply(null,arguments)}function za(e){var t=typeof Map=="function"?new Map:void 0;return za=function(r){if(r===null||!Md(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return sn(r,arguments,La(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ar(n,r)},za(e)}var Ld={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }). +import{_ as Ft}from"./iframe-5rd2FdmP.js";import{r as o,b as Tl,g as On,R as p,c as ta}from"./index-BBkUAzwr.js";import{r as E0,R as ed}from"./index-PqR-_bA4.js";import{q as S0,r as td,s as C0,t as rd,i as Tn,v as nd,w as ad,x as od,c as R0,y as I0,z as ld,A as A0,B as id,C as sd,D as cd,E as dd,F as ud,G as pd,H as _0,I as fd,J as hd,K as k0,_ as gd,L as md,M as vd,N as ho,d as O0,O as T0,P as M0,Q as bd,R as yd,U as wd,e as xd,S as Ml,k as ra}from"./index-DrlA5mbP.js";import{d as Ed}from"./index-DrFu-skq.js";var Fe=e=>`control-${e.replace(/\s+/g,"-")}`,Mn=e=>`set-${e.replace(/\s+/g,"-")}`;const{global:Sd}=__STORYBOOK_MODULE_GLOBAL__,{logger:Cd}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var Rd=Object.create,$0=Object.defineProperty,Id=Object.getOwnPropertyDescriptor,L0=Object.getOwnPropertyNames,Ad=Object.getPrototypeOf,_d=Object.prototype.hasOwnProperty,go=(e,t)=>function(){return t||(0,e[L0(e)[0]])((t={exports:{}}).exports,t),t.exports},kd=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of L0(t))!_d.call(e,a)&&a!==r&&$0(e,a,{get:()=>t[a],enumerable:!(n=Id(t,a))||n.enumerable});return e},z0=(e,t,r)=>(r=e!=null?Rd(Ad(e)):{},kd(t||!e||!e.__esModule?$0(r,"default",{value:e,enumerable:!0}):r,e));function vt(){return vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sn(e,t,r){return $d()?sn=Reflect.construct.bind():sn=function(n,a,l){var i=[null];i.push.apply(i,a);var c=Function.bind.apply(n,i),s=new c;return l&&Ar(s,l.prototype),s},sn.apply(null,arguments)}function za(e){var t=typeof Map=="function"?new Map:void 0;return za=function(r){if(r===null||!Md(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return sn(r,arguments,La(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Ar(n,r)},za(e)}var Ld={1:`Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }). `,2:`Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }). @@ -370,9 +370,9 @@ To pass a single animation please supply them in simple values, e.g. animation(' `,77:`remToPx expects a value in "rem" but you provided it in "%s". `,78:`base must be set in "px" or "%" but you set it in "%s". -`};function d3(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),i=1;i=0&&a<1?(c=l,s=i):a>=1&&a<2?(c=i,s=l):a>=2&&a<3?(s=l,d=i):a>=3&&a<4?(s=i,d=l):a>=4&&a<5?(c=i,d=l):a>=5&&a<6&&(c=l,d=i);var u=r-l/2,h=c+u,g=s+u,f=d+u;return n(h,g,f)}var Ei={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function p3(e){if(typeof e!="string")return e;var t=e.toLowerCase();return Ei[t]?"#"+Ei[t]:e}var f3=/^#[a-fA-F0-9]{6}$/,h3=/^#[a-fA-F0-9]{8}$/,g3=/^#[a-fA-F0-9]{3}$/,m3=/^#[a-fA-F0-9]{4}$/,ga=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,v3=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,b3=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,y3=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Yo(e){if(typeof e!="string")throw new tt(3);var t=p3(e);if(t.match(f3))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(h3)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(g3))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(m3)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var a=ga.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var l=v3.exec(t.substring(0,50));if(l)return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10),alpha:parseFloat(""+l[4])>1?parseFloat(""+l[4])/100:parseFloat(""+l[4])};var i=b3.exec(t);if(i){var c=parseInt(""+i[1],10),s=parseInt(""+i[2],10)/100,d=parseInt(""+i[3],10)/100,u="rgb("+Pr(c,s,d)+")",h=ga.exec(u);if(!h)throw new tt(4,t,u);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10)}}var g=y3.exec(t.substring(0,50));if(g){var f=parseInt(""+g[1],10),v=parseInt(""+g[2],10)/100,m=parseInt(""+g[3],10)/100,E="rgb("+Pr(f,v,m)+")",x=ga.exec(E);if(!x)throw new tt(4,t,E);return{red:parseInt(""+x[1],10),green:parseInt(""+x[2],10),blue:parseInt(""+x[3],10),alpha:parseFloat(""+g[4])>1?parseFloat(""+g[4])/100:parseFloat(""+g[4])}}throw new tt(5)}function w3(e){var t=e.red/255,r=e.green/255,n=e.blue/255,a=Math.max(t,r,n),l=Math.min(t,r,n),i=(a+l)/2;if(a===l)return e.alpha!==void 0?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var c,s=a-l,d=i>.5?s/(2-a-l):s/(a+l);switch(a){case t:c=(r-n)/s+(r=1?Rn(e,t,r):"rgba("+Pr(e,t,r)+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Rn(e.hue,e.saturation,e.lightness):"rgba("+Pr(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new tt(2)}function Ja(e,t,r){if(typeof e=="number"&&typeof t=="number"&&typeof r=="number")return Za("#"+_t(e)+_t(t)+_t(r));if(typeof e=="object"&&t===void 0&&r===void 0)return Za("#"+_t(e.red)+_t(e.green)+_t(e.blue));throw new tt(6)}function In(e,t,r,n){if(typeof e=="string"&&typeof t=="number"){var a=Yo(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}else{if(typeof e=="number"&&typeof t=="number"&&typeof r=="number"&&typeof n=="number")return n>=1?Ja(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Ja(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new tt(7)}var R3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},I3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"},A3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},_3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"};function sc(e){if(typeof e!="object")throw new tt(8);if(I3(e))return In(e);if(R3(e))return Ja(e);if(_3(e))return C3(e);if(A3(e))return S3(e);throw new tt(8)}function cc(e,t,r){return function(){var n=r.concat(Array.prototype.slice.call(arguments));return n.length>=t?e.apply(this,n):cc(e,t,n)}}function Ko(e){return cc(e,e.length,[])}function Xo(e,t,r){return Math.max(e,Math.min(t,r))}function k3(e,t){if(t==="transparent")return t;var r=ic(t);return sc(G({},r,{lightness:Xo(0,1,r.lightness-parseFloat(e))}))}var O3=Ko(k3),Zt=O3;function T3(e,t){if(t==="transparent")return t;var r=ic(t);return sc(G({},r,{lightness:Xo(0,1,r.lightness+parseFloat(e))}))}var M3=Ko(T3),Si=M3;function $3(e,t){if(t==="transparent")return t;var r=Yo(t),n=typeof r.alpha=="number"?r.alpha:1,a=G({},r,{alpha:Xo(0,1,+(n*100-parseFloat(e)*100).toFixed(2)/100)});return In(a)}var L3=Ko($3),Oe=L3,ur=({theme:e})=>({margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}}),ut=({theme:e})=>({lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?Oe(.1,e.color.defaultText):Oe(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border}),re=({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"}),Ut={margin:"16px 0"},z3=({href:e,...t})=>{let r=/^\//.test(e)?`./?path=${e}`:e,n=/^#.*/.test(e)?"_self":"_top";return p.createElement("a",{href:r,target:n,...t})},dc=A(z3)(re,({theme:e})=>({fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}})),uc=A.blockquote(re,Ut,({theme:e})=>({borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}})),B3=e=>typeof e=="string",P3=/[\n\r]/g,H3=A.code(({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"inline-block",paddingLeft:2,paddingRight:2,verticalAlign:"baseline",color:"inherit"}),ut),F3=A(Po)(({theme:e})=>({fontFamily:e.typography.fonts.mono,fontSize:`${e.typography.size.s2-1}px`,lineHeight:"19px",margin:"25px 0 40px",borderRadius:e.appBorderRadius,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}})),Zo=({className:e,children:t,...r})=>{let n=(e||"").match(/lang-(\S+)/),a=o.Children.toArray(t);return a.filter(B3).some(l=>l.match(P3))?p.createElement(F3,{bordered:!0,copyable:!0,language:(n==null?void 0:n[1])??"text",format:!1,...r},t):p.createElement(H3,{...r,className:e},a)},pc=A.div(re),fc=A.dl(re,Ut,{padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}}),hc=A.h1(re,ur,({theme:e})=>({fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold})),Jo=A.h2(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`})),Qo=A.h3(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m1}px`})),gc=A.h4(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s3}px`})),mc=A.h5(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`})),vc=A.h6(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`,color:e.color.dark})),bc=A.hr(({theme:e})=>({border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0})),yc=A.img({maxWidth:"100%"}),wc=A.li(re,({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":ut({theme:e})})),j3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},xc=A.ol(re,Ut,j3,{listStyle:"decimal"}),Ec=A.p(re,Ut,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":ut({theme:e})})),Sc=A.pre(re,Ut,({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}})),Cc=A.span(re,({theme:e})=>({"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}})),Rc=A.table(re,Ut,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base==="dark"?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}})),Ic=A.title(ut),N3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},Ac=A.ul(re,Ut,N3,{listStyle:"disc"}),el=A.div(re),_c={h1:e=>p.createElement(hc,{...te(e,"h1")}),h2:e=>p.createElement(Jo,{...te(e,"h2")}),h3:e=>p.createElement(Qo,{...te(e,"h3")}),h4:e=>p.createElement(gc,{...te(e,"h4")}),h5:e=>p.createElement(mc,{...te(e,"h5")}),h6:e=>p.createElement(vc,{...te(e,"h6")}),pre:e=>p.createElement(Sc,{...te(e,"pre")}),a:e=>p.createElement(dc,{...te(e,"a")}),hr:e=>p.createElement(bc,{...te(e,"hr")}),dl:e=>p.createElement(fc,{...te(e,"dl")}),blockquote:e=>p.createElement(uc,{...te(e,"blockquote")}),table:e=>p.createElement(Rc,{...te(e,"table")}),img:e=>p.createElement(yc,{...te(e,"img")}),div:e=>p.createElement(pc,{...te(e,"div")}),span:e=>p.createElement(Cc,{...te(e,"span")}),li:e=>p.createElement(wc,{...te(e,"li")}),ul:e=>p.createElement(Ac,{...te(e,"ul")}),ol:e=>p.createElement(xc,{...te(e,"ol")}),p:e=>p.createElement(Ec,{...te(e,"p")}),code:e=>p.createElement(Zo,{...te(e,"code")}),tt:e=>p.createElement(Ic,{...te(e,"tt")}),resetwrapper:e=>p.createElement(el,{...te(e,"resetwrapper")})},D3=A.div(({theme:e})=>({display:"inline-block",fontSize:11,lineHeight:"12px",alignSelf:"center",padding:"4px 12px",borderRadius:"3em",fontWeight:e.typography.weight.bold}),{svg:{height:12,width:12,marginRight:4,marginTop:-2,path:{fill:"currentColor"}}},({theme:e,status:t})=>{switch(t){case"critical":return{color:e.color.critical,background:e.background.critical};case"negative":return{color:e.color.negativeText,background:e.background.negative,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.negativeText)}`:"none"};case"warning":return{color:e.color.warningText,background:e.background.warning,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.warningText)}`:"none"};case"neutral":return{color:e.color.dark,background:e.color.mediumlight,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.dark)}`:"none"};case"positive":return{color:e.color.positiveText,background:e.background.positive,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.positiveText)}`:"none"};default:return{}}}),V3=({...e})=>p.createElement(D3,{...e}),U3=0,W3=e=>e.button===U3&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,q3=(e,t)=>{W3(e)&&(e.preventDefault(),t(e))},G3=A.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{},({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{}),Y3=A.a(({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:Zt(.07,e.color.secondary),"svg path:not([fill])":{fill:Zt(.07,e.color.secondary)}},"&:active":{color:Zt(.1,e.color.secondary),"svg path:not([fill])":{fill:Zt(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}},({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{}),Bt=({cancel:e=!0,children:t,onClick:r=void 0,withArrow:n=!1,containsIcon:a=!1,className:l=void 0,style:i=void 0,...c})=>p.createElement(Y3,{...c,onClick:r&&e?s=>q3(s,r):r,className:l},p.createElement(G3,{withArrow:n,containsIcon:a},t,n&&p.createElement(qo,null))),K3=A.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"span.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"span.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base==="dark"&&e.color.darkest}})),Pt=[],lr=null,X3=o.lazy(async()=>{let{SyntaxHighlighter:e}=await Ft(()=>import("./syntaxhighlighter-JOJW2KGS-DUP3RXnD.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);return Pt.length>0&&(Pt.forEach(t=>{e.registerLanguage(...t)}),Pt=[]),lr===null&&(lr=e),{default:t=>p.createElement(e,{...t})}}),Z3=o.lazy(async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([Ft(()=>import("./syntaxhighlighter-JOJW2KGS-DUP3RXnD.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Ft(()=>import("./formatter-B5HCVTEV-CN9GxRbj.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url)]);return Pt.length>0&&(Pt.forEach(r=>{e.registerLanguage(...r)}),Pt=[]),lr===null&&(lr=e),{default:r=>p.createElement(e,{...r,formatter:t})}}),Wn=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},e.format!==!1?p.createElement(Z3,{...e}):p.createElement(X3,{...e}));Wn.registerLanguage=(...e)=>{if(lr!==null){lr.registerLanguage(...e);return}Pt.push(e)};var J3=e=>typeof e=="number"?e:Number(e),Q3=A.div(({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${Da}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${Da}`]:{marginTop:0}},({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!!(t&&r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),e7=({col:e,row:t,outer:r,children:n,...a})=>{let l=J3(typeof r=="number"||!r?r:e||t);return p.createElement(Q3,{col:e,row:t,outer:l,...a},n)},t7=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),r7=A.div(),n7=A.div(({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})),a7=({children:e,...t})=>{let[r,n]=o.Children.toArray(e);return p.createElement(n7,{...t},p.createElement(t7,null,r),n&&p.createElement(r7,null,n))};function o7(e,t){var r=o.useRef(null),n=o.useRef(null);n.current=t;var a=o.useRef(null);o.useEffect(function(){l()});var l=o.useCallback(function(){var i=a.current,c=n.current,s=i||(c?c instanceof Element?c:c.current:null);r.current&&r.current.element===s&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:s,subscriber:e,cleanup:s?e(s):void 0})},[e]);return o.useEffect(function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}},[]),o.useCallback(function(i){a.current=i,l()},[l])}function Ci(e,t,r){return e[t]?e[t][0]?e[t][0][r]:e[t][r]:t==="contentBoxSize"?e.contentRect[r==="inlineSize"?"width":"height"]:void 0}function kc(e){e===void 0&&(e={});var t=e.onResize,r=o.useRef(void 0);r.current=t;var n=e.round||Math.round,a=o.useRef(),l=o.useState({width:void 0,height:void 0}),i=l[0],c=l[1],s=o.useRef(!1);o.useEffect(function(){return s.current=!1,function(){s.current=!0}},[]);var d=o.useRef({width:void 0,height:void 0}),u=o7(o.useCallback(function(h){return(!a.current||a.current.box!==e.box||a.current.round!==n)&&(a.current={box:e.box,round:n,instance:new ResizeObserver(function(g){var f=g[0],v=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",m=Ci(f,v,"inlineSize"),E=Ci(f,v,"blockSize"),x=m?n(m):void 0,y=E?n(E):void 0;if(d.current.width!==x||d.current.height!==y){var b={width:x,height:y};d.current.width=x,d.current.height=y,r.current?r.current(b):s.current||c(b)}})}),a.current.instance.observe(h,{box:e.box}),function(){a.current&&a.current.instance.unobserve(h)}},[e.box,n]),e.ref);return o.useMemo(function(){return{ref:u,width:i.width,height:i.height}},[u,i.width,i.height])}var l7=A.div(({scale:e=1,elementHeight:t})=>({height:t||"auto",transformOrigin:"top left",transform:`scale(${1/e})`}));function i7({scale:e,children:t}){let r=o.useRef(null),[n,a]=o.useState(0),l=o.useCallback(({height:i})=>{i&&a(i/e)},[e]);return o.useEffect(()=>{r.current&&a(r.current.getBoundingClientRect().height)},[e]),kc({ref:r,onResize:l}),p.createElement(l7,{scale:e,elementHeight:n},p.createElement("div",{ref:r,className:"innerZoomElementWrapper"},t))}var s7=class extends o.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:r}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),r!==e.active&&this.iframe.setAttribute("data-is-storybook",e.active?"true":"false"),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}render(){let{children:e}=this.props;return p.createElement(p.Fragment,null,e)}},Oc={Element:i7,IFrame:s7},{document:c7}=n3,d7=A.strong(({theme:e})=>({color:e.color.orange})),u7=A.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"})),Ri=A.em(({theme:e})=>({color:e.textMutedColor})),p7=/(Error): (.*)\n/,f7=/at (?:(.*) )?\(?(.+)\)?/,h7=/([^@]+)?(?:\/<)?@(.+)?/,g7=/([^@]+)?@(.+)?/,Tc=({error:e})=>{if(!e)return p.createElement(o.Fragment,null,"This error has no stack or message");if(!e.stack)return p.createElement(o.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message} +`};function d3(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),i=1;i=0&&a<1?(c=l,s=i):a>=1&&a<2?(c=i,s=l):a>=2&&a<3?(s=l,d=i):a>=3&&a<4?(s=i,d=l):a>=4&&a<5?(c=i,d=l):a>=5&&a<6&&(c=l,d=i);var u=r-l/2,h=c+u,g=s+u,f=d+u;return n(h,g,f)}var Ei={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function p3(e){if(typeof e!="string")return e;var t=e.toLowerCase();return Ei[t]?"#"+Ei[t]:e}var f3=/^#[a-fA-F0-9]{6}$/,h3=/^#[a-fA-F0-9]{8}$/,g3=/^#[a-fA-F0-9]{3}$/,m3=/^#[a-fA-F0-9]{4}$/,ga=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,v3=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,b3=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,y3=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Yo(e){if(typeof e!="string")throw new tt(3);var t=p3(e);if(t.match(f3))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(h3)){var r=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:r}}if(t.match(g3))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(m3)){var n=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:n}}var a=ga.exec(t);if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10)};var l=v3.exec(t.substring(0,50));if(l)return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10),alpha:parseFloat(""+l[4])>1?parseFloat(""+l[4])/100:parseFloat(""+l[4])};var i=b3.exec(t);if(i){var c=parseInt(""+i[1],10),s=parseInt(""+i[2],10)/100,d=parseInt(""+i[3],10)/100,u="rgb("+Pr(c,s,d)+")",h=ga.exec(u);if(!h)throw new tt(4,t,u);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10)}}var g=y3.exec(t.substring(0,50));if(g){var f=parseInt(""+g[1],10),v=parseInt(""+g[2],10)/100,m=parseInt(""+g[3],10)/100,E="rgb("+Pr(f,v,m)+")",x=ga.exec(E);if(!x)throw new tt(4,t,E);return{red:parseInt(""+x[1],10),green:parseInt(""+x[2],10),blue:parseInt(""+x[3],10),alpha:parseFloat(""+g[4])>1?parseFloat(""+g[4])/100:parseFloat(""+g[4])}}throw new tt(5)}function w3(e){var t=e.red/255,r=e.green/255,n=e.blue/255,a=Math.max(t,r,n),l=Math.min(t,r,n),i=(a+l)/2;if(a===l)return e.alpha!==void 0?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var c,s=a-l,d=i>.5?s/(2-a-l):s/(a+l);switch(a){case t:c=(r-n)/s+(r=1?Rn(e,t,r):"rgba("+Pr(e,t,r)+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Rn(e.hue,e.saturation,e.lightness):"rgba("+Pr(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new tt(2)}function Ja(e,t,r){if(typeof e=="number"&&typeof t=="number"&&typeof r=="number")return Za("#"+_t(e)+_t(t)+_t(r));if(typeof e=="object"&&t===void 0&&r===void 0)return Za("#"+_t(e.red)+_t(e.green)+_t(e.blue));throw new tt(6)}function In(e,t,r,n){if(typeof e=="string"&&typeof t=="number"){var a=Yo(e);return"rgba("+a.red+","+a.green+","+a.blue+","+t+")"}else{if(typeof e=="number"&&typeof t=="number"&&typeof r=="number"&&typeof n=="number")return n>=1?Ja(e,t,r):"rgba("+e+","+t+","+r+","+n+")";if(typeof e=="object"&&t===void 0&&r===void 0&&n===void 0)return e.alpha>=1?Ja(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new tt(7)}var R3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},I3=function(e){return typeof e.red=="number"&&typeof e.green=="number"&&typeof e.blue=="number"&&typeof e.alpha=="number"},A3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&(typeof e.alpha!="number"||typeof e.alpha>"u")},_3=function(e){return typeof e.hue=="number"&&typeof e.saturation=="number"&&typeof e.lightness=="number"&&typeof e.alpha=="number"};function sc(e){if(typeof e!="object")throw new tt(8);if(I3(e))return In(e);if(R3(e))return Ja(e);if(_3(e))return C3(e);if(A3(e))return S3(e);throw new tt(8)}function cc(e,t,r){return function(){var n=r.concat(Array.prototype.slice.call(arguments));return n.length>=t?e.apply(this,n):cc(e,t,n)}}function Ko(e){return cc(e,e.length,[])}function Xo(e,t,r){return Math.max(e,Math.min(t,r))}function k3(e,t){if(t==="transparent")return t;var r=ic(t);return sc(G({},r,{lightness:Xo(0,1,r.lightness-parseFloat(e))}))}var O3=Ko(k3),Zt=O3;function T3(e,t){if(t==="transparent")return t;var r=ic(t);return sc(G({},r,{lightness:Xo(0,1,r.lightness+parseFloat(e))}))}var M3=Ko(T3),Si=M3;function $3(e,t){if(t==="transparent")return t;var r=Yo(t),n=typeof r.alpha=="number"?r.alpha:1,a=G({},r,{alpha:Xo(0,1,+(n*100-parseFloat(e)*100).toFixed(2)/100)});return In(a)}var L3=Ko($3),Oe=L3,ur=({theme:e})=>({margin:"20px 0 8px",padding:0,cursor:"text",position:"relative",color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}}),ut=({theme:e})=>({lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?Oe(.1,e.color.defaultText):Oe(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border}),re=({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"}),Ut={margin:"16px 0"},z3=({href:e,...t})=>{let r=/^\//.test(e)?`./?path=${e}`:e,n=/^#.*/.test(e)?"_self":"_top";return p.createElement("a",{href:r,target:n,...t})},dc=A(z3)(re,({theme:e})=>({fontSize:"inherit",lineHeight:"24px",color:e.color.secondary,textDecoration:"none","&.absent":{color:"#cc0000"},"&.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0}})),uc=A.blockquote(re,Ut,({theme:e})=>({borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}})),B3=e=>typeof e=="string",P3=/[\n\r]/g,H3=A.code(({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",display:"inline-block",paddingLeft:2,paddingRight:2,verticalAlign:"baseline",color:"inherit"}),ut),F3=A(Po)(({theme:e})=>({fontFamily:e.typography.fonts.mono,fontSize:`${e.typography.size.s2-1}px`,lineHeight:"19px",margin:"25px 0 40px",borderRadius:e.appBorderRadius,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0","pre.prismjs":{padding:20,background:"inherit"}})),Zo=({className:e,children:t,...r})=>{let n=(e||"").match(/lang-(\S+)/),a=o.Children.toArray(t);return a.filter(B3).some(l=>l.match(P3))?p.createElement(F3,{bordered:!0,copyable:!0,language:(n==null?void 0:n[1])??"text",format:!1,...r},t):p.createElement(H3,{...r,className:e},a)},pc=A.div(re),fc=A.dl(re,Ut,{padding:0,"& dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",padding:0,margin:"16px 0 4px"},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:"0 0 16px",padding:"0 15px"},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}}),hc=A.h1(re,ur,({theme:e})=>({fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold})),Jo=A.h2(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`})),Qo=A.h3(re,ur,({theme:e})=>({fontSize:`${e.typography.size.m1}px`})),gc=A.h4(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s3}px`})),mc=A.h5(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`})),vc=A.h6(re,ur,({theme:e})=>({fontSize:`${e.typography.size.s2}px`,color:e.color.dark})),bc=A.hr(({theme:e})=>({border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0})),yc=A.img({maxWidth:"100%"}),wc=A.li(re,({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":ut({theme:e})})),j3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},xc=A.ol(re,Ut,j3,{listStyle:"decimal"}),Ec=A.p(re,Ut,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":ut({theme:e})})),Sc=A.pre(re,Ut,({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",lineHeight:"18px",padding:"11px 1rem",whiteSpace:"pre-wrap",color:"inherit",borderRadius:3,margin:"1rem 0","&:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px",code:{color:"inherit",fontSize:"inherit"}},"& code":{whiteSpace:"pre"},"& code, & tt":{border:"none"}})),Cc=A.span(re,({theme:e})=>({"&.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"&.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"&.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"&.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"&.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}}})),Rc=A.table(re,Ut,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"24px",padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base==="dark"?e.color.darker:e.color.lighter},"& tr th":{fontWeight:"bold",color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:"6px 13px"},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:"6px 13px"},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}})),Ic=A.title(ut),N3={paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},Ac=A.ul(re,Ut,N3,{listStyle:"disc"}),el=A.div(re),_c={h1:e=>p.createElement(hc,{...te(e,"h1")}),h2:e=>p.createElement(Jo,{...te(e,"h2")}),h3:e=>p.createElement(Qo,{...te(e,"h3")}),h4:e=>p.createElement(gc,{...te(e,"h4")}),h5:e=>p.createElement(mc,{...te(e,"h5")}),h6:e=>p.createElement(vc,{...te(e,"h6")}),pre:e=>p.createElement(Sc,{...te(e,"pre")}),a:e=>p.createElement(dc,{...te(e,"a")}),hr:e=>p.createElement(bc,{...te(e,"hr")}),dl:e=>p.createElement(fc,{...te(e,"dl")}),blockquote:e=>p.createElement(uc,{...te(e,"blockquote")}),table:e=>p.createElement(Rc,{...te(e,"table")}),img:e=>p.createElement(yc,{...te(e,"img")}),div:e=>p.createElement(pc,{...te(e,"div")}),span:e=>p.createElement(Cc,{...te(e,"span")}),li:e=>p.createElement(wc,{...te(e,"li")}),ul:e=>p.createElement(Ac,{...te(e,"ul")}),ol:e=>p.createElement(xc,{...te(e,"ol")}),p:e=>p.createElement(Ec,{...te(e,"p")}),code:e=>p.createElement(Zo,{...te(e,"code")}),tt:e=>p.createElement(Ic,{...te(e,"tt")}),resetwrapper:e=>p.createElement(el,{...te(e,"resetwrapper")})},D3=A.div(({theme:e})=>({display:"inline-block",fontSize:11,lineHeight:"12px",alignSelf:"center",padding:"4px 12px",borderRadius:"3em",fontWeight:e.typography.weight.bold}),{svg:{height:12,width:12,marginRight:4,marginTop:-2,path:{fill:"currentColor"}}},({theme:e,status:t})=>{switch(t){case"critical":return{color:e.color.critical,background:e.background.critical};case"negative":return{color:e.color.negativeText,background:e.background.negative,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.negativeText)}`:"none"};case"warning":return{color:e.color.warningText,background:e.background.warning,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.warningText)}`:"none"};case"neutral":return{color:e.color.dark,background:e.color.mediumlight,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.dark)}`:"none"};case"positive":return{color:e.color.positiveText,background:e.background.positive,boxShadow:e.base==="light"?`inset 0 0 0 1px ${Oe(.9,e.color.positiveText)}`:"none"};default:return{}}}),V3=({...e})=>p.createElement(D3,{...e}),U3=0,W3=e=>e.button===U3&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,q3=(e,t)=>{W3(e)&&(e.preventDefault(),t(e))},G3=A.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{},({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{}),Y3=A.a(({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:Zt(.07,e.color.secondary),"svg path:not([fill])":{fill:Zt(.07,e.color.secondary)}},"&:active":{color:Zt(.1,e.color.secondary),"svg path:not([fill])":{fill:Zt(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}},({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{}),Bt=({cancel:e=!0,children:t,onClick:r=void 0,withArrow:n=!1,containsIcon:a=!1,className:l=void 0,style:i=void 0,...c})=>p.createElement(Y3,{...c,onClick:r&&e?s=>q3(s,r):r,className:l},p.createElement(G3,{withArrow:n,containsIcon:a},t,n&&p.createElement(qo,null))),K3=A.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"span.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"span.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base==="dark"&&e.color.darkest}})),Pt=[],lr=null,X3=o.lazy(async()=>{let{SyntaxHighlighter:e}=await Ft(()=>import("./syntaxhighlighter-JOJW2KGS-psPRdUjt.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);return Pt.length>0&&(Pt.forEach(t=>{e.registerLanguage(...t)}),Pt=[]),lr===null&&(lr=e),{default:t=>p.createElement(e,{...t})}}),Z3=o.lazy(async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([Ft(()=>import("./syntaxhighlighter-JOJW2KGS-psPRdUjt.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Ft(()=>import("./formatter-B5HCVTEV-rIjXEVKW.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url)]);return Pt.length>0&&(Pt.forEach(r=>{e.registerLanguage(...r)}),Pt=[]),lr===null&&(lr=e),{default:r=>p.createElement(e,{...r,formatter:t})}}),Wn=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},e.format!==!1?p.createElement(Z3,{...e}):p.createElement(X3,{...e}));Wn.registerLanguage=(...e)=>{if(lr!==null){lr.registerLanguage(...e);return}Pt.push(e)};var J3=e=>typeof e=="number"?e:Number(e),Q3=A.div(({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${Da}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${Da}`]:{marginTop:0}},({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!!(t&&r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),e7=({col:e,row:t,outer:r,children:n,...a})=>{let l=J3(typeof r=="number"||!r?r:e||t);return p.createElement(Q3,{col:e,row:t,outer:l,...a},n)},t7=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),r7=A.div(),n7=A.div(({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})),a7=({children:e,...t})=>{let[r,n]=o.Children.toArray(e);return p.createElement(n7,{...t},p.createElement(t7,null,r),n&&p.createElement(r7,null,n))};function o7(e,t){var r=o.useRef(null),n=o.useRef(null);n.current=t;var a=o.useRef(null);o.useEffect(function(){l()});var l=o.useCallback(function(){var i=a.current,c=n.current,s=i||(c?c instanceof Element?c:c.current:null);r.current&&r.current.element===s&&r.current.subscriber===e||(r.current&&r.current.cleanup&&r.current.cleanup(),r.current={element:s,subscriber:e,cleanup:s?e(s):void 0})},[e]);return o.useEffect(function(){return function(){r.current&&r.current.cleanup&&(r.current.cleanup(),r.current=null)}},[]),o.useCallback(function(i){a.current=i,l()},[l])}function Ci(e,t,r){return e[t]?e[t][0]?e[t][0][r]:e[t][r]:t==="contentBoxSize"?e.contentRect[r==="inlineSize"?"width":"height"]:void 0}function kc(e){e===void 0&&(e={});var t=e.onResize,r=o.useRef(void 0);r.current=t;var n=e.round||Math.round,a=o.useRef(),l=o.useState({width:void 0,height:void 0}),i=l[0],c=l[1],s=o.useRef(!1);o.useEffect(function(){return s.current=!1,function(){s.current=!0}},[]);var d=o.useRef({width:void 0,height:void 0}),u=o7(o.useCallback(function(h){return(!a.current||a.current.box!==e.box||a.current.round!==n)&&(a.current={box:e.box,round:n,instance:new ResizeObserver(function(g){var f=g[0],v=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",m=Ci(f,v,"inlineSize"),E=Ci(f,v,"blockSize"),x=m?n(m):void 0,y=E?n(E):void 0;if(d.current.width!==x||d.current.height!==y){var b={width:x,height:y};d.current.width=x,d.current.height=y,r.current?r.current(b):s.current||c(b)}})}),a.current.instance.observe(h,{box:e.box}),function(){a.current&&a.current.instance.unobserve(h)}},[e.box,n]),e.ref);return o.useMemo(function(){return{ref:u,width:i.width,height:i.height}},[u,i.width,i.height])}var l7=A.div(({scale:e=1,elementHeight:t})=>({height:t||"auto",transformOrigin:"top left",transform:`scale(${1/e})`}));function i7({scale:e,children:t}){let r=o.useRef(null),[n,a]=o.useState(0),l=o.useCallback(({height:i})=>{i&&a(i/e)},[e]);return o.useEffect(()=>{r.current&&a(r.current.getBoundingClientRect().height)},[e]),kc({ref:r,onResize:l}),p.createElement(l7,{scale:e,elementHeight:n},p.createElement("div",{ref:r,className:"innerZoomElementWrapper"},t))}var s7=class extends o.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:r}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),r!==e.active&&this.iframe.setAttribute("data-is-storybook",e.active?"true":"false"),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}render(){let{children:e}=this.props;return p.createElement(p.Fragment,null,e)}},Oc={Element:i7,IFrame:s7},{document:c7}=n3,d7=A.strong(({theme:e})=>({color:e.color.orange})),u7=A.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"})),Ri=A.em(({theme:e})=>({color:e.textMutedColor})),p7=/(Error): (.*)\n/,f7=/at (?:(.*) )?\(?(.+)\)?/,h7=/([^@]+)?(?:\/<)?@(.+)?/,g7=/([^@]+)?@(.+)?/,Tc=({error:e})=>{if(!e)return p.createElement(o.Fragment,null,"This error has no stack or message");if(!e.stack)return p.createElement(o.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message} -${t}`);let r=t.match(p7);if(!r)return p.createElement(o.Fragment,null,t);let[,n,a]=r,l=t.split(/\n/).slice(1),[,...i]=l.map(c=>{let s=c.match(f7)||c.match(h7)||c.match(g7);return s?{name:(s[1]||"").replace("/<",""),location:s[2].replace(c7.location.origin,"")}:null}).filter(Boolean);return p.createElement(o.Fragment,null,p.createElement("span",null,n),": ",p.createElement(d7,null,a),p.createElement("br",null),i.map((c,s)=>c.name?p.createElement(o.Fragment,{key:s}," ","at ",p.createElement(u7,null,c.name)," (",p.createElement(Ri,null,c.location),")",p.createElement("br",null)):p.createElement(o.Fragment,{key:s}," ","at ",p.createElement(Ri,null,c.location),p.createElement("br",null))))},wt=o.forwardRef(({asChild:e=!1,animation:t="none",size:r="small",variant:n="outline",padding:a="medium",disabled:l=!1,active:i=!1,onClick:c,...s},d)=>{let u="button";s.isLink&&(u="a"),e&&(u=ko);let h=n,g=r,[f,v]=o.useState(!1),m=E=>{c&&c(E),t!=="none"&&v(!0)};if(o.useEffect(()=>{let E=setTimeout(()=>{f&&v(!1)},1e3);return()=>clearTimeout(E)},[f]),s.primary&&(h="solid",g="medium"),(s.secondary||s.tertiary||s.gray||s.outline||s.inForm)&&(h="outline",g="medium"),s.small||s.isLink||s.primary||s.secondary||s.tertiary||s.gray||s.outline||s.inForm||s.containsIcon){let E=p.Children.toArray(s.children).filter(x=>typeof x=="string"&&x!=="");lc(`Use of deprecated props in the button ${E.length>0?`"${E.join(" ")}"`:"component"} detected, see the migration notes at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-ui-and-props-for-button-and-iconbutton-components`)}return p.createElement(m7,{as:u,ref:d,variant:h,size:g,padding:a,disabled:l,active:i,animating:f,animation:t,onClick:m,...s})});wt.displayName="Button";var m7=A("button",{shouldForwardProp:e=>vo(e)})(({theme:e,variant:t,size:r,disabled:n,active:a,animating:l,animation:i,padding:c})=>({border:0,cursor:n?"not-allowed":"pointer",display:"inline-flex",gap:"6px",alignItems:"center",justifyContent:"center",overflow:"hidden",padding:c==="small"&&r==="small"?"0 7px":c==="small"&&r==="medium"?"0 9px":r==="small"?"0 10px":r==="medium"?"0 12px":0,height:r==="small"?"28px":"32px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:n?.5:1,margin:0,fontSize:`${e.typography.size.s1}px`,fontWeight:e.typography.weight.bold,lineHeight:"1",background:t==="solid"?e.color.secondary:t==="outline"?e.button.background:t==="ghost"&&a?e.background.hoverable:"transparent",...t==="ghost"?{".sb-bar &":{background:a?Oe(.9,e.barTextColor):"transparent",color:a?e.barSelectedColor:e.barTextColor,"&:hover":{color:e.barHoverColor,background:Oe(.86,e.barHoverColor)},"&:active":{color:e.barSelectedColor,background:Oe(.9,e.barSelectedColor)},"&:focus":{boxShadow:`${In(e.barHoverColor,1)} 0 0 0 1px inset`,outline:"none"}}}:{},color:t==="solid"?e.color.lightest:t==="outline"?e.input.color:t==="ghost"&&a?e.color.secondary:t==="ghost"?e.color.mediumdark:e.input.color,boxShadow:t==="outline"?`${e.button.border} 0 0 0 1px inset`:"none",borderRadius:e.input.borderRadius,flexShrink:0,"&:hover":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?Oe(.86,e.color.secondary):e.base==="light"?Zt(.02,s):Si(.03,s)})()},"&:active":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?e.background.hoverable:e.base==="light"?Zt(.02,s):Si(.03,s)})()},"&:focus":{boxShadow:`${In(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"},"> svg":{animation:l&&i!=="none"?`${e.animation[i]} 1000ms ease-out`:""}})),Ht=o.forwardRef(({padding:e="small",variant:t="ghost",...r},n)=>p.createElement(wt,{padding:e,variant:t,ref:n,...r}));Ht.displayName="IconButton";var v7=A.label(({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}})),b7=A.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"})),Mc=({label:e,children:t,...r})=>p.createElement(v7,{...r},e?p.createElement(b7,null,p.createElement("span",null,e)):null,t);Mc.defaultProps={label:void 0};var y7=o.useLayoutEffect,w7=y7,x7=function(e){var t=o.useRef(e);return w7(function(){t.current=e}),t},Ii=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},E7=function(e,t){var r=o.useRef();return o.useCallback(function(n){e.current=n,r.current&&Ii(r.current,null),r.current=t,t&&Ii(t,n)},[t])},S7=E7,Ai={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},C7=function(e){Object.keys(Ai).forEach(function(t){e.style.setProperty(t,Ai[t],"important")})},_i=C7,ye=null,ki=function(e,t){var r=e.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?r+t.borderSize:r-t.paddingSize};function R7(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),ye||(ye=document.createElement("textarea"),ye.setAttribute("tabindex","-1"),ye.setAttribute("aria-hidden","true"),_i(ye)),ye.parentNode===null&&document.body.appendChild(ye);var a=e.paddingSize,l=e.borderSize,i=e.sizingStyle,c=i.boxSizing;Object.keys(i).forEach(function(g){var f=g;ye.style[f]=i[f]}),_i(ye),ye.value=t;var s=ki(ye,e);ye.value=t,s=ki(ye,e),ye.value="x";var d=ye.scrollHeight-a,u=d*r;c==="border-box"&&(u=u+a+l),s=Math.max(u,s);var h=d*n;return c==="border-box"&&(h=h+a+l),s=Math.min(h,s),[s,d]}var Oi=function(){},I7=function(e,t){return e.reduce(function(r,n){return r[n]=t[n],r},{})},A7=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],_7=!!document.documentElement.currentStyle,k7=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var r=I7(A7,t),n=r.boxSizing;if(n==="")return null;_7&&n==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:l}},O7=k7;function $c(e,t,r){var n=x7(r);o.useLayoutEffect(function(){var a=function(l){return n.current(l)};if(e)return e.addEventListener(t,a),function(){return e.removeEventListener(t,a)}},[])}var T7=function(e){$c(window,"resize",e)},M7=function(e){$c(document.fonts,"loadingdone",e)},$7=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],L7=function(e,t){var r=e.cacheMeasurements,n=e.maxRows,a=e.minRows,l=e.onChange,i=l===void 0?Oi:l,c=e.onHeightChange,s=c===void 0?Oi:c,d=Io(e,$7),u=d.value!==void 0,h=o.useRef(null),g=S7(h,t),f=o.useRef(0),v=o.useRef(),m=function(){var x=h.current,y=r&&v.current?v.current:O7(x);if(y){v.current=y;var b=R7(y,x.value||x.placeholder||"x",a,n),w=b[0],S=b[1];f.current!==w&&(f.current=w,x.style.setProperty("height",w+"px","important"),s(w,{rowHeight:S}))}},E=function(x){u||m(),i(x)};return o.useLayoutEffect(m),T7(m),M7(m),o.createElement("textarea",G({},d,{onChange:E,ref:g}))},z7=o.forwardRef(L7),B7={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},tl=({theme:e})=>({...B7,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}}),rl=({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};case"auto":default:return{display:"inline"}}},Lc=({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};case"start":default:return{textAlign:"left"}}},nl=({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:case null:default:return{}}},P7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement("input",{...n,ref:a})}))(tl,rl,Lc,nl,{minHeight:32}),{displayName:"Input"}),H7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement("select",{...n,ref:a})}))(tl,rl,nl,{height:32,userSelect:"none",paddingRight:20,appearance:"menulist"}),{displayName:"Select"}),F7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement(z7,{...n,ref:a})}))(tl,rl,Lc,nl,({height:e=400})=>({overflow:"visible",maxHeight:e})),{displayName:"Textarea"}),Nt=Object.assign(A.form({boxSizing:"border-box",width:"100%"}),{Field:Mc,Input:P7,Select:H7,Textarea:F7,Button:wt}),j7=o.lazy(()=>Ft(()=>import("./WithTooltip-Y7J54OF7-gLBhxBwc.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltip}))),N7=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(j7,{...e})),D7=o.lazy(()=>Ft(()=>import("./WithTooltip-Y7J54OF7-gLBhxBwc.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltipPure}))),zc=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(D7,{...e})),V7=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),U7=A.span(),W7=A.div(({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}})),q7=A.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"})),G7=A.div({padding:15,width:280,boxSizing:"border-box"}),Bc=({title:e,desc:t,links:r})=>p.createElement(G7,null,p.createElement(q7,null,e&&p.createElement(V7,null,e),t&&p.createElement(U7,null,t)),r&&p.createElement(W7,null,r.map(({title:n,...a})=>p.createElement(Bt,{...a,key:n},n))));Bc.defaultProps={title:null,desc:null,links:null};var Y7=A.div(({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:e.base==="light"?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})),K7=({note:e,...t})=>p.createElement(Y7,{...t},e),X7=A(({active:e,loading:t,disabled:r,...n})=>p.createElement("span",{...n}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:Oe(.7,t.color.defaultText)}:{}),Z7=A.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),J7=A.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},({isIndented:e})=>e?{marginLeft:24}:{}),Q7=A.span(({theme:e})=>({fontSize:"11px",lineHeight:"14px"}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),eb=A.span(({active:e,theme:t})=>e?{color:t.color.secondary}:{},()=>({display:"flex",maxWidth:14})),tb=A.a(({theme:e})=>({fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",cursor:"pointer",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10},"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),({disabled:e})=>e?{cursor:"not-allowed"}:{}),rb=Dt(100)((e,t,r)=>{let n={};return e&&Object.assign(n,{onClick:e}),t&&Object.assign(n,{href:t}),r&&t&&Object.assign(n,{to:t,as:r}),n}),Pc=({loading:e,title:t,center:r,right:n,icon:a,active:l,disabled:i,isIndented:c,href:s,onClick:d,LinkWrapper:u,...h})=>{let g=rb(d,s,u),f={active:l,disabled:i};return p.createElement(tb,{...f,...h,...g},a&&p.createElement(eb,{...f},a),t||r?p.createElement(J7,{isIndented:!a&&c},t&&p.createElement(X7,{...f,loading:e},t),r&&p.createElement(Q7,{...f},r)):null,n&&p.createElement(Z7,{...f},n))};Pc.defaultProps={loading:!1,title:p.createElement("span",null,"Loading state"),center:null,right:null,active:!1,disabled:!1,href:null,LinkWrapper:null,onClick:null};var al=Pc,nb=A.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:15.5*32},({theme:e})=>({borderRadius:e.appBorderRadius})),ab=e=>{let{LinkWrapper:t,onClick:r,id:n,isIndented:a,...l}=e,{title:i,href:c,active:s}=l,d=o.useCallback(h=>{r(h,l)},[r]),u=!!r;return p.createElement(al,{title:i,active:s,href:c,id:`list-item-${n}`,LinkWrapper:t,isIndented:a,...l,...u?{onClick:d}:{}})},ol=({links:e,LinkWrapper:t})=>{let r=e.some(n=>n.icon);return p.createElement(nb,null,e.map(({isGatsby:n,...a})=>p.createElement(ab,{key:a.id,LinkWrapper:n?t:null,isIndented:r,...a})))};ol.defaultProps={LinkWrapper:al.defaultProps.LinkWrapper};var ob=e=>typeof e.props.href=="string",lb=e=>typeof e.props.href!="string";function ib({children:e,...t},r){let n={props:t,ref:r};if(ob(n))return p.createElement("a",{ref:n.ref,...n.props},e);if(lb(n))return p.createElement("button",{ref:n.ref,type:"button",...n.props},e);throw new Error("invalid props")}var Hc=o.forwardRef(ib);Hc.displayName="ButtonOrLink";var Gr=A(Hc,{shouldForwardProp:vo})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"},"&[hidden]":{display:"none"}},({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.barSelectedColor}}),({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent","&:hover":{color:r.barHoverColor}});Gr.displayName="TabButton";var sb=A.div(({theme:e})=>({width:14,height:14,backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),cb=A.div(()=>({marginTop:6,padding:7,height:28})),db=()=>p.createElement(cb,null,p.createElement(sb,null)),Qa=A.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:3},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{marginLeft:30,"& > *":{marginRight:4}}:{});Qa.displayName="Side";var ub=({children:e,className:t,scrollable:r})=>r?p.createElement(Bo,{vertical:!1,className:t},e):p.createElement("div",{className:t},e),ll=A(ub)(({theme:e,scrollable:t=!0})=>({color:e.barTextColor,width:"100%",height:40,flexShrink:0,overflow:t?"auto":"hidden",overflowY:"hidden"}),({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{});ll.displayName="Bar";var pb=A.div(({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""})),qn=({children:e,backgroundColor:t,className:r,...n})=>{let[a,l]=o.Children.toArray(e);return p.createElement(ll,{className:`sb-bar ${r}`,...n},p.createElement(pb,{bgColor:t},p.createElement(Qa,{scrollable:n.scrollable,left:!0},a),l?p.createElement(Qa,{right:!0},l):null))};qn.displayName="FlexBar";var Fc=A.div(({active:e})=>e?{display:"block"}:{display:"none"}),Ti=e=>o.Children.toArray(e).map(({props:{title:t,id:r,color:n,children:a}})=>{let l=Array.isArray(a)?a[0]:a;return{title:t,id:r,...n?{color:n}:{},render:typeof l=="function"?l:({active:i})=>p.createElement(Fc,{active:i,role:"tabpanel"},l)}}),fb=A.span(({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"})),hb=A(Gr)(({active:e,theme:t,preActive:r})=>` +${t}`);let r=t.match(p7);if(!r)return p.createElement(o.Fragment,null,t);let[,n,a]=r,l=t.split(/\n/).slice(1),[,...i]=l.map(c=>{let s=c.match(f7)||c.match(h7)||c.match(g7);return s?{name:(s[1]||"").replace("/<",""),location:s[2].replace(c7.location.origin,"")}:null}).filter(Boolean);return p.createElement(o.Fragment,null,p.createElement("span",null,n),": ",p.createElement(d7,null,a),p.createElement("br",null),i.map((c,s)=>c.name?p.createElement(o.Fragment,{key:s}," ","at ",p.createElement(u7,null,c.name)," (",p.createElement(Ri,null,c.location),")",p.createElement("br",null)):p.createElement(o.Fragment,{key:s}," ","at ",p.createElement(Ri,null,c.location),p.createElement("br",null))))},wt=o.forwardRef(({asChild:e=!1,animation:t="none",size:r="small",variant:n="outline",padding:a="medium",disabled:l=!1,active:i=!1,onClick:c,...s},d)=>{let u="button";s.isLink&&(u="a"),e&&(u=ko);let h=n,g=r,[f,v]=o.useState(!1),m=E=>{c&&c(E),t!=="none"&&v(!0)};if(o.useEffect(()=>{let E=setTimeout(()=>{f&&v(!1)},1e3);return()=>clearTimeout(E)},[f]),s.primary&&(h="solid",g="medium"),(s.secondary||s.tertiary||s.gray||s.outline||s.inForm)&&(h="outline",g="medium"),s.small||s.isLink||s.primary||s.secondary||s.tertiary||s.gray||s.outline||s.inForm||s.containsIcon){let E=p.Children.toArray(s.children).filter(x=>typeof x=="string"&&x!=="");lc(`Use of deprecated props in the button ${E.length>0?`"${E.join(" ")}"`:"component"} detected, see the migration notes at https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#new-ui-and-props-for-button-and-iconbutton-components`)}return p.createElement(m7,{as:u,ref:d,variant:h,size:g,padding:a,disabled:l,active:i,animating:f,animation:t,onClick:m,...s})});wt.displayName="Button";var m7=A("button",{shouldForwardProp:e=>vo(e)})(({theme:e,variant:t,size:r,disabled:n,active:a,animating:l,animation:i,padding:c})=>({border:0,cursor:n?"not-allowed":"pointer",display:"inline-flex",gap:"6px",alignItems:"center",justifyContent:"center",overflow:"hidden",padding:c==="small"&&r==="small"?"0 7px":c==="small"&&r==="medium"?"0 9px":r==="small"?"0 10px":r==="medium"?"0 12px":0,height:r==="small"?"28px":"32px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:n?.5:1,margin:0,fontSize:`${e.typography.size.s1}px`,fontWeight:e.typography.weight.bold,lineHeight:"1",background:t==="solid"?e.color.secondary:t==="outline"?e.button.background:t==="ghost"&&a?e.background.hoverable:"transparent",...t==="ghost"?{".sb-bar &":{background:a?Oe(.9,e.barTextColor):"transparent",color:a?e.barSelectedColor:e.barTextColor,"&:hover":{color:e.barHoverColor,background:Oe(.86,e.barHoverColor)},"&:active":{color:e.barSelectedColor,background:Oe(.9,e.barSelectedColor)},"&:focus":{boxShadow:`${In(e.barHoverColor,1)} 0 0 0 1px inset`,outline:"none"}}}:{},color:t==="solid"?e.color.lightest:t==="outline"?e.input.color:t==="ghost"&&a?e.color.secondary:t==="ghost"?e.color.mediumdark:e.input.color,boxShadow:t==="outline"?`${e.button.border} 0 0 0 1px inset`:"none",borderRadius:e.input.borderRadius,flexShrink:0,"&:hover":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?Oe(.86,e.color.secondary):e.base==="light"?Zt(.02,s):Si(.03,s)})()},"&:active":{color:t==="ghost"?e.color.secondary:null,background:(()=>{let s=e.color.secondary;return t==="solid"&&(s=e.color.secondary),t==="outline"&&(s=e.button.background),t==="ghost"?e.background.hoverable:e.base==="light"?Zt(.02,s):Si(.03,s)})()},"&:focus":{boxShadow:`${In(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"},"> svg":{animation:l&&i!=="none"?`${e.animation[i]} 1000ms ease-out`:""}})),Ht=o.forwardRef(({padding:e="small",variant:t="ghost",...r},n)=>p.createElement(wt,{padding:e,variant:t,ref:n,...r}));Ht.displayName="IconButton";var v7=A.label(({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}})),b7=A.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"})),Mc=({label:e,children:t,...r})=>p.createElement(v7,{...r},e?p.createElement(b7,null,p.createElement("span",null,e)):null,t);Mc.defaultProps={label:void 0};var y7=o.useLayoutEffect,w7=y7,x7=function(e){var t=o.useRef(e);return w7(function(){t.current=e}),t},Ii=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},E7=function(e,t){var r=o.useRef();return o.useCallback(function(n){e.current=n,r.current&&Ii(r.current,null),r.current=t,t&&Ii(t,n)},[t])},S7=E7,Ai={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},C7=function(e){Object.keys(Ai).forEach(function(t){e.style.setProperty(t,Ai[t],"important")})},_i=C7,ye=null,ki=function(e,t){var r=e.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?r+t.borderSize:r-t.paddingSize};function R7(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),ye||(ye=document.createElement("textarea"),ye.setAttribute("tabindex","-1"),ye.setAttribute("aria-hidden","true"),_i(ye)),ye.parentNode===null&&document.body.appendChild(ye);var a=e.paddingSize,l=e.borderSize,i=e.sizingStyle,c=i.boxSizing;Object.keys(i).forEach(function(g){var f=g;ye.style[f]=i[f]}),_i(ye),ye.value=t;var s=ki(ye,e);ye.value=t,s=ki(ye,e),ye.value="x";var d=ye.scrollHeight-a,u=d*r;c==="border-box"&&(u=u+a+l),s=Math.max(u,s);var h=d*n;return c==="border-box"&&(h=h+a+l),s=Math.min(h,s),[s,d]}var Oi=function(){},I7=function(e,t){return e.reduce(function(r,n){return r[n]=t[n],r},{})},A7=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],_7=!!document.documentElement.currentStyle,k7=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var r=I7(A7,t),n=r.boxSizing;if(n==="")return null;_7&&n==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),l=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:l}},O7=k7;function $c(e,t,r){var n=x7(r);o.useLayoutEffect(function(){var a=function(l){return n.current(l)};if(e)return e.addEventListener(t,a),function(){return e.removeEventListener(t,a)}},[])}var T7=function(e){$c(window,"resize",e)},M7=function(e){$c(document.fonts,"loadingdone",e)},$7=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],L7=function(e,t){var r=e.cacheMeasurements,n=e.maxRows,a=e.minRows,l=e.onChange,i=l===void 0?Oi:l,c=e.onHeightChange,s=c===void 0?Oi:c,d=Io(e,$7),u=d.value!==void 0,h=o.useRef(null),g=S7(h,t),f=o.useRef(0),v=o.useRef(),m=function(){var x=h.current,y=r&&v.current?v.current:O7(x);if(y){v.current=y;var b=R7(y,x.value||x.placeholder||"x",a,n),w=b[0],S=b[1];f.current!==w&&(f.current=w,x.style.setProperty("height",w+"px","important"),s(w,{rowHeight:S}))}},E=function(x){u||m(),i(x)};return o.useLayoutEffect(m),T7(m),M7(m),o.createElement("textarea",G({},d,{onChange:E,ref:g}))},z7=o.forwardRef(L7),B7={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},tl=({theme:e})=>({...B7,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}}),rl=({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};case"auto":default:return{display:"inline"}}},Lc=({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};case"start":default:return{textAlign:"left"}}},nl=({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:case null:default:return{}}},P7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement("input",{...n,ref:a})}))(tl,rl,Lc,nl,{minHeight:32}),{displayName:"Input"}),H7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement("select",{...n,ref:a})}))(tl,rl,nl,{height:32,userSelect:"none",paddingRight:20,appearance:"menulist"}),{displayName:"Select"}),F7=Object.assign(A(o.forwardRef(function({size:e,valid:t,align:r,...n},a){return p.createElement(z7,{...n,ref:a})}))(tl,rl,Lc,nl,({height:e=400})=>({overflow:"visible",maxHeight:e})),{displayName:"Textarea"}),Nt=Object.assign(A.form({boxSizing:"border-box",width:"100%"}),{Field:Mc,Input:P7,Select:H7,Textarea:F7,Button:wt}),j7=o.lazy(()=>Ft(()=>import("./WithTooltip-Y7J54OF7-C0NRGahW.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltip}))),N7=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(j7,{...e})),D7=o.lazy(()=>Ft(()=>import("./WithTooltip-Y7J54OF7-C0NRGahW.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltipPure}))),zc=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(D7,{...e})),V7=A.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),U7=A.span(),W7=A.div(({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}})),q7=A.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"})),G7=A.div({padding:15,width:280,boxSizing:"border-box"}),Bc=({title:e,desc:t,links:r})=>p.createElement(G7,null,p.createElement(q7,null,e&&p.createElement(V7,null,e),t&&p.createElement(U7,null,t)),r&&p.createElement(W7,null,r.map(({title:n,...a})=>p.createElement(Bt,{...a,key:n},n))));Bc.defaultProps={title:null,desc:null,links:null};var Y7=A.div(({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:e.base==="light"?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})),K7=({note:e,...t})=>p.createElement(Y7,{...t},e),X7=A(({active:e,loading:t,disabled:r,...n})=>p.createElement("span",{...n}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:Oe(.7,t.color.defaultText)}:{}),Z7=A.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),J7=A.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},({isIndented:e})=>e?{marginLeft:24}:{}),Q7=A.span(({theme:e})=>({fontSize:"11px",lineHeight:"14px"}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),eb=A.span(({active:e,theme:t})=>e?{color:t.color.secondary}:{},()=>({display:"flex",maxWidth:14})),tb=A.a(({theme:e})=>({fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",cursor:"pointer",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10},"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),({disabled:e})=>e?{cursor:"not-allowed"}:{}),rb=Dt(100)((e,t,r)=>{let n={};return e&&Object.assign(n,{onClick:e}),t&&Object.assign(n,{href:t}),r&&t&&Object.assign(n,{to:t,as:r}),n}),Pc=({loading:e,title:t,center:r,right:n,icon:a,active:l,disabled:i,isIndented:c,href:s,onClick:d,LinkWrapper:u,...h})=>{let g=rb(d,s,u),f={active:l,disabled:i};return p.createElement(tb,{...f,...h,...g},a&&p.createElement(eb,{...f},a),t||r?p.createElement(J7,{isIndented:!a&&c},t&&p.createElement(X7,{...f,loading:e},t),r&&p.createElement(Q7,{...f},r)):null,n&&p.createElement(Z7,{...f},n))};Pc.defaultProps={loading:!1,title:p.createElement("span",null,"Loading state"),center:null,right:null,active:!1,disabled:!1,href:null,LinkWrapper:null,onClick:null};var al=Pc,nb=A.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:15.5*32},({theme:e})=>({borderRadius:e.appBorderRadius})),ab=e=>{let{LinkWrapper:t,onClick:r,id:n,isIndented:a,...l}=e,{title:i,href:c,active:s}=l,d=o.useCallback(h=>{r(h,l)},[r]),u=!!r;return p.createElement(al,{title:i,active:s,href:c,id:`list-item-${n}`,LinkWrapper:t,isIndented:a,...l,...u?{onClick:d}:{}})},ol=({links:e,LinkWrapper:t})=>{let r=e.some(n=>n.icon);return p.createElement(nb,null,e.map(({isGatsby:n,...a})=>p.createElement(ab,{key:a.id,LinkWrapper:n?t:null,isIndented:r,...a})))};ol.defaultProps={LinkWrapper:al.defaultProps.LinkWrapper};var ob=e=>typeof e.props.href=="string",lb=e=>typeof e.props.href!="string";function ib({children:e,...t},r){let n={props:t,ref:r};if(ob(n))return p.createElement("a",{ref:n.ref,...n.props},e);if(lb(n))return p.createElement("button",{ref:n.ref,type:"button",...n.props},e);throw new Error("invalid props")}var Hc=o.forwardRef(ib);Hc.displayName="ButtonOrLink";var Gr=A(Hc,{shouldForwardProp:vo})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"},"&[hidden]":{display:"none"}},({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.barSelectedColor}}),({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent","&:hover":{color:r.barHoverColor}});Gr.displayName="TabButton";var sb=A.div(({theme:e})=>({width:14,height:14,backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),cb=A.div(()=>({marginTop:6,padding:7,height:28})),db=()=>p.createElement(cb,null,p.createElement(sb,null)),Qa=A.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:3},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{marginLeft:30,"& > *":{marginRight:4}}:{});Qa.displayName="Side";var ub=({children:e,className:t,scrollable:r})=>r?p.createElement(Bo,{vertical:!1,className:t},e):p.createElement("div",{className:t},e),ll=A(ub)(({theme:e,scrollable:t=!0})=>({color:e.barTextColor,width:"100%",height:40,flexShrink:0,overflow:t?"auto":"hidden",overflowY:"hidden"}),({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{});ll.displayName="Bar";var pb=A.div(({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""})),qn=({children:e,backgroundColor:t,className:r,...n})=>{let[a,l]=o.Children.toArray(e);return p.createElement(ll,{className:`sb-bar ${r}`,...n},p.createElement(pb,{bgColor:t},p.createElement(Qa,{scrollable:n.scrollable,left:!0},a),l?p.createElement(Qa,{right:!0},l):null))};qn.displayName="FlexBar";var Fc=A.div(({active:e})=>e?{display:"block"}:{display:"none"}),Ti=e=>o.Children.toArray(e).map(({props:{title:t,id:r,color:n,children:a}})=>{let l=Array.isArray(a)?a[0]:a;return{title:t,id:r,...n?{color:n}:{},render:typeof l=="function"?l:({active:i})=>p.createElement(Fc,{active:i,role:"tabpanel"},l)}}),fb=A.span(({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"})),hb=A(Gr)(({active:e,theme:t,preActive:r})=>` color: ${r||e?t.barSelectedColor:t.barTextColor}; .addon-collapsible-icon { color: ${r||e?t.barSelectedColor:t.barTextColor}; @@ -463,7 +463,7 @@ ${t}`);let r=t.match(p7);if(!r)return p.createElement(o.Fragment,null,t);let[,n, ${Ye(.02,e.input.background)} 100%)`:`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${Ot(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${Ot(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${Je(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),W1=A.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums"}),eI=A(W1)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),tI=A.div({display:"flex",alignItems:"center",width:"100%"});function rI(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var nI=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:l=1,onBlur:i,onFocus:c})=>{let s=h=>{r(hR(h.target.value))},d=t!==void 0,u=o.useMemo(()=>rI(l),[l]);return p.createElement(tI,null,p.createElement(W1,null,n),p.createElement(QR,{id:Fe(e),type:"range",onChange:s,name:e,value:t,min:n,max:a,step:l,onFocus:c,onBlur:i}),p.createElement(eI,{numberOFDecimalsPlaces:u,max:a},d?t.toFixed(u):"--"," / ",a))},aI=A.label({display:"flex"}),oI=A.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),lI=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:l})=>{let i=h=>{r(h.target.value)},[c,s]=o.useState(!1),d=o.useCallback(()=>{r(""),s(!0)},[s]);if(t===void 0)return p.createElement(wt,{variant:"outline",size:"medium",id:Mn(e),onClick:d},"Set string");let u=typeof t=="string";return p.createElement(aI,null,p.createElement(Nt.Textarea,{id:Fe(e),maxLength:l,onChange:i,size:"flex",placeholder:"Edit string...",autoFocus:c,valid:u?null:"error",name:e,value:u?t:"",onFocus:n,onBlur:a}),l&&p.createElement(oI,{isMaxed:(t==null?void 0:t.length)===l},(t==null?void 0:t.length)??0," / ",l))},iI=A(Nt.Input)({padding:10});function sI(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var cI=({onChange:e,name:t,accept:r="image/*",value:n})=>{let a=o.useRef(null);function l(i){if(!i.target.files)return;let c=Array.from(i.target.files).map(s=>URL.createObjectURL(s));e(c),sI(n)}return o.useEffect(()=>{n==null&&a.current&&(a.current.value=null)},[n,t]),p.createElement(iI,{ref:a,id:Fe(t),type:"file",name:t,multiple:!0,onChange:l,accept:r,size:"flex"})},dI=o.lazy(()=>Ft(()=>import("./Color-RQJUDNI5-roFcWcLK.js"),__vite__mapDeps([8,2,4,1,3,5]),import.meta.url)),uI=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(dI,{...e})),pI={array:y0,object:y0,boolean:lR,color:uI,date:pR,number:gR,check:Kt,"inline-check":Kt,radio:Kt,"inline-radio":Kt,select:Kt,"multi-select":Kt,range:nI,text:lI,file:cI},w0=()=>p.createElement(p.Fragment,null,"-"),fI=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var m;let{key:a,control:l}=e,[i,c]=o.useState(!1),[s,d]=o.useState({value:t});o.useEffect(()=>{i||d({value:t})},[i,t]);let u=o.useCallback(E=>(d({value:E}),r({[a]:E}),E),[r,a]),h=o.useCallback(()=>c(!1),[]),g=o.useCallback(()=>c(!0),[]);if(!l||l.disable){let E=(l==null?void 0:l.disable)!==!0&&((m=e==null?void 0:e.type)==null?void 0:m.name)!=="function";return n&&E?p.createElement(Bt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):p.createElement(w0,null)}let f={name:a,argType:e,value:s.value,onChange:u,onBlur:h,onFocus:g},v=pI[l.type]||w0;return p.createElement(v,{...f,...l,controlType:l.type})},hI=A.span({fontWeight:"bold"}),gI=A.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),mI=A.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...ut({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),vI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?4:0})),bI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),yI=A.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),wI=e=>e&&{summary:typeof e=="string"?e:e.name},on=e=>{var m;let[t,r]=o.useState(!1),{row:n,updateArgs:a,compact:l,expandable:i,initialExpandedArgs:c}=e,{name:s,description:d}=n,u=n.table||{},h=u.type||wI(n.type),g=u.defaultValue||n.defaultValue,f=(m=n.type)==null?void 0:m.required,v=d!=null&&d!=="";return p.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},p.createElement(yI,{expandable:i},p.createElement(hI,null,s),f?p.createElement(gI,{title:"Required"},"*"):null),l?null:p.createElement("td",null,v&&p.createElement(mI,null,p.createElement(h1,null,d)),u.jsDocTags!=null?p.createElement(p.Fragment,null,p.createElement(bI,{hasDescription:v},p.createElement(Ta,{value:h,initialExpandedArgs:c})),p.createElement(GC,{tags:u.jsDocTags})):p.createElement(vI,{hasDescription:v},p.createElement(Ta,{value:h,initialExpandedArgs:c}))),l?null:p.createElement("td",null,p.createElement(Ta,{value:g,initialExpandedArgs:c})),a?p.createElement("td",null,p.createElement(fI,{...e,isHovered:t})):null)},xI=A(ec)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),EI=A(qo)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),SI=A.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),CI=A.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),RI=A.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),II=A.td(()=>({position:"relative"})),AI=A.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Ot(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),x0=A.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),$a=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[l,i]=o.useState(n),c=e==="subsection"?RI:CI,s=(r==null?void 0:r.length)||0,d=e==="subsection"?`${s} item${s!==1?"s":""}`:"",u=`${l?"Hide":"Show"} ${e==="subsection"?s:t} item${s!==1?"s":""}`;return p.createElement(p.Fragment,null,p.createElement(AI,{title:u},p.createElement(c,{colSpan:1},p.createElement(x0,{onClick:h=>i(!l),tabIndex:0},u),p.createElement(SI,null,l?p.createElement(xI,null):p.createElement(EI,null),t)),p.createElement(II,{colSpan:a-1},p.createElement(x0,{onClick:h=>i(!l),tabIndex:-1,style:{outline:"none"}},u),l?null:d)),l?r:null)},ln=A.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),fe=A.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ie=A.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),he=[2,4,2,2],_I=()=>p.createElement(p.Fragment,null,p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"})))),kI=A.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),OI=A.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),TI=A.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),MI=({inAddonPanel:e})=>{let[t,r]=o.useState(!0);return o.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:p.createElement(kI,{inAddonPanel:e},p.createElement(il,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:p.createElement(p.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:p.createElement(OI,null,e&&p.createElement(p.Fragment,null,p.createElement(Bt,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},p.createElement(Xs,null)," Watch 5m video"),p.createElement(TI,null),p.createElement(Bt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Read docs")),!e&&p.createElement(Bt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Learn how to set that up"))}))},$I=A.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?ee(.25,e.color.defaultText):ee(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),LI=A(Ht)(({theme:e})=>({margin:"-4px -12px -4px 0"})),zI=A.span({display:"flex",justifyContent:"space-between"}),BI={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},PI=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([l,i])=>{let{category:c,subcategory:s}=(i==null?void 0:i.table)||{};if(c){let d=r.sections[c]||{ungrouped:[],subsections:{}};if(!s)d.ungrouped.push({key:l,...i});else{let u=d.subsections[s]||[];u.push({key:l,...i}),d.subsections[s]=u}r.sections[c]=d}else if(s){let d=r.ungroupedSubsections[s]||[];d.push({key:l,...i}),r.ungroupedSubsections[s]=d}else r.ungrouped.push({key:l,...i})});let n=BI[t],a=l=>n?Object.keys(l).reduce((i,c)=>({...i,[c]:l[c].sort(n)}),{}):l;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((l,i)=>({...l,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},HI=(e,t,r)=>{try{return r3(e,t,r)}catch(n){return mC.warn(n.message),!1}},uo=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:l,sort:i="none",isLoading:c}=e;if("error"in e){let{error:y}=e;return p.createElement(k1,null,y," ",p.createElement(Bt,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Read the docs"))}if(c)return p.createElement(_I,null);let{rows:s,args:d,globals:u}="rows"in e&&e,h=PI(E6(s,y=>{var b;return!((b=y==null?void 0:y.table)!=null&&b.disable)&&HI(y,d||{},u||{})}),i),g=h.ungrouped.length===0,f=Object.entries(h.sections).length===0,v=Object.entries(h.ungroupedSubsections).length===0;if(g&&f&&v)return p.createElement(MI,{inAddonPanel:a});let m=1;t&&(m+=1),n||(m+=2);let E=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:l};return p.createElement(el,null,p.createElement($I,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},p.createElement("thead",{className:"docblock-argstable-head"},p.createElement("tr",null,p.createElement("th",null,p.createElement("span",null,"Name")),n?null:p.createElement("th",null,p.createElement("span",null,"Description")),n?null:p.createElement("th",null,p.createElement("span",null,"Default")),t?p.createElement("th",null,p.createElement(zI,null,"Control"," ",!c&&r&&p.createElement(LI,{onClick:()=>r(),title:"Reset controls"},p.createElement(rc,{"aria-hidden":!0})))):null)),p.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(y=>p.createElement(on,{key:y.key,row:y,arg:d&&d[y.key],...x})),Object.entries(h.ungroupedSubsections).map(([y,b])=>p.createElement($a,{key:y,label:y,level:"subsection",colSpan:m},b.map(w=>p.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],expandable:E,...x})))),Object.entries(h.sections).map(([y,b])=>p.createElement($a,{key:y,label:y,level:"section",colSpan:m},b.ungrouped.map(w=>p.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(b.subsections).map(([w,S])=>p.createElement($a,{key:w,label:w,level:"subsection",colSpan:m},S.map(C=>p.createElement(on,{key:C.key,row:C,arg:d&&d[C.key],expandable:E,...x})))))))))},FI=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?p.createElement(uo,{...r[0][1],...t}):p.createElement(cl,null,r.map((n,a)=>{let[l,i]=n,c=`prop_table_div_${l}`,s="div",d=a===0?t:{sort:t.sort};return p.createElement(s,{key:c,id:c,title:l},({active:u})=>u?p.createElement(uo,{key:`prop_table_${l}`,...i,...d}):null)}))};A.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});A.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});A.div(re,({theme:e})=>({...Zn(e),margin:"25px 0 40px",padding:"30px 20px"}));A.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));A.div(({theme:e})=>({color:e.base==="light"?ee(.2,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});A.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));A.div({display:"flex",flexDirection:"row"});A.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));A.div(({theme:e})=>({...Zn(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));A.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});A.div({flex:1,display:"flex",flexDirection:"row"});A.div({display:"flex",alignItems:"flex-start"});A.div({flex:"0 0 30%"});A.div({flex:1});A.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));A.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));A.div(({theme:e})=>({...Zn(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));A.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});A.div({display:"flex",flexFlow:"row wrap"});var jI=e=>`anchor--${e}`,q1=({storyId:e,children:t})=>p.createElement("div",{id:jI(e),className:"sb-anchor"},t);Te&&Te.__DOCS_CONTEXT__===void 0&&(Te.__DOCS_CONTEXT__=o.createContext(null),Te.__DOCS_CONTEXT__.displayName="DocsContext");var Ae=Te?Te.__DOCS_CONTEXT__:o.createContext(null),Yr=(e,t)=>o.useContext(Ae).resolveOf(e,t),NI=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),DI=e=>{if(e)return typeof e=="string"?e.includes("-")?NI(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function VI(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function G1(e){return dC(e,{allowFunction:!1})}var Y1=o.createContext({sources:{}}),K1="--unknown--",UI=({children:e,channel:t})=>{let[r,n]=o.useState({});return o.useEffect(()=>{let a=(l,i=null,c=!1)=>{let{id:s,args:d=void 0,source:u,format:h}=typeof l=="string"?{id:l,source:i,format:c}:l,g=d?G1(d):K1;n(f=>({...f,[s]:{...f[s],[g]:{code:u,format:h}}}))};return t.on(Ml,a),()=>t.off(Ml,a)},[]),p.createElement(Y1.Provider,{value:{sources:r}},e)},WI=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[G1(t)])||(a==null?void 0:a[K1])||{code:""}},qI=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var s,d;let{__isArgsStory:a}=t.parameters,l=((s=t.parameters.docs)==null?void 0:s.source)||{},i=r||l.type||ra.AUTO;if(l.code!==void 0)return l.code;let c=i===ra.DYNAMIC||i===ra.AUTO&&e&&a?e:l.originalSource||"";return((d=n??l.transform)==null?void 0:d(c,t))||c},GI=(e,t,r)=>{var f,v,m,E;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let l=((v=(f=n==null?void 0:n.parameters)==null?void 0:f.docs)==null?void 0:v.source)||{},{code:i}=e,c=e.format??l.format,s=e.language??l.language??"jsx",d=e.dark??l.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:c,language:s,dark:d};let u=t.getStoryContext(n),h=e.__forceInitialArgs?u.initialArgs:u.unmappedArgs,g=WI(n.id,h,r);return c=g.format??((E=(m=n.parameters.docs)==null?void 0:m.source)==null?void 0:E.format)??!1,{code:qI({snippet:g.code,storyContext:{...u,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:c,language:s,dark:d}};function YI(e,t){let r=KI([e],t);return r&&r[0]}function KI(e,t){let[r,n]=o.useState({});return o.useEffect(()=>{Promise.all(e.map(async a=>{let l=await t.loadStory(a);n(i=>i[a]===l?i:{...i,[a]:l})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var XI=(e,t)=>{let{of:r,meta:n}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return n&&t.referenceMeta(n,!1),t.resolveOf(r||"story",["story"]).story.id},ZI=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,l=a.story||{};if(a.disable)return null;if(e.inline??l.inline??!1){let c=e.height??l.height,s=e.autoplay??l.autoplay??!1;return{story:t,inline:!0,height:c,autoplay:s,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??l.height??l.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},JI=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=o.useContext(Ae),r=XI(e,t),n=YI(r,t);if(!n)return p.createElement(T1,null);let a=ZI(e,n,t);return a?p.createElement(FC,{...a}):null},QI=e=>{var g,f,v,m,E,x,y,b,w,S;let t=o.useContext(Ae),r=o.useContext(Y1),{of:n,source:a}=e;if("of"in e&&n===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story:l}=Yr(n||"story",["story"]),i=GI({...a,...n&&{of:n}},t,r),c=e.layout??l.parameters.layout??((f=(g=l.parameters.docs)==null?void 0:g.canvas)==null?void 0:f.layout)??"padded",s=e.withToolbar??((m=(v=l.parameters.docs)==null?void 0:v.canvas)==null?void 0:m.withToolbar)??!1,d=e.additionalActions??((x=(E=l.parameters.docs)==null?void 0:E.canvas)==null?void 0:x.additionalActions),u=e.sourceState??((b=(y=l.parameters.docs)==null?void 0:y.canvas)==null?void 0:b.sourceState)??"hidden",h=e.className??((S=(w=l.parameters.docs)==null?void 0:w.canvas)==null?void 0:S.className);return p.createElement(M1,{withSource:u==="none"?void 0:i,isExpanded:u==="shown",withToolbar:s,additionalActions:d,className:h,layout:c},p.createElement(JI,{of:n||l.moduleExport,meta:e.meta,...e.story}))},eA=(e,t)=>{let r=t.getStoryContext(e),[n,a]=o.useState(r.globals);return o.useEffect(()=>{let l=i=>{a(i.globals)};return t.channel.on(c0,l),()=>t.channel.off(c0,l)},[t.channel]),[n]},tA=(e,t)=>{let r=rA(e,t);if(!r)throw new Error("No result when story was defined");return r},rA=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,l]=o.useState(r.args);o.useEffect(()=>{let s=d=>{d.storyId===n&&l(d.args)};return t.channel.on(d0,s),()=>t.channel.off(d0,s)},[n,t.channel]);let i=o.useCallback(s=>t.channel.emit(vC,{storyId:n,updatedArgs:s}),[n,t.channel]),c=o.useCallback(s=>t.channel.emit(bC,{storyId:n,argNames:s}),[n,t.channel]);return e&&[a,i,c]};function nA(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var aA=e=>{var w;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=o.useContext(Ae),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:l,component:i,subcomponents:c}=n,s=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??s.include,u=e.exclude??s.exclude,h=e.sort??s.sort,[g,f,v]=tA(n,r),[m]=eA(n,r),E=s0(l,d,u);if(!(c&&Object.keys(c).length>0))return Object.keys(E).length>0||Object.keys(g).length>0?p.createElement(uo,{rows:E,sort:h,args:g,globals:m,updateArgs:f,resetArgs:v}):null;let x=DI(i),y=Object.fromEntries(Object.entries(c).map(([S,C])=>[S,{rows:s0(nA(C,a),d,u),sort:h}])),b={[x]:{rows:E,sort:h},...y};return p.createElement(FI,{tabs:b,sort:h,args:g,globals:m,updateArgs:f,resetArgs:v})},{document:X1}=Te,oA=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return p.createElement(Zo,null,t);let n=e&&e.split("-");return p.createElement(xl,{language:n&&n[1]||"text",format:!1,code:t,...r})};function Rl(e,t){e.channel.emit(yC,t)}var po=Dc.a,lA=({hash:e,children:t})=>{let r=o.useContext(Ae);return p.createElement(po,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);X1.getElementById(a)&&Rl(r,e)}},t)},iA=e=>{let{href:t,target:r,children:n,...a}=e,l=o.useContext(Ae);if(t){if(t.startsWith("#"))return p.createElement(lA,{hash:t},n);if(r!=="_blank"&&!t.startsWith("https://"))return p.createElement(po,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),Rl(l,i.currentTarget.getAttribute("href")))},target:r,...a},n)}return p.createElement(po,{...e})},Z1=["h1","h2","h3","h4","h5","h6"],sA=Z1.reduce((e,t)=>({...e,[t]:A(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),cA=A.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),dA=({as:e,id:t,children:r,...n})=>{let a=o.useContext(Ae),l=sA[e],i=`#${t}`;return p.createElement(l,{id:t,...n},p.createElement(cA,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:c=>{X1.getElementById(t)&&Rl(a,i)}},p.createElement(Qs,null)),r)},Il=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return p.createElement(dA,{as:t,id:r,...a},n);let l=t,{as:i,...c}=e;return p.createElement(l,{...te(c,t)})},uA=Z1.reduce((e,t)=>({...e,[t]:r=>p.createElement(Il,{as:t,...r})}),{}),pA=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(Ed`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' + ${Ot(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${Je(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),W1=A.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums"}),eI=A(W1)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),tI=A.div({display:"flex",alignItems:"center",width:"100%"});function rI(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var nI=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:l=1,onBlur:i,onFocus:c})=>{let s=h=>{r(hR(h.target.value))},d=t!==void 0,u=o.useMemo(()=>rI(l),[l]);return p.createElement(tI,null,p.createElement(W1,null,n),p.createElement(QR,{id:Fe(e),type:"range",onChange:s,name:e,value:t,min:n,max:a,step:l,onFocus:c,onBlur:i}),p.createElement(eI,{numberOFDecimalsPlaces:u,max:a},d?t.toFixed(u):"--"," / ",a))},aI=A.label({display:"flex"}),oI=A.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),lI=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:l})=>{let i=h=>{r(h.target.value)},[c,s]=o.useState(!1),d=o.useCallback(()=>{r(""),s(!0)},[s]);if(t===void 0)return p.createElement(wt,{variant:"outline",size:"medium",id:Mn(e),onClick:d},"Set string");let u=typeof t=="string";return p.createElement(aI,null,p.createElement(Nt.Textarea,{id:Fe(e),maxLength:l,onChange:i,size:"flex",placeholder:"Edit string...",autoFocus:c,valid:u?null:"error",name:e,value:u?t:"",onFocus:n,onBlur:a}),l&&p.createElement(oI,{isMaxed:(t==null?void 0:t.length)===l},(t==null?void 0:t.length)??0," / ",l))},iI=A(Nt.Input)({padding:10});function sI(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var cI=({onChange:e,name:t,accept:r="image/*",value:n})=>{let a=o.useRef(null);function l(i){if(!i.target.files)return;let c=Array.from(i.target.files).map(s=>URL.createObjectURL(s));e(c),sI(n)}return o.useEffect(()=>{n==null&&a.current&&(a.current.value=null)},[n,t]),p.createElement(iI,{ref:a,id:Fe(t),type:"file",name:t,multiple:!0,onChange:l,accept:r,size:"flex"})},dI=o.lazy(()=>Ft(()=>import("./Color-RQJUDNI5-DeQMaR6o.js"),__vite__mapDeps([8,2,4,1,3,5]),import.meta.url)),uI=e=>p.createElement(o.Suspense,{fallback:p.createElement("div",null)},p.createElement(dI,{...e})),pI={array:y0,object:y0,boolean:lR,color:uI,date:pR,number:gR,check:Kt,"inline-check":Kt,radio:Kt,"inline-radio":Kt,select:Kt,"multi-select":Kt,range:nI,text:lI,file:cI},w0=()=>p.createElement(p.Fragment,null,"-"),fI=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var m;let{key:a,control:l}=e,[i,c]=o.useState(!1),[s,d]=o.useState({value:t});o.useEffect(()=>{i||d({value:t})},[i,t]);let u=o.useCallback(E=>(d({value:E}),r({[a]:E}),E),[r,a]),h=o.useCallback(()=>c(!1),[]),g=o.useCallback(()=>c(!0),[]);if(!l||l.disable){let E=(l==null?void 0:l.disable)!==!0&&((m=e==null?void 0:e.type)==null?void 0:m.name)!=="function";return n&&E?p.createElement(Bt,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):p.createElement(w0,null)}let f={name:a,argType:e,value:s.value,onChange:u,onBlur:h,onFocus:g},v=pI[l.type]||w0;return p.createElement(v,{...f,...l,controlType:l.type})},hI=A.span({fontWeight:"bold"}),gI=A.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),mI=A.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...ut({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),vI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?4:0})),bI=A.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ee(.1,e.color.defaultText):ee(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),yI=A.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),wI=e=>e&&{summary:typeof e=="string"?e:e.name},on=e=>{var m;let[t,r]=o.useState(!1),{row:n,updateArgs:a,compact:l,expandable:i,initialExpandedArgs:c}=e,{name:s,description:d}=n,u=n.table||{},h=u.type||wI(n.type),g=u.defaultValue||n.defaultValue,f=(m=n.type)==null?void 0:m.required,v=d!=null&&d!=="";return p.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},p.createElement(yI,{expandable:i},p.createElement(hI,null,s),f?p.createElement(gI,{title:"Required"},"*"):null),l?null:p.createElement("td",null,v&&p.createElement(mI,null,p.createElement(h1,null,d)),u.jsDocTags!=null?p.createElement(p.Fragment,null,p.createElement(bI,{hasDescription:v},p.createElement(Ta,{value:h,initialExpandedArgs:c})),p.createElement(GC,{tags:u.jsDocTags})):p.createElement(vI,{hasDescription:v},p.createElement(Ta,{value:h,initialExpandedArgs:c}))),l?null:p.createElement("td",null,p.createElement(Ta,{value:g,initialExpandedArgs:c})),a?p.createElement("td",null,p.createElement(fI,{...e,isHovered:t})):null)},xI=A(ec)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),EI=A(qo)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ee(.25,e.color.defaultText):ee(.3,e.color.defaultText),border:"none",display:"inline-block"})),SI=A.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),CI=A.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),RI=A.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),II=A.td(()=>({position:"relative"})),AI=A.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Ot(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),x0=A.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),$a=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[l,i]=o.useState(n),c=e==="subsection"?RI:CI,s=(r==null?void 0:r.length)||0,d=e==="subsection"?`${s} item${s!==1?"s":""}`:"",u=`${l?"Hide":"Show"} ${e==="subsection"?s:t} item${s!==1?"s":""}`;return p.createElement(p.Fragment,null,p.createElement(AI,{title:u},p.createElement(c,{colSpan:1},p.createElement(x0,{onClick:h=>i(!l),tabIndex:0},u),p.createElement(SI,null,l?p.createElement(xI,null):p.createElement(EI,null),t)),p.createElement(II,{colSpan:a-1},p.createElement(x0,{onClick:h=>i(!l),tabIndex:-1,style:{outline:"none"}},u),l?null:d)),l?r:null)},ln=A.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),fe=A.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ie=A.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),he=[2,4,2,2],_I=()=>p.createElement(p.Fragment,null,p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"}))),p.createElement(ln,null,p.createElement(fe,{numColumn:he[0]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[1]},p.createElement(ie,{width:"80%"}),p.createElement(ie,{width:"30%"})),p.createElement(fe,{numColumn:he[2]},p.createElement(ie,{width:"60%"})),p.createElement(fe,{numColumn:he[3]},p.createElement(ie,{width:"60%"})))),kI=A.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),OI=A.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),TI=A.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),MI=({inAddonPanel:e})=>{let[t,r]=o.useState(!0);return o.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:p.createElement(kI,{inAddonPanel:e},p.createElement(il,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:p.createElement(p.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:p.createElement(OI,null,e&&p.createElement(p.Fragment,null,p.createElement(Bt,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},p.createElement(Xs,null)," Watch 5m video"),p.createElement(TI,null),p.createElement(Bt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Read docs")),!e&&p.createElement(Bt,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Learn how to set that up"))}))},$I=A.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?ee(.25,e.color.defaultText):ee(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),LI=A(Ht)(({theme:e})=>({margin:"-4px -12px -4px 0"})),zI=A.span({display:"flex",justifyContent:"space-between"}),BI={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},PI=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([l,i])=>{let{category:c,subcategory:s}=(i==null?void 0:i.table)||{};if(c){let d=r.sections[c]||{ungrouped:[],subsections:{}};if(!s)d.ungrouped.push({key:l,...i});else{let u=d.subsections[s]||[];u.push({key:l,...i}),d.subsections[s]=u}r.sections[c]=d}else if(s){let d=r.ungroupedSubsections[s]||[];d.push({key:l,...i}),r.ungroupedSubsections[s]=d}else r.ungrouped.push({key:l,...i})});let n=BI[t],a=l=>n?Object.keys(l).reduce((i,c)=>({...i,[c]:l[c].sort(n)}),{}):l;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((l,i)=>({...l,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},HI=(e,t,r)=>{try{return r3(e,t,r)}catch(n){return mC.warn(n.message),!1}},uo=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:l,sort:i="none",isLoading:c}=e;if("error"in e){let{error:y}=e;return p.createElement(k1,null,y," ",p.createElement(Bt,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},p.createElement(Cn,null)," Read the docs"))}if(c)return p.createElement(_I,null);let{rows:s,args:d,globals:u}="rows"in e&&e,h=PI(E6(s,y=>{var b;return!((b=y==null?void 0:y.table)!=null&&b.disable)&&HI(y,d||{},u||{})}),i),g=h.ungrouped.length===0,f=Object.entries(h.sections).length===0,v=Object.entries(h.ungroupedSubsections).length===0;if(g&&f&&v)return p.createElement(MI,{inAddonPanel:a});let m=1;t&&(m+=1),n||(m+=2);let E=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:l};return p.createElement(el,null,p.createElement($I,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},p.createElement("thead",{className:"docblock-argstable-head"},p.createElement("tr",null,p.createElement("th",null,p.createElement("span",null,"Name")),n?null:p.createElement("th",null,p.createElement("span",null,"Description")),n?null:p.createElement("th",null,p.createElement("span",null,"Default")),t?p.createElement("th",null,p.createElement(zI,null,"Control"," ",!c&&r&&p.createElement(LI,{onClick:()=>r(),title:"Reset controls"},p.createElement(rc,{"aria-hidden":!0})))):null)),p.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(y=>p.createElement(on,{key:y.key,row:y,arg:d&&d[y.key],...x})),Object.entries(h.ungroupedSubsections).map(([y,b])=>p.createElement($a,{key:y,label:y,level:"subsection",colSpan:m},b.map(w=>p.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],expandable:E,...x})))),Object.entries(h.sections).map(([y,b])=>p.createElement($a,{key:y,label:y,level:"section",colSpan:m},b.ungrouped.map(w=>p.createElement(on,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(b.subsections).map(([w,S])=>p.createElement($a,{key:w,label:w,level:"subsection",colSpan:m},S.map(C=>p.createElement(on,{key:C.key,row:C,arg:d&&d[C.key],expandable:E,...x})))))))))},FI=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?p.createElement(uo,{...r[0][1],...t}):p.createElement(cl,null,r.map((n,a)=>{let[l,i]=n,c=`prop_table_div_${l}`,s="div",d=a===0?t:{sort:t.sort};return p.createElement(s,{key:c,id:c,title:l},({active:u})=>u?p.createElement(uo,{key:`prop_table_${l}`,...i,...d}):null)}))};A.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});A.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});A.div(re,({theme:e})=>({...Zn(e),margin:"25px 0 40px",padding:"30px 20px"}));A.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));A.div(({theme:e})=>({color:e.base==="light"?ee(.2,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});A.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));A.div({display:"flex",flexDirection:"row"});A.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));A.div(({theme:e})=>({...Zn(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));A.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});A.div({flex:1,display:"flex",flexDirection:"row"});A.div({display:"flex",alignItems:"flex-start"});A.div({flex:"0 0 30%"});A.div({flex:1});A.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?ee(.4,e.color.defaultText):ee(.6,e.color.defaultText)}));A.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));A.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));A.div(({theme:e})=>({...Zn(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));A.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});A.div({display:"flex",flexFlow:"row wrap"});var jI=e=>`anchor--${e}`,q1=({storyId:e,children:t})=>p.createElement("div",{id:jI(e),className:"sb-anchor"},t);Te&&Te.__DOCS_CONTEXT__===void 0&&(Te.__DOCS_CONTEXT__=o.createContext(null),Te.__DOCS_CONTEXT__.displayName="DocsContext");var Ae=Te?Te.__DOCS_CONTEXT__:o.createContext(null),Yr=(e,t)=>o.useContext(Ae).resolveOf(e,t),NI=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),DI=e=>{if(e)return typeof e=="string"?e.includes("-")?NI(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function VI(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function G1(e){return dC(e,{allowFunction:!1})}var Y1=o.createContext({sources:{}}),K1="--unknown--",UI=({children:e,channel:t})=>{let[r,n]=o.useState({});return o.useEffect(()=>{let a=(l,i=null,c=!1)=>{let{id:s,args:d=void 0,source:u,format:h}=typeof l=="string"?{id:l,source:i,format:c}:l,g=d?G1(d):K1;n(f=>({...f,[s]:{...f[s],[g]:{code:u,format:h}}}))};return t.on(Ml,a),()=>t.off(Ml,a)},[]),p.createElement(Y1.Provider,{value:{sources:r}},e)},WI=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[G1(t)])||(a==null?void 0:a[K1])||{code:""}},qI=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var s,d;let{__isArgsStory:a}=t.parameters,l=((s=t.parameters.docs)==null?void 0:s.source)||{},i=r||l.type||ra.AUTO;if(l.code!==void 0)return l.code;let c=i===ra.DYNAMIC||i===ra.AUTO&&e&&a?e:l.originalSource||"";return((d=n??l.transform)==null?void 0:d(c,t))||c},GI=(e,t,r)=>{var f,v,m,E;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let l=((v=(f=n==null?void 0:n.parameters)==null?void 0:f.docs)==null?void 0:v.source)||{},{code:i}=e,c=e.format??l.format,s=e.language??l.language??"jsx",d=e.dark??l.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:c,language:s,dark:d};let u=t.getStoryContext(n),h=e.__forceInitialArgs?u.initialArgs:u.unmappedArgs,g=WI(n.id,h,r);return c=g.format??((E=(m=n.parameters.docs)==null?void 0:m.source)==null?void 0:E.format)??!1,{code:qI({snippet:g.code,storyContext:{...u,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:c,language:s,dark:d}};function YI(e,t){let r=KI([e],t);return r&&r[0]}function KI(e,t){let[r,n]=o.useState({});return o.useEffect(()=>{Promise.all(e.map(async a=>{let l=await t.loadStory(a);n(i=>i[a]===l?i:{...i,[a]:l})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var XI=(e,t)=>{let{of:r,meta:n}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return n&&t.referenceMeta(n,!1),t.resolveOf(r||"story",["story"]).story.id},ZI=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,l=a.story||{};if(a.disable)return null;if(e.inline??l.inline??!1){let c=e.height??l.height,s=e.autoplay??l.autoplay??!1;return{story:t,inline:!0,height:c,autoplay:s,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??l.height??l.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},JI=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=o.useContext(Ae),r=XI(e,t),n=YI(r,t);if(!n)return p.createElement(T1,null);let a=ZI(e,n,t);return a?p.createElement(FC,{...a}):null},QI=e=>{var g,f,v,m,E,x,y,b,w,S;let t=o.useContext(Ae),r=o.useContext(Y1),{of:n,source:a}=e;if("of"in e&&n===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story:l}=Yr(n||"story",["story"]),i=GI({...a,...n&&{of:n}},t,r),c=e.layout??l.parameters.layout??((f=(g=l.parameters.docs)==null?void 0:g.canvas)==null?void 0:f.layout)??"padded",s=e.withToolbar??((m=(v=l.parameters.docs)==null?void 0:v.canvas)==null?void 0:m.withToolbar)??!1,d=e.additionalActions??((x=(E=l.parameters.docs)==null?void 0:E.canvas)==null?void 0:x.additionalActions),u=e.sourceState??((b=(y=l.parameters.docs)==null?void 0:y.canvas)==null?void 0:b.sourceState)??"hidden",h=e.className??((S=(w=l.parameters.docs)==null?void 0:w.canvas)==null?void 0:S.className);return p.createElement(M1,{withSource:u==="none"?void 0:i,isExpanded:u==="shown",withToolbar:s,additionalActions:d,className:h,layout:c},p.createElement(JI,{of:n||l.moduleExport,meta:e.meta,...e.story}))},eA=(e,t)=>{let r=t.getStoryContext(e),[n,a]=o.useState(r.globals);return o.useEffect(()=>{let l=i=>{a(i.globals)};return t.channel.on(c0,l),()=>t.channel.off(c0,l)},[t.channel]),[n]},tA=(e,t)=>{let r=rA(e,t);if(!r)throw new Error("No result when story was defined");return r},rA=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,l]=o.useState(r.args);o.useEffect(()=>{let s=d=>{d.storyId===n&&l(d.args)};return t.channel.on(d0,s),()=>t.channel.off(d0,s)},[n,t.channel]);let i=o.useCallback(s=>t.channel.emit(vC,{storyId:n,updatedArgs:s}),[n,t.channel]),c=o.useCallback(s=>t.channel.emit(bC,{storyId:n,argNames:s}),[n,t.channel]);return e&&[a,i,c]};function nA(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var aA=e=>{var w;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=o.useContext(Ae),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:l,component:i,subcomponents:c}=n,s=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??s.include,u=e.exclude??s.exclude,h=e.sort??s.sort,[g,f,v]=tA(n,r),[m]=eA(n,r),E=s0(l,d,u);if(!(c&&Object.keys(c).length>0))return Object.keys(E).length>0||Object.keys(g).length>0?p.createElement(uo,{rows:E,sort:h,args:g,globals:m,updateArgs:f,resetArgs:v}):null;let x=DI(i),y=Object.fromEntries(Object.entries(c).map(([S,C])=>[S,{rows:s0(nA(C,a),d,u),sort:h}])),b={[x]:{rows:E,sort:h},...y};return p.createElement(FI,{tabs:b,sort:h,args:g,globals:m,updateArgs:f,resetArgs:v})},{document:X1}=Te,oA=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return p.createElement(Zo,null,t);let n=e&&e.split("-");return p.createElement(xl,{language:n&&n[1]||"text",format:!1,code:t,...r})};function Rl(e,t){e.channel.emit(yC,t)}var po=Dc.a,lA=({hash:e,children:t})=>{let r=o.useContext(Ae);return p.createElement(po,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);X1.getElementById(a)&&Rl(r,e)}},t)},iA=e=>{let{href:t,target:r,children:n,...a}=e,l=o.useContext(Ae);if(t){if(t.startsWith("#"))return p.createElement(lA,{hash:t},n);if(r!=="_blank"&&!t.startsWith("https://"))return p.createElement(po,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),Rl(l,i.currentTarget.getAttribute("href")))},target:r,...a},n)}return p.createElement(po,{...e})},Z1=["h1","h2","h3","h4","h5","h6"],sA=Z1.reduce((e,t)=>({...e,[t]:A(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),cA=A.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),dA=({as:e,id:t,children:r,...n})=>{let a=o.useContext(Ae),l=sA[e],i=`#${t}`;return p.createElement(l,{id:t,...n},p.createElement(cA,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:c=>{X1.getElementById(t)&&Rl(a,i)}},p.createElement(Qs,null)),r)},Il=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return p.createElement(dA,{as:t,id:r,...a},n);let l=t,{as:i,...c}=e;return p.createElement(l,{...te(c,t)})},uA=Z1.reduce((e,t)=>({...e,[t]:r=>p.createElement(Il,{as:t,...r})}),{}),pA=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(Ed`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' This is often caused by not wrapping the child in a template string. This is invalid: @@ -479,4 +479,4 @@ ${t}`);let r=t.match(p7);if(!r)return p.createElement(o.Fragment,null,t);let[,n, A paragraph \`} - `);return p.createElement(h1,{...e,options:{forceBlock:!0,overrides:{code:oA,a:iA,...uA,...(t=e==null?void 0:e.options)==null?void 0:t.overrides},...e==null?void 0:e.options}})},fA=(e=>(e.INFO="info",e.NOTES="notes",e.DOCGEN="docgen",e.AUTO="auto",e))(fA||{}),hA=e=>{var t,r,n,a,l,i,c,s;switch(e.type){case"story":return((r=(t=e.story.parameters.docs)==null?void 0:t.description)==null?void 0:r.story)||null;case"meta":{let{parameters:d,component:u}=e.preparedMeta;return((a=(n=d.docs)==null?void 0:n.description)==null?void 0:a.component)||((i=(l=d.docs)==null?void 0:l.extractComponentDescription)==null?void 0:i.call(l,u,{component:u,parameters:d}))||null}case"component":{let{component:d,projectAnnotations:{parameters:u}}=e;return((s=(c=u.docs)==null?void 0:c.extractComponentDescription)==null?void 0:s.call(c,d,{component:d,parameters:u}))||null}default:throw new Error(`Unrecognized module type resolved from 'useOf', got: ${e.type}`)}},fo=e=>{let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=Yr(t||"meta"),n=hA(r);return n?p.createElement(pA,null,n):null},gA=A.div(({theme:e})=>({width:"10rem","@media (max-width: 768px)":{display:"none"}})),mA=A.div(({theme:e})=>({position:"fixed",bottom:0,top:0,width:"10rem",paddingTop:"4rem",paddingBottom:"2rem",overflowY:"auto",fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch","& *":{boxSizing:"border-box"},"& > .toc-wrapper > .toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`}}},"& .toc-list-item":{position:"relative",listStyleType:"none",marginLeft:20,paddingTop:3,paddingBottom:3},"& .toc-list-item::before":{content:'""',position:"absolute",height:"100%",top:0,left:0,transform:"translateX(calc(-2px - 20px))",borderLeft:`solid 2px ${e.color.mediumdark}`,opacity:0,transition:"opacity 0.2s"},"& .toc-list-item.is-active-li::before":{opacity:1},"& .toc-list-item > a":{color:e.color.defaultText,textDecoration:"none"},"& .toc-list-item.is-active-li > a":{fontWeight:600,color:e.color.secondary,textDecoration:"none"}})),vA=A.p(({theme:e})=>({fontWeight:600,fontSize:"0.875em",color:e.textColor,textTransform:"uppercase",marginBottom:10})),bA=({title:e})=>e===null?null:typeof e=="string"?p.createElement(vA,null,e):e,yA=({title:e,disable:t,headingSelector:r,contentsSelector:n,ignoreSelector:a,unsafeTocbotOptions:l})=>(o.useEffect(()=>{let i={tocSelector:".toc-wrapper",contentSelector:n??".sbdocs-content",headingSelector:r??"h3",ignoreSelector:a??".docs-story *, .skip-toc",headingsOffset:40,scrollSmoothOffset:-40,orderedList:!1,onClick:()=>!1,...l},c=setTimeout(()=>i0.init(i),100);return()=>{clearTimeout(c),i0.destroy()}},[t]),p.createElement(p.Fragment,null,p.createElement(gA,null,t?null:p.createElement(mA,null,p.createElement(bA,{title:e||null}),p.createElement("div",{className:"toc-wrapper"}))))),{document:wA,window:xA}=Te,EA=({context:e,theme:t,children:r})=>{var a,l,i,c,s;let n;try{n=(l=(a=e.resolveOf("meta",["meta"]).preparedMeta.parameters)==null?void 0:a.docs)==null?void 0:l.toc}catch{n=(s=(c=(i=e==null?void 0:e.projectAnnotations)==null?void 0:i.parameters)==null?void 0:c.docs)==null?void 0:s.toc}return o.useEffect(()=>{let d;try{if(d=new URL(xA.parent.location.toString()),d.hash){let u=wA.getElementById(d.hash.substring(1));u&&setTimeout(()=>{VI(u)},200)}}catch{}}),p.createElement(Ae.Provider,{value:e},p.createElement(UI,{channel:e.channel},p.createElement(ts,{theme:Gp(t)},p.createElement(_C,{toc:n?p.createElement(yA,{className:"sbdocs sbdocs-toc--custom",...n}):null},r))))},SA=/\s*\/\s*/,CA=e=>{let t=e.trim().split(SA);return t&&t[t.length-1]||e},RA=({children:e})=>{let t=o.useContext(Ae),r=e||CA(t.storyById().title);return r?p.createElement(CC,{className:"sbdocs-title sb-unstyled"},r):null},IA=({children:e})=>{var n;let t=o.useContext(Ae),r=e||((n=t.storyById().parameters)==null?void 0:n.componentSubtitle);return r?p.createElement(RC,{className:"sbdocs-subtitle sb-unstyled"},r):null},AA=({children:e,disableAnchor:t})=>{if(t||typeof e!="string")return p.createElement(Qo,null,e);let r=globalThis.encodeURIComponent(e.toLowerCase());return p.createElement(Il,{as:"h3",id:r},e)},J1=({of:e,expanded:t=!0,withToolbar:r=!1,__forceInitialArgs:n=!1,__primary:a=!1})=>{var c,s;let{story:l}=Yr(e||"story",["story"]),i=((s=(c=l.parameters.docs)==null?void 0:c.canvas)==null?void 0:s.withToolbar)??r;return p.createElement(q1,{storyId:l.id},t&&p.createElement(p.Fragment,null,p.createElement(AA,null,l.name),p.createElement(fo,{of:e})),p.createElement(QI,{of:e,withToolbar:i,story:{__forceInitialArgs:n,__primary:a},source:{__forceInitialArgs:n}}))},_A=e=>{let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{csfFile:r}=Yr(t||"meta",["meta"]),n=o.useContext(Ae).componentStoriesFromCSFFile(r)[0];return n?p.createElement(J1,{of:n.moduleExport,expanded:!1,__primary:!0,withToolbar:!0}):null},kA=({children:e,disableAnchor:t,...r})=>{if(t||typeof e!="string")return p.createElement(Jo,null,e);let n=e.toLowerCase().replace(/[^a-z0-9]/gi,"-");return p.createElement(Il,{as:"h2",id:n,...r},e)},OA=A(kA)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,fontWeight:e.typography.weight.bold,lineHeight:"16px",letterSpacing:"0.35em",textTransform:"uppercase",color:e.textMutedColor,border:0,marginBottom:"12px","&:first-of-type":{marginTop:"56px"}})),TA=({title:e="Stories",includePrimary:t=!0})=>{var c;let{componentStories:r,projectAnnotations:n,getStoryContext:a}=o.useContext(Ae),l=r(),{stories:{filter:i}={filter:void 0}}=((c=n.parameters)==null?void 0:c.docs)||{};return i&&(l=l.filter(s=>i(s,a(s)))),t||(l=l.slice(1)),!l||l.length===0?null:p.createElement(p.Fragment,null,p.createElement(OA,null,e),l.map(s=>s&&p.createElement(J1,{key:s.id,of:s.moduleExport,expanded:!0,__forceInitialArgs:!0})))},MA=()=>{let e=Yr("meta",["meta"]),{stories:t}=e.csfFile,r=Object.keys(t).length===1;return p.createElement(p.Fragment,null,p.createElement(RA,null),p.createElement(IA,null),p.createElement(fo,{of:"meta"}),r?p.createElement(fo,{of:"story"}):null,p.createElement(_A,null),p.createElement(aA,null),r?null:p.createElement(TA,null))};function VA({context:e,docsParameter:t}){let r=t.container||EA,n=t.page||MA;return p.createElement(r,{context:e,theme:t.theme},p.createElement(n,null))}var UA=({of:e})=>{let t=o.useContext(Ae);e&&t.referenceMeta(e,!0);try{let r=t.storyById();return p.createElement(q1,{storyId:r.id})}catch{return null}};export{iA as A,oA as C,VA as D,Nt as F,uA as H,UA as M,Po as S,K7 as T,Vg as W,hh as a,Vs as b,Os as c,JI as d,N7 as e,$m as f,Fe as g,Dt as m,A as n,FA as s}; + `);return p.createElement(h1,{...e,options:{forceBlock:!0,overrides:{code:oA,a:iA,...uA,...(t=e==null?void 0:e.options)==null?void 0:t.overrides},...e==null?void 0:e.options}})},fA=(e=>(e.INFO="info",e.NOTES="notes",e.DOCGEN="docgen",e.AUTO="auto",e))(fA||{}),hA=e=>{var t,r,n,a,l,i,c,s;switch(e.type){case"story":return((r=(t=e.story.parameters.docs)==null?void 0:t.description)==null?void 0:r.story)||null;case"meta":{let{parameters:d,component:u}=e.preparedMeta;return((a=(n=d.docs)==null?void 0:n.description)==null?void 0:a.component)||((i=(l=d.docs)==null?void 0:l.extractComponentDescription)==null?void 0:i.call(l,u,{component:u,parameters:d}))||null}case"component":{let{component:d,projectAnnotations:{parameters:u}}=e;return((s=(c=u.docs)==null?void 0:c.extractComponentDescription)==null?void 0:s.call(c,d,{component:d,parameters:u}))||null}default:throw new Error(`Unrecognized module type resolved from 'useOf', got: ${e.type}`)}},fo=e=>{let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=Yr(t||"meta"),n=hA(r);return n?p.createElement(pA,null,n):null},gA=A.div(({theme:e})=>({width:"10rem","@media (max-width: 768px)":{display:"none"}})),mA=A.div(({theme:e})=>({position:"fixed",bottom:0,top:0,width:"10rem",paddingTop:"4rem",paddingBottom:"2rem",overflowY:"auto",fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch","& *":{boxSizing:"border-box"},"& > .toc-wrapper > .toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`}}},"& .toc-list-item":{position:"relative",listStyleType:"none",marginLeft:20,paddingTop:3,paddingBottom:3},"& .toc-list-item::before":{content:'""',position:"absolute",height:"100%",top:0,left:0,transform:"translateX(calc(-2px - 20px))",borderLeft:`solid 2px ${e.color.mediumdark}`,opacity:0,transition:"opacity 0.2s"},"& .toc-list-item.is-active-li::before":{opacity:1},"& .toc-list-item > a":{color:e.color.defaultText,textDecoration:"none"},"& .toc-list-item.is-active-li > a":{fontWeight:600,color:e.color.secondary,textDecoration:"none"}})),vA=A.p(({theme:e})=>({fontWeight:600,fontSize:"0.875em",color:e.textColor,textTransform:"uppercase",marginBottom:10})),bA=({title:e})=>e===null?null:typeof e=="string"?p.createElement(vA,null,e):e,yA=({title:e,disable:t,headingSelector:r,contentsSelector:n,ignoreSelector:a,unsafeTocbotOptions:l})=>(o.useEffect(()=>{let i={tocSelector:".toc-wrapper",contentSelector:n??".sbdocs-content",headingSelector:r??"h3",ignoreSelector:a??".docs-story *, .skip-toc",headingsOffset:40,scrollSmoothOffset:-40,orderedList:!1,onClick:()=>!1,...l},c=setTimeout(()=>i0.init(i),100);return()=>{clearTimeout(c),i0.destroy()}},[t]),p.createElement(p.Fragment,null,p.createElement(gA,null,t?null:p.createElement(mA,null,p.createElement(bA,{title:e||null}),p.createElement("div",{className:"toc-wrapper"}))))),{document:wA,window:xA}=Te,EA=({context:e,theme:t,children:r})=>{var a,l,i,c,s;let n;try{n=(l=(a=e.resolveOf("meta",["meta"]).preparedMeta.parameters)==null?void 0:a.docs)==null?void 0:l.toc}catch{n=(s=(c=(i=e==null?void 0:e.projectAnnotations)==null?void 0:i.parameters)==null?void 0:c.docs)==null?void 0:s.toc}return o.useEffect(()=>{let d;try{if(d=new URL(xA.parent.location.toString()),d.hash){let u=wA.getElementById(d.hash.substring(1));u&&setTimeout(()=>{VI(u)},200)}}catch{}}),p.createElement(Ae.Provider,{value:e},p.createElement(UI,{channel:e.channel},p.createElement(ts,{theme:Gp(t)},p.createElement(_C,{toc:n?p.createElement(yA,{className:"sbdocs sbdocs-toc--custom",...n}):null},r))))},SA=/\s*\/\s*/,CA=e=>{let t=e.trim().split(SA);return t&&t[t.length-1]||e},RA=({children:e})=>{let t=o.useContext(Ae),r=e||CA(t.storyById().title);return r?p.createElement(CC,{className:"sbdocs-title sb-unstyled"},r):null},IA=({children:e})=>{var n;let t=o.useContext(Ae),r=e||((n=t.storyById().parameters)==null?void 0:n.componentSubtitle);return r?p.createElement(RC,{className:"sbdocs-subtitle sb-unstyled"},r):null},AA=({children:e,disableAnchor:t})=>{if(t||typeof e!="string")return p.createElement(Qo,null,e);let r=globalThis.encodeURIComponent(e.toLowerCase());return p.createElement(Il,{as:"h3",id:r},e)},J1=({of:e,expanded:t=!0,withToolbar:r=!1,__forceInitialArgs:n=!1,__primary:a=!1})=>{var c,s;let{story:l}=Yr(e||"story",["story"]),i=((s=(c=l.parameters.docs)==null?void 0:c.canvas)==null?void 0:s.withToolbar)??r;return p.createElement(q1,{storyId:l.id},t&&p.createElement(p.Fragment,null,p.createElement(AA,null,l.name),p.createElement(fo,{of:e})),p.createElement(QI,{of:e,withToolbar:i,story:{__forceInitialArgs:n,__primary:a},source:{__forceInitialArgs:n}}))},_A=e=>{let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{csfFile:r}=Yr(t||"meta",["meta"]),n=o.useContext(Ae).componentStoriesFromCSFFile(r)[0];return n?p.createElement(J1,{of:n.moduleExport,expanded:!1,__primary:!0,withToolbar:!0}):null},kA=({children:e,disableAnchor:t,...r})=>{if(t||typeof e!="string")return p.createElement(Jo,null,e);let n=e.toLowerCase().replace(/[^a-z0-9]/gi,"-");return p.createElement(Il,{as:"h2",id:n,...r},e)},OA=A(kA)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,fontWeight:e.typography.weight.bold,lineHeight:"16px",letterSpacing:"0.35em",textTransform:"uppercase",color:e.textMutedColor,border:0,marginBottom:"12px","&:first-of-type":{marginTop:"56px"}})),TA=({title:e="Stories",includePrimary:t=!0})=>{var c;let{componentStories:r,projectAnnotations:n,getStoryContext:a}=o.useContext(Ae),l=r(),{stories:{filter:i}={filter:void 0}}=((c=n.parameters)==null?void 0:c.docs)||{};return i&&(l=l.filter(s=>i(s,a(s)))),t||(l=l.slice(1)),!l||l.length===0?null:p.createElement(p.Fragment,null,p.createElement(OA,null,e),l.map(s=>s&&p.createElement(J1,{key:s.id,of:s.moduleExport,expanded:!0,__forceInitialArgs:!0})))},MA=()=>{let e=Yr("meta",["meta"]),{stories:t}=e.csfFile,r=Object.keys(t).length===1;return p.createElement(p.Fragment,null,p.createElement(RA,null),p.createElement(IA,null),p.createElement(fo,{of:"meta"}),r?p.createElement(fo,{of:"story"}):null,p.createElement(_A,null),p.createElement(aA,null),r?null:p.createElement(TA,null))};function VA({context:e,docsParameter:t}){let r=t.container||EA,n=t.page||MA;return p.createElement(r,{context:e,theme:t.theme},p.createElement(n,null))}var UA=({of:e})=>{let t=o.useContext(Ae);e&&t.referenceMeta(e,!0);try{let r=t.storyById();return p.createElement(q1,{storyId:r.id})}catch{return null}};export{iA as A,aA as C,VA as D,Nt as F,uA as H,UA as M,Po as S,K7 as T,Vg as W,hh as a,Vs as b,Os as c,JI as d,oA as e,N7 as f,$m as g,Fe as h,Dt as m,A as n,FA as s}; diff --git a/docs/assets/preview-DClWTqGL.js b/docs/assets/preview-MHbL11ZG.js similarity index 65% rename from docs/assets/preview-DClWTqGL.js rename to docs/assets/preview-MHbL11ZG.js index b77f2e5..5121f3f 100644 --- a/docs/assets/preview-DClWTqGL.js +++ b/docs/assets/preview-MHbL11ZG.js @@ -1,7 +1,7 @@ function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./DocsRenderer-K4EAMTCU-CsI0HbRn.js","./iframe-C3OM9s_A.js","./index-BBkUAzwr.js","./react-18-B-OKcmzb.js","./index-PqR-_bA4.js","./index-iQvBBB1Z.js","./index-DrlA5mbP.js","./index-DrFu-skq.js"] + __vite__mapDeps.viteFileDeps = ["./DocsRenderer-K4EAMTCU-13PP_yj2.js","./iframe-5rd2FdmP.js","./index-BBkUAzwr.js","./react-18-B-OKcmzb.js","./index-PqR-_bA4.js","./index-BLJ7OnYF.js","./index-DrlA5mbP.js","./index-DrFu-skq.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } -import{_ as a}from"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";const{global:s}=__STORYBOOK_MODULE_GLOBAL__;var _=Object.entries(s.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-K4EAMTCU-CsI0HbRn.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>_[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters}; +import{_ as a}from"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";const{global:s}=__STORYBOOK_MODULE_GLOBAL__;var _=Object.entries(s.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-K4EAMTCU-13PP_yj2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>_[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters}; diff --git a/docs/assets/preview-C7c1sqri.js b/docs/assets/preview-m58XexFJ.js similarity index 66% rename from docs/assets/preview-C7c1sqri.js rename to docs/assets/preview-m58XexFJ.js index 7f76cdd..2de43b1 100644 --- a/docs/assets/preview-C7c1sqri.js +++ b/docs/assets/preview-m58XexFJ.js @@ -1 +1 @@ -const o={parameters:{controls:{matchers:{color:/(background|color)$/i,date:/Date$/i}},options:{storySort:{order:["nbody","Installation","Quick Start","Integration","Contribute","Define",["Intro","Force","Simulate Function","Transformation"],"Visualize",["Intro","Dimension","Multiverse","Record","Controller","Trails","Debug Info"],"Showcase",["Intro","Analemma",["Intro","Sun-Earth"],"HorseshoeOrbit",["Intro","54509 YORP"],"SolarSystem"]]}}}};export{o as default}; +const o={parameters:{controls:{matchers:{color:/(background|color)$/i,date:/Date$/i}},options:{storySort:{order:["nbody","Installation","Quick Start","Integration","Contribute","Define",["Intro","Force","Simulate Function","Transformation"],"Visualize",["Intro","Dimension","Multiverse","Record","Controller","Trails","Debug Info"],"Showcase",["Intro","Analemma",["Intro","Sun-Earth","Sun-Mars"],"HorseshoeOrbit",["Intro","54509 YORP"],"SolarSystem"]]}}}};export{o as default}; diff --git a/docs/assets/syntaxhighlighter-JOJW2KGS-DUP3RXnD.js b/docs/assets/syntaxhighlighter-JOJW2KGS-psPRdUjt.js similarity index 62% rename from docs/assets/syntaxhighlighter-JOJW2KGS-DUP3RXnD.js rename to docs/assets/syntaxhighlighter-JOJW2KGS-psPRdUjt.js index 1c14138..0cc53c1 100644 --- a/docs/assets/syntaxhighlighter-JOJW2KGS-DUP3RXnD.js +++ b/docs/assets/syntaxhighlighter-JOJW2KGS-psPRdUjt.js @@ -1 +1 @@ -import{S as s,c as g,s as n,a as u}from"./index-iQvBBB1Z.js";import"./iframe-C3OM9s_A.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";export{s as SyntaxHighlighter,g as createCopyToClipboardFunction,n as default,u as supportedLanguages}; +import{S as s,c as g,s as n,a as u}from"./index-BLJ7OnYF.js";import"./iframe-5rd2FdmP.js";import"../sb-preview/runtime.js";import"./index-BBkUAzwr.js";import"./index-PqR-_bA4.js";import"./index-DrlA5mbP.js";import"./index-DrFu-skq.js";export{s as SyntaxHighlighter,g as createCopyToClipboardFunction,n as default,u as supportedLanguages}; diff --git a/docs/iframe.html b/docs/iframe.html index f628fb5..a68e82d 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -394,7 +394,7 @@ } - + diff --git a/docs/index.json b/docs/index.json index 5fb2b22..099ad83 100644 --- a/docs/index.json +++ b/docs/index.json @@ -1 +1 @@ -{"v":4,"entries":{"nbody--docs":{"id":"nbody--docs","title":"nbody","name":"Docs","importPath":"./.storybook/stories/Nbody.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"installation--docs":{"id":"installation--docs","title":"Installation","name":"Docs","importPath":"./.storybook/stories/Install.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"quick-start--docs":{"id":"quick-start--docs","title":"Quick Start","name":"Docs","importPath":"./.storybook/stories/QuickStart.mdx","storiesImports":["./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"integration--docs":{"id":"integration--docs","title":"Integration","name":"Docs","importPath":"./.storybook/stories/Integration.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"contribute--docs":{"id":"contribute--docs","title":"Contribute","name":"Docs","importPath":"./.storybook/stories/Contribute.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"define-intro--docs":{"id":"define-intro--docs","title":"Define/Intro","name":"Docs","importPath":"./.storybook/stories/Define/Intro.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"define-force--docs":{"id":"define-force--docs","title":"Define/Force","name":"Docs","importPath":"./.storybook/stories/Define/Force.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"define-simulate-function--docs":{"id":"define-simulate-function--docs","title":"Define/Simulate Function","name":"Docs","importPath":"./.storybook/stories/Define/SimulateFunction.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"define-transformation--docs":{"id":"define-transformation--docs","title":"Define/Transformation","name":"Docs","importPath":"./.storybook/stories/Define/Transformation.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-intro--docs":{"id":"visualize-intro--docs","title":"Visualize/Intro","name":"Docs","importPath":"./.storybook/stories/Visualize/Intro.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-dimension--docs":{"id":"visualize-dimension--docs","title":"Visualize/Dimension","name":"Docs","importPath":"./.storybook/stories/Visualize/Dimension/Dimension.mdx","storiesImports":["./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-dimension--two-d":{"type":"story","id":"visualize-dimension--two-d","name":"Two D","title":"Visualize/Dimension","importPath":"./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx","tags":["story"]},"visualize-dimension--three-d":{"type":"story","id":"visualize-dimension--three-d","name":"Three D","title":"Visualize/Dimension","importPath":"./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx","tags":["story"]},"visualize-multiverse--docs":{"id":"visualize-multiverse--docs","title":"Visualize/Multiverse","name":"Docs","importPath":"./.storybook/stories/Visualize/Multiverse/Multiverse.mdx","storiesImports":["./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-multiverse--single-universe":{"type":"story","id":"visualize-multiverse--single-universe","name":"Single Universe","title":"Visualize/Multiverse","importPath":"./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx","tags":["story"]},"visualize-multiverse--multiverse":{"type":"story","id":"visualize-multiverse--multiverse","name":"Multiverse","title":"Visualize/Multiverse","importPath":"./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx","tags":["story"]},"visualize-multiverse--multiverse-3-d":{"type":"story","id":"visualize-multiverse--multiverse-3-d","name":"Multiverse 3 D","title":"Visualize/Multiverse","importPath":"./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx","tags":["story"]},"visualize-record--docs":{"id":"visualize-record--docs","title":"Visualize/Record","name":"Docs","importPath":"./.storybook/stories/Visualize/Record/Record.mdx","storiesImports":["./.storybook/stories/Visualize/Record/Record.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-record--real-time":{"type":"story","id":"visualize-record--real-time","name":"Real Time","title":"Visualize/Record","importPath":"./.storybook/stories/Visualize/Record/Record.stories.tsx","tags":["story"]},"visualize-record--recorded":{"type":"story","id":"visualize-record--recorded","name":"Recorded","title":"Visualize/Record","importPath":"./.storybook/stories/Visualize/Record/Record.stories.tsx","tags":["story"]},"visualize-record--recorded-looped":{"type":"story","id":"visualize-record--recorded-looped","name":"Recorded Looped","title":"Visualize/Record","importPath":"./.storybook/stories/Visualize/Record/Record.stories.tsx","tags":["story"]},"visualize-controller--docs":{"id":"visualize-controller--docs","title":"Visualize/Controller","name":"Docs","importPath":"./.storybook/stories/Visualize/Controller/Controller.mdx","storiesImports":["./.storybook/stories/Visualize/Controller/Controller.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-controller--none":{"type":"story","id":"visualize-controller--none","name":"None","title":"Visualize/Controller","importPath":"./.storybook/stories/Visualize/Controller/Controller.stories.tsx","tags":["story"]},"visualize-controller--ui":{"type":"story","id":"visualize-controller--ui","name":"Ui","title":"Visualize/Controller","importPath":"./.storybook/stories/Visualize/Controller/Controller.stories.tsx","tags":["story"]},"visualize-controller--code":{"type":"story","id":"visualize-controller--code","name":"Code","title":"Visualize/Controller","importPath":"./.storybook/stories/Visualize/Controller/Controller.stories.tsx","tags":["story"]},"visualize-trails--docs":{"id":"visualize-trails--docs","title":"Visualize/Trails","name":"Docs","importPath":"./.storybook/stories/Visualize/Trails/Trails.mdx","storiesImports":["./.storybook/stories/Visualize/Trails/Trails.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-trails--show-trails-off":{"type":"story","id":"visualize-trails--show-trails-off","name":"Show Trails Off","title":"Visualize/Trails","importPath":"./.storybook/stories/Visualize/Trails/Trails.stories.tsx","tags":["story"]},"visualize-trails--show-trails-on":{"type":"story","id":"visualize-trails--show-trails-on","name":"Show Trails On","title":"Visualize/Trails","importPath":"./.storybook/stories/Visualize/Trails/Trails.stories.tsx","tags":["story"]},"visualize-debug-info--docs":{"id":"visualize-debug-info--docs","title":"Visualize/Debug Info","name":"Docs","importPath":"./.storybook/stories/Visualize/Debug Info/Debug.mdx","storiesImports":["./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-debug-info--debug-info-on":{"type":"story","id":"visualize-debug-info--debug-info-on","name":"Debug Info On","title":"Visualize/Debug Info","importPath":"./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx","tags":["story"]},"visualize-debug-info--debug-info-off":{"type":"story","id":"visualize-debug-info--debug-info-off","name":"Debug Info Off","title":"Visualize/Debug Info","importPath":"./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx","tags":["story"]},"visualize-debug-info--ui":{"type":"story","id":"visualize-debug-info--ui","name":"Ui","title":"Visualize/Debug Info","importPath":"./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx","tags":["story"]},"showcase-intro--docs":{"id":"showcase-intro--docs","title":"Showcase/Intro","name":"Docs","importPath":"./.storybook/stories/Showcase/Intro.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-analemma--sun-earth-analemma":{"type":"story","id":"showcase-analemma--sun-earth-analemma","name":"Sun Earth Analemma","title":"Showcase/Analemma","importPath":"./.storybook/stories/Showcase/Analemma/Analemma.stories.tsx","tags":["story"]},"showcase-analemma-intro--docs":{"id":"showcase-analemma-intro--docs","title":"Showcase/Analemma/Intro","name":"Docs","importPath":"./.storybook/stories/Showcase/Analemma/Analemma.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-analemma-sun-earth--docs":{"id":"showcase-analemma-sun-earth--docs","title":"Showcase/Analemma/Sun-Earth","name":"Docs","importPath":"./.storybook/stories/Showcase/Analemma/Sun-Earth.mdx","storiesImports":["./.storybook/stories/Showcase/Analemma/Analemma.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-horseshoeorbit-intro--docs":{"id":"showcase-horseshoeorbit-intro--docs","title":"Showcase/HorseshoeOrbit/Intro","name":"Docs","importPath":"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.mdx","storiesImports":["./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-horseshoeorbit-54509-yorp--docs":{"id":"showcase-horseshoeorbit-54509-yorp--docs","title":"Showcase/HorseshoeOrbit/54509 YORP","name":"Docs","importPath":"./.storybook/stories/Showcase/HorseshoeOrbit/54509 YORP.mdx","storiesImports":["./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-solarsystem--docs":{"id":"showcase-solarsystem--docs","title":"Showcase/SolarSystem","name":"Docs","importPath":"./.storybook/stories/Showcase/SolarSystem/SolarSystem.mdx","storiesImports":["./.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-horseshoe-orbit--yorp":{"type":"story","id":"showcase-horseshoe-orbit--yorp","name":"YORP","title":"Showcase/Horseshoe Orbit","importPath":"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx","tags":["story"]},"showcase-solar-system--solar-system":{"type":"story","id":"showcase-solar-system--solar-system","name":"Solar System","title":"Showcase/Solar System","importPath":"./.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx","tags":["story"]}}} +{"v":4,"entries":{"nbody--docs":{"id":"nbody--docs","title":"nbody","name":"Docs","importPath":"./.storybook/stories/Nbody.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"installation--docs":{"id":"installation--docs","title":"Installation","name":"Docs","importPath":"./.storybook/stories/Install.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"quick-start--docs":{"id":"quick-start--docs","title":"Quick Start","name":"Docs","importPath":"./.storybook/stories/QuickStart.mdx","storiesImports":["./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"integration--docs":{"id":"integration--docs","title":"Integration","name":"Docs","importPath":"./.storybook/stories/Integration.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"contribute--docs":{"id":"contribute--docs","title":"Contribute","name":"Docs","importPath":"./.storybook/stories/Contribute.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"define-intro--docs":{"id":"define-intro--docs","title":"Define/Intro","name":"Docs","importPath":"./.storybook/stories/Define/Intro.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"define-force--docs":{"id":"define-force--docs","title":"Define/Force","name":"Docs","importPath":"./.storybook/stories/Define/Force.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"define-simulate-function--docs":{"id":"define-simulate-function--docs","title":"Define/Simulate Function","name":"Docs","importPath":"./.storybook/stories/Define/SimulateFunction.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"define-transformation--docs":{"id":"define-transformation--docs","title":"Define/Transformation","name":"Docs","importPath":"./.storybook/stories/Define/Transformation.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-intro--docs":{"id":"visualize-intro--docs","title":"Visualize/Intro","name":"Docs","importPath":"./.storybook/stories/Visualize/Intro.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-dimension--docs":{"id":"visualize-dimension--docs","title":"Visualize/Dimension","name":"Docs","importPath":"./.storybook/stories/Visualize/Dimension/Dimension.mdx","storiesImports":["./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-dimension--two-d":{"type":"story","id":"visualize-dimension--two-d","name":"Two D","title":"Visualize/Dimension","importPath":"./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx","tags":["story"]},"visualize-dimension--three-d":{"type":"story","id":"visualize-dimension--three-d","name":"Three D","title":"Visualize/Dimension","importPath":"./.storybook/stories/Visualize/Dimension/Dimension.stories.tsx","tags":["story"]},"visualize-multiverse--docs":{"id":"visualize-multiverse--docs","title":"Visualize/Multiverse","name":"Docs","importPath":"./.storybook/stories/Visualize/Multiverse/Multiverse.mdx","storiesImports":["./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-multiverse--single-universe":{"type":"story","id":"visualize-multiverse--single-universe","name":"Single Universe","title":"Visualize/Multiverse","importPath":"./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx","tags":["story"]},"visualize-multiverse--multiverse":{"type":"story","id":"visualize-multiverse--multiverse","name":"Multiverse","title":"Visualize/Multiverse","importPath":"./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx","tags":["story"]},"visualize-multiverse--multiverse-3-d":{"type":"story","id":"visualize-multiverse--multiverse-3-d","name":"Multiverse 3 D","title":"Visualize/Multiverse","importPath":"./.storybook/stories/Visualize/Multiverse/Multiverse.stories.tsx","tags":["story"]},"visualize-record--docs":{"id":"visualize-record--docs","title":"Visualize/Record","name":"Docs","importPath":"./.storybook/stories/Visualize/Record/Record.mdx","storiesImports":["./.storybook/stories/Visualize/Record/Record.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-record--real-time":{"type":"story","id":"visualize-record--real-time","name":"Real Time","title":"Visualize/Record","importPath":"./.storybook/stories/Visualize/Record/Record.stories.tsx","tags":["story"]},"visualize-record--recorded":{"type":"story","id":"visualize-record--recorded","name":"Recorded","title":"Visualize/Record","importPath":"./.storybook/stories/Visualize/Record/Record.stories.tsx","tags":["story"]},"visualize-record--recorded-looped":{"type":"story","id":"visualize-record--recorded-looped","name":"Recorded Looped","title":"Visualize/Record","importPath":"./.storybook/stories/Visualize/Record/Record.stories.tsx","tags":["story"]},"visualize-controller--docs":{"id":"visualize-controller--docs","title":"Visualize/Controller","name":"Docs","importPath":"./.storybook/stories/Visualize/Controller/Controller.mdx","storiesImports":["./.storybook/stories/Visualize/Controller/Controller.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-controller--none":{"type":"story","id":"visualize-controller--none","name":"None","title":"Visualize/Controller","importPath":"./.storybook/stories/Visualize/Controller/Controller.stories.tsx","tags":["story"]},"visualize-controller--ui":{"type":"story","id":"visualize-controller--ui","name":"Ui","title":"Visualize/Controller","importPath":"./.storybook/stories/Visualize/Controller/Controller.stories.tsx","tags":["story"]},"visualize-controller--code":{"type":"story","id":"visualize-controller--code","name":"Code","title":"Visualize/Controller","importPath":"./.storybook/stories/Visualize/Controller/Controller.stories.tsx","tags":["story"]},"visualize-trails--docs":{"id":"visualize-trails--docs","title":"Visualize/Trails","name":"Docs","importPath":"./.storybook/stories/Visualize/Trails/Trails.mdx","storiesImports":["./.storybook/stories/Visualize/Trails/Trails.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-trails--show-trails-off":{"type":"story","id":"visualize-trails--show-trails-off","name":"Show Trails Off","title":"Visualize/Trails","importPath":"./.storybook/stories/Visualize/Trails/Trails.stories.tsx","tags":["story"]},"visualize-trails--show-trails-on":{"type":"story","id":"visualize-trails--show-trails-on","name":"Show Trails On","title":"Visualize/Trails","importPath":"./.storybook/stories/Visualize/Trails/Trails.stories.tsx","tags":["story"]},"visualize-debug-info--docs":{"id":"visualize-debug-info--docs","title":"Visualize/Debug Info","name":"Docs","importPath":"./.storybook/stories/Visualize/Debug Info/Debug.mdx","storiesImports":["./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"visualize-debug-info--debug-info-on":{"type":"story","id":"visualize-debug-info--debug-info-on","name":"Debug Info On","title":"Visualize/Debug Info","importPath":"./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx","tags":["story"]},"visualize-debug-info--debug-info-off":{"type":"story","id":"visualize-debug-info--debug-info-off","name":"Debug Info Off","title":"Visualize/Debug Info","importPath":"./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx","tags":["story"]},"visualize-debug-info--ui":{"type":"story","id":"visualize-debug-info--ui","name":"Ui","title":"Visualize/Debug Info","importPath":"./.storybook/stories/Visualize/Debug Info/Debug.stories.tsx","tags":["story"]},"showcase-intro--docs":{"id":"showcase-intro--docs","title":"Showcase/Intro","name":"Docs","importPath":"./.storybook/stories/Showcase/Intro.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-analemma--sun-earth-analemma":{"type":"story","id":"showcase-analemma--sun-earth-analemma","name":"Sun Earth Analemma","title":"Showcase/Analemma","importPath":"./.storybook/stories/Showcase/Analemma/Analemma.stories.tsx","tags":["story"]},"showcase-analemma--sun-mars-analemma":{"type":"story","id":"showcase-analemma--sun-mars-analemma","name":"Sun Mars Analemma","title":"Showcase/Analemma","importPath":"./.storybook/stories/Showcase/Analemma/Analemma.stories.tsx","tags":["story"]},"showcase-analemma-intro--docs":{"id":"showcase-analemma-intro--docs","title":"Showcase/Analemma/Intro","name":"Docs","importPath":"./.storybook/stories/Showcase/Analemma/Intro.mdx","storiesImports":[],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-analemma-sun-earth--docs":{"id":"showcase-analemma-sun-earth--docs","title":"Showcase/Analemma/Sun-Earth","name":"Docs","importPath":"./.storybook/stories/Showcase/Analemma/Sun-Earth.mdx","storiesImports":["./.storybook/stories/Showcase/Analemma/Analemma.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-analemma-sun-mars--docs":{"id":"showcase-analemma-sun-mars--docs","title":"Showcase/Analemma/Sun-Mars","name":"Docs","importPath":"./.storybook/stories/Showcase/Analemma/Sun-Mars.mdx","storiesImports":["./.storybook/stories/Showcase/Analemma/Analemma.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-horseshoeorbit-intro--docs":{"id":"showcase-horseshoeorbit-intro--docs","title":"Showcase/HorseshoeOrbit/Intro","name":"Docs","importPath":"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.mdx","storiesImports":["./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-horseshoeorbit-54509-yorp--docs":{"id":"showcase-horseshoeorbit-54509-yorp--docs","title":"Showcase/HorseshoeOrbit/54509 YORP","name":"Docs","importPath":"./.storybook/stories/Showcase/HorseshoeOrbit/54509 YORP.mdx","storiesImports":["./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-solarsystem--docs":{"id":"showcase-solarsystem--docs","title":"Showcase/SolarSystem","name":"Docs","importPath":"./.storybook/stories/Showcase/SolarSystem/SolarSystem.mdx","storiesImports":["./.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx"],"type":"docs","tags":["unattached-mdx","docs"]},"showcase-horseshoe-orbit--yorp":{"type":"story","id":"showcase-horseshoe-orbit--yorp","name":"YORP","title":"Showcase/Horseshoe Orbit","importPath":"./.storybook/stories/Showcase/HorseshoeOrbit/HorseshoeOrbit.stories.tsx","tags":["story"]},"showcase-solar-system--solar-system":{"type":"story","id":"showcase-solar-system--solar-system","name":"Solar System","title":"Showcase/Solar System","importPath":"./.storybook/stories/Showcase/SolarSystem/SolarSystem.stories.tsx","tags":["story"]}}} diff --git a/docs/project.json b/docs/project.json index 2fed57f..8044c80 100644 --- a/docs/project.json +++ b/docs/project.json @@ -1 +1 @@ -{"generatedAt":1712562599303,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"packageManager":{"type":"yarn","version":"1.22.22"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","storybookVersion":"8.0.6","storybookVersionSpecifier":"^8.0.6","language":"typescript","storybookPackages":{"@chromatic-com/storybook":{"version":"1.3.1"},"@storybook/addon-interactions":{"version":"8.0.6"},"@storybook/addon-links":{"version":"8.0.6"},"@storybook/addon-onboarding":{"version":"8.0.6"},"@storybook/blocks":{"version":"8.0.6"},"@storybook/react":{"version":"8.0.6"},"@storybook/react-vite":{"version":"8.0.6"},"@storybook/test":{"version":"8.0.6"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.0.6"}},"addons":{"@storybook/addon-essentials":{"options":{"actions":false},"version":"8.0.6"}}} +{"generatedAt":1712682111779,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"packageManager":{"type":"yarn","version":"1.22.22"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","storybookVersion":"8.0.6","storybookVersionSpecifier":"^8.0.6","language":"typescript","storybookPackages":{"@chromatic-com/storybook":{"version":"1.3.1"},"@storybook/addon-interactions":{"version":"8.0.6"},"@storybook/addon-links":{"version":"8.0.6"},"@storybook/addon-onboarding":{"version":"8.0.6"},"@storybook/blocks":{"version":"8.0.6"},"@storybook/react":{"version":"8.0.6"},"@storybook/react-vite":{"version":"8.0.6"},"@storybook/test":{"version":"8.0.6"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.0.6"}},"addons":{"@storybook/addon-essentials":{"options":{"actions":false},"version":"8.0.6"}}} diff --git a/package.json b/package.json index 2c63cf4..44cc165 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nbody", - "version": "0.0.4", + "version": "0.1.0", "description": "Configure, simulate and visualize n-body interactions", "main": "./dist/src/index.js", "types": "./dist/types/src/index.d.ts", @@ -36,7 +36,8 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "lil-gui": "^0.19.2" + "lil-gui": "^0.19.2", + "stats.js": "^0.17.0" }, "devDependencies": { "@chromatic-com/storybook": "1.3.1", @@ -88,4 +89,4 @@ "plugin:storybook/recommended" ] } -} +} \ No newline at end of file diff --git a/src/CelestialBody.ts b/src/CelestialBody.ts index 7ee6602..eb49a85 100644 --- a/src/CelestialBody.ts +++ b/src/CelestialBody.ts @@ -13,6 +13,10 @@ export class CelestialBody { * Mean mass of the body. */ readonly mass: number; // mean mass + /** + * Mean mass of the body. + */ + readonly radius: number; // mean radius /** * Position vector of the body. */ @@ -30,6 +34,7 @@ export class CelestialBody { * Create a new CelestialBody with the provided information. * @param label label of the body. * @param mass mass of the body. + * @param radius radius of the body. * @param position position of the body. * @param velocity velocity of the body. * @param acceleration acceleration of the body. @@ -37,12 +42,14 @@ export class CelestialBody { constructor( label: string, mass: number, + radius: number, position: Vector3, velocity: Vector3, acceleration: Vector3, ) { this.label = label; this.mass = mass; + this.radius = radius; this.position = position; this.velocity = velocity; this.acceleration = acceleration; @@ -61,6 +68,7 @@ export class CelestialBody { return new CelestialBody( this.label, this.mass, + this.radius, position === undefined ? this.position.clone() : position, velocity === undefined ? this.velocity.clone() : velocity, acceleration === undefined ? this.acceleration.clone() : acceleration, diff --git a/src/Simulation.ts b/src/Simulation.ts index e3611c0..23712ff 100644 --- a/src/Simulation.ts +++ b/src/Simulation.ts @@ -84,7 +84,7 @@ export class Simulation { }; } = { speed: 1, - paused: true, + paused: false, showTrails: false, showUniverse: {}, }; @@ -279,24 +279,28 @@ export class Simulation { /** * Insert the simulation visualization in the div with the given id. * @param divId div id. - * @param speed initial time scale. - * @param paused whether to start the simulation paused. + * @param width width of the visualization. + * @param height height of the visualization. + * @param playSpeed initial time scale. + * @param startPaused whether to start the simulation paused. * @param recordFor number of seconds to record for, only used if in record mode. + * @param recordSpeed speed of the recording, only used if in record mode. */ start( divId: string, width: number, height: number, - speed: number = 1, - paused: boolean = false, - recordFor: number = 0, + playSpeed: number = 1, + startPaused: boolean = false, + recordFor: number = 1, + recordSpeed: number = 1, ): void { if (recordFor === undefined) { throw new Error('recordFor must be defined if record is true'); } - this.controls.paused = paused; - this.controls.speed = speed; - this.visualizer.start(divId, width, height, recordFor); + this.controls.paused = startPaused; + this.controls.speed = playSpeed; + this.visualizer.start(divId, width, height, recordFor, recordSpeed); } /** diff --git a/src/Visualizer.ts b/src/Visualizer.ts index a4ee9b9..8813e30 100644 --- a/src/Visualizer.ts +++ b/src/Visualizer.ts @@ -10,8 +10,9 @@ export interface Visualizer { * @param width width of the visualizer. * @param height height of the visualizer. * @param recordFor time to record the visualization for. + * @param recordSpeed speed to record the visualization at. */ - start(divId: string, width: number, height: number, recordFor: number): void; + start(divId: string, width: number, height: number, recordFor: number, recordSpeed: number): void; /** * Stop and clear the visualization. diff --git a/src/library/Visualizer.ts b/src/library/Visualizer.ts index a2450c4..d7ce5c9 100644 --- a/src/library/Visualizer.ts +++ b/src/library/Visualizer.ts @@ -1,25 +1,32 @@ /* eslint-disable import/extensions */ import GUI from 'lil-gui'; import Plotly, { type Data, type Layout } from 'plotly.js-dist'; +import Stats from 'stats.js'; import * as THREE from 'three'; import { OrbitControls, ViewHelper } from 'three/examples/jsm/Addons.js'; -import Stats from 'three/examples/jsm/libs/stats.module.js'; import { type Simulation } from '../Simulation'; import { type State } from '../State'; import { type Universe } from '../Universe'; import { type Visualizer } from '../Visualizer'; /** - * Clips a number to a minimum and maximum value. - * @param x number to clip. - * @param min minimum value. - * @param max maximum value. - * @returns clipped value. + * Extrapolates a value from a range to another range. + * @param val value to extrapolate. + * @param minR minimum value of the input range. + * @param maxR maximum value of the input range. + * @param low minimum value of the output range. + * @param high maximum value of the output range. + * @returns extrapolated value. */ -function clipMinMax(x: number, min: number, max: number): number { - if (x < min) return min; - if (x > max) return max; - return x; +function extrapolateRadius( + val: number, + minR: number, + maxR: number, + low: number, + high: number, +): number { + if (minR === maxR) return (low + high) / 2; + return low + ((val - minR) / (maxR - minR)) * (high - low); } /** @@ -96,6 +103,8 @@ export class RealTimeVisualizer implements Visualizer { simulation: Simulation; divId: string = ''; universeTrails: PlotlyUniverseTrail[] = []; + gui?: GUI; + stats?: Stats; /** * Constructor for RealTimeVisualizer @@ -139,6 +148,14 @@ export class RealTimeVisualizer implements Visualizer { config.showUniverse[u.label] = value; }); }); + this.gui = gui; + } + + /** + * Remove the controls from the visualization. + */ + private removeControls() { + this.gui?.destroy(); } /** @@ -161,11 +178,17 @@ export class RealTimeVisualizer implements Visualizer { // const height = element.clientHeight; let maxWidth = 0; let maxHeight = 0; + let maxRadius = 0; + let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { maxWidth = Math.max(maxWidth, Math.abs(b.position.x)); maxHeight = Math.max(maxHeight, Math.abs(b.position.y)); + minRadius = Math.min(minRadius, b.radius); + maxRadius = Math.max(maxRadius, b.radius); })); const scale = 0.5 * Math.min(height / maxHeight, width / maxWidth); + const minShowRadius = 0.01 * Math.min(height, width); + const maxShowRadius = 0.05 * Math.min(height, width); const layout: Partial = { paper_bgcolor: '#000000', @@ -191,13 +214,12 @@ export class RealTimeVisualizer implements Visualizer { this.addControls(element); } - let stats: Stats | undefined; if (this.simulation.showDebugInfo) { - stats = new Stats(); - stats.dom.style.position = 'absolute'; - stats.dom.style.bottom = '0px'; - stats.dom.style.removeProperty('top'); - element.appendChild(stats.dom); + this.stats = new Stats(); + this.stats.dom.style.position = 'absolute'; + this.stats.dom.style.bottom = '0px'; + this.stats.dom.style.removeProperty('top'); + element.appendChild(this.stats.dom); } const init_data: Data[] = this.simulation.universes.flatMap( @@ -214,8 +236,14 @@ export class RealTimeVisualizer implements Visualizer { mode: 'markers', marker: { color: uni.color, - sizemin: 6, - size: uni.currState.bodies.map((body) => Math.min(10, body.mass)), + sizemin: minShowRadius, + size: uni.currState.bodies.map((body) => extrapolateRadius( + body.radius, + minRadius, + maxRadius, + minShowRadius, + maxShowRadius, + )), }, }; if (this.simulation.getShowTrails()) { @@ -300,9 +328,15 @@ export class RealTimeVisualizer implements Visualizer { y: uni.currState.bodies.map((body) => body.position.y), hovertext: uni.currState.bodies.map((body) => body.label), marker: { - size: uni.currState.bodies.map((body) => Math.min(10, body.mass)), color: uni.color, - sizemin: 6, + sizemin: minShowRadius, + size: uni.currState.bodies.map((body) => extrapolateRadius( + body.radius, + minRadius, + maxRadius, + minShowRadius, + maxShowRadius, + )), }, mode: 'markers', }; @@ -320,8 +354,8 @@ export class RealTimeVisualizer implements Visualizer { ); Plotly.react(divId, new_data, layout); - if (this.simulation.showDebugInfo && stats) { - stats.update(); + if (this.simulation.showDebugInfo && this.stats) { + this.stats.update(); } this.animationId = requestAnimationFrame(paint); }; @@ -342,6 +376,8 @@ export class RealTimeVisualizer implements Visualizer { ut.popAllTrails(); }); this.universeTrails = []; + this.removeControls(); + this.stats?.dom.remove(); try { Plotly.purge(this.divId); } catch (_) { @@ -445,6 +481,8 @@ export class RealTimeVisualizer3D implements Visualizer { simulation: Simulation; scene?: THREE.Scene; universeTrails: ThreeUniverseTrail[] = []; + gui?: GUI; + stats?: Stats; /** * Constructor for RealTimeVisualizer3D. @@ -490,6 +528,14 @@ export class RealTimeVisualizer3D implements Visualizer { config.showUniverse[u.label] = value; }); }); + this.gui = gui; + } + + /** + * Remove the controls from the visualization. + */ + private removeControls() { + this.gui?.destroy(); } /** @@ -508,16 +554,19 @@ export class RealTimeVisualizer3D implements Visualizer { return; } element.style.position = 'relative'; - // const width = element.clientWidth; - // const height = element.clientHeight; - let maxWidth = 0; - let maxHeight = 0; + let maxLength = 0; + let maxRadius = 0; + let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { - maxWidth = Math.max(maxWidth, Math.abs(b.position.x)); - maxHeight = Math.max(maxHeight, Math.abs(b.position.y)); + for (let i = 0; i < 3; i++) { + maxLength = Math.max(maxLength, Math.abs(b.position.getComponent(i))); + } + minRadius = Math.min(minRadius, b.radius); + maxRadius = Math.max(maxRadius, b.radius); })); - const scale = 0.5 * Math.min(height / maxHeight, width / maxWidth); - + const scale = 0.5 * Math.min(height, width) / maxLength; + const minShowRadius = 0.015 * Math.min(height, width); + const maxShowRadius = 0.04 * Math.min(height, width); this.scene = new THREE.Scene(); const camera = new THREE.OrthographicCamera( @@ -535,13 +584,12 @@ export class RealTimeVisualizer3D implements Visualizer { renderer.autoClear = false; element.appendChild(renderer.domElement); - let stats: Stats | undefined; if (this.simulation.showDebugInfo) { - stats = new Stats(); - stats.dom.style.position = 'absolute'; - stats.dom.style.right = '0px'; - stats.dom.style.removeProperty('left'); - element.appendChild(stats.dom); + this.stats = new Stats(); + this.stats.dom.style.position = 'absolute'; + this.stats.dom.style.right = '0px'; + this.stats.dom.style.removeProperty('left'); + element.appendChild(this.stats.dom); } if (this.simulation.controller === 'ui') { @@ -576,7 +624,7 @@ export class RealTimeVisualizer3D implements Visualizer { const viewHelper = new ViewHelper(camera, renderer.domElement); // var m: Map = new Map(); - let arr: THREE.LineSegments[] = []; + let arr: THREE.Group[] = []; this.simulation.universes.forEach((u) => { this.universeTrails.push( @@ -589,24 +637,38 @@ export class RealTimeVisualizer3D implements Visualizer { ); u.currState.bodies.forEach((b, i) => { const sph = new THREE.SphereGeometry( - clipMinMax(Math.log2(b.mass) - 70, 10, 40), - 8, - 8, + extrapolateRadius(b.radius, minRadius, maxRadius, minShowRadius, maxShowRadius), + 12, + 12, ); - const curr = new THREE.WireframeGeometry(sph); - const line = new THREE.LineSegments( - curr, + const group = new THREE.Group(); + group.add(new THREE.LineSegments( + new THREE.WireframeGeometry(sph), new THREE.LineBasicMaterial({ color: new THREE.Color( typeof u.color === 'string' ? u.color : u.color[i], ), + transparent: true, + opacity: 0.4, }), - ); - this.scene!.add(line); - line.position.copy(b.position.clone() + )); + group.add(new THREE.Mesh( + sph, + new THREE.MeshBasicMaterial({ + color: new THREE.Color( + typeof u.color === 'string' ? u.color : u.color[i], + ), + transparent: true, + opacity: 0.5, + side: THREE.FrontSide, + }), + )); + + this.scene!.add(group); + group.position.copy(b.position.clone() .multiplyScalar(scale)); // m.set(u.label + " " + b.label, line); - arr.push(line); + arr.push(group); }); }); // arr[0].add(earthLabel) @@ -658,8 +720,8 @@ export class RealTimeVisualizer3D implements Visualizer { } lastPaint = timestampMs; - if (this.simulation.showDebugInfo && stats) { - stats.update(); + if (this.simulation.showDebugInfo && this.stats) { + this.stats.update(); } let ind = 0; @@ -670,7 +732,7 @@ export class RealTimeVisualizer3D implements Visualizer { arr[ind].position.copy(b.position.clone() .multiplyScalar(scale)); if (this.simulation.controls.showTrails) { - this.universeTrails[i].addTrail(arr[ind].position); + this.universeTrails[i].addTrail(arr[ind].position.clone()); } ind++; }); @@ -695,16 +757,15 @@ export class RealTimeVisualizer3D implements Visualizer { this.clear = () => { renderer.clear(); renderer.dispose(); - arr.forEach((a) => { - if (Array.isArray(a.material)) { - a.material.forEach((m) => { - m.dispose(); - }); - } else { - a.material.dispose(); - } - a.geometry.dispose(); + arr.forEach((g) => { + g.children.forEach((c) => { + // @ts-ignore + c.geometry.dispose(); + // @ts-ignore + c.material.dispose(); + }); }); + renderer.domElement.remove(); }; this.animationId = requestAnimationFrame(paint); @@ -729,6 +790,8 @@ export class RealTimeVisualizer3D implements Visualizer { ut.popAllTrails(); }); this.universeTrails = []; + this.removeControls(); + this.stats?.dom.remove(); } } @@ -741,6 +804,8 @@ export class RecordingVisualizer implements Visualizer { simulation: Simulation; divId: string = ''; universeTrails: PlotlyUniverseTrail[] = []; + gui?: GUI; + stats?: Stats; /** * Constructor for RealTimeVisualizer @@ -784,6 +849,14 @@ export class RecordingVisualizer implements Visualizer { config.showUniverse[u.label] = value; }); }); + this.gui = gui; + } + + /** + * Remove the controls from the visualization. + */ + removeControls(): void { + this.gui?.destroy(); } /** @@ -791,9 +864,10 @@ export class RecordingVisualizer implements Visualizer { * @param divId div id to render the visualization in. * @param width width of the visualization. * @param height height of the visualization. - * @param recordFor number of seconds to record for.. + * @param recordFor number of seconds to record for. + * @param recordSpeed speed to record the visualization at. */ - start(divId: string, width: number, height: number, recordFor: number): void { + start(divId: string, width: number, height: number, recordFor: number, recordSpeed: number): void { if (this.divId !== '') { console.error('Simulation already playing. Stop the current playtime before initiating a new one.'); return; @@ -803,15 +877,19 @@ export class RecordingVisualizer implements Visualizer { if (element === null) { return; } - // const width = element.clientWidth; - // const height = element.clientHeight; let maxWidth = 0; let maxHeight = 0; + let maxRadius = 0; + let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { maxWidth = Math.max(maxWidth, Math.abs(b.position.x)); maxHeight = Math.max(maxHeight, Math.abs(b.position.y)); + minRadius = Math.min(minRadius, b.radius); + maxRadius = Math.max(maxRadius, b.radius); })); const scale = 0.5 * Math.min(height / maxHeight, width / maxWidth); + const minShowRadius = 0.01 * Math.min(height, width); + const maxShowRadius = 0.05 * Math.min(height, width); const recordedFrames: State[][] = []; const totalFrames = this.simulation.maxFrameRate * recordFor; @@ -820,7 +898,7 @@ export class RecordingVisualizer implements Visualizer { recordedFrames.push([u.currState.clone()]); }); for (let i = 0; i < totalFrames; i++) { - this.simulation.simulateStep(1 / this.simulation.maxFrameRate); + this.simulation.simulateStep(recordSpeed / this.simulation.maxFrameRate); this.simulation.universes.forEach((u, j) => { recordedFrames[j].push(u.currState.clone()); }); @@ -850,13 +928,13 @@ export class RecordingVisualizer implements Visualizer { this.addControls(element); } - let stats: Stats | undefined; + if (this.simulation.showDebugInfo) { - stats = new Stats(); - stats.dom.style.position = 'absolute'; - stats.dom.style.bottom = '0px'; - stats.dom.style.removeProperty('top'); - element.appendChild(stats.dom); + this.stats = new Stats(); + this.stats.dom.style.position = 'absolute'; + this.stats.dom.style.bottom = '0px'; + this.stats.dom.style.removeProperty('top'); + element.appendChild(this.stats.dom); } const init_data: Data[] = this.simulation.universes.flatMap( @@ -873,8 +951,14 @@ export class RecordingVisualizer implements Visualizer { mode: 'markers', marker: { color: uni.color, - sizemin: 6, - size: uni.currState.bodies.map((body) => Math.min(10, body.mass)), + sizemin: minShowRadius, + size: uni.currState.bodies.map((body) => extrapolateRadius( + body.radius, + minRadius, + maxRadius, + minShowRadius, + maxShowRadius, + )), }, }; if (this.simulation.getShowTrails()) { @@ -935,9 +1019,15 @@ export class RecordingVisualizer implements Visualizer { y: currState.bodies.map((body) => body.position.y), hovertext: currState.bodies.map((body) => body.label), marker: { - size: currState.bodies.map((body) => Math.min(10, body.mass)), color: uni.color, - sizemin: 6, + sizemin: minShowRadius, + size: uni.currState.bodies.map((body) => extrapolateRadius( + body.radius, + minRadius, + maxRadius, + minShowRadius, + maxShowRadius, + )), }, mode: 'markers', }; @@ -955,8 +1045,8 @@ export class RecordingVisualizer implements Visualizer { ); Plotly.react(divId, new_data, layout); - if (this.simulation.showDebugInfo && stats) { - stats.update(); + if (this.simulation.showDebugInfo && this.stats) { + this.stats.update(); } playInd = Math.round(playInd + this.simulation.controls.speed); @@ -993,6 +1083,8 @@ export class RecordingVisualizer implements Visualizer { Plotly.purge(this.divId); } catch (_) { } + this.removeControls(); + this.stats?.dom.remove(); } } @@ -1009,6 +1101,8 @@ export class RecordingVisualizer3D implements Visualizer { simulation: Simulation; scene?: THREE.Scene; universeTrails: ThreeUniverseTrail[] = []; + gui?: GUI; + stats?: Stats; /** * Constructor for RealTimeVisualizer3D. @@ -1054,6 +1148,14 @@ export class RecordingVisualizer3D implements Visualizer { config.showUniverse[u.label] = value; }); }); + this.gui = gui; + } + + /** + * Remove the controls from the visualization. + */ + private removeControls() { + this.gui?.destroy(); } /** @@ -1062,8 +1164,9 @@ export class RecordingVisualizer3D implements Visualizer { * @param width width of the visualization. * @param height height of the visualization. * @param recordFor number of seconds to record for. + * @param recordSpeed speed to record the simulation at. */ - start(divId: string, width: number, height: number, recordFor: number): void { + start(divId: string, width: number, height: number, recordFor: number, recordSpeed: number): void { if (this.scene !== undefined) { console.error('Simulation already playing. Stop the current playtime before initiating a new one.'); return; @@ -1072,16 +1175,19 @@ export class RecordingVisualizer3D implements Visualizer { if (element === null) { return; } - // const width = element.clientWidth; - // const height = element.clientHeight; - let maxWidth = 0; - let maxHeight = 0; + let maxLength = 0; + let maxRadius = 0; + let minRadius = Infinity; this.simulation.universes.forEach((u) => u.currState.bodies.forEach((b) => { - maxWidth = Math.max(maxWidth, Math.abs(b.position.x)); - maxHeight = Math.max(maxHeight, Math.abs(b.position.y)); + for (let i = 0; i < 3; i++) { + maxLength = Math.max(maxLength, Math.abs(b.position.getComponent(i))); + } + minRadius = Math.min(minRadius, b.radius); + maxRadius = Math.max(maxRadius, b.radius); })); - const scale = 0.5 * Math.min(height / maxHeight, width / maxWidth); - + const scale = 0.5 * Math.min(height, width) / maxLength; + const minShowRadius = 0.015 * Math.min(height, width); + const maxShowRadius = 0.04 * Math.min(height, width); this.scene = new THREE.Scene(); const camera = new THREE.OrthographicCamera( @@ -1099,19 +1205,6 @@ export class RecordingVisualizer3D implements Visualizer { renderer.autoClear = false; element.appendChild(renderer.domElement); - let stats: Stats | undefined; - if (this.simulation.showDebugInfo) { - stats = new Stats(); - stats.dom.style.position = 'absolute'; - stats.dom.style.right = '0px'; - stats.dom.style.removeProperty('left'); - element.appendChild(stats.dom); - } - - if (this.simulation.controller === 'ui') { - this.addControls(element); - } - // const earthDiv = document.createElement('div'); // earthDiv.className = 'label'; // earthDiv.textContent = 'Earthhgkjfdghkjfgh'; @@ -1140,7 +1233,7 @@ export class RecordingVisualizer3D implements Visualizer { const viewHelper = new ViewHelper(camera, renderer.domElement); // var m: Map = new Map(); - let arr: THREE.LineSegments[] = []; + let arr: THREE.Group[] = []; this.simulation.universes.forEach((u) => { this.universeTrails.push( @@ -1153,28 +1246,50 @@ export class RecordingVisualizer3D implements Visualizer { ); u.currState.bodies.forEach((b, i) => { const sph = new THREE.SphereGeometry( - clipMinMax(Math.log2(b.mass) - 70, 10, 40), - 8, - 8, + extrapolateRadius(b.radius, minRadius, maxRadius, minShowRadius, maxShowRadius), + 12, + 12, ); - const curr = new THREE.WireframeGeometry(sph); - const line = new THREE.LineSegments( - curr, + const group = new THREE.Group(); + group.add(new THREE.LineSegments( + new THREE.WireframeGeometry(sph), new THREE.LineBasicMaterial({ color: new THREE.Color( typeof u.color === 'string' ? u.color : u.color[i], ), + transparent: true, + opacity: 0.4, }), - ); - this.scene!.add(line); - line.position.copy(b.position.clone() + )); + group.add(new THREE.Mesh( + sph, + new THREE.MeshBasicMaterial({ + color: new THREE.Color( + typeof u.color === 'string' ? u.color : u.color[i], + ), + transparent: true, + opacity: 0.5, + side: THREE.FrontSide, + }), + )); + + this.scene!.add(group); + group.position.copy(b.position.clone() .multiplyScalar(scale)); // m.set(u.label + " " + b.label, line); - arr.push(line); + arr.push(group); }); }); // arr[0].add(earthLabel) + if (this.simulation.showDebugInfo) { + this.stats = new Stats(); + this.stats.dom.style.position = 'absolute'; + this.stats.dom.style.right = '0px'; + this.stats.dom.style.removeProperty('left'); + element.appendChild(this.stats.dom); + } + const recordedFrames: State[][] = []; const totalFrames = this.simulation.maxFrameRate * recordFor; let playInd = 1; @@ -1182,12 +1297,16 @@ export class RecordingVisualizer3D implements Visualizer { recordedFrames.push([u.currState.clone()]); }); for (let i = 0; i < totalFrames; i++) { - this.simulation.simulateStep(1 / this.simulation.maxFrameRate); + this.simulation.simulateStep(recordSpeed / this.simulation.maxFrameRate); this.simulation.universes.forEach((u, j) => { recordedFrames[j].push(u.currState.clone()); }); } + if (this.simulation.controller === 'ui') { + this.addControls(element); + } + /** * Paint the visualization * @param timestampMs current timestamp in milliseconds, provided by requestAnimationFrame @@ -1215,7 +1334,7 @@ export class RecordingVisualizer3D implements Visualizer { arr[ind].position.copy(b.position.clone() .multiplyScalar(scale)); if (this.simulation.controls.showTrails) { - this.universeTrails[i].addTrail(arr[ind].position); + this.universeTrails[i].addTrail(arr[ind].position.clone()); } ind++; }); @@ -1227,8 +1346,8 @@ export class RecordingVisualizer3D implements Visualizer { } }); - if (this.simulation.showDebugInfo && stats) { - stats.update(); + if (this.simulation.showDebugInfo && this.stats) { + this.stats.update(); } playInd = Math.round(playInd + this.simulation.controls.speed); @@ -1260,15 +1379,13 @@ export class RecordingVisualizer3D implements Visualizer { this.clear = () => { renderer.clear(); renderer.dispose(); - arr.forEach((a) => { - if (Array.isArray(a.material)) { - a.material.forEach((m) => { - m.dispose(); - }); - } else { - a.material.dispose(); - } - a.geometry.dispose(); + arr.forEach((g) => { + g.children.forEach((c) => { + // @ts-ignore + c.geometry.dispose(); + // @ts-ignore + c.material.dispose(); + }); }); }; this.animationId = requestAnimationFrame(paint); @@ -1293,5 +1410,7 @@ export class RecordingVisualizer3D implements Visualizer { ut.popAllTrails(); }); this.universeTrails = []; + this.removeControls(); + this.stats?.dom.remove(); } } diff --git a/yarn.lock b/yarn.lock index f6395c4..b39c434 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6802,6 +6802,11 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz#887da8aa73218e51a1d917502d79863161a93f9c" integrity sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg== +stats.js@^0.17.0: + version "0.17.0" + resolved "https://registry.yarnpkg.com/stats.js/-/stats.js-0.17.0.tgz#b1c3dc46d94498b578b7fd3985b81ace7131cc7d" + integrity sha512-hNKz8phvYLPEcRkeG1rsGmV5ChMjKDAWU7/OJJdDErPBNChQXxCo3WZurGpnWc6gZhAzEPFad1aVgyOANH1sMw== + statuses@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63"